if (e < -(sintC)d) // e < -d ?
return cl_float(1,x); // ja -> 1.0 als Ergebnis
{ Mutable(cl_LF,x);
if (e < -(sintC)d) // e < -d ?
return cl_float(1,x); // ja -> 1.0 als Ergebnis
{ Mutable(cl_LF,x);
// Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe
// angewandt werden. limit_slope = 1.0 ist nicht schlecht,
// auch im Bereich d = ca. 800.
// Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe
// angewandt werden. limit_slope = 1.0 ist nicht schlecht,
// auch im Bereich d = ca. 800.
if (e < -(sintC)d) // e < -d ?
return cl_float(1,x); // ja -> 1.0 als Ergebnis
{ Mutable(cl_F,x);
if (e < -(sintC)d) // e < -d ?
return cl_float(1,x); // ja -> 1.0 als Ergebnis
{ Mutable(cl_F,x);
- // Wir wählen limit_slope = 1.5.
- var sintL e_limit = -1-floor(isqrt(d)*3,2); // -1-floor(sqrt(d))
+ // Wir wählen limit_slope = 1.5.
+ var sintL e_limit = -1-floor(isqrtC(d)*3,2); // -1-floor(sqrt(d))
var uintC len = TheLfloat(x)->len;
var cl_idecoded_float x_ = integer_decode_float(x);
// x = (-1)^sign * 2^exponent * mantissa
var uintC len = TheLfloat(x)->len;
var cl_idecoded_float x_ = integer_decode_float(x);
// x = (-1)^sign * 2^exponent * mantissa
var const cl_I& p = x_.mantissa;
// Compute exp(p/2^lq) by splitting into pieces.
// Each piece gives rise to a factor exp(pk/2^lqk).
var const cl_I& p = x_.mantissa;
// Compute exp(p/2^lq) by splitting into pieces.
// Each piece gives rise to a factor exp(pk/2^lqk).
// (b) 311 317 305 312 295 291 286 293 291 284 295 284 293 287 288 305
// (a): N=300, time in 0.01 sec. (b): N=1000, time in 0.1 sec.
// Values 2.5 <= c <= 3.2 seem best. Let's choose c = 2.875.
// (b) 311 317 305 312 295 291 286 293 291 284 295 284 293 287 288 305
// (a): N=300, time in 0.01 sec. (b): N=1000, time in 0.1 sec.
// Values 2.5 <= c <= 3.2 seem best. Let's choose c = 2.875.
for (b1 = 0, b2 = 1; b1 < lq; b1 = b2, b2 = ceiling(b2*23,8)) {
// Piece containing bits b1+1..b2 after "decimal point"
// in the binary representation of (p/2^lq).
for (b1 = 0, b2 = 1; b1 < lq; b1 = b2, b2 = ceiling(b2*23,8)) {
// Piece containing bits b1+1..b2 after "decimal point"
// in the binary representation of (p/2^lq).
var cl_I pk = ldb(p,cl_byte(lqk-b1,lq-lqk));
// Compute exp(pk/2^lqk).
if (!zerop(pk)) {
var cl_I pk = ldb(p,cl_byte(lqk-b1,lq-lqk));
// Compute exp(pk/2^lqk).
if (!zerop(pk)) {