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

Table of contents


NAME

frexpof, frexpo, frexpol, frexpow, frexpoq, frexpoll, frexpodf, frexpod, frexpodl, frexpodll - extract fraction and power-of-eight from a floating-point number

SYNOPSIS

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

#include <mathcw.h>

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

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

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

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

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

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

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

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

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

extern decimal_long_long_double frexpodll (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/8,1) (or 0 if the argument is zero) with the same sign as the argument, and an integral power of eight. This operation is always exact for bases 2, 4, and 8, and the number can be recovered with the companion function ldexpo(x,n).

RETURN VALUES

Return the fraction as the function value, and if the second argument is non-NULL, store the power-of-eight 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-eight, if set, is zero.

SEE ALSO

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