Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ frexp(S) — Xenix 2.3.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     FREXP(S)                 XENIX System V                  FREXP(S)



     Name
          frexp, ldexp, modf - Splits floating-point number into a
          mantissa and an exponent.

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

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

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

     Description
          Every non-zero number can be written uniquely as x * 211
          wher 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 exptr.  If value is
          0, both results returned by frexp are 0.

          ldexp returns the quantity value*(2**exp).

          modf returns the positive fractional part of value and
          stores the integer part indirectly through 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.

     Notes
          These routines must be linked by using the -lm linker
          option.
















     Page 1                                           (printed 8/7/87)



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