预订演示

请注意 : 本帮助页面不适用于最新版本的Enterprise Architect. 最新的帮助文档在这里.

前页 后页

exp2

Base 2 exponential function.

SYNOPSIS:

double x, y, exp2();
y = exp2(x);

DESCRIPTION:

Returns 2 raised to the x power.

Range reduction is accomplished by separating the argument into an integer k and fraction f, such that:
    x    k   f
   2  = 2   2

A Pade' form:

1 + 2x P(x**2) / (Q(x**2) - x P(x**2))

approximates 2**x in the basic range [-0.5, 0.5].

ACCURACY:
                     Relative error:
arithmetic   domain     # trials      peak         rms
   IEEE    -1022,+1024   30000       1.8e-16     5.4e-17

ERROR MESSAGES:

message      condition      value returned
underflow    x < -MAXL2        0.0
overflow     x > MAXL2         MAXNUM

For DEC arithmetic, MAXL2 = 127.
For IEEE arithmetic, MAXL2 = 1024.