Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ modf(3M) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

frexp(3M)

isnan(3M)

ldexp(3M)

scalb(3M)

values(5)

modf(3M)

NAME

modf() − decompose floating-point number

SYNOPSIS

#include <math.h>

double modf(double x, double *iptr);

DESCRIPTION

The modf() function breaks the argument x into integral and fractional parts, each of which has the same sign as the argument.  It stores the integral part as a double in the object pointed to by iptr.

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 modf() function returns the signed fractional part of x.

If x is NaN, modf() returns NaN. 

If the correct value after rounding would be smaller in magnitude than MINDOUBLE, modf() returns zero. 

ERRORS

No errors are defined. 

SEE ALSO

frexp(3M), isnan(3M), ldexp(3M), scalb(3M), values(5). 

STANDARDS CONFORMANCE

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

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

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