From 0dc170977a8c80ae4653a21928a5643389983d51 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Thu, 16 May 2002 16:48:32 +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 b735a725f..0e098dd56 100644 --- a/ice-9/boot-9.scm +++ b/ice-9/boot-9.scm @@ -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