On Wed, 14 Mar 2012, Jeff Law wrote:

> On 03/14/2012 08:30 AM, Vincent Lefevre wrote:
> > 
> > > (b) Where functions do make attempts at being correctly rounded
> > > (especially the IBM Accurate Mathematical Library functions), they tend to
> > > be sufficiently slow that the slowness attracts bug reports.  Again, this
> > > would likely be addressed by new implementations that use careful error
> > > bounds and information about worst cases to reduce the cost of being
> > > correctly rounding.
> > 
> > I'm not sure that the complaints are about worst cases. More probably
> > software implementation vs hardware implementation in the average
> > case. But a new software implementation (better in average) could
> > help.
> The complaints I typically see are about worst case performance.  I
> occasionally see requests for better performance with the potential loss of
> accuracy.

I'd say that "better performance with the potential loss of accuracy" 
should be covered by -ffast-math - that GCC should generate direct use of 
fsin/fcos instructions for sin/cos for -O2 -funsafe-math-optimizations on 
x86_64, as it does on x86, unless there is some reason to think they would 
perform worse than the out-of-line implementation.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to