Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/

| HDF5 Last Updated on 2026-03-23 The HDF5 Field Guide

Loading...
Searching...
No Matches
Alternative Floating Point Datatypes
Datatypes (H5T) » Predefined Datatypes

## Detailed Description

Alternative (non-IEEE) floating point types.

Predefined Alternative Floating Point Datatypes
Datatype | Description
--- | ---
H5T_FLOAT_BFLOAT16BE | 16-bit big-endian bfloat16 floating point
H5T_FLOAT_BFLOAT16LE | 16-bit little-endian bfloat16 floating point
H5T_FLOAT_F8E4M3 | 8-bit FP8 E4M3 (4 exponent bits, 3 mantissa bits) floating point
H5T_FLOAT_F8E5M2 | 8-bit FP8 E5M2 (5 exponent bits, 2 mantissa bits) floating point
H5T_FLOAT_F6E2M3 | 6-bit FP6 E2M3 (2 exponent bits, 3 mantissa bits) floating point
H5T_FLOAT_F6E3M2 | 6-bit FP6 E3M2 (3 exponent bits, 2 mantissa bits) floating point
H5T_FLOAT_F4E2M1 | 4-bit FP4 E2M1 (2 exponent bits, 1 mantissa bit) floating point

## Macros
#define | H5T_FLOAT_BFLOAT16BE (H5OPEN H5T_FLOAT_BFLOAT16BE_g)
#define | H5T_FLOAT_BFLOAT16LE (H5OPEN H5T_FLOAT_BFLOAT16LE_g)
#define | H5T_FLOAT_F4E2M1 (H5OPEN H5T_FLOAT_F4E2M1_g)
#define | H5T_FLOAT_F6E2M3 (H5OPEN H5T_FLOAT_F6E2M3_g)
#define | H5T_FLOAT_F6E3M2 (H5OPEN H5T_FLOAT_F6E3M2_g)
#define | H5T_FLOAT_F8E4M3 (H5OPEN H5T_FLOAT_F8E4M3_g)
#define | H5T_FLOAT_F8E5M2 (H5OPEN H5T_FLOAT_F8E5M2_g)

## Macro Definition Documentation

## ◆ H5T_FLOAT_BFLOAT16BE

#define H5T_FLOAT_BFLOAT16BE (H5OPEN H5T_FLOAT_BFLOAT16BE_g)

16-bit big-endian bfloat16 floating-point numbers

## ◆ H5T_FLOAT_BFLOAT16LE

#define H5T_FLOAT_BFLOAT16LE (H5OPEN H5T_FLOAT_BFLOAT16LE_g)

16-bit little-endian bfloat16 floating-point numbers

## ◆ H5T_FLOAT_F4E2M1

#define H5T_FLOAT_F4E2M1 (H5OPEN H5T_FLOAT_F4E2M1_g)

4-bit FP4 E2M1 (2 exponent bits, 1 mantissa bit) floating-point numbers

Attention
  Implicit datatype conversion should currently be avoided when using this datatype for I/O operations. Incomplete handling of non-IEEE floating-point formats in HDF5 can cause certain FP4 E2M1 values to be improperly converted to Infinities or NaN values. If possible, an application should perform I/O with this datatype using an in-memory type that matches the FP4 E2M1 format and perform explicit data conversion outside of HDF5, if necessary. Otherwise, read/written values should be verified to be correct.

## ◆ H5T_FLOAT_F6E2M3

#define H5T_FLOAT_F6E2M3 (H5OPEN H5T_FLOAT_F6E2M3_g)

6-bit FP6 E2M3 (2 exponent bits, 3 mantissa bits) floating-point numbers

Attention
  Implicit datatype conversion should currently be avoided when using this datatype for I/O operations. Incomplete handling of non-IEEE floating-point formats in HDF5 can cause certain FP6 E2M3 values to be improperly converted to Infinities or NaN values. If possible, an application should perform I/O with this datatype using an in-memory type that matches the FP6 E2M3 format and perform explicit data conversion outside of HDF5, if necessary. Otherwise, read/written values should be verified to be correct.

## ◆ H5T_FLOAT_F6E3M2

#define H5T_FLOAT_F6E3M2 (H5OPEN H5T_FLOAT_F6E3M2_g)

6-bit FP6 E3M2 (3 exponent bits, 2 mantissa bits) floating-point numbers

Attention
  Implicit datatype conversion should currently be avoided when using this datatype for I/O operations. Incomplete handling of non-IEEE floating-point formats in HDF5 can cause certain FP6 E3M2 values to be improperly converted to Infinities or NaN values. If possible, an application should perform I/O with this datatype using an in-memory type that matches the FP6 E3M2 format and perform explicit data conversion outside of HDF5, if necessary. Otherwise, read/written values should be verified to be correct.

## ◆ H5T_FLOAT_F8E4M3

#define H5T_FLOAT_F8E4M3 (H5OPEN H5T_FLOAT_F8E4M3_g)

8-bit FP8 E4M3 (4 exponent bits, 3 mantissa bits) floating-point numbers

Attention
  Implicit datatype conversion should currently be avoided when using this datatype for I/O operations. Incomplete handling of non-IEEE floating-point formats in HDF5 can cause certain FP8 E4M3 values to be improperly converted to Infinities or NaN values. If possible, an application should perform I/O with this datatype using an in-memory type that matches the FP8 E4M3 format and perform explicit data conversion outside of HDF5, if necessary. Otherwise, read/written values should be verified to be correct.

## ◆ H5T_FLOAT_F8E5M2

#define H5T_FLOAT_F8E5M2 (H5OPEN H5T_FLOAT_F8E5M2_g)

8-bit FP8 E5M2 (5 exponent bits, 2 mantissa bits) floating-point numbers

Attention
  Implicit datatype conversion should currently be avoided when using this datatype for I/O operations. Incomplete handling of non-IEEE floating-point formats in HDF5 can cause certain FP8 E5M2 values to be improperly converted to Infinities or NaN values. If possible, an application should perform I/O with this datatype using an in-memory type that matches the FP8 E5M2 format and perform explicit data conversion outside of HDF5, if necessary. Otherwise, read/written values should be verified to be correct.