From 0ad7cc4f972609128a84c3845f3d29ac14e7e32f Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sat, 5 Oct 2002 04:10:48 +0000 Subject: [PATCH] * boot-9.scm (expt): switch if sense and use negative? rather than >= 0. --- ice-9/boot-9.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ice-9/boot-9.scm b/ice-9/boot-9.scm index 6e6f1e1fb..c1a03f000 100644 --- a/ice-9/boot-9.scm +++ b/ice-9/boot-9.scm @@ -690,9 +690,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