Boost logo

Boost :

From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2002-09-06 04:03:24


"Paul A. Bristow" <boost_at_[hidden]> writes:

| > -----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 !

You want to have a look at

    http://nssdc.gsfc.nasa.gov/nssdc/formats/
  
and
  
  http://www.tru64unix.compaq.com/docs/base_doc/DOCUMENTATION/V51_HTML/ARH9LBTE/FLTNGCHP.HTM#fp-fmt-fig

| Do they provide std::numeric_limits<FPtype>::digits and radix ??

Yes.

numeric_limits<> isn't something tailored to IEEE-754. It is the C++
thingy to support LIA-1 floating-point model. LIA-1 doesn't exclude
IEEE-754; IEEE-754 is optional within LIA-1 -- LIA-1 is an attempt to
"correct" some IEEE-754 limitations.

numeric_limits<FPtype> describes the basic characteristics of the FP
system (if covered by LIA-1). That means, digits and radix are present.

| > 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.

Yes, I know.

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

Yes, it affects precision in some sense -- tighter with 2 and bigger
with a radix > 2.

-- Gaby


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