[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calc/calc.el,v
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calc/calc.el,v |
Date: |
Sat, 07 Jul 2007 23:56:33 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Jay Belanger <jpb> 07/07/07 23:56:33
Index: calc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/calc/calc.el,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -b -r1.83 -r1.84
--- calc.el 7 Jul 2007 04:13:49 -0000 1.83
+++ calc.el 7 Jul 2007 23:56:33 -0000 1.84
@@ -2283,7 +2283,8 @@
-(defconst math-bignum-digit-length 3
+(defconst math-bignum-digit-length
+ (truncate (/ (log10 (/ most-positive-fixnum 2)) 2))
"The length of a \"digit\" in Calc bignums.
If a big integer is of the form (bigpos N0 N1 ...), this is the
length of the allowable Emacs integers N0, N1,...
@@ -3466,6 +3467,8 @@
(cond
;; Integer
((string-match "^[0-9]+$" s)
+ (if (string-match "^\\(0+\\)" s)
+ (setq s (substring s (match-end 0))))
(if (<= (length s) (* 2 math-bignum-digit-length))
(string-to-number s)
(cons 'bigpos (math-read-bignum s))))
- [Emacs-diffs] Changes to emacs/lisp/calc/calc.el,v, Jay Belanger, 2007/07/05
- [Emacs-diffs] Changes to emacs/lisp/calc/calc.el,v, Jay Belanger, 2007/07/07
- [Emacs-diffs] Changes to emacs/lisp/calc/calc.el,v,
Jay Belanger <=
- [Emacs-diffs] Changes to emacs/lisp/calc/calc.el,v, Jay Belanger, 2007/07/07
- [Emacs-diffs] Changes to emacs/lisp/calc/calc.el,v, Jay Belanger, 2007/07/07
- [Emacs-diffs] Changes to emacs/lisp/calc/calc.el,v, Jay Belanger, 2007/07/07
- [Emacs-diffs] Changes to emacs/lisp/calc/calc.el,v, Miles Bader, 2007/07/26