Long double support in FreeBSD?

David Schultz das at FreeBSD.ORG
Mon Mar 23 11:01:19 PDT 2009


On Mon, Mar 23, 2009, Alexander Sack wrote:
> I'm working with building the Boost libraries and Boost.Math has long
> double support stubbed out for FreeBSD (personally I don't need it
> but..).  I believe looking at some historical threads about this over
> the weekend and a lot of it was due to compiler GNUish bugs handling
> long double math (I believe Bruce Evans had some patches at one point
> but mentioned it was still crappy).
> 
> Can someone speak if the current compiler/BSD flavors support long
> double math on a 64-bit capable CPU (LM=1)?

Long doubles are supported, except that long double versions of
the following libm functions are missing:

    acoshl asinhl atanhl cbrtl coshl erfcl erfl expl expm1l
    lgammal log10l log1pl log2l logl powl sinhl tanhl tgammal

The only other caveat is that on i386 we set the FPU to 53-bit
precision so that gcc produces saner results in double precision.
(See the archives for the gruesome details.) Of course, if you're
running FreeBSD/amd64 on a 64-bit machine, this doesn't apply.


More information about the freebsd-hackers mailing list