FrExp (open)
Splits a value into a mantissa and an exponent
Syntax
LOADLIB "wh::float.whlib";
RECORD FUNCTION FrExp(FLOAT value)Parameters
FLOAT valueThe FLOAT value to take the mantissa and exponent from
Return value
RECORDA RECORD containing the mantissa and exponent of @italic value
exponentAn INTEGER exponent
mantissaA FLOAT fraction in the range [.5,1>
Description
This function calculates and returns a mantissa and an exponent in a RECORD, so that value = mantissa * pow(2, exponent).
Examples
// frexp_rec.mantissa = .75, frexp_rec.exponent = 2
RECORD frexp_rec := FrExp(3);