expt -- r7rs Definition procedure;
Procedure variants:
((real-not-nan real-not-nan) -> (real-not-nan))
real-not-nan;real-not-nan;real-not-nan;((complex-not-nan complex-not-nan) -> (complex-not-nan))
complex-not-nan;complex-not-nan;complex-not-nan;((number number) -> (number-nan))
number-nan;scheme:base -- (scheme base);scheme -- (scheme);(expt z_1 z_2)Returns
z_1raised to the powerz_2. For nonzeroz_1, this isz_1^z_2 = e^(z_2 log z_1)The value of0^zis1if(zero? z),0if(real-part z)is positive, and an error otherwise. Similarly for0.0^z, with inexact results.
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.