Boost logo

Boost :

From: Daniel James (daniel_james_at_[hidden])
Date: 2006-09-25 06:59:39

On 25/09/06, John Maddock <john_at_[hidden]> wrote:
> There are a couple of problems: and you are correct on both counts, there
> are no long double versions of the math functions (there are no *l versions,
> the std::func versions do have long double overloads but they call the
> double versions internally). And numeric_limits<long double> is wrong as
> well, see
> In fact numeric_limits<long double> has some really strange properties: it's
> min/max values correspond to an 80-bit long double with an extended exponent
> range, but the digits and epsilon values are those of a 64-bit double. Oh
> but LDBL_EPSILON and LDBL_MANT_DIG are correct!

That's on FreeBSD, my problem was with OpenBSD
( but it seems that both are wrong. OpenBSD
is the other way round, the macros say that long double is 64-bit but
numeric_limits claims 80-bit. So it ends up with
numeric_limits::min()==0, max()==inf. Hopefully all I have to do is
use the macros for the BSDs.

> BTW the math_info program results were designed to diagnose precisely these
> kinds of issues,
> HTH,

Very helpful, thank you. I'll look at it closer tonight.


Boost list run by bdawes at, gregod at, cpdaniel at, john at