[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SRFI-77 with more than one flonum representation

This page is part of the web mail archives of SRFI 77 from before July 7th, 2015. The new archives for SRFI 77 contain all messages, not just those from before July 7th, 2015.

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".



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