[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
math code origin
From: |
Bruno Haible |
Subject: |
math code origin |
Date: |
Wed, 29 Feb 2012 12:29:59 +0100 |
User-agent: |
KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; ) |
When writing new math functions code, it is useful to know where the
existing code in gnulib comes from. Assuming that no one here has the
expertise to compute Chebyshev polynomials for transcendental functions,
it is clear from which files Paolo has derived the math code he contributed.
2012-02-29 Bruno Haible <address@hidden>
math code: Add comments.
* lib/acosl.c: Add comment about related glibc source files.
* lib/asinl.c: Likewise.
* lib/atanl.c: Likewise.
* lib/expl.c: Likewise.
* lib/logl.c: Likewise.
* lib/sincosl.c: Likewise.
* lib/sinl.c: Likewise.
* lib/tanl.c: Likewise.
* lib/trigl.c: Likewise.
* lib/cosl.c: Likewise. Fix comments.
--- lib/acosl.c.orig Wed Feb 29 12:24:18 2012
+++ lib/acosl.c Wed Feb 29 12:12:29 2012
@@ -24,6 +24,9 @@
#else
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/e_asinl.c
+ and glibc/sysdeps/ieee754/ldbl-128/e_acosl.c. */
+
/*
Long double expansions contributed by
Stephen L. Moshier <address@hidden>
--- lib/asinl.c.orig Wed Feb 29 12:24:18 2012
+++ lib/asinl.c Wed Feb 29 12:12:29 2012
@@ -24,6 +24,8 @@
#else
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/e_asinl.c. */
+
/*
Long double expansions contributed by
Stephen L. Moshier <address@hidden>
--- lib/atanl.c.orig Wed Feb 29 12:24:18 2012
+++ lib/atanl.c Wed Feb 29 12:12:29 2012
@@ -28,6 +28,8 @@
#else
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/s_atanl.c. */
+
/* s_atanl.c
*
* Inverse circular tangent for 128-bit long double precision
--- lib/cosl.c.orig Wed Feb 29 12:24:18 2012
+++ lib/cosl.c Wed Feb 29 12:12:29 2012
@@ -28,12 +28,14 @@
#else
-/* sinl(x)
- * Return sine function of x.
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/s_cosl.c. */
+
+/* cosl(x)
+ * Return cosine function of x.
*
* kernel function:
* __kernel_sinl ... sine function on [-pi/4,pi/4]
- * __kernel_cosl ... cose function on [-pi/4,pi/4]
+ * __kernel_cosl ... cosine function on [-pi/4,pi/4]
* __ieee754_rem_pio2l ... argument reduction routine
*
* Method.
--- lib/expl.c.orig Wed Feb 29 12:24:18 2012
+++ lib/expl.c Wed Feb 29 12:12:29 2012
@@ -33,6 +33,8 @@
#else
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/e_expl.c. */
+
# include <float.h>
static const long double C[] = {
--- lib/logl.c.orig Wed Feb 29 12:24:18 2012
+++ lib/logl.c Wed Feb 29 12:12:29 2012
@@ -28,6 +28,8 @@
#else
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/e_logl.c. */
+
/* logll.c
*
* Natural logarithm for 128-bit long double precision.
--- lib/sincosl.c.orig Wed Feb 29 12:24:18 2012
+++ lib/sincosl.c Wed Feb 29 12:12:29 2012
@@ -24,6 +24,10 @@
#include <float.h>
#include <math.h>
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/k_sincosl.c
+ or glibc/sysdeps/ieee754/ldbl-128/k_{sin,cos}l.c
+ and glibc/sysdeps/ieee754/ldbl-128/t_sincosl.c. */
+
static const long double sin_c[] = {
#define ONE sin_c[0]
1.00000000000000000000000000000000000E+00L, /*
3fff0000000000000000000000000000 */
--- lib/sinl.c.orig Wed Feb 29 12:24:18 2012
+++ lib/sinl.c Wed Feb 29 12:12:29 2012
@@ -28,12 +28,14 @@
#else
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/s_sinl.c. */
+
/* sinl(x)
* Return sine function of x.
*
* kernel function:
* __kernel_sinl ... sine function on [-pi/4,pi/4]
- * __kernel_cosl ... cose function on [-pi/4,pi/4]
+ * __kernel_cosl ... cosine function on [-pi/4,pi/4]
* __ieee754_rem_pio2l ... argument reduction routine
*
* Method.
--- lib/tanl.c.orig Wed Feb 29 12:24:18 2012
+++ lib/tanl.c Wed Feb 29 12:12:29 2012
@@ -29,6 +29,9 @@
#else
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/s_tanl.c
+ and glibc/sysdeps/ieee754/ldbl-128/k_tanl.c. */
+
/* tanl(x)
* Return tangent function of x.
*
--- lib/trigl.c.orig Wed Feb 29 12:24:18 2012
+++ lib/trigl.c Wed Feb 29 12:12:29 2012
@@ -24,6 +24,9 @@
#include <float.h>
#include <math.h>
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/e_rem_pio2l.c
+ and glibc/sysdeps/ieee754/dbl-64/k_rem_pio2.c. */
+
/* Table of constants for 2/pi, 5628 hexadecimal digits of 2/pi */
static const int two_over_pi[] = {
0xa2f983, 0x6e4e44, 0x1529fc, 0x2757d1, 0xf534dd, 0xc0db62,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- math code origin,
Bruno Haible <=