Boost logo

Boost :

From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-10-20 13:30:11


This is also what I found with MSVC 7.1. Although this is very promising, it
really must handle all these cases - and I suspect there are many others too
that we should test in order to 'stress' the concept a bit more.

Suggestions anyone?

And I have, of course, for two years had a collection of suitably high accuracy
math constants ready waiting for a Boost-acceptable way of presenting them to
users.

To Daniel's want-list, I would add the need to work with the Boost Interval
library.

Paul

Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
mailto:pbristow_at_[hidden]

| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of Thorsten Ottosen
| Sent: Saturday, October 18, 2003 1:37 AM
| To: boost_at_[hidden]
| Subject: [boost] Re: Constants framework (long)
|
|
|
| [snip]
| > The framework itself allows compilers to produce code which is as
| > good as hand-written code. Of course, not all compilers make use of
| > these opportunities. I tested the GCC and the Intel compiler, the
| > latter can produce optimal code, the former has some problems,
| > though. Last tested: GCC 3.3, maybe this has improved since, further
| > testing is definitly needed. To be fair, I should also mention that
| > Paul Bristow tried the run the code through the VC++, which
| > failed. The code seems to be a bit challanging, but I haven't given
| > up hope. If you can make it work for the VC++, please let me know :)
|
| I could compile some of it with vc7:
|
| int main()
| {
| // Usage example:
|
| using namespace boost::math;
| using std::sqrt;
| using boost::math::sqrt;
|
| const float f = 1.F;
| const double d = 1.;
| const long double ld = 1.L;
|
| cout << pi * f * f << endl;
| cout << pi * d * d << endl;
| cout << pi * ld * ld << endl;
| /*
| cout << static_cast< double >( pi ) << endl;
| cout << static_cast< float >( pi ) * d * d << endl;
| */
| cout << pi * pi * f << endl;
| cout << pi * pi * d << endl;
| cout << pi * pi * ld << endl;
|
| cout << pi + pi - pi * pi / pi + d << endl;
| /*
| cout << pi * pi * pi * f << endl;
| cout << pi * pi * pi * d << endl;
| cout << pi * pi * pi * ld << endl;
|
| cout << pi + 2. << endl;
| cout << 2. + pi << endl;
|
| cout << sqrt( two ) * sqrt( 2.F ) << endl;
| cout << sqrt( two ) * sqrt( 2.L ) << endl;
|
| cout << sqrt( sqrt( two + pi ) ) + d << endl;
|
| // double dx = sqrt( pi );
| // cout << ( sqrt( pi ) ) << endl;
| */
| }
|
| For the rest, I havn't looked more into it.
|
| cheers
|
| Thorsten
|
|
|
| _______________________________________________
| Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
|
|


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