Boost logo

Boost-Commit :

From: steven_at_[hidden]
Date: 2008-05-15 15:07:58


Author: steven_watanabe
Date: 2008-05-15 15:07:57 EDT (Thu, 15 May 2008)
New Revision: 45400
URL: http://svn.boost.org/trac/boost/changeset/45400

Log:
Made examples pass on como 4.3.3
Text files modified:
   sandbox/units/libs/units/example/complex.cpp | 8 ++++----
   sandbox/units/libs/units/example/kitchen_sink.cpp | 17 ++++++++---------
   sandbox/units/libs/units/example/quantity.cpp | 8 ++++----
   sandbox/units/libs/units/example/radar_beam_height.cpp | 14 +++++++-------
   sandbox/units/libs/units/example/temperature.cpp | 6 +++---
   5 files changed, 26 insertions(+), 27 deletions(-)

Modified: sandbox/units/libs/units/example/complex.cpp
==============================================================================
--- sandbox/units/libs/units/example/complex.cpp (original)
+++ sandbox/units/libs/units/example/complex.cpp 2008-05-15 15:07:57 EDT (Thu, 15 May 2008)
@@ -421,9 +421,9 @@
     sstream2 << "L*L = 3 + 4 i m^2" << std::endl;
     sstream2 << "L/L = 1 + 0 i dimensionless" << std::endl;
     sstream2 << "L^3 = 2 + 11 i m^3" << std::endl;
- sstream2 << "L^(3/2) = 2.56713 + 2.14247 i m^(3/2)" << std::endl;
+ sstream2 << "L^(3/2) = 2.56713 + " << 2.14246818967038 << " i m^(3/2)" << std::endl;
     sstream2 << "3vL = 1.29207 + 0.201294 i m^(1/3)" << std::endl;
- sstream2 << "(3/2)vL = 1.62894 + 0.520175 i m^(2/3)" << std::endl;
+ sstream2 << "(3/2)vL = " << 1.62893714592218 << " + " << 0.520174502304546 << " i m^(2/3)" << std::endl;
     sstream2 << std::endl;
     sstream2 << "+L = 2 m + 1 m i" << std::endl;
     sstream2 << "-L = -2 m + -1 m i" << std::endl;
@@ -432,9 +432,9 @@
     sstream2 << "L*L = 3 m^2 + 4 m^2 i" << std::endl;
     sstream2 << "L/L = 1 dimensionless + 0 dimensionless i" << std::endl;
     sstream2 << "L^3 = 2 m^3 + 11 m^3 i" << std::endl;
- sstream2 << "L^(3/2) = 2.56713 m^(3/2) + 2.14247 m^(3/2) i" << std::endl;
+ sstream2 << "L^(3/2) = 2.56713 m^(3/2) + " << 2.14246818967038 << " m^(3/2) i" << std::endl;
     sstream2 << "3vL = 1.29207 m^(1/3) + 0.201294 m^(1/3) i" << std::endl;
- sstream2 << "(3/2)vL = 1.62894 m^(2/3) + 0.520175 m^(2/3) i" << std::endl;
+ sstream2 << "(3/2)vL = " << 1.62893714592218 << " m^(2/3) + " << 0.520174502304546 << " m^(2/3) i" << std::endl;
     sstream2 << std::endl;
 
     std::string str1(sstream1.str());

Modified: sandbox/units/libs/units/example/kitchen_sink.cpp
==============================================================================
--- sandbox/units/libs/units/example/kitchen_sink.cpp (original)
+++ sandbox/units/libs/units/example/kitchen_sink.cpp 2008-05-15 15:07:57 EDT (Thu, 15 May 2008)
@@ -492,9 +492,9 @@
     sstream2 << std::endl;
     sstream2 << "r = " << 5e-7 << " m" << std::endl;
     sstream2 << "P = 101325 m^-1 kg s^-2" << std::endl;
- sstream2 << "V = " << 5.23599e-19 << " m^3" << std::endl;
+ sstream2 << "V = " << 5.23598666666667e-019 << " m^3" << std::endl;
     sstream2 << "T = 310 K" << std::endl;
- sstream2 << "n = " << 2.05835e-17 << " mol" << std::endl;
+ sstream2 << "n = " << 2.05834787514993e-017 << " mol" << std::endl;
     #if BOOST_UNITS_HAS_TYPEOF
     sstream2 << "R = 8.314472 m^2 kg s^-2 K^-1 mol^-1 (rel. unc. = "
              << 1.8e-6 << ")" << std::endl;
@@ -503,7 +503,7 @@
     #endif // BOOST_UNITS_HAS_TYPEOF
     sstream2 << std::endl;
     sstream2 << "theta = " << 0.375 << " rad" << std::endl;
- sstream2 << "sin(theta) = " << 0.366273 << " dimensionless"
+ sstream2 << "sin(theta) = " << 0.366272529086048 << " dimensionless"
              << std::endl;
     sstream2 << "asin(sin(theta)) = " << 0.375 << " rad" << std::endl;
     sstream2 << std::endl;
@@ -512,14 +512,13 @@
     sstream2 << "Z = (1.5,-2) m^2 kg s^-3 A^-2" << std::endl;
     sstream2 << "I*Z = (12.5,0) m^2 kg s^-3 A^-1" << std::endl;
     sstream2 << std::endl;
- sstream2 << std::scientific << std::setprecision(1);
 
