#include <math.h> double frexp(double y, int *j);
frexp
separates a floating-point argument y
into a fraction and an
integer exponent of 2.
frexp
returns a real number that is equal to or greater than .5 and less
than 1.0. The exponent of 2 is stored in the location addressed by j
.
frexp
is useful in situations that require repeated multiplication by 2.
If the next multiplication causes an overflow or underflow, you can use
frexp
to separate the mantissa from the exponent. This gives you complete
control over the exponent and mantissa so you can operate on them separately
without any loss of precision.
ldexp
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.