ECL? was ..Re: Runtime determination of share directories?
Subject: ECL? was ..Re: Runtime determination of share directories?
From: Raymond Toy
Date: Fri, 23 Jan 2009 20:07:00 -0500
Michael Abshoff wrote:
> Raymond Toy wrote:
>
>> I didn't find it that easy to build MPFR and/or GMP.
>>
>
> Ok, I personally have zero problems with GMP and MPFR while getting
> various lisps to compile did cost me considerable more effort. And gcc
> 4.2.x recommends GMP and MPFR while 4.3.x and later require it for
>
Yes, I had to build mpfr and gmp because gcc wanted them. It took a
while to get it built. (I don't normally do this unless I have to. I
thought I needed a recent gcc on solaris/sparc.) So now I actually have
them available.
> constant folding. So any system providing recent gcc should have them
> available. Ecl has its own GMP copy in tree and so do other lisp
> implementations.
>
>
>> But Maxima can't run without a lisp, but it does run well (quite well,
>> IMNSHO) without MPFR/GMP. :-)
>>
>
> Absolutely, but given the periodically reappearing discussion about
> easier use of external libraries written in C/C++/Fortran something
> worthwhile to think about IMHO would be MPFR. Since I am not doing any
> of the work this is merely a suggestion.
>
The best part of using an ffi is having my lisp die because I called the
foreign function incorrectly. Or it decided an error happened and
exiting is the best way. :-)
(But I do use FFI for stuff, as needed.)
>> Do you have such an example? I'd really like to see it, since I
>>
>
> I need to dig it out of the Sage bug tracker and that will take some time.
>
I would certainly like it, but if it's too much work, that's ok.
>
>
> AFAIK the advantage if qd is that it sets rounding mode to 53 bits and
> hence does not rely on 80 bit representation. There is a well known
> paper that shows that compilers optimizing expression trees will cause
> precision loss. But qd at least to my understanding should not be
> affected by this issue.
>
>
Setting the rounding mode to 53 bits isn't actually enough. I saw some
Java numerics slide that explained this. Even though the precision was
53 bits, the exponent is still 16 bits, so numbers don't
underflow/overflow as you would expect for double precision. The slides
explained how to solve this problem, but it added a factor of 2-4 in
execution or something like that.
Ray