mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-23 17:31:43 +01:00
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
This commit is contained in:
parent
9e2d0733c5
commit
5d8d8dd3b6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23080
@ -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) );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user