1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-28 16:00:22 +02:00

* boot-9.scm (expt): switch if sense and use negative? rather than

>= 0.
This commit is contained in:
Rob Browning 2002-05-16 16:48:32 +00:00
parent 280804ba43
commit 0dc170977a

View file

@ -694,9 +694,9 @@
(let ((integer-expt integer-expt))
(lambda (z1 z2)
(cond ((integer? z2)
(if (>= z2 0)
(integer-expt z1 z2)
(/ 1 (integer-expt z1 (- z2)))))
(if (negative? z2)
(/ 1 (integer-expt z1 (- z2)))
(integer-expt z1 z2)))
((and (real? z2) (real? z1) (>= z1 0))
($expt z1 z2))
(else