52 lines
1.6 KiB
Plaintext
52 lines
1.6 KiB
Plaintext
$NetBSD: patch-ad,v 1.1 2007/10/13 12:19:43 rillig Exp $
|
|
|
|
See ISO C99, 6.7.1p5.
|
|
|
|
--- d2c/runtime/c-code/float.c.orig 2003-07-23 17:08:58.000000000 +0200
|
|
+++ d2c/runtime/c-code/float.c 2007-10-13 14:10:40.000000000 +0200
|
|
@@ -101,11 +101,12 @@ long double (logl)(long double x)
|
|
|
|
#define SQRTHL 0.70710678118654752440L
|
|
|
|
-long double (logl)(long double x)
|
|
-{
|
|
static long double polevll(long double, long double *, size_t);
|
|
static long double p1evll(long double, long double *, size_t);
|
|
|
|
+long double (logl)(long double x)
|
|
+{
|
|
+
|
|
/* Coefficients for log(1+x) = x - x**2/2 + x**3 P(x)/Q(x) 1/sqrt(2) <= x <
|
|
* sqrt(2) Theoretical peak relative error = 2.32e-20
|
|
*/
|
|
@@ -229,11 +230,12 @@ long double (log2l)(long double x)
|
|
#define LOG2EAL 4.4269504088896340735992e-1L
|
|
#define SQRTHL 0.70710678118654752440L
|
|
|
|
-long double (log2l)(long double x)
|
|
-{
|
|
static long double polevll(long double, long double *, size_t);
|
|
static long double p1evll(long double, long double *, size_t);
|
|
|
|
+long double (log2l)(long double x)
|
|
+{
|
|
+
|
|
static long double P[] = {
|
|
4.9962495940332550844739E-1L,
|
|
1.0767376367209449010438E1L,
|
|
@@ -362,11 +364,12 @@ long double (log10l)(long double x)
|
|
|
|
#define SQRTHL 0.70710678118654752440L
|
|
|
|
-long double (log10l)(long double x)
|
|
-{
|
|
static long double polevll(long double, long double *, size_t);
|
|
static long double p1evll(long double, long double *, size_t);
|
|
|
|
+long double (log10l)(long double x)
|
|
+{
|
|
+
|
|
/* Coefficients for log(1+x) = x - x**2/2 + x**3 P(x)/Q(x) 1/sqrt(2) <= x <
|
|
* sqrt(2) Theoretical peak relative error = 6.2e-22
|
|
*/
|