public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Nadav <nadav256@gmail.com>
To: newlib@sourceware.org
Subject: A patch with a small typo fix
Date: Thu, 15 Dec 2022 12:02:42 -0800	[thread overview]
Message-ID: <CALtyhvSdryKGN7T8qmX2ttV4ZhuiV+jOFsKYxZh6WP9jbWVW_Q@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 93 bytes --]

Hi folks,

I attached a patch with a small typo fix in one of the comments of expf().

Nadav

[-- Attachment #2: 0001-e_exp-Fix-a-typo-in-the-comment.patch --]
[-- Type: text/x-patch, Size: 1293 bytes --]

From 36d4bbb7369b3091dcd200286d7b026e1e1a1b90 Mon Sep 17 00:00:00 2001
From: Nadav Rotem <nadavrot@users.noreply.github.com>
Date: Wed, 14 Dec 2022 19:53:47 -0800
Subject: [PATCH] [e_exp] 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
---
 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,
-- 
2.34.1


             reply	other threads:[~2022-12-15 20:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 20:02 Nadav [this message]
2022-12-16 17:19 ` Jeff Johnston

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,
  and reply-to-all from there: mbox

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALtyhvSdryKGN7T8qmX2ttV4ZhuiV+jOFsKYxZh6WP9jbWVW_Q@mail.gmail.com \
    --to=nadav256@gmail.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).