mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Fix calculator division truncation (bug#40892)
* lisp/calculator.el (calculator-string-to-number): Convert decimal
numbers input to float, fixing a regression introduced in f248292ede.
Reported by Aitor Soroa.
This commit is contained in:
parent
2c306146d2
commit
20c1e7f8af
1 changed files with 1 additions and 1 deletions
|
|
@ -864,7 +864,7 @@ The result should not exceed the screen width."
|
|||
"\\.\\([^0-9].*\\)?$" ".0\\1" str))
|
||||
(str (replace-regexp-in-string
|
||||
"[eE][+-]?\\([^0-9].*\\)?$" "e0\\1" str)))
|
||||
(string-to-number str))))
|
||||
(float (string-to-number str)))))
|
||||
|
||||
(defun calculator-push-curnum ()
|
||||
"Push the numeric value of the displayed number to the stack."
|
||||
|
|
|
|||
Loading…
Reference in a new issue