Browse Source

* src/float/transcendental/cl_F_sinx.cc (sinx_naive): For small

values of x, return square(x) instead of x.
        * src/float/transcendental/cl_F_sinhx.cc (sinhx_naive): Likewise.
master
Richard Kreckel 23 years ago
parent
commit
b485d76c78
  1. 18
      ChangeLog
  2. 2
      src/float/transcendental/cl_F_sinhx.cc
  3. 3
      src/float/transcendental/cl_F_sinx.cc

18
ChangeLog

@ -1,13 +1,19 @@
2000-07-25 Richard Kreckel <kreckel@ginac.de>
2001-11-03 Richard Kreckel <kreckel@ginac.de>
* src/float/transcendental/cl_F_sinx.cc (sinx_naive): For small
values of x, return square(x) instead of x.
* src/float/transcendental/cl_F_sinhx.cc (sinhx_naive): Likewise.
2001-07-25 Richard Kreckel <kreckel@ginac.de>
* Version 1.1.2 released. * Version 1.1.2 released.
2000-07-24 Richard Kreckel <kreckel@ginac.de>
2001-07-24 Richard Kreckel <kreckel@ginac.de>
* src/base/hash/cl_hash.h: declare _cl_hashtable_iterator<htentry> a * src/base/hash/cl_hash.h: declare _cl_hashtable_iterator<htentry> a
friend of cl_heap_hashtable<htentry>. friend of cl_heap_hashtable<htentry>.
2000-07-22 Richard Kreckel <kreckel@ginac.de>
2001-07-22 Richard Kreckel <kreckel@ginac.de>
* src/float/base/cl_ieee.cc: try to do magic to the FPU only if * src/float/base/cl_ieee.cc: try to do magic to the FPU only if
_FPU_IEEE is really defined. _FPU_IEEE is really defined.
@ -20,18 +26,18 @@
extern "C" elsewhere out of the namespace. extern "C" elsewhere out of the namespace.
* src/base/low/cl_low_div.cc: Likewise. * src/base/low/cl_low_div.cc: Likewise.
2000-06-08 Bruno Haible <haible@clisp.cons.org>
2001-06-08 Bruno Haible <haible@clisp.cons.org>
* autoconf/config.{guess,sub}: Update to GNU version 2001-05-11. * autoconf/config.{guess,sub}: Update to GNU version 2001-05-11.
* autoconf/aclocal.m4: Upgrade to libtool-1.4. * autoconf/aclocal.m4: Upgrade to libtool-1.4.
* autoconf/ltmain.sh: Likewise. * autoconf/ltmain.sh: Likewise.
* autoconf/ltconfig: Remove file. * autoconf/ltconfig: Remove file.
2000-06-05 Richard Kreckel <kreckel@ginac.de>
2001-06-05 Richard Kreckel <kreckel@ginac.de>
* tests/tests.cc: resolve namespace ambiguity about strcmp(). * tests/tests.cc: resolve namespace ambiguity about strcmp().
2000-05-31 Richard Kreckel <kreckel@ginac.de>
2001-05-31 Richard Kreckel <kreckel@ginac.de>
* Version 1.1.1 released. * Version 1.1.1 released.

2
src/float/transcendental/cl_F_sinhx.cc

@ -118,7 +118,7 @@ const cl_LF sinhx_naive (const cl_LF& x)
var uintL d = float_digits(x); var uintL d = float_digits(x);
var sintL e = float_exponent(x); var sintL e = float_exponent(x);
if (e <= (1-(sintL)d)>>1) // e <= (1-d)/2 <==> e <= -ceiling((d-1)/2) ? if (e <= (1-(sintL)d)>>1) // e <= (1-d)/2 <==> e <= -ceiling((d-1)/2) ?
return x; // ja -> x als Ergebnis
return square(x); // ja -> x^2 als Ergebnis
{ Mutable(cl_LF,x); { Mutable(cl_LF,x);
var sintL ee = e; var sintL ee = e;
// Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe // Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe

3
src/float/transcendental/cl_F_sinx.cc

@ -120,14 +120,13 @@ const cl_LF sinx_naive (const cl_LF& x)
// -1.4 = d/dk j(k) = (d/dj k(j))^-1 = - j^2/(d+j)*ln 2, also j^2=2(d+j), // -1.4 = d/dk j(k) = (d/dj k(j))^-1 = - j^2/(d+j)*ln 2, also j^2=2(d+j),
// grob j=sqrt(2d) und damit k=sqrt(d).] // grob j=sqrt(2d) und damit k=sqrt(d).]
// Aufwand: asymptotisch d^2.5 . // Aufwand: asymptotisch d^2.5 .
if (zerop(x)) if (zerop(x))
return x; return x;
var uintL actuallen = TheLfloat(x)->len; var uintL actuallen = TheLfloat(x)->len;
var uintL d = float_digits(x); var uintL d = float_digits(x);
var sintL e = float_exponent(x); var sintL e = float_exponent(x);
if (e <= (-(sintL)d)>>1) // e <= (-d)/2 <==> e <= -ceiling(d/2) ? if (e <= (-(sintL)d)>>1) // e <= (-d)/2 <==> e <= -ceiling(d/2) ?
return x; // ja -> x als Ergebnis
return square(x); // ja -> x^2 als Ergebnis
{ Mutable(cl_LF,x); { Mutable(cl_LF,x);
var sintL ee = e; var sintL ee = e;
// Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe // Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe

Loading…
Cancel
Save