Boost logo

Boost :

From: Paul A. Bristow (boost_at_[hidden])
Date: 2002-09-05 12:09:27

> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]]On Behalf Of Gabriel Dos Reis
> Sent: Thursday, September 05, 2002 10:39 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] Formal Review for Interval Library- getting
> intervalsof constants

> As a first start, consider the VAX machines. Then move on IBM
> systems. Then consider Tru64unix.

Can you quickly summarise what these machines do - for the benefit
of those who have been lucky enough to only use IEEE-754 !
Do they provide std::numeric_limits<FPtype>::digits and radix ??

> Well, my feeling is that requiring IEEE-754 is too strong for no
> practical benefits for the thing you want to accomplish. You might
> want to consider that C++ tends to support LIA-1 (and not IEEE-754,
> not this one is not excluded). It is my belief that any useful
> numerical component for C++ should try to work within LIA-1
> assumptions and not require more unless there are good reasons to do
> so. In this specific case, I don't see any reason to require more
> than LIA-1.
> Well, a minor nit: there is no requirement that the FP system has
> radix 2 -- that is an IEEE-754 assumption that should be gotten rid
> of. That radix may be 16 as with IBM formats. It may be 10.

Numeric_limits<FPtype>::radix shoudl provide the radix.

I have worked out how to generate exactly representatable interval values
using only std::numeric_limits<FPtype>::digits and radix == 2 only
by using NTL arbitrary precision. Sylvian has suggested providing
intervals for all math constants, something that has been desirable
for a long time and I am warming this idea.

Does the radix make any difference provided it is divisible by 2?

radix = 10 seems quite another matter.

As a fallback approximation,
one could use excessive decimal digits and nextafter functions,
by as Sylvian has observed, this gives a wider 2 ulp interval.


Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
Mobile mailto:pabristow_at_[hidden]

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