Expt weird behaviour



I got this error:

79571> (expt -2 2)

79571> (expt -2.0 2)
Error: ‘expt’ invalid result

of course, the implementation of expt in a float domain (according to common lisp) is a little bit tricky because it can involve also complex numbers. But in this specific situation, it should return 4.0


You’re right - it should be able to return a result if the first argument is a negative float provided the second argument is an integer. I’ll add that to the bug list.



This is fixed in uLisp 3.5.