diff options
author | bde <bde@FreeBSD.org> | 1997-02-24 17:44:08 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-02-24 17:44:08 +0000 |
commit | 139936b34a895520e9ee8b9a6d3f774754cdcc48 (patch) | |
tree | 1b9f54c259d2b4a658d83e51242c6a2516d396f0 /lib/libF77/d_lg10.c | |
parent | 9e266561b379c627a821de0a2e93f47aa96cff01 (diff) | |
download | FreeBSD-src-139936b34a895520e9ee8b9a6d3f774754cdcc48.zip FreeBSD-src-139936b34a895520e9ee8b9a6d3f774754cdcc48.tar.gz |
Use the C library version of log10() instead of the inaccurate formula
log10(x) = log10e * log(x). This fixes some small (one or two ULP)
inaccuracies.
Found by: ucbtest
Diffstat (limited to 'lib/libF77/d_lg10.c')
-rw-r--r-- | lib/libF77/d_lg10.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libF77/d_lg10.c b/lib/libF77/d_lg10.c index f03ff00..3135881 100644 --- a/lib/libF77/d_lg10.c +++ b/lib/libF77/d_lg10.c @@ -1,9 +1,7 @@ #include "f2c.h" -#define log10e 0.43429448190325182765 - #ifdef KR_headers -double log(); +double log10(); double d_lg10(x) doublereal *x; #else #undef abs @@ -11,5 +9,5 @@ double d_lg10(x) doublereal *x; double d_lg10(doublereal *x) #endif { -return( log10e * log(*x) ); +return( log10(*x) ); } |