Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ modf(3C) — HP-UX ANSI C A.09.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

frexp(3C)

NAME

frexp(), ldexp(), modf() − split floating-point into mantissa and exponent

SYNOPSIS

DESCRIPTION

Every non-zero number can be written uniquely as x∗ 2n, where the “mantissa” (fraction) x is in the range 0.5 ≤ |x| < 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. If value is zero, both results returned by frexp are zero. 

ldexp() returns the quantity value∗ 2exp.

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 (according to the sign of value), and errno is set to ERANGE . 

If ldexp() would cause underflow, zero is returned and errno is set to ERANGE. 

STANDARDS CONFORMANCE

frexp(): AES, SVID2, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C

ldexp(): AES, SVID2, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C

modf(): AES, SVID2, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

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