CustomFloatFlags

Format flags for CustomFloat.

Values

ValueMeaning
signed1

Adds a sign bit to allow for signed numbers.

storeNormalized2

Store values in normalized form by default. The actual precision of the significand is extended by 1 bit by assuming an implicit leading bit of 1 instead of 0. i.e. 1.nnnn instead of 0.nnnn. True for all IEE754 types

allowDenorm4

Stores the significand in IEEE754 denormalized form when the exponent is 0. Required to express the value 0.

infinity8

Allows the storage of IEEE754 _infinity values.

nan16

Allows the storage of IEEE754 Not a Number values.

probability32

If set, select an exponent bias such that max_exp = 1. i.e. so that the maximum value is >= 1.0 and < 2.0. Ignored if the exponent bias is manually specified.

negativeUnsigned64

If set, unsigned custom floats are assumed to be negative.

allowDenormZeroOnly128 | allowDenorm | storeNormalized

If set, 0 is the only allowed IEEE754 denormalized number. Requires allowDenorm and storeNormalized.

ieeesigned | storeNormalized | allowDenorm | infinity | nan

Include _all of the IEEE754 options.

none0

Include none of the above options.

Meta