- sstream2 << "x+y-w = 0.48(+/-0.632772) m" << std::endl;
- sstream2 << "w*x = 9.04(+/-0.904885) m^2" << std::endl;
- sstream2 << "x/y = 0.666667(+/-0.149071) dimensionless"
+ sstream2 << "x+y-w = 0.48(+/-" << 0.632771680782255 << ") m" << std::endl;
+ sstream2 << "w*x = 9.04(+/-" << 0.904884523019374 << ") m^2" << std::endl;
+ sstream2 << "x/y = " << 0.666666666666667 << "(+/-0.149071) dimensionless"
              << std::endl;
- sstream2 << "w*y^2/(u*x)^2 = 10.17(+/-3.52328) m^-1" << std::endl;
- sstream2 << "w/(u*x)^(1/2) = 3.19612(+/-0.160431) dimensionless"
+ sstream2 << "w*y^2/(u*x)^2 = 10.17(+/-" << 3.5232787286844 << ") m^-1" << std::endl;
+ sstream2 << "w/(u*x)^(1/2) = " << 3.19612265096319 << "(+/-" << 0.160430670384437 << ") dimensionless"
              << std::endl;
 
     sstream2 << std::endl;

Modified: sandbox/units/libs/units/example/quantity.cpp
==============================================================================
--- sandbox/units/libs/units/example/quantity.cpp (original)
+++ sandbox/units/libs/units/example/quantity.cpp 2008-05-15 15:07:57 EDT (Thu, 15 May 2008)
@@ -137,9 +137,9 @@
               << "kilograms*(L/seconds)*(L/seconds) = 4 m^2 kg s^-2\n"
               << "kilograms*(L/seconds)^2 = 4 m^2 kg s^-2\n"
               << "L^3 = 8 m^3\n"
- << "L^(3/2) = 2.82843 m^(3/2)\n"
- << "2vL = 1.41421 m^(1/2)\n"
- << "(3/2)vL = 1.5874 m^(2/3)\n"
+ << "L^(3/2) = " << 2.82842712474619 << " m^(3/2)\n"
+ << "2vL = " << 1.4142135623731 << " m^(1/2)\n"
+ << "(3/2)vL = " << 1.5874010519682 << " m^(2/3)\n"
               << std::endl
               << "L = (3,4) m\n"
               << "L+L = (6,8) m\n"
@@ -152,7 +152,7 @@
               << "L^3 = (-117,44) m^3\n"
               << "L^(3/2) = (2,11) m^(3/2)\n"
               << "2vL = (2,1) m^(1/2)\n"
- << "(3/2)vL = (2.38285,1.69466) m^(2/3)\n"
+ << "(3/2)vL = (" << 2.3828547125173 << "," << 1.69466313833091 << ") m^(2/3)\n"
               << std::endl;
 
     std::string str1(sstream1.str());

Modified: sandbox/units/libs/units/example/radar_beam_height.cpp
==============================================================================
--- sandbox/units/libs/units/example/radar_beam_height.cpp (original)
+++ sandbox/units/libs/units/example/radar_beam_height.cpp 2008-05-15 15:07:57 EDT (Thu, 15 May 2008)
@@ -185,13 +185,13 @@
               << std::endl << std::endl;
     
     sstream2 << "radar range : 300 nmi" << std::endl;
- sstream2 << "earth radius : " << 6.37101e6 << " m" << std::endl;
- sstream2 << "beam height 1 : 18169.7 m" << std::endl;
- sstream2 << "beam height 2 : 9.81085 nmi" << std::endl;
- sstream2 << "beam height 3 : 18169.7 m" << std::endl;
- sstream2 << "beam height 4 : 9.81085 nmi" << std::endl;
- sstream2 << "beam height approx : 59488.4 ft" << std::endl;
- sstream2 << "beam height approx : 18132.1 m" << std::endl;
+ sstream2 << "earth radius : " << 6371008.7714 << " m" << std::endl;
+ sstream2 << "beam height 1 : " << 18169.690884692 << " m" << std::endl;
+ sstream2 << "beam height 2 : " << 9.81084820987694 << " nmi" << std::endl;
+ sstream2 << "beam height 3 : " << 18169.6908846921 << " m" << std::endl;
+ sstream2 << "beam height 4 : " << 9.81084820987694 << " nmi" << std::endl;
+ sstream2 << "beam height approx : " << 59488.3997620464 << " ft" << std::endl;
+ sstream2 << "beam height approx : " << 18132.0642474718 << " m" << std::endl;
     sstream2 << std::endl;
 
     std::string str1(sstream1.str());

Modified: sandbox/units/libs/units/example/temperature.cpp
==============================================================================
--- sandbox/units/libs/units/example/temperature.cpp (original)
+++ sandbox/units/libs/units/example/temperature.cpp 2008-05-15 15:07:57 EDT (Thu, 15 May 2008)
@@ -122,9 +122,9 @@
               << "273.15 absolute K" << std::endl
               << "273.15 absolute K" << std::endl
               << "32 F" << std::endl
- << "17.7778 K" << std::endl
- << "17.7778 K" << std::endl
- << "17.7778 K" << std::endl
+ << 17.77777777777 << " K" << std::endl
+ << 17.77777777777 << " K" << std::endl
+ << 17.77777777777 << " K" << std::endl
               << std::endl;
     
     std::string str1(sstream1.str());


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk