I am proposing for small Scheme a rational exponentiation procedure,
which is defined even if inexact numbers are not available; its first
argument is a real number, its second argument is an integer.

I note that in the original and revised reports on Algol 60, a number
raised to a flonum type ("real" in Algol 60 jargon) was always of type
flonum.  However, a number raised to a fixnum ("integer" in Algol 60
jargon) was of the same type as the base, *except* when the fixnum was
negative, in which case the result had type flonum.

This typing rule was the one and only exception to the strong static
typing of the language, and meant that for strict conformance, numerical
expressions involving exponentiation had to be executed at run time
by a dynamically typed interpreter.  This prescription was widely
ignored, and eventually changed by the modified report, which declared
that exponentiation expressions were always of flonum type unless both
operands were fixnums.

-- 
"But I am the real Strider, fortunately,"       John Cowan
he said, looking down at them with his face     [email protected]
softened by a sudden smile.  "I am Aragorn son  http://www.ccil.org/~cowan
of Arathorn, and if by life or death I can
save you, I will."  --LotR Book I Chapter 10

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to