This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Error of tan/tanf in libm.




On Mon, 16 Apr 2001, J. Johnston wrote:
> Thanks for the patch Stephen.

I should have pointed out why the change accomplishes anything.
If you look at this code near the end of the program,

      p = 2.0 * s * r - (pio2_lo - 2.0 * c);
      q = pio4_hi - 2.0 * w;
      t = pio4_hi - (p - q);

you see that pio2_lo plus twice pio4_hi is supposed to equal pi/2
to extra precision.  But also pio2_lo plus pio2_hi is supposed
to be the same thing.  Therefore pio4_hi must be exactly half
of pio2_hi, which was not the case.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]