bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41347: 28.0.50; calculator.el: Cannot input negative exponents


From: Mattias Engdegård
Subject: bug#41347: 28.0.50; calculator.el: Cannot input negative exponents
Date: Sun, 17 May 2020 13:08:30 +0200

> @@ -863,7 +863,7 @@ calculator-string-to-number
>      (let* ((str (replace-regexp-in-string
>                   "\\.\\([^0-9].*\\)?$" ".0\\1" str))
>             (str (replace-regexp-in-string
> -                 "[eE][+-]?\\([^0-9].*\\)?$" "e0\\1" str)))
> +                 "[eE]\\([+-]?\\)?$" "e\\10" str)))
>        (float (string-to-number str)))))

Thanks for the report and the suggested patch! However, I'm not sure what 
either of these replace-regexp-in-string calls are good for. The first one 
possibly to accept 1.e23 instead of 1e23; the second one is less clear. 
Frankly, I think we can drop both.

Eli, do you remember?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]