From: Paul A Bristow (boost_at_[hidden])
Date: 2003-06-08 09:56:53
You can seen an example of extending to a 'new' constant 'gamma'
in the examples testFunctionConstants/gamma_function_constants.hpp.
The example by Michael Kenniston also show how complex items
could also be added
(but not normally to avoid every program dragging in <complex>).
Macros could also facilitate the process of course,
and it could start with a macro
defining the constant as a 40 decimal digit string.
If Boosters agree that this scheme is an acceptable way to go,
the the example and guidance could be made more helpful to provide
the encouragement you rightly say is needed.
But first the overall strategy needs agreement.
Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria LA8 8AB UK
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Daniel Frey
| Sent: 07 June 2003 00:20
| To: boost_at_[hidden]
| Subject: [boost] RE: Math Constants Formal Review
| Another point I am missing is a way to extend the constants
| for user-defined types. Something like numeric_limits<>
| comes to mind. I think that this is a must-have feature as
| people that write applications that need lots of these
| constants are likely also using types with higher precision
| that the standard types provided by the language. Without a
| way to teach the constants-framework the new types, they
| will create wrappers and thus they won't use the intended
| boost-/standard-way to access the variables.
| Regards, Daniel
| Unsubscribe & other changes:
| http://lists.boost.org/mailman/listinfo.cgi/b| oost