This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Implement fma correctly


On Wed, Oct 13, 2010 at 09:40:00AM -0400, Ulrich Drepper wrote:
> On Tue, Oct 12, 2010 at 18:02, Richard Henderson <rth@twiddle.net> wrote:
> > Given that you're already manipulating the status word, you
> > could go ahead and force 53-bit rounding at the same time
> > with minimal extra overhead. ?Of course, feupdateenv does
> > not reset the rounding size to match. ?You'd have to either
> > open-code that function in order avoid doing extra work,
> > or add new helper functions.
> 
> I actually have second thoughts even about the fmaf code.  The problem
> is that now libm is not signal-safe.  There is no limitatino of using
> FP math in signal handlers and you now get different results depending
> on whether fmaf got interrupted or other code got interrupted.

Well, it is not just fma that changes the fp control word, e.g. exp*,
nearbyint*, and rintl also change it temporarily.  And if we ever care
about rounding other than nearest, I bet lots more functions will need to do some
computation in explicit round to nearest and only use the selected rounding
for the final computation.

> We might have to do everything in software only without appropriate
> fma hardware support.

That would be said.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]