Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ldexp(3M) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

frexp(3M)

isinf(3M)

isnan(3M)

modf(3M)

scalb(3M)

values(5)

ldexp(3M)

NAME

ldexp() − load exponent of a floating-point number

SYNOPSIS

#include <math.h>

double ldexp(double x, int exp);

DESCRIPTION

The ldexp() function computes the quantity x∗ 2exp.

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

RETURN VALUE

Upon successful completion, the ldexp() function returns a double representing the value x multiplied by 2 raised to the power exp.

If x is NaN, ldexp() returns NaN. 

If the correct value would overflow, ldexp() returns ±HUGE_VAL (according to the sign of x) and sets errno to [ERANGE]. 

If the correct value after rounding would be smaller in magnitude than MINDOUBLE, ldexp() returns zero and sets errno to [ERANGE]. 

ERRORS

If ldexp() fails, errno is set to one of the following values. 

[ERANGE] The correct value would overflow. 

[ERANGE] The correct value after rounding would be smaller in magnitude than MINDOUBLE. 

SEE ALSO

frexp(3M), isinf(3M), isnan(3M), modf(3M), scalb(3M), values(5). 

STANDARDS CONFORMANCE

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

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

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