Re: [Scheme-reports] Reformulated numeric-tower ballot
Alaric Snell-Pym 01 May 2014 13:07 UTC
On 01/05/14 13:57, Devon Schudy wrote:
> John Cowan wrote:
>> Note also that fixnums often go up to 2^60 these days.
>
> 60-bit fixnums satisfy almost all of the practical need for bignums,
> so they'd be a reasonable minimum. That would force 32-bit
> implementations to provide bignums or at least fixed-precision boxed
> integers (e.g. Java.lang.Long), but avoid unnecessary work for 64-bit
> ones.
The situations in which I need integers beyond 2^30 or so are generally:
1) Sizes of files or other byte-vectors.
2) Cryptographic algorithms - the internals thereof, and useful return
values such as hashes - often use 32-bit or 64-bit or similar sizes.
They're arguably bit vectors rather than numbers, however.
3) Because I'm reading some file format/protocol which has 32-bit or
64-bit fields in it, and need to pass them on. Likewise.
The latter suggest the need for some kind of fixed-precision bit vector
type, which might support some integer operations defined in terms of
twos-complement, perhaps... Which would take the strain off of fixnums.
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