Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2005-12-02 13:11:39


| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of John Maddock
| Sent: 02 December 2005 17:25
| To: boost_at_[hidden]
| Subject: Re: [boost] [math] floating point classification -
| testinghelpwanted
|
| Actually if that's correct then things are a lot better than
| I feared: the
| text implies that the type behaves as a real type with
| 106-bit's in the
| significand. It also implies that numeric_limits<>::epsilon
| must be buggy
| for that platform. So I'm more confused than ever :-(

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.

But without confirmation of this, in 'testing' NTL math functions, I cheated
using the number of decimal digits

        quad_float tolpc = to_quad_float("1e-30"); // 31 guaranteed decimal
digits, so percent tolerance is about 1e-29
        BOOST_CHECK_CLOSE(x, one, tolpc);

But I'm ready (anxious even) to have someone agree, or correct me.

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_at_[hidden]  http://www.hetp.u-net.com/index.html
http://www.hetp.u-net.com/Paul%20A%20Bristow%20info.html



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk