VMS Help  —  CRTL  scalbn
    Returns the exponent of a floating-point number using the
    floating-point base exponent.

    Format

      #include  <math.h>

      double scalbn  (double x, int n);

      float scalbnf  (float x, int n);

      long double scalbnl  (long double x, int n);

1  –  Arguments

 x

    A nonzero floating-point number.

 n

    Value of the exponent (int).

2  –  Description

    These functions multiply their first argument x by FLT_RADIX (on
    binary systems, it has a value of 2) to the power of n, which is:

    x * FLT_RADIX ** n

    The definition of FLT_RADIX can be obtained by including <float.h>.

3  –  Return Values

    x                  On success, x * FLT_RADIX ** n is returned.
    NaN                If x is NaN.
    +/- 0              If x is +/- 0.
                       If the result underflows, a range error occurs,
                       and the functions return +/- 0 with a sign the
                       same as x.
    +/- Infinity       If x is +/- Infinity.
    +/- HUGE_VAL
    HUGE_VALF
    HUGE_VALL          If the result overflows, a range error occurs, and
                       the functions return +/- HUGE_VAL, HUGE_VALF, or
                       HUGE_VALL, respectively, with a sign the same as x.
Close Help