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 > [email protected] > http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss > _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
