Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ modf(3c) — 4D1 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     FREXP(3C)                                               FREXP(3C)



     NAME
          frexp, ldexp, modf - manipulate parts of floating-point
          numbers

     SYNOPSIS
          double frexp (value, eptr)
          double value;
          int *eptr;

          double ldexp (value, exp)
          double value;
          int exp;

          double modf (value, iptr)
          double value, *iptr;

     DESCRIPTION
n
Every non-zero number can be written uniquely as x* 2 ,
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.
exp
Ldexp returns the quantity value* 2 .
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 (defined in <math.h> ) 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. If value is Nan or INF, frexp ( ) or modf ( ) raise a floating-point exception. ORIGIN AT&T V.3 Page 1 (last mod. 8/20/87)

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