summaryrefslogtreecommitdiff
path: root/boost/libs/math/example/arcsine_example.cpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2020-05-11 22:17:58 +0200
committerChristoph Berg <myon@debian.org>2020-05-11 22:17:58 +0200
commit32a41b1abe1a4aab0892c9c2051be6ba5b379f1e (patch)
treec6e107c1ee4d70610e43a7912e57c720334a08c7 /boost/libs/math/example/arcsine_example.cpp
parent08299e8b2bf50ba90daf570f57def529dd29d6e7 (diff)
New upstream version 2.2.0~rc1+repackupstream/2.2.0_rc1+repack
Diffstat (limited to 'boost/libs/math/example/arcsine_example.cpp')
-rw-r--r--boost/libs/math/example/arcsine_example.cpp88
1 files changed, 0 insertions, 88 deletions
diff --git a/boost/libs/math/example/arcsine_example.cpp b/boost/libs/math/example/arcsine_example.cpp
deleted file mode 100644
index 7a27fb47..00000000
--- a/boost/libs/math/example/arcsine_example.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-// arcsine_example.cpp
-
-// Copyright John Maddock 2014.
-// Copyright Paul A. Bristow 2014.
-
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt
-// or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// Example for the arcsine Distribution.
-
-// Note: Contains Quickbook snippets in comments.
-
-//[arcsine_snip_1
-#include <boost/math/distributions/arcsine.hpp> // For arcsine_distribution.
-//] [/arcsine_snip_1]
-
-#include <iostream>
-#include <exception>
-
-int main()
-{
- std::cout << "Examples of Arcsine distribution." << std::endl;
- std::cout.precision(3); // Avoid uninformative decimal digits.
-
- using boost::math::arcsine;
-
- arcsine as; // Construct a default `double` standard [0, 1] arcsine distribution.
-
-//[arcsine_snip_2
- std::cout << pdf(as, 1. / 2) << std::endl; // 0.637
- // pdf has a minimum at x = 0.5
-//] [/arcsine_snip_2]
-
-//[arcsine_snip_3
- std::cout << pdf(as, 1. / 4) << std::endl; // 0.735
-//] [/arcsine_snip_3]
-
-
-//[arcsine_snip_4
- std::cout << cdf(as, 0.05) << std::endl; // 0.144
-//] [/arcsine_snip_4]
-
-//[arcsine_snip_5
- std::cout << 2 * cdf(as, 1 - 0.975) << std::endl; // 0.202
-//] [/arcsine_snip_5]
-
-
-//[arcsine_snip_6
- std::cout << 2 * cdf(complement(as, 0.975)) << std::endl; // 0.202
-//] [/arcsine_snip_6]
-
-//[arcsine_snip_7
- std::cout << quantile(as, 1 - 0.2 / 2) << std::endl; // 0.976
-
- std::cout << quantile(complement(as, 0.2 / 2)) << std::endl; // 0.976
-//] [/arcsine_snip_7]
-
-{
-//[arcsine_snip_8
- using boost::math::arcsine_distribution;
-
- arcsine_distribution<> as(2, 5); // Cconstructs a double arcsine distribution.
- assert(as.x_min() == 2.); // as.x_min() returns 2.
- assert(as.x_max() == 5.); // as.x_max() returns 5.
-//] [/arcsine_snip_8]
-}
- return 0;
-
-} // int main()
-
-/*
-[arcsine_output
-
-Example of Arcsine distribution
-0.637
-0.735
-0.144
-0.202
-0.202
-0.976
-0.976
-
-] [/arcsine_output]
-*/
-
-