1 Mar 2004 01:06
Re: [math constants] a new approach (perhaps)
Thorsten Ottosen <nesotto <at> cs.auc.dk>
2004-03-01 00:06:22 GMT
2004-03-01 00:06:22 GMT
"Paul A Bristow" <boost <at> hetp.u-net.com> wrote in message
news:002c01c3ff13$be46d340$0c010101 <at> hetp3...
> Looks interesting - but what is in "math_constant.hpp" ?
David Abrahams:
>So, umm, are you going to show us the definition of "pi"?
Yes, of course. BTW, I've attached the file since
my messages seems to format the code like ****.
br
Thorsten
namespace std
{
#define CNAME( Var ) Var##_constant_t
#define OVERLOAD_CONTEXT( ConstType, FP, FPV ) \
inline FP operator+( FP l, ConstType ) \
{ return l + FPV; } \
inline FP operator+( ConstType, FP r ) \
{ return r + FPV; } \
inline FP operator-( FP l, ConstType ) \
{ return l - FPV; } \
inline FP operator-( ConstType, FP r ) \
{ return FPV - r; } \
inline FP operator*( FP l, ConstType ) \
{ return l * FPV; } \
(Continue reading)
RSS Feed