[gambit-list] SRFI-56(Re: Reading binary files)
Christian Jaeger
christian at pflanze.mine.nu
Thu Dec 20 13:21:00 EST 2007
Siegfried Gonzi wrote:
> I always thought there are two types for most of the 'modern languages' (e.g. Clean which I first learnt and Scheme compilers): long integer, and double precision C type?
Maybe some partial answer:
Scheme systems implementing the full numeric tower (like Gambit) have
bignums, "much better" than "long integer". But Gambit also supports
various fixed-size number vectors, see the documentation.
Regarding floating point numbers, you should be aware that x86
processors have 80-bit wide floating point numbers which are not
standard; IEEE standardized 64-bit floating point numbers. The latter
can be chosen by using the "double" type in C, but usually, compiled C
code on PC's does internal calculations in the 80-bit types.
In contrast to this, AFAICT, Gambit always works with clean 64-bit
numbers in it's flonum handling. Of course when using the FFI, C code
usually uses the 80-bit numbers for intermediates.
(I haven't looked at the code you're referring to.)
Christian.
More information about the Gambit-list
mailing list