Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



  frexp(3)                            CLIX                            frexp(3)



  NAME

    frexp, ldexp, modf - Manipulates parts of floating-point numbers

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    double frexp(
      double value ,
      int *eptr );

    double ldexp(
      double value ,
      int exp );

    double modf(
      double value ,
      double *iptr );

  PARAMETERS

    value   Specifies a double integer.

    eptr    Points to an exponent (see below).

    exp     Specifies the exponent of an integer (see below).

    iptr    Points to the integral part of value.

  DESCRIPTION

    Every nonzero number can be written uniquely as x * 2 n, where the
    ``mantissa'' (fraction) x is in the range 0.5 < x < 1.0, and the
    ``exponent'' n is an integer.  The frexp() function returns the mantissa
    of a double value, and stores the exponent indirectly in the location
    pointed to by eptr.  If value is 0, both results returned by frexp() are
    0.

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

    The modf() function returns the signed fractional part of value and stores
    the integral part indirectly in the location pointed to by iptr.

  RETURN VALUES

    If the ldexp() function causes overflow, +HUGE (defined in <math.h>) is
    returned (according to the sign of value) and errno is set.




  2/94 - Intergraph Corporation                                              1






  frexp(3)                            CLIX                            frexp(3)



    If ldexp() causes underflow, 0 is returned and errno is set.

  ERRORS

    The following errors can occur:

    [ERANGE]   The ldexp() function causes an overflow or underflow.















































  2                                              Intergraph Corporation - 2/94




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