From 5c453f78bcef58871a9d41d4319df3f71742b3eb Mon Sep 17 00:00:00 2001 From: bde Date: Sun, 16 Feb 1997 17:54:58 +0000 Subject: 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 --- lib/libF77/r_lg10.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/libF77') 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) ); } -- cgit v1.1