unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#73817: 29.4; Docstring for math-approx-sqrt-e is wrong
@ 2024-10-15 12:17 Ulrich Mueller
  2024-10-15 13:07 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Mueller @ 2024-10-15 12:17 UTC (permalink / raw)
  To: 73817; +Cc: Mattias Engdegård

[-- 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#73817: 29.4; Docstring for math-approx-sqrt-e is wrong
  2024-10-15 12:17 bug#73817: 29.4; Docstring for math-approx-sqrt-e is wrong Ulrich Mueller
@ 2024-10-15 13:07 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-10-15 13:07 UTC (permalink / raw)
  To: Ulrich Mueller; +Cc: mattiase, 73817

> Cc: Mattias Engdegård <mattiase@acm.org>
> From: Ulrich Mueller <ulm@gentoo.org>
> Date: Tue, 15 Oct 2024 14:17:21 +0200
> 
> 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?

Please install on emacs-30 (documentation changes are always okay on
the release branch).

Thanks.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-15 13:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-15 12:17 bug#73817: 29.4; Docstring for math-approx-sqrt-e is wrong Ulrich Mueller
2024-10-15 13:07 ` Eli Zaretskii

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