This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Sine and Cosine Accuracy
On 2005-05-29 01:33:43 -0600, Roger Sayle wrote:
> I apologise for coming into this argument late. I'll admit that I
> haven't even caught up on the entire thread, but an interesting
> relevant article that may or may not have already been mentioned is:
>
> http://web.archive.org/web/20040409144725/http://www.naturalbridge.com/floatingpoint/intelfp.html
I mentioned it here:
Date: Fri, 27 May 2005 14:42:32 +0200
From: Vincent Lefevre <vincent+gcc@vinc17.org>
To: gcc@gcc.gnu.org
Subject: Re: GCC and Floating-Point (A proposal)
Message-ID: <20050527124232.GT5967@ay.vinc17.org>
> Admittedly on many IA-32 systems there's little difference between
> using FSIN vs calling the OS's libm's sin function, as glibc and
> microsoft's runtimes (for example) themselves use the x87 intrinsics.
> GCC, however, is not to know this and assumes that the user might
> provide a high-precision library, such as Lefevre's perfect O.5ulp
> implementation. [It's nice to see him join this argument! :)]
Well, I'm just one of the authors of MPFR. Concerning the runtime
libraries for math functions in IEEE double precision, that partly
provide correct rounding, I know:
* IBM's MathLib, on which the glibc is based (for Athlon 64,
Opteron, PowerPC, Alpha and PA-RISC). Does rounding-to-nearest
only.
URL: ftp://www-126.ibm.com/pub/mathlib/
* Arenaire's Crlibm.
URL: https://lipforge.ens-lyon.fr/projects/crlibm/
* Sun's libmcr.
URL: http://www.sun.com/download/products.xml?id=41797765
* MPFR does correct rounding in multiple precision, but a wrapper
could be written for the double precision (and possibly other
precisions for the*f and *l variants). Of course, this would be
quite slow as MPFR wasn't written for such kind of things, but
some users may still be interested.
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA