AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox

01.01.2013 Views

FREXP ( 3C ) FREXP ( 3C ) NAME frexp, ldexp, modf - manipulate parts of floating-point numbers SYNOPSIS double frexp (value, eptr) double value; int *eptr; double ldexp (value, exp) double value; int exp; double modf (value, iptr) double value, •iptr; DESCRIPTION Every non-zero number can be written uniquely as x * 2 n , where the "mantissa" (fraction) x is in the range 0.5 :::; I x I < 1.0, and the "exponent" n is an integer. Frexp returns the mantissa of a double value, and stores the exponent indirectly in the location pointed to by eptr . Ldexp returns the quantity value * 2 e:rp . Modf returns the signed fractional part of value and stores the integral part indirectly in the location pointed to by iptr. DIAGNOSTICS If ldexp would cause overflow, HUGE is returned and errno is set to ERANGE. - 1 -

FREXP ( 3C ) FREXP ( 3C )<br />

NAME<br />

frexp, ldexp, modf - manipulate parts of floating-point numbers<br />

SYNOPSIS<br />

double frexp (value, eptr)<br />

double value;<br />

int *eptr;<br />

double ldexp (value, exp)<br />

double value;<br />

int exp;<br />

double modf (value, iptr)<br />

double value, •iptr;<br />

DESCRIPTION<br />

Every non-zero number can be written uniquely as x * 2 n , where<br />

the "mantissa" (fraction) x is in the range 0.5 :::; I x I < 1.0, and<br />

the "exponent" n is an integer. Frexp returns the mantissa of a<br />

double value, and stores the exponent indirectly in the location<br />

pointed to by eptr .<br />

Ldexp returns the quantity value * 2 e:rp .<br />

Modf returns the signed fractional part of value and stores the<br />

integral part indirectly in the location pointed to by iptr.<br />

DIAGNOSTICS<br />

If ldexp would cause overflow, HUGE is returned and errno is set<br />

to ERANGE.<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!