Skip to content

float_set

Floating Point Numbers (XFL)
  • Compute an XFL (xls17) floating point from the provided exponent and mantissa
  • Return that XFL as an int64_t
int64_t float_set (
int32_t exponent,
int64_t mantissa
);
int64_t small_amount =
float_set(-81, 1);
NameTypeDescription
exponentint32_tAn exponent in the range -96 to 80
mantissaint64_tA mantissa. If negative then the sign of the float is negative.
TypeDescription
int64_t

The XFL (xls17) enclosing number

If negative, an error:
INVALID_FLOAT
- The adjustment of the mantissa to 16 digits produced an under or overflow.