Post #1782127
2026-04-27 06:58 UTC
Replies (2)
-
@simon_brooke@mastodon.scot 2026-04-27 07:10
@screwlisp **but**, if you convert an integer to ratio, then the divisor will necessarily be one; so if it is true that "... an implementation [of expt] might choose to compute (expt x 3/2) as if it had been written (sqrt (expt x 3))" (and at this time in the morning I am not awake enough to evaluate this in my head), then yes, the value of `(expt 3/4 3)` should be a complex number. But if that's so, why is (expt 0.75 3) not also a complex number?
-
@vnikolov@ieji.de 2026-04-27 17:07
@simon_brooke wrote: «... SBCL does not do this: CL-USER[1]: (expt 1/2 3/4) 0.59460354 » What is it that SBCL does not do here? Note that 1/2 to the power of 3/4 is an (algebraic) irrational number, so the value can only be a floating-point number in a Common Lisp implementation without rather fancy extensions. @screwlisp