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: The state of glibc libm


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
joseph@codesourcery.com


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