mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-23 13:00:34 +02:00
* boot-9.scm (expt): switch if sense and use negative? rather than
>= 0.
This commit is contained in:
parent
497092c9d1
commit
0ad7cc4f97
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue