summaryrefslogtreecommitdiff
path: root/libs/math/doc/sf/trigamma.qbk
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-04-08 03:09:47 +0000
committer <>2015-05-05 14:37:32 +0000
commitf2541bb90af059680aa7036f315f052175999355 (patch)
treea5b214744b256f07e1dc2bd7273035a7808c659f /libs/math/doc/sf/trigamma.qbk
parented232fdd34968697a68783b3195b1da4226915b5 (diff)
downloadboost-tarball-master.tar.gz
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'libs/math/doc/sf/trigamma.qbk')
-rw-r--r--libs/math/doc/sf/trigamma.qbk84
1 files changed, 84 insertions, 0 deletions
diff --git a/libs/math/doc/sf/trigamma.qbk b/libs/math/doc/sf/trigamma.qbk
new file mode 100644
index 000000000..827c8fb52
--- /dev/null
+++ b/libs/math/doc/sf/trigamma.qbk
@@ -0,0 +1,84 @@
+[section:trigamma Trigamma]
+
+[h4 Synopsis]
+
+``
+#include <boost/math/special_functions/trigamma.hpp>
+``
+
+ namespace boost{ namespace math{
+
+ template <class T>
+ ``__sf_result`` trigamma(T z);
+
+ template <class T, class ``__Policy``>
+ ``__sf_result`` trigamma(T z, const ``__Policy``&);
+
+ }} // namespaces
+
+[h4 Description]
+
+Returns the trigamma function of /x/. Trigamma is defined as the
+derivative of the digamma function:
+
+[equation trigamma1]
+
+[graph trigamma]
+
+[optional_policy]
+
+The return type of this function is computed using the __arg_pomotion_rules:
+the result is of type `double` when T is an integer type, and type T otherwise.
+
+[h4 Accuracy]
+
+The following table shows the peak errors (in units of epsilon)
+found on various platforms with various floating point types.
+Unless otherwise specified any floating point type that is narrower
+than the one shown will have __zero_error.
+
+[table
+[[Significand Size] [Platform and Compiler] [Random Values] ]
+[[53] [Win32 Visual C++ 12] [Peak=1.0 Mean=0.4] ]
+[[64] [Win64 Mingw GCC] [Peak=1.4 Mean=0.4] ]
+[[113] [Win64 Mingw GCC __float128] [Peak=1.0 Mean=0.5] ]
+]
+
+As shown above, error rates are generally very low for built in types.
+For multiprecision types, error rates are typically in the order of a
+few epsilon.
+
+[h4 Testing]
+
+Testing is against Mathematica generated spot values to 35 digit precision.
+
+[h4 Implementation]
+
+The arbitrary precision version of this function simply calls __polygamma.
+
+For built in fixed precision types, negative arguments are first made positive via:
+
+[equation trigamma2]
+
+Then arguments in the range \[0, 1) are shifted to >= 1 via:
+
+[equation trigamma3]
+
+Then evaluation is via one of a number of rational approximations, for small x these are
+of the form:
+
+[equation trigamma4]
+
+and for large x of the form:
+
+[equation trigamma5]
+
+[endsect][/section:digamma The Trigamma Function]
+
+[/
+ Copyright 2014 John Maddock and Paul A. Bristow.
+ Distributed under 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).
+]
+