emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/calc/calc-ext.el,v


From: Jay Belanger
Subject: [Emacs-diffs] Changes to emacs/lisp/calc/calc-ext.el,v
Date: Fri, 22 Jun 2007 04:00:15 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Jay Belanger <jpb>      07/06/22 04:00:14

Index: calc-ext.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/calc/calc-ext.el,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- calc-ext.el 20 Jun 2007 04:14:24 -0000      1.52
+++ calc-ext.el 22 Jun 2007 04:00:12 -0000      1.53
@@ -1878,8 +1878,19 @@
        (last-prec (intern (concat (symbol-name name) "-last-prec")))
        (last-val (intern (concat (symbol-name name) "-last"))))
     (list 'progn
-         (list 'defvar cache-prec (if init (math-numdigs (nth 1 init)) -100))
-         (list 'defvar cache-val (list 'quote init))
+;        (list 'defvar cache-prec (if init (math-numdigs (nth 1 init)) -100))
+         (list 'defvar cache-prec 
+                `(cond
+                  ((consp ,init) (math-numdigs (nth 1 ,init)))
+                  (,init 
+                   (nth 1 (math-numdigs (eval ,init))))
+                  (t
+                   -100)))
+         (list 'defvar cache-val 
+                `(cond
+                  ((consp ,init) ,init)
+                  (,init (eval ,init))
+                  (t ,init)))
          (list 'defvar last-prec -100)
          (list 'defvar last-val nil)
          (list 'setq 'math-cache-list
@@ -1914,7 +1925,7 @@
 (put 'math-defcache 'lisp-indent-hook 2)
 
 ;;; Betcha didn't know that pi = 16 atan(1/5) - 4 atan(1/239).   [F] [Public]
-(math-defcache math-pi (float (bigpos 463 238 793 589 653 592 141 3) -21)
+(math-defcache math-pi (math-read-number-simple "3.141592653589793238463")
   (math-add-float (math-mul-float '(float 16 0)
                                  (math-arctan-raw '(float 2 -1)))
                  (math-mul-float '(float -4 0)
@@ -1945,7 +1956,8 @@
 (math-defcache math-sqrt-two-pi nil
   (math-sqrt-float (math-two-pi)))
 
-(math-defcache math-sqrt-e (float (bigpos 849 146 128 700 270 721 648 1) -21)
+
+(math-defcache math-sqrt-e (math-read-number-simple "1.648721270700128146849")
   (math-add-float '(float 1 0) (math-exp-minus-1-raw '(float 5 -1))))
 
 (math-defcache math-e nil
@@ -1956,9 +1968,8 @@
                  '(float 5 -1)))
 
 (math-defcache math-gamma-const nil
-  '(float (bigpos 495 467 917 632 470 369 709 646 776 267 677 848 348 672
-                 057 988 235 399 359 593 421 310 024 824 900 120 065 606
-                 328 015 649 156 772 5) -100))
+               (math-read-number-simple 
+                
"0.5772156649015328606065120900824024310421593359399235988057672348848677267776646709369470632917467495"))
 
 (defun math-half-circle (symb)
   (if (eq calc-angle-mode 'rad)




reply via email to

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