Changeset View
Changeset View
Standalone View
Standalone View
head/lib/msun/src/e_pow.c
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
* Constants : | * Constants : | ||||
* The hexadecimal values are the intended ones for the following | * The hexadecimal values are the intended ones for the following | ||||
* constants. The decimal values may be used, provided that the | * constants. The decimal values may be used, provided that the | ||||
* compiler will convert from decimal to binary accurately enough | * compiler will convert from decimal to binary accurately enough | ||||
* to produce the hexadecimal values shown. | * to produce the hexadecimal values shown. | ||||
*/ | */ | ||||
#include <float.h> | |||||
#include "math.h" | #include "math.h" | ||||
#include "math_private.h" | #include "math_private.h" | ||||
static const double | static const double | ||||
bp[] = {1.0, 1.5,}, | bp[] = {1.0, 1.5,}, | ||||
dp_h[] = { 0.0, 5.84962487220764160156e-01,}, /* 0x3FE2B803, 0x40000000 */ | dp_h[] = { 0.0, 5.84962487220764160156e-01,}, /* 0x3FE2B803, 0x40000000 */ | ||||
dp_l[] = { 0.0, 1.35003920212974897128e-08,}, /* 0x3E4CFDEB, 0x43CFD006 */ | dp_l[] = { 0.0, 1.35003920212974897128e-08,}, /* 0x3E4CFDEB, 0x43CFD006 */ | ||||
zero = 0.0, | zero = 0.0, | ||||
▲ Show 20 Lines • Show All 234 Lines • ▼ Show 20 Lines | __ieee754_pow(double x, double y) | ||||
r = (z*t1)/(t1-two)-(w+z*w); | r = (z*t1)/(t1-two)-(w+z*w); | ||||
z = one-(r-z); | z = one-(r-z); | ||||
GET_HIGH_WORD(j,z); | GET_HIGH_WORD(j,z); | ||||
j += (n<<20); | j += (n<<20); | ||||
if((j>>20)<=0) z = scalbn(z,n); /* subnormal output */ | if((j>>20)<=0) z = scalbn(z,n); /* subnormal output */ | ||||
else SET_HIGH_WORD(z,j); | else SET_HIGH_WORD(z,j); | ||||
return s*z; | return s*z; | ||||
} | } | ||||
#if (LDBL_MANT_DIG == 53) | |||||
__weak_reference(pow, powl); | |||||
#endif |