comparison lisp/calc/calc-ext.el @ 82441:01eedbaaac05

(math-approx-pi,math-approx-sqrt-e,math-approx-gamma-const): Remove `eval-when-compile's.
author Jay Belanger <jay.p.belanger@gmail.com>
date Fri, 17 Aug 2007 20:19:36 +0000
parents 5dbe5cf5ad96
children 9e97aa608e01 aaccdab0ee26
comparison
equal deleted inserted replaced
82440:ddd464fd7cb4 82441:01eedbaaac05
1924 last-val)))) 1924 last-val))))
1925 (put 'math-defcache 'lisp-indent-hook 2) 1925 (put 'math-defcache 'lisp-indent-hook 2)
1926 1926
1927 ;;; Betcha didn't know that pi = 16 atan(1/5) - 4 atan(1/239). [F] [Public] 1927 ;;; Betcha didn't know that pi = 16 atan(1/5) - 4 atan(1/239). [F] [Public]
1928 (defconst math-approx-pi 1928 (defconst math-approx-pi
1929 (eval-when-compile 1929 (math-read-number-simple "3.141592653589793238463")
1930 (math-read-number-simple "3.141592653589793238463"))
1931 "An approximation for pi.") 1930 "An approximation for pi.")
1932 1931
1933 (math-defcache math-pi math-approx-pi 1932 (math-defcache math-pi math-approx-pi
1934 (math-add-float (math-mul-float '(float 16 0) 1933 (math-add-float (math-mul-float '(float 16 0)
1935 (math-arctan-raw '(float 2 -1))) 1934 (math-arctan-raw '(float 2 -1)))
1960 1959
1961 (math-defcache math-sqrt-two-pi nil 1960 (math-defcache math-sqrt-two-pi nil
1962 (math-sqrt-float (math-two-pi))) 1961 (math-sqrt-float (math-two-pi)))
1963 1962
1964 (defconst math-approx-sqrt-e 1963 (defconst math-approx-sqrt-e
1965 (eval-when-compile (math-read-number-simple "1.648721270700128146849")) 1964 (math-read-number-simple "1.648721270700128146849")
1966 "An approximation for sqrt(3).") 1965 "An approximation for sqrt(3).")
1967 1966
1968 (math-defcache math-sqrt-e math-approx-sqrt-e 1967 (math-defcache math-sqrt-e math-approx-sqrt-e
1969 (math-add-float '(float 1 0) (math-exp-minus-1-raw '(float 5 -1)))) 1968 (math-add-float '(float 1 0) (math-exp-minus-1-raw '(float 5 -1))))
1970 1969
1974 (math-defcache math-phi nil 1973 (math-defcache math-phi nil
1975 (math-mul-float (math-add-float (math-sqrt-raw '(float 5 0)) '(float 1 0)) 1974 (math-mul-float (math-add-float (math-sqrt-raw '(float 5 0)) '(float 1 0))
1976 '(float 5 -1))) 1975 '(float 5 -1)))
1977 1976
1978 (defconst math-approx-gamma-const 1977 (defconst math-approx-gamma-const
1979 (eval-when-compile 1978 (math-read-number-simple
1980 (math-read-number-simple 1979 "0.5772156649015328606065120900824024310421593359399235988057672348848677267776646709369470632917467495")
1981 "0.5772156649015328606065120900824024310421593359399235988057672348848677267776646709369470632917467495"))
1982 "An approximation for gamma.") 1980 "An approximation for gamma.")
1983 1981
1984 (math-defcache math-gamma-const nil 1982 (math-defcache math-gamma-const nil
1985 math-approx-gamma-const) 1983 math-approx-gamma-const)
1986 1984