Boost logo

Boost :

From: Ed Brey (edbrey_at_[hidden])
Date: 2001-11-01 14:08:25


From: "Paul A. Bristow" <boost_at_[hidden]>
> >
> > Cleaning up for compilers with poor QoI goes beyond the charter I
> > had in mind of the constants library. Rather, I think the
> > central thrust of the library should be to complement good
> > compilers by providing users the basic tools they need to write
> > math-based code productively.
>
> Agreed - but you have clearly not met the 'computer validation' requirements
> which have infested highly regulated industries such as food and
> pharmaceuticals.

You're right. I'm not familar with computer validation requirements. As such, I have a hard time understanding how a constant like two_pi helps in any meaningful way. See below.

> Having a single definition IS important because it deters
> the validators, generally not very knowledgeable,
> from worrying about about compiler QoI.
>
> two_pi is just as much a constant as pi.
> Once two_pi is calculated, there is an end to it.

Two_pi starts out as a sequence of ASCII characters, each representing a digit, which the compilers turns into a binary representation. Doesn't this need to be checked? How is it different from the compiler taking the source code for pi, translating it to a binary representation, then multiplying it by 2 and outputting the result. In either case, don't you have to ensure that the output is correct?

The other issue is that any interesting math program is going to have floating point operations all over the place. If pi * 2 is too much to validate or trust, how can one verify all of the program's equations.

I'm tempted to ask for some specifics to help me understand the requirements of computer validation; however, accounting for such requirements seems to be heading into rather domain-specific territory, and possibly isn't appropriate for a Boost library, which is more general-purpose.


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