FREXPH 3CW "05 January 2007" "mathcw-1.00"

Table of contents


NAME

frexphf, frexph, frexphl, frexphw, frexphq, frexphll, frexphdf, frexphd, frexphdl, frexphdll - extract fraction and power-of-sixteen from a floating-point number

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern float frexphf (float x, /*@out@*/ int * y);

extern double frexph (double x, /*@out@*/ int * y);

extern long double frexphl (long double x, /*@out@*/ int * y);

extern double frexphw (double x, /*@out@*/ int * y);

extern double frexphq (double x, /*@out@*/ int * y);

extern long_long_double frexphll (long_long_double x, /*@out@*/ int * y);

extern decimal_float frexphdf (decimal_float x, /*@out@*/ int * y);

extern decimal_double frexphd (decimal_double x, /*@out@*/ int * y);

extern decimal_long_double frexphdl (decimal_long_double x, /*@out@*/ int * y);

extern decimal_long_long_double frexphdll (decimal_long_long_double x, /*@out@*/ int * y);

NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.


DESCRIPTION

Split the argument into the product of a fraction of magnitude in [1/16,1) (or 0 if the argument is zero) with the same sign as the argument, and an integral power of sixteen. This operation is always exact for bases 2, 4, and 16, and the number can be recovered with the companion function ldexph(x,n).

RETURN VALUES

Return the fraction as the function value, and if the second argument is non-NULL, store the power-of-sixteen in the object that it points to.

ERRORS

If the first argument is either a NaN or Infinity, the returned value is that argument, and the power-of-sixteen, if set, is zero.

SEE ALSO

frexp(3CW), frexpo(3CW), ldexp(3CW), ldexph(3CW), ldexpo(3CW), logb(3CW).