Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83362 - trunk/libs/math/example
From: pbristow_at_[hidden]
Date: 2013-03-08 07:53:36


Author: pbristow
Date: 2013-03-08 07:53:35 EST (Fri, 08 Mar 2013)
New Revision: 83362
URL: http://svn.boost.org/trac/boost/changeset/83362

Log:
Added split into four examples to the jamfile.
Text files modified:
   trunk/libs/math/example/Jamfile.v2 | 7 ++++++-
   trunk/libs/math/example/bessel_zeros_example.cpp | 6 +++---
   trunk/libs/math/example/constants_eg1.cpp | 12 +++++++-----
   3 files changed, 16 insertions(+), 9 deletions(-)

Modified: trunk/libs/math/example/Jamfile.v2
==============================================================================
--- trunk/libs/math/example/Jamfile.v2 (original)
+++ trunk/libs/math/example/Jamfile.v2 2013-03-08 07:53:35 EST (Fri, 08 Mar 2013)
@@ -33,7 +33,12 @@
       <include>../../..
     ;
     
-run bessel_zeros_example.cpp ;
+# run bessel_zeros_example.cpp ; # Now split into four examples.
+run bessel_zeros_example_1.cpp ;
+run bessel_zeros_interator_example.cpp ;
+run bessel_zeros_example_1.cpp ;
+run neumann_zeros_example_1.cpp ;
+
 run test_cpp_float_close_fraction.cpp ../../test/build//boost_unit_test_framework/<link>static ;
 run binomial_coinflip_example.cpp ;
 run binomial_confidence_limits.cpp ;

Modified: trunk/libs/math/example/bessel_zeros_example.cpp
==============================================================================
--- trunk/libs/math/example/bessel_zeros_example.cpp (original)
+++ trunk/libs/math/example/bessel_zeros_example.cpp 2013-03-08 07:53:35 EST (Fri, 08 Mar 2013)
@@ -167,11 +167,11 @@
     double nan_root = boost::math::cyl_bessel_j_zero(nan, 1, ignore_all_policy());
     std::cout << "boost::math::cyl_bessel_j_zero(nan, 1) " << nan_root << std::endl; // 1.#QNAN
 
-/*`Another version of `cyl_bessel_j_zero` allows calculation of multiple zeros with one call,
+/*`Another version of `cyl_bessel_j_zero` allows calculation of multiple zeros with one call,
 placing the results in a container, often `std::vector`.
 For example, generate five `double` roots of J[sub v] for integral order 2.
 
-As column J[sub 2](x) in table 1 of
+showing the same results as column J[sub 2](x) in table 1 of
 [@ http://mathworld.wolfram.com/BesselFunctionZeros.html Wolfram Bessel Function Zeros].
 
 */
@@ -182,7 +182,7 @@
               roots.end(),
               std::ostream_iterator<double>(std::cout, "\n"));
 
-/*`Or generate 50 decimal digit roots of J[sub v] for non-integral order `v=71/19`.
+/*`Or generate 50 decimal digit roots of J[sub v] for non-integral order `v = 71/19`.
 
 We set the precision of the output stream and show trailing zeros to display a fixed 50 decimal digits.
 */

Modified: trunk/libs/math/example/constants_eg1.cpp
==============================================================================
--- trunk/libs/math/example/constants_eg1.cpp (original)
+++ trunk/libs/math/example/constants_eg1.cpp 2013-03-08 07:53:35 EST (Fri, 08 Mar 2013)
@@ -69,7 +69,7 @@
   cout << "pidf = boost::math::constants::pi() = " << pif << endl;
   // pidf = boost::math::float_constants::pi = 3.1415927410125732
 
- //float df = pi * rf * rf; // conversion from 'const double' to 'float', possible loss of data
+ //float df = pi * rf * rf; // conversion from 'const double' to 'float', possible loss of data.
   float df = pif * rf * rf;
 
   cout << "df = " << df << ", rf = " << rf << endl;
@@ -100,7 +100,7 @@
     // If you try to use two namespaces, this may, of course, create ambiguity:
     // it is not too difficult to do this inadvertently.
     using namespace boost::math::float_constants;
- //cout << pi << endl; // error C2872: 'pi' : ambiguous symbol
+ //cout << pi << endl; // error C2872: 'pi' : ambiguous symbol.
 
   }
   {
@@ -156,13 +156,15 @@
 
 
   }
- {
+/*
+{
     using boost::math::constants::pi;
- double my_pi3 = pi<double>();
+ //double my_pi3 = pi<double>(); // OK
     //double my_pi4 = pi<>(); cannot find template type.
- //double my_pi4 = pi();
+ //double my_pi4 = pi(); // Can't find a function.
 
   }
+*/
 
 } // int main()
 


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