MathLib.frexp splits a number into two components: a normalized fraction that ranges from .5 to 1, and an exponent that represents the power of 2. The fraction is the return value, and the exponent is the value returned to the second argument.
eglx.lang
static function frexp(value float in, exponent int out) returns(float);
The returned fraction ranges from .5 to 1.
After the following code runs, the first argument equals the returned value multiplied by 2 to the power of the second argument:
// myInput = result * 2**myExponent result = mathLib.frexp(myInput,myExponent);
In the case of Java™, EGL uses methods in the Java StrictMath class that are equivalent to the EGL functions. This usage ensures that the runtime behavior is the same for every Java Virtual Machine.
Target | Issue |
---|---|
Java | No issues. |
JavaScript | No issues. |