Error of tan/tanf in libm.

Tim Prince tprince@computer.org
Fri Apr 6 06:07:00 GMT 2001


Are you using #include <math.h> 
correctly?  The only libm functions in newlib which I've found to be 
substandard are acosf() / asinf().   If you were writing code for 
compatibility with MSVC, you wouldn't dare use any of the float nor long 
double functions.  If you were looking for best efficiency or accuracy 
on either i386 (short of P4, which I don't think is supported specifically in 
open source) or m68k, you would be using something resembling 
<bits/mathinline.h> from glibc.

  ----- Original Message ----- 
  From: 
  Cliff Tsai 
  To: newlib@sources.redhat.com 
  Sent: Friday, April 06, 2001 4:22 
AM
  Subject: Error of tan/tanf in libm.
  
  Hi:
      I'm testing libm on m68k 
  platform.
      But I found that there are erros in some functions in 
  libm.
      Like tan/tanf.For example,tanf(0.25) shoud be  
  close to 0.2553419.
      But when I test tan/tanf in native platform(cygwin on 
  x86)
      And tan/tanf on m68k platform.
      The return is 2.0.Why?
      Do anyone know other errors in libm?
   
      Thanks!
   
   
      
   



More information about the Newlib mailing list