chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Bignums in core


From: Thomas Bushnell BSG
Subject: Re: [Chicken-users] Bignums in core
Date: Sat, 03 Oct 2009 23:19:41 -0700

So "bignum" is really not a Scheme concept.  It's a particular
implementation strategy.  Let's talk about the Scheme data types here.
Chicken scheme allows exact integers of limited size, and the limit is
fairly small.

The point here is that it is patently obvious that in fact you *do* need
larger exact integers than Chicken Scheme supports at present.  Having
inexact integers be used is, in my opinion, as wrong as accepting
eight-byte blobs and using those as 64 bit integers.

Thomas


On Sat, 2009-10-03 at 23:07 -0700, Nicholas "Indy" Ray wrote:
> Bignums are nice and all, but I hardly see it as a practical
> necessity. Plus if I had to choose between fix/flonums or bignums and
> slower number performance, I'd choose the prior, that is why I use
> chicken!
> 
> 
> Indy 
> 
> 
> On Sat, Oct 3, 2009 at 10:39 PM, John Cowan <address@hidden> wrote:
>         Kon Lovett scripsit:
>         
>         > I am not defending the lack of bignums in Chicken. Just
>         trying to
>         > understand the need.
>         
>         
>         I think at this point it's about what people expect from a
>         Scheme.
>         Of the pre-R6RS implementations I tested, all of PLT, Gauche,
>         MIT Scheme,
>         Gambit, Bigloo, Scheme48/scsh, Guile, Kawa, SISC, Chez, SCM,
>         STklos,
>         and even tiny Chibi provide bignums.  In effect, bignums have
>         become
>         part of what a Scheme is.  Most of these systems limit bignums
>         in one
>         way or another to a size far less than all of memory, but all
>         of them
>         AFAIK handle numbers up to at least 2^(2^15).
>         
>         Scraping the bottom of the implementation barrel, SigScheme
>         has 28-bit
>         fixnums and signals an error if you overflow them; however,
>         bignum
>         literals are interpreted as flonums.  SXM and S7, which are
>         extremely
>         minimal, wrap at 31 bits and 64 bits respectively, which is
>         not even
>         R5RS-conformant; SXM actually crashes if it reads a bignum
>         literal.
>         
>         Chicken and only Chicken converts fixnum operations to flonums
>         on
>         overflow.  This behavior is certainly licensed by R5RS, but it
>         doesn't
>         fit very well into the Scheme ecology.  The numbers egg just
>         isn't a
>         substitute for bignums in the core (and particularly in the
>         FFI).
>         
>         --
>         Normally I can handle panic attacks on my own;   John Cowan
>         <address@hidden>
>         but panic is, at the moment, a way of life.
>          http://www.ccil.org/~cowan
>         
>         
>         _______________________________________________
>         Chicken-users mailing list
>         address@hidden
>         http://lists.nongnu.org/mailman/listinfo/chicken-users
>         
> 
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/chicken-users





reply via email to

[Prev in Thread] Current Thread [Next in Thread]