|
From: rtoy <rt...@us...> - 2025-12-10 16:00:23
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Maxima CAS".
The branch, rtoy-rename-bfhalf-with-stars has been created
at 2f4278f02e14872ee19b00291a8799e36a9f3b89 (commit)
- Log -----------------------------------------------------------------
commit 2f4278f02e14872ee19b00291a8799e36a9f3b89
Author: Raymond Toy <toy...@gm...>
Date: Tue Dec 9 08:11:00 2025 -0800
Update more places with bfhalf and friends
These files also need to rename `bfhalf` to `*bfhalf*` and friends.
Testsuite + share passes with no new failures.
diff --git a/share/contrib/binsplit/binsplit.lisp b/share/contrib/binsplit/binsplit.lisp
index 8f83b5bb8..50f16fb80 100644
--- a/share/contrib/binsplit/binsplit.lisp
+++ b/share/contrib/binsplit/binsplit.lisp
@@ -87,7 +87,7 @@
(let ((e 0) phi)
;; bs-carg11 needs im-z < 1/2 (i.e. phi < pi/6)
;; when im-z >= 1/2 bisect phi by taking the complex sqrt
- (when (not (fplessp im-z (cdr bfhalf)))
+ (when (not (fplessp im-z (cdr *bfhalf*)))
(multiple-value-setq (re-z im-z) (complex-sqrt (bcons re-z) (bcons im-z)))
(setq e 1) )
(setq phi (bs-carg11 (list re-z im-z) prec))
diff --git a/share/linearalgebra/mring.lisp b/share/linearalgebra/mring.lisp
index 4460a361b..a3b9255a7 100644
--- a/share/linearalgebra/mring.lisp
+++ b/share/linearalgebra/mring.lisp
@@ -260,9 +260,9 @@
:sub #'(lambda (a b) ($rectform (sub a b)))
:negate #'(lambda (a) (mul -1 a))
:psqrt #'(lambda (s) (if (mlsp s 0) nil (ftake '%sqrt s)))
- :add-id #'(lambda () bigfloatzero)
- :mult-id #'(lambda () bigfloatone)
- :fzerop #'(lambda (s) (like s bigfloatzero))
+ :add-id #'(lambda () *bigfloatzero*)
+ :mult-id #'(lambda () *bigfloatone*)
+ :fzerop #'(lambda (s) (like s *bigfloatzero*))
:adjoint #'cl:identity
:mring-to-maxima #'cl:identity
:maxima-to-mring #'(lambda (s)
diff --git a/share/numeric/rtest_decfp.mac b/share/numeric/rtest_decfp.mac
index f10328ce4..7ff87fcba 100644
--- a/share/numeric/rtest_decfp.mac
+++ b/share/numeric/rtest_decfp.mac
@@ -84,5 +84,5 @@ block(
/* The decfp code changes the value of bigfloatone (and possibly other
such values) to decimal floats. Let's reset them. */
-(reset(?bigfloat%pi,?bigfloat%e,?bfmhalf,?bfhalf,?bigfloatone,?bigfloatzero),0);
+(reset(?bigfloat%pi,?bigfloat%e,?\*bfmhalf\*,?\*bfhalf\*,?\*bigfloatone\*,?\*bigfloatzero\*),0);
0$
\ No newline at end of file
diff --git a/src/float-properties.lisp b/src/float-properties.lisp
index 9f4fb65ad..a14a6fdb1 100644
--- a/src/float-properties.lisp
+++ b/src/float-properties.lisp
@@ -125,7 +125,7 @@
(expon (- (caddr f) (bigfloat-prec f))))
(cond ((= 0 significand)
; ULP is arbitrarily small for bigfloat 0
- bigfloatzero)
+ *bigfloatzero*)
;; precision of resulting bigfloat not necessarily the same as input
;; but that doesn't matter, since 2^n can be represented exactly in all
;; precisions
diff --git a/tests/rtest_allnummod.mac b/tests/rtest_allnummod.mac
index e8be42e8f..3aee2cea2 100644
--- a/tests/rtest_allnummod.mac
+++ b/tests/rtest_allnummod.mac
@@ -266,10 +266,10 @@ trigsimp(ceiling(asin(cos(sqrt(2))^2 + sin(sqrt(2))^2 - 1/7)));
/* SF bug #1644378 */
-(x : ?bigfloatone,0);
+(x : ?\*bigfloatone\*,0);
0$
-(ceiling(log(2)), is(x = ?bigfloatone));
+(ceiling(log(2)), is(x = ?\*bigfloatone\*));
true$
(remvalue(x),0);
commit 9b8a8d96afc8fbbaf68cbc6236700a03c23ff3bf
Author: Raymond Toy <toy...@gm...>
Date: Tue Dec 9 07:27:15 2025 -0800
Rename bfhalf to *bfhalf*
Rename this special var using the lisp convention. This makes it
clear bfhalf is a special variable. We do the same for
`bigfloatzero`, `bigfloatone`, and `bfmhalf`. Update docstrings to
say that these are updated when fpprec is set.
diff --git a/src/cpoly.lisp b/src/cpoly.lisp
index 19d52c988..6de509cca 100644
--- a/src/cpoly.lisp
+++ b/src/cpoly.lisp
@@ -1057,12 +1057,12 @@
dx (fpquotient (fpdifference (fplog (aref *shr-sl* *nn*))
(fplog (aref *shr-sl* 0)))
(intofp *nn*))
- *polysc1* (fpentier (bcons (fpplus (cdr bfhalf)
+ *polysc1* (fpentier (bcons (fpplus (cdr *bfhalf*)
(fpquotient dx *logbas*))))
x (fpplus x (fptimes* (intofp (* *polysc1* *nn*))
(fptimes* *logbas*
- (cdr bfhalf))))
- *polysc* (fpentier (bcons (fpplus (cdr bfhalf) (fpquotient x *logbas*))))))
+ (cdr *bfhalf*))))
+ *polysc* (fpentier (bcons (fpplus (cdr *bfhalf*) (fpquotient x *logbas*))))))
(cond ((equalp (aref *shr-sl* i) (intofp 0))
(setq j (1+ j)))
(t
@@ -1142,7 +1142,7 @@
((or bool1
(fpgreaterp omp mp)
;;(not (< relstp 0.05))
- (fpgreaterp relstp (cdr bfhalf)))
+ (fpgreaterp relstp (cdr *bfhalf*)))
(if (fpgreaterp (fptimes* (intofp 0.1) mp)
omp)
(return t)
@@ -1199,7 +1199,7 @@
(cond ((and (not *bool*)
test
(not (= j l2)))
- (cond ((fpgreaterp (fptimes* (cdr bfhalf) (bf-cmod-sl *zr* *zi*))
+ (cond ((fpgreaterp (fptimes* (cdr *bfhalf*) (bf-cmod-sl *zr* *zi*))
(bf-cmod-sl (fpdifference *tr* otr)
(fpdifference *ti* oti)))
(cond (pasd
@@ -1231,7 +1231,7 @@
;; bfloat epsilon. 2^(-fpprec)
(*are* (bf-scale-float (intofp 2) (- fpprec)))
(*mre* (intofp 0))
- (xx (fproot bfhalf 2))
+ (xx (fproot *bfhalf* 2))
(yy (intofp 0))
;; cos(94deg). Probably don't need full bfloat precision here.
(cosr (intofp -0.0697564737441253007759588351941433286009032016527965250436172961370711270667891229125378568280742923028942076107741717160209821557740512756197740925891665208235244345674420755726285778495732000059330205461129612198466216775458241726113210999152981126990497403794217445425671287263223529689424188857433131142804))
@@ -1469,7 +1469,7 @@
(*infin* (intofp +most-positive-flonum+))
(*are* (bf-scale-float (intofp 2) (- fpprec)))
(*mre* (intofp 0))
- (xx (fproot bfhalf 2))
+ (xx (fproot *bfhalf* 2))
(yy (intofp 0))
;; cos(94deg)
(cosr (intofp
diff --git a/src/expintegral.lisp b/src/expintegral.lisp
index 77c523c98..88af88e04 100644
--- a/src/expintegral.lisp
+++ b/src/expintegral.lisp
@@ -703,7 +703,7 @@
(defun bfloat-expintegral-e (n z)
(let ((*expint-eps* (power ($bfloat 10.0) (- $fpprec)))
(*expint-maxit* 5000) ; arbitrarily chosen, we need a better choice
- (bigfloattwo (add bigfloatone bigfloatone))
+ (bigfloattwo (add *bigfloatone* *bigfloatone*))
(bigfloat%e ($bfloat '$%e))
(bigfloat%gamma ($bfloat '$%gamma))
(flz (complex ($float ($realpart z)) ($float ($imagpart z)))))
@@ -721,8 +721,8 @@
(when *debug-expintegral*
(format t "~&We expand in continued fractions.~%"))
(let* ((b (add z n))
- (c (div bigfloatone (mul *expint-eps* *expint-eps*)))
- (d (cdiv bigfloatone b))
+ (c (div *bigfloatone* (mul *expint-eps* *expint-eps*)))
+ (d (cdiv *bigfloatone* b))
(n1 (- n 1))
(h d)
(e 0.0))
@@ -733,12 +733,12 @@
(intl:gettext "expintegral_e: continued fractions failed.")))
(setq b (add b bigfloattwo))
- (setq d (cdiv bigfloatone (add (mul a d) b)))
+ (setq d (cdiv *bigfloatone* (add (mul a d) b)))
(setq c (add b (cdiv a c)))
(setq e (cmul c d))
(setq h (cmul h e))
- (when (eq ($sign (sub (cabs (sub e bigfloatone)) *expint-eps*))
+ (when (eq ($sign (sub (cabs (sub e *bigfloatone*)) *expint-eps*))
'$neg)
(when *debug-expintegral*
(setq *debug-expint-bfloatmaxit*
@@ -750,9 +750,9 @@
(format t "~&We expand in a power series.~%"))
(let* ((n1 (- n 1))
(meuler (mul -1 bigfloat%gamma))
- (r (if (= n1 0) (sub meuler ($log z)) (div bigfloatone n1)))
- (f bigfloatone)
- (e bigfloatzero))
+ (r (if (= n1 0) (sub meuler ($log z)) (div *bigfloatone* n1)))
+ (f *bigfloatone*)
+ (e *bigfloatzero*))
(do* ((i 1 (+ i 1)))
((> i *expint-maxit*)
(merror (intl:gettext "expintegral_e: series failed.")))
@@ -761,7 +761,7 @@
((= i n1)
(let ((psi meuler))
(dotimes (ii n1)
- (setq psi (add psi (cdiv bigfloatone (+ ii 1)))))
+ (setq psi (add psi (cdiv *bigfloatone* (+ ii 1)))))
(setq e (cmul f (sub psi ($log z))))))
(t
(setq e (cdiv (mul -1 f) (- i n1)))))
@@ -783,7 +783,7 @@
(defun frac-bfloat-expintegral-e (n z)
(let ((*expint-eps* (power ($bfloat 10.0) (- $fpprec)))
(*expint-maxit* 5000) ; arbitrarily chosen, we need a better choice
- (bigfloattwo (add bigfloatone bigfloatone))
+ (bigfloattwo (add *bigfloatone* *bigfloatone*))
(bigfloat%e ($bfloat '$%e))
(bigfloat%gamma ($bfloat '$%gamma)))
@@ -795,13 +795,13 @@
(cond
((and (or (eq ($sign ($realpart z)) '$pos)
(eq ($sign ($realpart z)) '$zero))
- (eq ($sign (sub (cabs z) bigfloatone)) '$pos))
+ (eq ($sign (sub (cabs z) *bigfloatone*)) '$pos))
;; We expand in continued fractions.
(when *debug-expintegral*
(format t "We expand in continued fractions.~%"))
(let* ((b (add z n))
- (c (div bigfloatone (mul *expint-eps* *expint-eps*)))
- (d (cdiv bigfloatone b))
+ (c (div *bigfloatone* (mul *expint-eps* *expint-eps*)))
+ (d (cdiv *bigfloatone* b))
(n1 (sub n 1))
(h d)
(e 0.0))
@@ -812,12 +812,12 @@
(intl:gettext "expintegral_e: continued fractions failed.")))
(setq b (add b bigfloattwo))
- (setq d (cdiv bigfloatone (add (mul a d) b)))
+ (setq d (cdiv *bigfloatone* (add (mul a d) b)))
(setq c (add b (cdiv a c)))
(setq e (cmul c d))
(setq h (cmul h e))
- (when (eq ($sign (sub (cabs (sub e bigfloatone)) *expint-eps*))
+ (when (eq ($sign (sub (cabs (sub e *bigfloatone*)) *expint-eps*))
'$neg)
(when *debug-expintegral*
(setq *debug-expint-fracbfloatmaxit*
@@ -831,7 +831,7 @@
(and ($bfloatp n)
(eq ($sign n) '$pos)
(equal (sub (mul 2 ($fix n)) (mul 2 n))
- bigfloatzero)))
+ *bigfloatzero*)))
;; We have a Float or Bigfloat representation of positive integer.
;; We call bfloat-expintegral-e.
(when *debug-expintegral*
@@ -843,16 +843,16 @@
;; of an integer) or complex. We expand in a power series.
(when *debug-expintegral*
(format t "We expand in a power series.~%"))
- (let* ((n1 (sub n bigfloatone))
- (n2 (sub bigfloatone n))
+ (let* ((n1 (sub n *bigfloatone*))
+ (n2 (sub *bigfloatone* n))
(gm (take '(%gamma) n2))
- (r (sub (cmul (cpower z n1) gm) (cdiv bigfloatone n2)))
- (f bigfloatone)
- (e bigfloatzero))
+ (r (sub (cmul (cpower z n1) gm) (cdiv *bigfloatone* n2)))
+ (f *bigfloatone*)
+ (e *bigfloatzero*))
(do ((i 1 (+ i 1)))
((> i *expint-maxit*)
(merror (intl:gettext "expintegral_e: series failed.")))
- (setq f (cmul (mul -1 bigfloatone) (cmul f (cdiv z i))))
+ (setq f (cmul (mul -1 *bigfloatone*) (cmul f (cdiv z i))))
(setq e (cdiv (mul -1 f) (sub i n1)))
(setq r (add r e))
(when (eq ($sign (sub (cabs e) (cmul (cabs r) *expint-eps*)))
@@ -1180,11 +1180,11 @@
(defun bfloat-expintegral-ei (z)
(let ((mz (mul -1 z)))
- (add (cmul (mul -1 bigfloatone)
+ (add (cmul (mul -1 *bigfloatone*)
(bfloat-expintegral-e 1 mz))
- (sub (cmul (div bigfloatone 2)
+ (sub (cmul (div *bigfloatone* 2)
(sub (take '(%log) z)
- (take '(%log) (cdiv bigfloatone z))))
+ (take '(%log) (cdiv *bigfloatone* z))))
(take '(%log) mz)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/src/float.lisp b/src/float.lisp
index 1ecacc822..73462c3ec 100644
--- a/src/float.lisp
+++ b/src/float.lisp
@@ -73,10 +73,10 @@
(if (or (not (fixnump q)) (< q 1))
(merror (intl:gettext "fpprec: value must be a positive integer; found: ~M") q))
(setq fpprec (+ 2 (integer-length (expt 10. q)))
- bigfloatone ($bfloat 1)
- bigfloatzero ($bfloat 0)
- bfhalf (list (car bigfloatone) (cadr bigfloatone) 0)
- bfmhalf (list (car bigfloatone) (- (cadr bigfloatone)) 0))
+ *bigfloatone* ($bfloat 1)
+ *bigfloatzero* ($bfloat 0)
+ *bfhalf* (list (car *bigfloatone*) (cadr *bigfloatone*) 0)
+ *bfmhalf* (list (car *bigfloatone*) (- (cadr *bigfloatone*)) 0))
q)
;; FPSCAN is called by lexical scan when a
@@ -598,7 +598,7 @@
(let ((fprateps (cdr ($bfloat (if $bftorat
(list '(rat simp) 1 (exptrl 2 (1- fpprec)))
$ratepsilon)))))
- (or (and (equal x bigfloatzero) (cons 0 1))
+ (or (and (equal x *bigfloatzero*) (cons 0 1))
(prog (y a)
(return (do ((xx x (setq y (invertbigfloat
(bcons (fpdifference (cdr xx) (cdr ($bfloat a)))))))
@@ -768,7 +768,7 @@
;; that and signal a domain error if so. There
;; are no other bfloat values where tan(x) or
;; sin(x) is zero.
- (when (equal (second x) bigfloatzero)
+ (when (equal (second x) *bigfloatzero*)
(domain-error (second x) (caar x)))
(invertbigfloat
($bfloat (list (ncons (safe-get (caar x) 'recip)) y))))
@@ -788,7 +788,7 @@
(defun addbigfloat (h)
(prog (fans tst r nfans)
- (setq fans (setq tst bigfloatzero) nfans 0)
+ (setq fans (setq tst *bigfloatzero*) nfans 0)
(do ((l h (cdr l)))
((null l))
(cond ((setq r (bigfloatp (car l)))
@@ -1222,7 +1222,7 @@
;; value because 1 is always an exact bfloat.
(defun fpone ()
(cond (*decfp (intofp 1))
- ((= fpprec (bigfloat-prec bigfloatone)) (cdr bigfloatone))
+ ((= fpprec (bigfloat-prec *bigfloatone*)) (cdr *bigfloatone*))
(t (intofp 1))))
;;----------------------------------------------------------------------------;;
@@ -1729,9 +1729,9 @@
(power -1 n))
(exptbigfloat (bcons (fpminus (cdr p))) n)))
((and (< (cadr p) 0) (not (integerp n)))
- (cond ((or (equal n 0.5) (equal n bfhalf))
+ (cond ((or (equal n 0.5) (equal n *bfhalf*))
(exptbigfloat p '((rat simp) 1 2)))
- ((or (equal n -0.5) (equal n bfmhalf))
+ ((or (equal n -0.5) (equal n *bfmhalf*))
(exptbigfloat p '((rat simp) -1 2)))
(($bfloatp (setq n ($bfloat n)))
(cond ((equal n ($bfloat (fpentier n)))
@@ -2193,7 +2193,7 @@
(cond ((minusp (car fp-x))
;; asin(-x) = -asin(x);
(mul -1 (fpasin (bcons (fpminus fp-x)))))
- ((fplessp fp-x (cdr bfhalf))
+ ((fplessp fp-x (cdr *bfhalf*))
;; 0 <= x < 1/2
;; asin(x) = atan(x/sqrt(1-x^2))
(bcons
@@ -2349,17 +2349,17 @@
(multiple-value-bind (u v)
(complex-atanh x (bcons (intofp 0)))
(add u (mul '$%i v))))
- ((fpgreaterp fp-x (cdr bfhalf))
+ ((fpgreaterp fp-x (cdr *bfhalf*))
;; atanh(x) = 1/2*log1p(2*x/(1-x))
(bcons
- (fptimes* (cdr bfhalf)
+ (fptimes* (cdr *bfhalf*)
(fplog1p (fpquotient (fptimes* (intofp 2) fp-x)
(fpdifference (fpone) fp-x))))))
(t
;; atanh(x) = 1/2*log1p(2*x + 2*x*x/(1-x))
(let ((2x (fptimes* (intofp 2) fp-x)))
(bcons
- (fptimes* (cdr bfhalf)
+ (fptimes* (cdr *bfhalf*)
(fplog1p (fpplus 2x
(fpquotient (fptimes* 2x fp-x)
(fpdifference (fpone) fp-x)))))))))))
@@ -2424,11 +2424,11 @@
(fppi-val (fppi)))
(if x-lt-minus-1
- (fptimes* fppi-val (cdr bfhalf))
+ (fptimes* fppi-val (cdr *bfhalf*))
(if x-gt-plus-1
- (fptimes* fppi-val (cdr bfmhalf))
+ (fptimes* fppi-val (cdr *bfmhalf*))
'(0 0))))
- (fptimes* (cdr bfmhalf)
+ (fptimes* (cdr *bfmhalf*)
(fpatan2 (fptimes* (intofp 2) y)
(fpdifference (fptimes* 1-x (fpplus fp1 x))
t1^2))))))
diff --git a/src/gamma.lisp b/src/gamma.lisp
index c7a0d0f2e..176d4210e 100644
--- a/src/gamma.lisp
+++ b/src/gamma.lisp
@@ -312,7 +312,7 @@
(defun bfloat-double-factorial (z)
(let* ((pival ($bfloat '$%pi))
- (bigfloat1 ($bfloat bigfloatone))
+ (bigfloat1 ($bfloat *bigfloatone*))
(bigfloat2 (add bigfloat1 bigfloat1))
(bigfloat4 (add bigfloat2 bigfloat2))
($ratprint nil))
@@ -2032,10 +2032,10 @@
(bfloat-log-gamma z))))
(t
(let* ((k (* 2 (+ 1 ($entier (* 0.41 $fpprec)))))
- (m ($bfloat bigfloatone))
+ (m ($bfloat *bigfloatone*))
(z+k (add z k -1))
(y (power z+k 2))
- (x ($bfloat bigfloatzero))
+ (x ($bfloat *bigfloatzero*))
(ii))
(dotimes (i (/ k 2))
(setq ii (* 2 (+ i 1)))
@@ -2080,10 +2080,10 @@
(complex-bfloat-log-gamma z))))
(t
(let* ((k (* 2 (+ 1 ($entier (* 0.41 $fpprec)))))
- (m ($bfloat bigfloatone))
+ (m ($bfloat *bigfloatone*))
(z+k (add z k -1))
(y ($rectform (power z+k 2)))
- (x ($bfloat bigfloatzero))
+ (x ($bfloat *bigfloatzero*))
(ii))
(dotimes (i (/ k 2))
(setq ii (* 2 (+ i 1)))
@@ -2250,20 +2250,20 @@
(simplify (list '(%signum) z))
(sub 1
(mul
- (div 1 (power ($bfloat '$%pi) bfhalf))
- (bfloat-gamma-incomplete bfhalf ($bfloat (power z 2))))))))
+ (div 1 (power ($bfloat '$%pi) *bfhalf*))
+ (bfloat-gamma-incomplete *bfhalf* ($bfloat (power z 2))))))))
(defun complex-bfloat-erf (z)
;; Warning! This has round-off problems when abs(z) is very small.
(let* (($ratprint nil)
(result
(cmul
- (cdiv (cpower (cpower z 2) bfhalf) z)
+ (cdiv (cpower (cpower z 2) *bfhalf*) z)
(sub 1
(cmul
- (div 1 (power ($bfloat '$%pi) bfhalf))
+ (div 1 (power ($bfloat '$%pi) *bfhalf*))
(complex-bfloat-gamma-incomplete
- bfhalf
+ *bfhalf*
($bfloat (cpower z 2))))))))
(cond
((zerop1 ($imagpart z))
diff --git a/src/globals.lisp b/src/globals.lisp
index 76644e4d4..fbdc95be6 100644
--- a/src/globals.lisp
+++ b/src/globals.lisp
@@ -793,19 +793,27 @@
rounding purposes."
:properties ((assign 'fpprec1)))
-(defmvar bigfloatzero '((bigfloat simp 56.) 0 0)
- "Bigfloat representation of 0"
+(defmvar *bigfloatzero*
+ '((bigfloat simp 56.) 0 0)
+ "Bigfloat representation of 0 Automatically updated whenever fpprec
+ is set."
in-core)
-(defmvar bigfloatone '((bigfloat simp 56.) #.(expt 2 55.) 1)
- "Bigfloat representation of 1"
+(defmvar *bigfloatone*
+ '((bigfloat simp 56.) #.(expt 2 55.) 1)
+ "Bigfloat representation of 1. Automatically updated whenever fpprec
+ is set."
in-core)
-(defmvar bfhalf '((bigfloat simp 56.) #.(expt 2 55.) 0)
- "Bigfloat representation of 1/2")
+(defmvar *bfhalf*
+ '((bigfloat simp 56.) #.(expt 2 55.) 0)
+ "Bigfloat representation of 1/2. Automatically updated whenever fpprec
+ is set.")
-(defmvar bfmhalf '((bigfloat simp 56.) #.(- (expt 2 55.)) 0)
- "Bigfloat representation of -1/2")
+(defmvar *bfmhalf*
+ '((bigfloat simp 56.) #.(- (expt 2 55.)) 0)
+ "Bigfloat representation of -1/2. Automatically updated whenever
+ fpprec is set.")
(defmvar bigfloat%e '((bigfloat simp 56.) 48968212118944587. 2)
"Bigfloat representation of %E")
diff --git a/src/nummod.lisp b/src/nummod.lisp
index c2fa9f300..e5094b2c9 100644
--- a/src/nummod.lisp
+++ b/src/nummod.lisp
@@ -94,7 +94,7 @@
;; For an example, see pretty-good-floor-or-ceiling. Code courtesy of Stavros Macrakis.
(defmacro bind-fpprec (val &body exprs)
- `(let (fpprec bigfloatzero bigfloatone bfhalf bfmhalf)
+ `(let (fpprec *bigfloatzero* *bigfloatone* *bfhalf* bfmhalf)
(let (($fpprec (fpprec1 nil ,val)))
,@exprs)))
diff --git a/src/rpart.lisp b/src/rpart.lisp
index 09396e1f3..2365cc72c 100644
--- a/src/rpart.lisp
+++ b/src/rpart.lisp
@@ -689,7 +689,7 @@
(t (cons (take '(mabs) l) (genatan 0 l))))))))
((eq '$zero (let ((sign-imag-errp nil)) (catch 'sign-imag-err ($sign l))))
(cond ((some-bfloatp l)
- (cons bigfloatzero bigfloatzero)) ; contagious
+ (cons *bigfloatzero* *bigfloatzero*)) ; contagious
((some-floatp l)
(cons 0.0 0.0))
(t (cons 0 0))))
diff --git a/src/simp.lisp b/src/simp.lisp
index 1a1b97d41..760e8f679 100644
--- a/src/simp.lisp
+++ b/src/simp.lisp
@@ -1269,7 +1269,7 @@
(/ (cadr x) (caddr x)))
((and (floatp (cadr x)) (floatp (caddr x)) #-ieee-floating-point (not (zerop (caddr x))))
(/ (cadr x) (caddr x)))
- ((and ($bfloatp (cadr x)) ($bfloatp (caddr x)) (not (equal bigfloatzero (caddr x))))
+ ((and ($bfloatp (cadr x)) ($bfloatp (caddr x)) (not (equal *bigfloatzero* (caddr x))))
;; Call BIGFLOATP to ensure that arguments have same precision.
;; Otherwise FPQUOTIENT could return a spurious value.
(bcons (fpquotient (cdr (bigfloatp (cadr x))) (cdr (bigfloatp (caddr x))))))
@@ -1893,10 +1893,10 @@
(cond ((mnump r1) (addk 0.0 r1))
;; Do not simplify the type of the number away.
(t (list '(mexpt simp) r1 1.0))))
- ((equal r2 bigfloatone)
+ ((equal r2 *bigfloatone*)
(cond ((mnump r1) ($bfloat r1))
;; Do not simplify the type of the number away.
- (t (list '(mexpt simp) r1 bigfloatone))))
+ (t (list '(mexpt simp) r1 *bigfloatone*))))
((zerop1 r1)
(cond ((or (zerop1 r2) (mnegp r2))
(if (not errorsw)
@@ -1904,7 +1904,7 @@
(throw 'errorsw t)))
(t (zerores r1 r2))))
((or (zerop1 r2) (onep1 r1))
- (cond ((or ($bfloatp r1) ($bfloatp r2)) bigfloatone)
+ (cond ((or ($bfloatp r1) ($bfloatp r2)) *bigfloatone*)
((or (floatp r1) (floatp r2)) 1.0)
(t 1)))
((or ($bfloatp r1) ($bfloatp r2)) ($bfloat (list '(mexpt) r1 r2)))
@@ -2196,7 +2196,7 @@
;; A numeric constant like %e, %pi, ... and
;; exponent is a float or bigfloat value.
(return (if (and (member gr *builtin-numeric-constants*)
- (equal pot bigfloatone))
+ (equal pot *bigfloatone*))
;; Return a bigfloat value.
($bfloat gr)
;; Return a float value.
@@ -2742,7 +2742,7 @@
(t (list '(mexpt simp) '$%e pot))))
(defun zerores (r1 r2)
- (cond ((or ($bfloatp r1) ($bfloatp r2)) bigfloatzero)
+ (cond ((or ($bfloatp r1) ($bfloatp r2)) *bigfloatzero*)
((or (floatp r1) (floatp r2)) 0.0)
(t 0)))
-----------------------------------------------------------------------
hooks/post-receive
--
Maxima CAS
|