C log function inaccurate (with fix) (many UNIX versions)
Guido van Rossum
guido at mcvax.UUCP
Fri Jan 6 06:20:55 AEST 1984
One of my colleagues discovered that the log function the the mathematical
C library is quite inaccurate. What's more, he also provided a change
to one of the coefficients which much improved it. Here they are:
BAD: p2 = -.963769093368686593e1;
GOOD: p2 = -.963769093377840513e1;
^^^^^^^^
So now you should all go and fix your C library.
I found the same coefficients in UNIX V7 as in 4.2 BSD, so I suspect
they are probably in almost all other UNIXes around the world.
Related question: the source states
"The coefficients are #2705 from Hart & Cheney. (19.38D)".
We cannot locate this reference in our institute's library.
Does someone know what this references, and give us a more precise pointer?
Guido van Rossum, {philabs,decvax}!mcvax!guido
Centre for Mathematics and Computer Science, (CWI, formerly MC), Amsterdam
(with thanks to Lambert Meertens)
More information about the Net.bugs
mailing list