bug-gnubg
[Top][All Lists]
Advanced

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

Re: [Bug-gnubg] Possible error in SSE sigmoid calculation


From: Philippe Michel
Subject: Re: [Bug-gnubg] Possible error in SSE sigmoid calculation
Date: Sat, 31 Dec 2011 15:26:39 +0100 (CET)
User-agent: Alpine 2.00 (BSF 1167 2008-08-23)

I've commited the fix, including the fast-math related ifdef below. As a result of the latter, the code is now sligtly slower by default but one can always use -ffast-math everywhere and recoup that and some more.

I didn't run serious speed or non-regression tests, but it looks like this option is well worth using.


The differences between nosse and ssecvtt are due, I think, to the usage of a reciprocal instead of a true division in 1/(1+exp(x)). I suppose this was found acceptable at the time and would dissappear if everything was compiled with the -ffast-math flag. Maybe one could use something like

#ifdef __FAST_MATH__
... use reciprocal intrinsic
#else
... use divide intrinsic
#endif



reply via email to

[Prev in Thread] Current Thread [Next in Thread]