Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2005-12-02 14:45:02

>> If you want to be confused even further, attached is my inexpert
>> stab at numeric_limits for NTL quad_float which I think may be the
>> same.
>> But I have asked the package author for his advice and help on this,
>> but so far no reply (though there are regular package updates).
>> I'm not sure that epsilon has a exactly defined value but I concluded
>> static quad_float epsilon() throw() { return
>> 2.4651903288156618919116517665087069677288E-32;}; // 2^(1-106) ==
>> 2^105
>> was my best guess.

Normally it should be std::pow(two, 1-std::numeric_limits<T>::digits), so
your value sounds about right (you can also use ldexp(1.0, exponent) to
achieve the same thing a little more efficiently).

On Darwin numeric_limits<>::epsilon returns something like 10^-303 which is
the same as the value for numeric_limts<>::min() I believe. It's just plain
crazy, all IMO of course :-)


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