tech-userlevel archive

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

Re: clang support flagging



On Tue, Jun 05, 2012 at 01:50:08PM -0400, James K. Lowden wrote:
> On Tue, 5 Jun 2012 14:03:55 +0200
> Joerg Sonnenberger <joerg%britannica.bec.de@localhost> wrote:
> 
> > On Tue, Jun 05, 2012 at 12:58:09AM -0400, James K. Lowden wrote:
> > > Bringing locales and 80-bit floating point to NetBSD seems to be a
> > > matter of porting.  FreeBSD has both, and cephes has most of the C99
> > > math.  
> > 
> > The second part is not true. FreeBSD does not have complete long
> > double support, they just cheat by aliasing most to the double
> > version. 
> 
> http://svnweb.freebsd.org/base/stable/9/lib/msun/src/s_fminl.c?revision=225736&view=markup
> 
> I'm not sure what "aliasing" you're referring to.  
> 
> The implementation for sqrtl() is here, 
> 
> http://svnweb.freebsd.org/base/stable/9/lib/msun/src/e_sqrtl.c?revision=225736&view=markup
> 
> starting on line 75.  It might be slow, but afaict it does use 
> 80 bits.  It certainly works better than ours.  

All of the trigonometric functions for once.

> > I also don't agree that long double support is that support,
> > given the significant performance penalty on modern x86 cpus.
> 
> Performance is not a factor for compliance.  
> 
> Many C++ programs do not need long-double math, or don't use it in ways
> that make performance critical.  A slow implementation can be later
> optimized; non-implementation prevents use of the library.  

You are missing my point. Most things don't care about long double
support at all. Using it is most of the time not beneficial.

My complain is not about a slow implementation, but about correctness.
Aliasing sin and sinl gives incorrect results and I consider that far
worse than not having it at all. I am quite aware of the requirements of
libc++. libm is certainly not the biggest item.

Joerg


Home | Main Index | Thread Index | Old Index