For exponentiation, R[34]RS noted the convention
"0^0 is defined to be equal to 1."

R5RS clarified this as "0^z is 1 if z = 0 and 0 otherwise."

R6RS changes this to:

  (expt z1 z2)    procedure

  Returns z1 raised to the power z2.  For nonzero z1, this is
  e^{z2 log z1}.  0.0^z is 1.0 if z = 0.0, and 0.0 if (real-part z) is
  positive.  For other cases in which the first argument is zero,
  either an exception is raised with condition type
  &implementation-restriction, or an unspecified number object is
  returned.

As a minor issue, it replaced the exact numbers with
inexact numbers, although all but one of the zero base
examples are exact.  I'm assuming this was a stylistic
change, and that from the examples the intention is the
rule applies to any base which answers #t to `zero?'.

What I'm more interested in is the unusual behavior
that the result _either_ raises an exception _or_ returns
an unspecified number.  I believe this is the only place
in any of the reports where the semantics is the disjunction
of signalling an error and an unspecified value.  What's
the story behind this?

Thanks,

--
Alex

_______________________________________________
r6rs-discuss mailing list
r6rs-discuss@lists.r6rs.org
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to