This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

testing gcc-2.95 with glibc x86 math library


Sometimes it is difficult to avoid blaming egcs for questionable math 
function results. I did some investigating subsequent to the recent finding 
that the pow() function in this library fails the paranoia test of 
calculations resembling interest compounded daily.  I apologize if this 
discussion seems off-topic, but as far as I have been able to determine, the 
mailing lists, if any, for glibc are private ones and I haven't been able to 
detect any interest in the math library from the maintainers.

Many of the functions in this library are copied without attribution from the 
1985 BSD4.3 libm.  I hope the U of Cal regents don't mind this apparent 
violation of their copyright, but proper attribution ought to be made if only 
for it historical informational value.  As that library was tested primarily 
on the VAX D-float architecture, it might not be surprising if the 
coefficients proposed for 53-bit arithmetic aren't optimum.

One of the confusion factors, for me at least, is that it is not evident 
which C options invoke mathinline.h and which don't.  Many of the functions 
produce similar results either way, but atan() is one which doesn't.   From 
g77, evidently, we get the inferior version.  The built-in atan2() in the 
i686 is nearly as accurate as a good software implementation of atan2(), but 
the one in the library is not.

I am attaching a patch file for the glibc-2.1 mathinline.h to correct some of 
the more annoying errors in long double math functions.  These corrections 
follow advice presented in publications by the chip designers, either on the 
Intel web pages or in the old Palmer and Morse 8087 book.

Tim
tprince@computer.org

MATHIN~2.GZ


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