Boost logo

Boost :

From: Paul A Bristow (boost_at_[hidden])
Date: 2003-06-17 04:03:49


In previous discussions, the main issues debated were:

1 Control of precision is essential,
and some users wanted to be able to use
float, double and long double at the same time.

2 Avoiding paying for what you don't use, which leads to

2a MACROS provide a simple way of avoiding some cost for
constants you don't use, (Although some Boosters were opposed
to MACROs because they pollute the global namespace).

So, even if other presentations are provided,
I strongly believe macros should be published.
If you don't like them, don't use them!

2b Splitting the constants into several groups of files: essential,
common, esoteric...

3 Efficiency

Some compilers can generate better code
from functions like "double pi() { return 3.1459;}"
but that this implies writing "pi()" instead of plain "pi".

4 Appearance

BUT Users extremely strongly prefer to write "float area = pi * r * r;"

So the ()s remain a MAJOR issue.

Michael Kenniston produced a 'presentation'
which allows 'novice' users to write "pi" but
get the effect of "pi()" without too many precision surprises.
Yet it still allows the 'expert' to write "pi()" and control precision
explicitly.

I see nothing wrong with your suggestions and examples,
but I don't yet understand
how your proposal helps to meet this last 'requirement'.

Paul

Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria LA8 8AB UK
+44 1539 561830
pbristow_at_[hidden]

| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Daniel Frey
| Sent: 14 June 2003 20:48
| To: boost_at_[hidden]
| Subject: [boost] RE: Re: Math Constants Formal Review - is
| extensible.
|
|
| On Wed, 11 Jun 2003 15:49:05 +0200, Paul A. Bristow wrote:
|
| > The proposal is for several header files each containing the same
| > constants, only one of which would be used for any
| compilation. (Users
| > have been warned against using more than one! Nobody has
| suggested a
| > way to guard against this mistake, but I think that it would be
| > apparent pretty soon, probably at compile time, and at
| link time if
| > not.) The macros constants header is the simplest and
| could be used
| > to provide the appropiate value(s) above.
|
| The difference IMHO is, that this is not a generic approach.
| It's a bit like replacing templates with macros. I haven't
| seen any convincing arguments against the code I showed,
| which *is* generic IMHO, but as I don't have the background
| of the "long saga" you mentioned, I think I'm not the right
| one to say what's the best way to go.
|
| Regards, Daniel
|
| _______________________________________________
| Unsubscribe & other changes:
| http://lists.boost.org/mailman/listinfo.cgi/b| oost
|
|


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