Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference (Volume 6 of 9): Section 3: Library Functions (A-M) > f

frexp(3M)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

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, make sure your program includes <math.h>, and 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.

STANDARDS CONFORMANCE

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

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2000 Hewlett-Packard Development Company, L.P.