unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: 73817@debbugs.gnu.org
Cc: "Mattias Engdegård" <mattiase@acm.org>
Subject: bug#73817: 29.4; Docstring for math-approx-sqrt-e is wrong
Date: Tue, 15 Oct 2024 14:17:21 +0200	[thread overview]
Message-ID: <uttddv9v2@gentoo.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 374 bytes --]

math-approx-sqrt-e is a variable defined in ‘calc-ext.el’.

Its value is (float 1648721270700128146849 -21)

An approximation for sqrt(3).

  This variable may be risky if used as a file-local variable.


Obviously this should be sqrt(e) = 1.648..., whereas sqrt(3) = 1.732...

OK to push attached patch to the emacs-30 branch, or should it go to
master?


[-- Attachment #2: 0001-lisp-calc-calc-ext.el-math-approx-sqrt-e-Doc-fix.patch --]
[-- Type: text/plain, Size: 803 bytes --]

From ec01569490f2df9999925d4471e627a6370606eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@gentoo.org>
Date: Tue, 15 Oct 2024 14:06:49 +0200
Subject: [PATCH] * lisp/calc/calc-ext.el (math-approx-sqrt-e): Doc fix.

---
 lisp/calc/calc-ext.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index 191149892a8..25d2492b277 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -2069,7 +2069,7 @@ math-sqrt-two-pi
 
 (defconst math-approx-sqrt-e
   (math-read-number-simple "1.648721270700128146849")
-  "An approximation for sqrt(3).")
+  "An approximation for sqrt(e).")
 
 (math-defcache math-sqrt-e math-approx-sqrt-e
   (math-add-float '(float 1 0) (math-exp-minus-1-raw '(float 5 -1))))
-- 
2.47.0


             reply	other threads:[~2024-10-15 12:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-15 12:17 Ulrich Mueller [this message]
2024-10-15 13:07 ` bug#73817: 29.4; Docstring for math-approx-sqrt-e is wrong Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=uttddv9v2@gentoo.org \
    --to=ulm@gentoo.org \
    --cc=73817@debbugs.gnu.org \
    --cc=mattiase@acm.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).