Ray Dillinger scripsit:
> We already have examples of at least most of these behaviors in
> extant schemes; MIT/GNU (and many others) coerce to bignum,
R5RS says an implementation must coerce to bignums if it has them.
Specifically (6.2.3):
Implementations are encouraged, but not required, to support
exact integers and exact rationals of practically unlimited size
and precision, and to implement the above procedures and the /
procedure in such a way that they always return exact results
when given exact arguments. If one of these procedures is unable
to deliver an exact result when given exact arguments, then it
may either report a violation of an implementation restriction
or it may silently coerce its result to an inexact number.
So when the result is too big to store exactly whether as a fixnum or
a bignum (and even with bignums, an infinite number of integers will be
bigger than the biggest bignum on the system), a conformant implementation
may coerce-float or signal-error, but not wraparound.
> Stalin (and many others) silently wraparound
So far I've only found Stalin and Chibi.
> and I've seen at least one system that coerces to float
Chicken (without -R numbers)
> and one that reports an overflow error,
Haven't found any of those.
--
John Cowan http://ccil.org/~cowan [email protected]
All "isms" should be "wasms". --Abbie
_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss