cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float frexpf (float x, /*@out@*/ int *exp); extern double frexp (double x, /*@out@*/ int *exp); extern long double frexpl (long double x, /*@out@*/ int *exp); extern __float80 frexpw (__float80 x, /*@out@*/ int *exp); extern __float128 frexpq (__float128 x, /*@out@*/ int *exp); extern long_long_double frexpll (long_long_double x, /*@out@*/ int *exp); extern decimal_float frexpdf (decimal_float x, /*@out@*/ int *exp); extern decimal_double frexpd (decimal_double x, /*@out@*/ int *exp); extern decimal_long_double frexpdl (decimal_long_double x, /*@out@*/ int *exp); extern decimal_long_long_double frexpdll (decimal_long_long_double x, /*@out@*/ int *exp);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
For frexpdf(), frexpd(), frexpdl(), and frexpdll(), split the argument into the product of a fraction of magnitude in [1/10, 1) (or 0 if the argument is zero) with the same sign as the argument, and an integral power of ten.
This operation is always exact, and the number can be recovered with a suitable member of the companion ldexp(), ldexpo(), or ldexph() function families.
No special variant of the frexp() family is strictly needed for octal or hexadecimal bases, since powers of those bases are also powers of two, but the companion frexph() and frexpo() function families are available for programmer convenience.