[r6rs-discuss] incorrect result in example for expt
William D Clinger
will at ccs.neu.edu
Sun Aug 10 22:47:52 EDT 2008
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
More information about the r6rs-discuss
mailing list