Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

isinf(3)

FREXP(3)  —  C LIBRARY FUNCTIONS

NAME

frexp, ldexp, modf − floating point analysis and synthesis

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

Frexp returns the significand of a double value as a double quantity, x, of magnitude less than 1 and stores an integer n, indirectly through eptr, such that value = x∗2n. 

The results are not defined when value is an IEEE infinity or NaN. 

ldexp returns the quantity:

value∗2exp. 

modf returns the positive fractional part of value and stores the integer part indirectly through iptr.  Thus the argument value and the returned values modf and ∗iptr would satisfy, in the absence of rounding error,

(∗iptr + modf) == value

and

0 <= modf < abs(value). 

The results are not defined when value is an IEEE infinity or NaN. 

Note that the definition of modf varies among Unix implementations; avoid modf in portable code. 

SEE ALSO

isinf(3)

Sun Release 3.2  —  Last change: 8 August 1985

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026