float4_e1m2

The APIs described in this section are reserved and may be changed or deprecated in the future. You are not advised to use these APIs.

Table 1 API list

API Definition

Description

FromBits()

Returns the tag used to construct a Float4E1M2 object from a bit pattern.

Float4E1M2()

Default constructor of struct Float4E1M2, initialized to zero.

Float4E1M2(uint8_t bits, FromBitsTag)

Constructor of struct Float4E1M2, which constructs an object from the original bit pattern.

Float4E1M2(float v)

Constructor of struct Float4E1M2, which constructs an object from a float value.

operator float()

Converts Float4E1M2 to float.

operator double()

Converts Float4E1M2 to double.

Epsilon()

Returns the machine epsilon value of the Float4E1M2 data type.

Highest()

Returns the maximum finite value of the Float4E1M2 data type.

Lowest()

Returns the minimum finite value of the Float4E1M2 data type.

MinPositiveNormal()

Returns the minimum normalized number of the Float4E1M2 data type.

IsZero()

Checks whether the current Float4E1M2 value is zero.

IsNaN()

Checks whether the current Float4E1M2 value is NaN.

IsInf()

Checks whether the current Float4E1M2 value is infinite.

isinf(const Float4E1M2 &a)

Checks whether the given Float4E1M2 value a is infinite.

isnan(const Float4E1M2 &a)

Checks whether the given Float4E1M2 value a is NaN.

isfinite(const Float4E1M2 &a)

Checks whether the given Float4E1M2 value a is finite.

min()

Returns the minimum normalized number of the Float4E1M2 data type.

lowest()

Returns the minimum finite value of the Float4E1M2 data type.

max()

Returns the maximum finite value of the Float4E1M2 data type.

epsilon()

Returns the machine epsilon value of the Float4E1M2 data type.

round_error()

Returns the maximum rounding error of the Float4E1M2 data type.

infinity()

Returns the maximum value of the Float4E1M2 data type (if infinity is represented, the maximum finite value is returned).

quiet_NaN()

Returns the quiet NaN value of the Float4E1M2 data type (if no NaN is represented, zero is returned).

signaling_NaN()

Returns the signaling NaN value of the Float4E1M2 data type.

denorm_min()

Returns the minimum positive denormalized value of the Float4E1M2 data type.