[Ecls-list] Another delay...

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Mon Sep 27 08:32:50 UTC 2010


in the release plans. This time it is the Common Lisp reader with a more or
less serious bug report. It involves strtod(), atoi(), etc, functions are
used by ECL which may be affected by the current C locale.

So far I have managed to fix the reader, spitting the functions
ecl_parse_integer and ecl_parse_number into separate, self contained files
(a step towards a deeper reorganization of ECL's code). The changed
functions now rely on bignums and bignum rounding to double/long-float
precision, and in the process I also had to fix ecl_to_double() which did
not round properly in the bignum->float conversion.

Still to be fixed: the printer, which still relies on strtod() to find out
the best precision. I will probably have to backport the function that is
used in FORMAT from Common Lisp to C or do some other trick.

Tests are passed and I tried my best to get things right. The change alters
ECL's behavior slightly. Formerly

> (let ((*read-base* 2)) (read-from-string "3d0"))
|3D0|
3

Now:

> (let ((*read-base* 2)) (read-from-string "3d0"))
3.0d0
3

SBCL and CLISP behave similarly.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100927/6b63751e/attachment.html>


More information about the ecl-devel mailing list