Re: SRFI-77 with more than one flonum representation
Alan Watson 03 Jul 2006 19:12 UTC
Will Clinger noted that some compilers implement double precision
arithmetic on IA32 using double-extented precision, and then asked:
> If you choose to argue that implementors should be required
> to solve this problem for single precision arithmetic, then
> why aren't you arguing that implementors should be required
> to solve it for double precision arithmetic on the IA32?
I did. In the second to last paragraph of my first reply to John Cowan I
asked for both "convert-to-single-precision-and-back-to-flonum" and
"convert-to-double-precision-and-back-to-flonum".
Regards,
Alan
P.S. The problem you describe disappears if you use the SSE2
instructions for double-precision arithmetic; this extension is
available on most modern implementations of IA32. Furthermore, my
experience with implementations that use the 387 instructions (which can
have this problem) is that saving intermediates to memory is not really
that much slower. I benchmarked this a few years ago on one of my codes,
and it cost me about 20%. Your mileage may vary.
--
Dr Alan Watson
Centro de Radioastronomía y Astrofísica
Universidad Astronómico Nacional de México