openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/glibc/2.29-r0/git/sysdeps/ieee754/flt-32/e_powf.c
static inline double_t exp2_inline(double_t xd, uint32_t sign_bias)
{
    uint64_t ki, ski, t;
    /* double_t for better performance on targets with FLT_EVAL_METHOD==2.  */
    double_t kd, z, r, r2, y, s;

#if TOINT_INTRINSICS
#define C __exp2f_data.poly_scaled
    /* N*x = k + r with r in [-1/2, 1/2] */
    kd = roundtoint(xd); /* k */
    ki = converttoint(xd);
#else
#define C __exp2f_data.poly
#define SHIFT __exp2f_data.shift_scaled
    /* x = k/N + r with r in [-1/(2N), 1/(2N)] */
    kd = (double)(xd + SHIFT); /* Rounding to double precision is required.  */
    ki = asuint64(kd);
    kd -= SHIFT; /* k/N */
#endif
    r = xd - kd;

    /* exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1) */
    t = T[ki % N];
    ski = ki + sign_bias;
    t += ski << (52 - EXP2F_TABLE_BITS);
    s = asdouble(t);
    z = C[0] * r + C[1];
    r2 = r * r;
    y = C[2] * r + 1;
    y = z * r2 + y;
    y = y * s;
    return y;
}
/* The output of log2 and thus the input of exp2 is either scaled by N
   (in case of fast toint intrinsics) or not.  The unscaled xd must be
   in [-1021,1023], sign_bias sets the sign of the result.  */
The output of log2 and thus the input of exp2 is either scaled by N
(in case of fast toint intrinsics) or not.  The unscaled xd must be
in [-1021,1023], sign_bias sets the sign of the result.
The output of log2 and thus the input of exp2 is either scaled by N ( in case of fast toint intrinsics ) or not . The unscaled xd must be in [ - 1021 1023 ] sign_bias sets the sign of the result .
static inline double_t exp2_inline(double_t xd, uint32_t sign_bias)
{
    uint64_t ki, ski, t;
    double_t kd, z, r, r2, y, s;
#if TOINT_INTRINSICS
#define C __exp2f_data.poly_scaled
    kd = roundtoint(xd); 
    ki = converttoint(xd);
#else
#define C __exp2f_data.poly
#define SHIFT __exp2f_data.shift_scaled
    kd = (double)(xd + SHIFT); 
    ki = asuint64(kd);
    kd -= SHIFT; 
#endif
    r = xd - kd;
    t = T[ki % N];
    ski = ki + sign_bias;
    t += ski << (52 - EXP2F_TABLE_BITS);
    s = asdouble(t);
    z = C[0] * r + C[1];
    r2 = r * r;
    y = C[2] * r + 1;
    y = z * r2 + y;
    y = y * s;
    return y;
}
static inline double_t exp2_inline ( double_t xd , uint32_t sign_bias ) { uint64_t ki , ski , t ; double_t kd , z , r , r2 , y , s ; #if TOINT_INTRINSICS #define C  __exp2f_data.poly_scaled kd = roundtoint ( xd ) ; ki = converttoint ( xd ) ; #else #define C  __exp2f_data.poly #define SHIFT  __exp2f_data.shift_scaled kd = ( double ) ( xd + SHIFT ) ; ki = asuint64 ( kd ) ; kd -= SHIFT ; #endif r = xd - kd ; t = T [ ki % N ] ; ski = ki + sign_bias ; t += ski << ( 52 - EXP2F_TABLE_BITS ) ; s = asdouble ( t ) ; z = C [ 0 ] * r + C [ 1 ] ; r2 = r * r ; y = C [ 2 ] * r + 1 ; y = z * r2 + y ; y = y * s ; return y ; }
The output of log2 and thus the input of exp2 is either scaled by N
(in case of fast toint intrinsics) or not.
The output of log2 and thus the input of exp2 is either scaled by N ( in case of fast toint intrinsics ) or not .
/* double_t for better performance on targets with FLT_EVAL_METHOD==2.  */ /* N*x = k + r with r in [-1/2, 1/2] */ /* k */ /* x = k/N + r with r in [-1/(2N), 1/(2N)] */ /* Rounding to double precision is required.  */ /* k/N */ /* exp2(x) = 2^(k/N) * 2^r ~= s * (C0*r^3 + C1*r^2 + C2*r + 1) */