
| -----Original Message----- | From: boost-bounces@lists.boost.org | [mailto:boost-bounces@lists.boost.org] On Behalf Of John Maddock | Sent: 02 December 2005 19:45 | To: boost@lists.boost.org | Subject: Re: [boost] [math] floating point classification - | testinghelpwanted | | >> 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). Yes - but I was hoping that this value would be computed at compile time, whereas ldexp would only be used at runtime? | 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 :-) Sounds wrong to me too. But it wouldn't be the first time <limits> values have been dodgy ;-) Paul -- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB Phone and SMS text +44 1539 561830, Mobile and SMS text +44 7714 330204 mailto: pbristow@hetp.u-net.com http://www.hetp.u-net.com/index.html http://www.hetp.u-net.com/Paul%20A%20Bristow%20info.html