VMS Help  —  CRTL  exp2
    Returns the value of 2 raised to the power of the argument.

    This function is OpenVMS Alpha and Integrity servers only.

    Format

      #include  <math.h>

      double exp2  (double x);

      float exp2f  (float x);

      long double exp2l  (long double x); )

1  –  Argument

 x

    A real value.

2  –  Description

    The exp2 functions compute the base-2 exponential of x.

    If an overflow occurs, the exp functions return the largest
    possible floating-point value and set errno to ERANGE. The
    constant HUGE_VAL is defined in the <math.h> header file to be
    the largest possible floating-point value.

3  –  Return Values

    n                  2**x.
    HUGE_VAL           Overflow occurred; errno is set to ERANGE.
    1                  x is +0 or -0; errno is set to ERANGE.
    0                  x is -Inf or underflow occurred; errno is set
                       to ERANGE.
    x                  x is +Inf; errno is set to ERANGE.
    NaN                x is NaN; errno is set to EDOM.
Close Help