[Ecls-list] ECL's view of floats

Lars Brinkhoff lars at nocrew.org
Mon Aug 28 12:43:02 UTC 2006


Lars Brinkhoff <lars at nocrew.org> writes:
> Juan Jose Garcia-Ripoll wrote:
>> Lars Brinkhoff wrote:
>> > I'm working on a patch to convert ECL to the single/double-float
>> > style, and also to add a third immediate short-float type.
>> The first part is ok with me
> Good.  I'll keep working on that, then.

I'm done with the first part.

(type-of 0.0f0) and (type-of 0.0d0) now returns SINGLE-FLOAT and
DOUBLE-FLOAT, respectively.  SHORT-FLOAT and LONG-FLOAT are considered
to be secondary aliases.  To accomodate this change, other parts of
the implementation, like the compiler and SUBTYPEP, had to be modified
accordingly.

I've also taken the liberty to modify the internal naming conventions
to be consistent with the new names; for example make_shortfloat has
been renamed to make_singlefloat.  I believe this may impliy an API
change for programmers using the C interface.

Testing with ecl-test shows no new failures except :ARRAY-LEGACY-318
which expect the result to be LONG-FLOAT instead of DOUBLE-FLOAT.

Binaries built with the patch are almost exactly the same size as the
original.  Unmodified sizes:

   text    data     bss     dec     hex filename
   1977     324       8    2309     905 ecl-cvs-20060818-orig/build/bin/ecl
1289226   43852   65984 1399062  155916 ecl-cvs-20060818-orig/build/libecl.so
 436189    3312     256  439757   6b5cd ecl-cvs-20060818-orig/build/cmp.fas

Sizes after the modification:

   text    data     bss     dec     hex filename
   1977     324       8    2309     905 ecl-cvs-20060818-sfdf/build/bin/ecl
1289261   43852   65984 1399097  155939 ecl-cvs-20060818-sfdf/build/libecl.so
 436221    3312     256  439789   6b5ed ecl-cvs-20060818-sfdf/build/cmp.fas

The patch is over 3000 lines long, so I'm not sure if it's small
enough to send as an attachment.  It's available from these two
locations:

http://lisp.se/tmp/ecl-cvs-20060818-sfdf.diff
http://www.lisp.se/tmp/ecl-cvs-20060818-sfdf.diff





More information about the ecl-devel mailing list