summaryrefslogtreecommitdiffstats
path: root/lib/libF77
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-02-16 17:54:58 +0000
committerbde <bde@FreeBSD.org>1997-02-16 17:54:58 +0000
commit5c453f78bcef58871a9d41d4319df3f71742b3eb (patch)
tree899406fde5d503505ae4f16452cbf6334974850f /lib/libF77
parent8a3827cb4c37b7113ce2e15b069e87e46325fde6 (diff)
downloadFreeBSD-src-5c453f78bcef58871a9d41d4319df3f71742b3eb.zip
FreeBSD-src-5c453f78bcef58871a9d41d4319df3f71742b3eb.tar.gz
Use the C library version of log10() instead of the inaccurate formula
log10(x) = log10e * log(x). The formula would work if the RHS were evaluated in extended precision with an extended precision log(). This actually happened with the i387 log() because it returns excess precision. Found by: ucbtest
Diffstat (limited to 'lib/libF77')
-rw-r--r--lib/libF77/r_lg10.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libF77/r_lg10.c b/lib/libF77/r_lg10.c
index 4ea02f4..87013ae 100644
--- a/lib/libF77/r_lg10.c
+++ b/lib/libF77/r_lg10.c
@@ -1,7 +1,5 @@
#include "f2c.h"
-#define log10e 0.43429448190325182765
-
#ifdef KR_headers
double log();
double r_lg10(x) real *x;
@@ -11,5 +9,5 @@ double r_lg10(x) real *x;
double r_lg10(real *x)
#endif
{
-return( log10e * log(*x) );
+return( log10(*x) );
}
OpenPOWER on IntegriCloud