mirror of
https://github.com/boostorg/math.git
synced 2026-01-27 19:12:08 +00:00
Lots of minor fixes: mostly configuration issues.
Change to use std::tuple when available. Add two new distributions: inverse gamma and inverse chi squared. [SVN r65749]
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// C_error_policy_example.cpp
|
||||
|
||||
// Copyright Paul A. Bristow 2007.
|
||||
// Copyright Paul A. Bristow 2007, 2010.
|
||||
// Copyright John Maddock 2007.
|
||||
|
||||
// Use, modification and distribution are subject to the
|
||||
@@ -11,6 +11,8 @@
|
||||
// Suppose we want a call to tgamma to behave in a C-compatible way
|
||||
// and set global ::errno rather than throw an exception.
|
||||
|
||||
#include <cerrno> // for ::errno
|
||||
|
||||
#include <boost/math/special_functions/gamma.hpp>
|
||||
using boost::math::tgamma;
|
||||
|
||||
@@ -27,7 +29,7 @@ using boost::math::policies::errno_on_error;
|
||||
//using boost::math::policies::ignore_error;
|
||||
|
||||
//using namespace boost::math::policies;
|
||||
//using namespace boost::math;
|
||||
//using namespace boost::math; // avoid potential ambiuity with std:: <random>
|
||||
|
||||
// Define a policy:
|
||||
typedef policy<
|
||||
@@ -58,7 +60,7 @@ int main()
|
||||
overflow_error<errno_on_error>(),
|
||||
evaluation_error<errno_on_error>()
|
||||
));
|
||||
cout << "tgamma(4., make_policy( ...) = " << t << endl; // 6
|
||||
cout << "tgamma(4., make_policy(...) = " << t << endl; // 6
|
||||
|
||||
return 0;
|
||||
} // int main()
|
||||
@@ -67,8 +69,13 @@ int main()
|
||||
|
||||
Output
|
||||
|
||||
Autorun "i:\boost-06-05-03-1300\libs\math\test\Math_test\debug\c_error_policy_example.exe"
|
||||
tgamma(4., C_error_policy() = 6
|
||||
tgamma(4., make_policy( ...) = 6
|
||||
c_error_policy_example.cpp
|
||||
Generating code
|
||||
Finished generating code
|
||||
c_error_policy_example.vcxproj -> J:\Cpp\MathToolkit\test\Math_test\Release\c_error_policy_example.exe
|
||||
tgamma(4., C_error_policy() = 6
|
||||
tgamma(4., make_policy(...) = 6
|
||||
tgamma(4., C_error_policy() = 6
|
||||
tgamma(4., make_policy(...) = 6
|
||||
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user