Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ frexp(3M) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

isnan(3M)

ldexp(3M)

modf(3M)

scalb(3M)

frexp(3M)

NAME

frexp() − extract mantissa and exponent from double-precision number

SYNOPSIS

#include <math.h>

double frexp(double num, int *exp);

DESCRIPTION

The frexp() function breaks a floating-point number into a normalized fraction and an integral power of 2.  It stores the integer exponent in the int object pointed to by exp.

To use this function, link in the math library by specifying −lm on the compiler or linker command line. 

RETURN VALUE

The frexp() function returns the value x, such that x is a double with magnitude in the interval [0.5, 1] or zero, and num equals x times 2 raised to the power *exp.

If num is zero, both parts of the result are zero. 

If num is NaN, frexp() returns NaN, and the value of *exp is unspecified. 

If num is ±INFINITY, frexp() returns num, and the value of *exp is unspecified. 

ERRORS

No errors are defined. 

SEE ALSO

isnan(3M), ldexp(3M), modf(3M), scalb(3M). 

STANDARDS CONFORMANCE

frexp(): SVID3, XPG4.2, ANSI C

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

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