Re: [Scheme-reports] Reformulated numeric-tower ballot
Alaric Snell-Pym 30 Apr 2014 12:54 UTC
On 29/04/14 23:50, John Cowan wrote:
> Alaric Snell-Pym scripsit:
>
>> I think it's perhaps difficult to define what "bignum support" is,
>> which means that any argument about whether an implementation provides
>> bignums and whether a library requires them is doomed to end up
>> without a useful conclusion.
>
> Actually it's not. Bignum support means that the arithmetic operations
> of Scheme (other than /) are closed on the exact integers. That is,
> when two exact integers are added, the result may be an exact integer
> or the report of an implementation restriction, but on no account an
> inexact number.
To me that sounds like a definition of "fixnums overflow into flonums",
which is something slightly different. A system might have fixnums that
raise a condition rather than overflowing, without having a bignum system.
I'd argue that overflow-to-flonum is questionable (it produces incorrect
results rather than no results, and lets you check for incorrectness
with exact?, but I foresee lots of code not thinking to check for exact?
and silently failing); it strikes me as useful to allow developers to
have mental rules like "exact + exact = exact". I think that people who
don't mind exacts overflowing to inexacts are probably people who wanted
inexacts in the first place and just happened to get an exact when they
typed "10".
But that's orthogonal to whether a system has a multiple-precision
integer facility; the user-facing implication of that is that the range
of exact integers explodes from a few bits short of the machine's word
size to gargantuan impossible mega-numbers that could count not only all
the electrons in the universe, but also all the possible ways of
choosing a million of them, and fun stuff like that. Which is purely an
issue of the valid range.
>
> If bignums don't pass, there will be a ballot about the minimal values
> of most-{positive,negative}-exact-integer.
>
bignums are an implementation issue; minimal ranges are a user issue,
and what happens when those ranges are exceeded (errors or overflows to
inexacts) :-)
ABS
--
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports