Mercurial > emacs
comparison lisp/calc/calc-bin.el @ 44572:9e404d7dbe1d
(math-format-radix-float): Load `calc-ext' before we call `math-group-float'.
author | Colin Walters <walters@gnu.org> |
---|---|
date | Sun, 14 Apr 2002 01:51:15 +0000 |
parents | fcd507927105 |
children | 52bd3d1b9cb9 |
comparison
equal
deleted
inserted
replaced
44571:be1cb50b8859 | 44572:9e404d7dbe1d |
---|---|
674 str)) | 674 str)) |
675 (if (> (length str) afigs) | 675 (if (> (length str) afigs) |
676 (setq str (substring str 1) | 676 (setq str (substring str 1) |
677 int (math-add int 1)))) | 677 int (math-add int 1)))) |
678 (setq str (concat (math-format-number int) point str))) | 678 (setq str (concat (math-format-number int) point str))) |
679 (if calc-group-digits | 679 (when calc-group-digits |
680 (setq str (math-group-float str)))) | 680 (require 'calc-ext) |
681 (setq str (math-group-float str)))) | |
681 (setq figs 0)))) | 682 (setq figs 0)))) |
682 (or str | 683 (or str |
683 (let* ((prec calc-internal-prec) | 684 (let* ((prec calc-internal-prec) |
684 (afigs (if (> figs 0) | 685 (afigs (if (> figs 0) |
685 figs | 686 figs |
743 (substring str (1+ eadj))))) | 744 (substring str (1+ eadj))))) |
744 (setq pos (length str)) | 745 (setq pos (length str)) |
745 (while (eq (aref str (1- pos)) ?0) (setq pos (1- pos))) | 746 (while (eq (aref str (1- pos)) ?0) (setq pos (1- pos))) |
746 (and explo (eq (aref str (1- pos)) ?.) (setq pos (1- pos))) | 747 (and explo (eq (aref str (1- pos)) ?.) (setq pos (1- pos))) |
747 (setq str (substring str 0 pos)) | 748 (setq str (substring str 0 pos)) |
748 (if calc-group-digits | 749 (when calc-group-digits |
749 (setq str (math-group-float str))) | 750 (setq str (math-group-float str))) |
750 (if explo | 751 (if explo |
751 (let ((estr (let ((calc-number-radix 10) | 752 (let ((estr (let ((calc-number-radix 10) |
752 (calc-group-digits nil)) | 753 (calc-group-digits nil)) |
753 (setq estr (math-format-number | 754 (setq estr (math-format-number |
754 (math-sub explo eadj)))))) | 755 (math-sub explo eadj)))))) |