hx = __HI(x); /* high word of x */
xsb = hx&0x80000000; /* sign bit of x */ if(xsb==0) y=x; else y= -x; /* y = |x| */
hx &= 0x7fffffff; /* high word of |x| */
/* argument reduction */ if(hx > 0x3fd62e42) { /* if |x| > 0.5 ln2 */ if(hx < 0x3FF0A2B2) { /* and |x| < 1.5 ln2 */ if(xsb==0)
{hi = x - ln2_hi; lo = ln2_lo; k = 1;} else
{hi = x + ln2_hi; lo = -ln2_lo; k = -1;}
} else {
k = invln2*x+((xsb==0)?0.5:-0.5);
t = k;
hi = x - t*ln2_hi; /* t*ln2_hi is exact here */
lo = t*ln2_lo;
}
x = hi - lo;
c = (hi-x)-lo;
} elseif(hx < 0x3c900000) { /* when |x|<2**-54, return x */
t = huge+x; /* return x with inexact flags when x!=0 */ return x - (t-(huge+x));
} else k = 0;
/* x is now in primary range */
hfx = 0.5*x;
hxs = x*hfx;
r1 = one+hxs*(Q1+hxs*(Q2+hxs*(Q3+hxs*(Q4+hxs*Q5))));
t = 3.0-r1*hfx;
e = hxs*((r1-t)/(6.0 - x*t)); if(k==0) return x - (x*e-hxs); /* c is 0 */ else {
e = (x*(e-c)-c);
e -= hxs; if(k== -1) return0.5*(x-e)-0.5; if(k==1) { if(x < -0.25) return -2.0*(e-(x+0.5)); elsereturn one+2.0*(x-e);
} if (k <= -2 || k>56) { /* suffice to return exp(x)-1 */
y = one-(e-x);
__HI(y) += (k<<20); /* add k to y's exponent */ return y-one;
}
t = one; if(k<20) {
__HI(t) = 0x3ff00000 - (0x200000>>k); /* t=1-2^-k */
y = t-(e-x);
__HI(y) += (k<<20); /* add k to y's exponent */
} else {
__HI(t) = ((0x3ff-k)<<20); /* 2^-k */
y = x-(e+t);
y += one;
__HI(y) += (k<<20); /* add k to y's exponent */
}
} return y;
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.11Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.