```public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed```
```From: Jeff Johnston <jjohnstn@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Fix a typo in the comment.
Date: Fri, 16 Dec 2022 17:19:11 +0000 (GMT)	[thread overview]
Message-ID: <20221216171911.4CB6F382E74C@sourceware.org> (raw)

Date:   Wed Dec 14 19:53:47 2022 -0800

Fix a typo in the comment.

The implementation of expf() explains how approximation in the range [0 - 0.34] is done. The comment describes the "Reme" algorithm for constructing the polynomial. This is a typo and should be the "Remez" algorithm. The remez algorithm (or minimax) is used to calculate the coefficients of polynomials in other implementations of exp(0 and log().

See more:
https://en.wikipedia.org/wiki/Remez_algorithm

Diff:
---
newlib/libm/math/e_exp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/libm/math/e_exp.c b/newlib/libm/math/e_exp.c
index ec26c2099..77652d687 100644
--- a/newlib/libm/math/e_exp.c
+++ b/newlib/libm/math/e_exp.c
@@ -28,7 +28,7 @@
*	the interval [0,0.34658]:
*	Write
*	    R(r**2) = r*(exp(r)+1)/(exp(r)-1) = 2 + r*r/6 - r**4/360 + ...
- *      We use a special Reme algorithm on [0,0.34658] to generate
+ *      We use a special Remez algorithm on [0,0.34658] to generate
* 	a polynomial of degree 5 to approximate R. The maximum error
*	of this polynomial approximation is bounded by 2**-59. In
*	other words,
```

```                 reply	other threads:[~2022-12-16 17:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
```

```Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,

Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

switches of git-send-email(1):

git send-email \
```This is a public inbox, see mirroring instructions