On Mon, 13 Feb 2012, Jakub Jelinek wrote: > Furthermore, crlibm_init changes the i?86/x86_64 rounding mode globally, > that is not appropriate for a general purpose math library, there you either > need to cope with extended precision, or rely on SSE/SSE2 for float/double, > or change the rounding mode dynamically on entry and reset back to previous > state in all functions that rely on it.
My understanding is that the crlibm method of using double+double for most intermediate computations, with good error bounds, triple double in cases where double+double isn't precise enough and searches for worst cases that prove triple double is always enough would work equally well using extended+extended for intermediate computations; you'd simply need to have alternative versions of the functions for use on x86 that use extended (80-bit) as an intermediate type. This is of course supposing a suitable framework for generating functions depending on the types available for hardware arithmetic (similarly, you might want to generate float functions for x86 that also use extended as an intermediate type). -- Joseph S. Myers jos...@codesourcery.com