[r6rs-discuss] incorrect result in example for expt
Chongkai Zhu
czhu at cs.utah.edu
Sun Aug 10 23:15:37 EDT 2008
I can't understand why (expt 0 0) should be 1. Would anyone explain?
Chongkai
William D Clinger wrote:
> In the specification of expt in R6RS section 11.7.4.3,
> the following example is incorrect:
>
> (expt 0 5+.0000312i) => 0
>
> Implementations are required to return an inexact
> result for that example, following the general rule
> stated in R6RS section 11.7.1:
>
> The general rule is that the generic operations...
> return an inexact result when any argument is
> inexact.
>
> The example does not fall within the general exception
> to that rule (stated in the paragraph following the
> general rule) because (expt 0 0) is 1 but (expt 0 1)
> is 0. Since the value of the second argument affects
> the result, passing an inexact value for the second
> argument mandates an inexact result.
>
> Will
>
> _______________________________________________
> r6rs-discuss mailing list
> r6rs-discuss at lists.r6rs.org
> http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
>
More information about the r6rs-discuss
mailing list