[Ecls-list] Re: Decimal Numbers

Marco Antoniotti marcoxa at cs.nyu.edu
Thu Aug 18 14:18:41 UTC 2005


On Aug 17, 2005, at 5:18 PM, GP lisper wrote:

> On Wed, 17 Aug 2005 07:14:07 -0400, <marcoxa at cs.nyu.edu> wrote:
>>
>> On Aug 17, 2005, at 3:18 AM, GP lisper wrote:
>>
>>> Does someone have a quick guessimate about:
>>>
>>> A)  Adding the Decimal Number type into ECL
>>
>> This is a useful enterprise only if the final aim is to provide a
>> portable package, that can be used on all implementations.
>
> Well, maybe not.  It would attract people to ECL when they needed
> decimal numbers.  I primarily use CMUCL, when I thought about this my
> first choice was 'slisp', then ECL.  Changes such as the above need a
> simple place to grow, CMUCL is too big and not easy to hack.  Solving
> it for ECL and then letting it spread to other lisps is an easier
> approach.

First of all, as much as I like ECL, I care about Common Lisp as a 
whole first.
If you just need to wrap a C library then you can do so using this of 
that FFI and maybe UFFI.  So that would solve that problem.  Of course 
a full blown portable CL re-implementation would be better.

>
>>> B)  Replacing floats with Decimal Numbers.
>>
>> You got to be kidding! :)
>
> Nope.  For someone as clueless as me, floats would provide a roadmap
> to where changes need to be made.  The change would trade speed for
> accuracy, some people think that is an excellent tradeoff.  The
> Decimal Number package has enough numeric range for most users
> (exponents to 999).
>
> My primary use of Common Lisp is for money related programs, floats
> are giving ~<1% errors.  There is a recurring thread on c.l.l about
> those errors.
>
>
> But I was really looking for an estimate of effort, I know it's not
> simple, but I wonder if it is within my reach...

It is not a question of "within your reach" or not.  Floats are in the 
ANSI spec, you cannot remove them and still have a Common Lisp.

Cheers
--
Marco Antoniotti					http://bioinformatics.nyu.edu
NYU Courant Bioinformatics Group		tel. +1 - 212 - 998 3488
715 Broadway 10th FL				fax. +1 - 212 - 998 3484
New York, NY, 10003, U.S.A.





More information about the ecl-devel mailing list