Long double support in FreeBSD?

Alexander Sack pisymbol at gmail.com
Mon Mar 23 11:22:12 PDT 2009


On Mon, Mar 23, 2009 at 2:03 PM, David Schultz <das at freebsd.org> wrote:
> 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.
>

Thank you so much David, that is what I needed to know (I just thought
asking would be easier in this case than trying to parse through the
many threads over the past about this topic).

-aps


More information about the freebsd-hackers mailing list