(expt 1 #c(2 2)) signals an error incorrectly
Describe the bug
(expt 1 #c(2 2))
signals an error when it shouldn't. Similarly
(expt 1.0 #c(2 2))
signals too, but (expt 1d0 #c(2 2))
does not
and returns #c(1.0d0 0d0)
.
To Reproduce
Steps to reproduce the behavior:
- Evaluate
(expt 1 #c(2 2))
- See error:
Argument POWER is not a NUMBER: #C(2 2).
[Condition of type SIMPLE-TYPE-ERROR]
Expected behavior
This is well-defined and cmucl should return a result.
The number-dispatch
form in expt
is probably missing a case for
rational base and single-float base.
Desktop (please complete the following information):
- OS: All
- Version
snapshot-2021-07
, probably earlier
Additional info
This was found in ansi-tests, test EXPT.29