diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2020-04-30 15:06:06 +0200 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2020-05-03 10:05:43 -0700 |
commit | 20c1e7f8af08dadba1d69ff93ca9671cb26cd246 (patch) | |
tree | 4ca0abc415fac2f9c535e6e7bf915c1bcffbcf2e /lisp/calculator.el | |
parent | 2c306146d2a4a12b291ab81ed4ff2968a9ba22e6 (diff) | |
download | emacs-20c1e7f8af08dadba1d69ff93ca9671cb26cd246.tar.gz emacs-20c1e7f8af08dadba1d69ff93ca9671cb26cd246.tar.bz2 emacs-20c1e7f8af08dadba1d69ff93ca9671cb26cd246.zip |
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.
Diffstat (limited to 'lisp/calculator.el')
-rw-r--r-- | lisp/calculator.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/calculator.el b/lisp/calculator.el index 6996990814d..7e0b2fcc6a3 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -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." |