-

Functions HI-TECH C FREXP

From HI-TECH C for CP/M Fan WIKI(EN)
Revision as of 19:58, 31 July 2017 by Kumokosi (talk | contribs) (Created page with "<strong>FREXP, LDEXP<strong> ==SYNOPSIS== #include <math.h> double frexp(double f, int * p) double ldexp(double f, int i) ==DESCRIPTION== <strong>Frexp</stron...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

FREXP, LDEXP

SYNOPSIS

#include  <math.h>

double    frexp(double f, int * p)

double    ldexp(double f, int i)


DESCRIPTION

Frexp() breaks a floating point number into a normalized fraction and an integral power of 2. The integer is stored into the int object pointed to by p. Its return value x is in the interval [0.5, 1.0) or zero, and f equals x times 2 raised to the power stored in

  • p. If f is zero, both parts of the result are zero.

Ldexp() performs the reverse operation; the integer i is added to the exponent of the floating point f and the resultant value returned.