mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Add new tables to old docs. Tweak table formatting slightly.
This commit is contained in:
@@ -96,23 +96,14 @@ The domain of the random variable is \[0, 1\].
|
||||
The following table shows the peak errors
|
||||
(in units of [@http://en.wikipedia.org/wiki/Machine_epsilon epsilon])
|
||||
found on various platforms with various floating point types.
|
||||
No comparison to the [@http://www.r-project.org/ R-2.5.1 Math library],
|
||||
or to the FORTRAN implementations of AS226 or AS310 are given since these appear
|
||||
to only guarantee absolute error: this would causes our test harness
|
||||
to assign an /"infinite"/ error to these libraries for some of our
|
||||
test values when measuring /relative error/.
|
||||
The failures in the comparison to the [@http://www.r-project.org/ R Math library],
|
||||
seem to be mostly in the corner cases when the probablity would be very small.
|
||||
Unless otherwise specified any floating-point type that is narrower
|
||||
than the one shown will have __zero_error.
|
||||
|
||||
[table Errors In CDF of the Noncentral Beta
|
||||
[[Significand Size] [Platform and Compiler] [[alpha], [beta],[lambda] < 200] [[alpha],[beta],[lambda] > 200]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=620 Mean=22] [Peak=8670 Mean=1040]]
|
||||
[[64] [RedHat Linux IA32, gcc-4.1.1] [Peak=825 Mean=50] [Peak=2.5x10[super 4] Mean=4000]]
|
||||
[table_non_central_beta_CDF]
|
||||
|
||||
[[64] [Redhat Linux IA64, gcc-3.4.4] [Peak=825 Mean=30] [Peak=1.7x10[super 4] Mean=2500]]
|
||||
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=420 Mean=50] [Peak=9200 Mean=1200]]
|
||||
]
|
||||
[table_non_central_beta_CDF_complement]
|
||||
|
||||
Error rates for the PDF, the complement of the CDF and for the quantile
|
||||
functions are broadly similar.
|
||||
|
||||
@@ -129,28 +129,18 @@ for the noncentral chi-squared distribution.
|
||||
[h4 Accuracy]
|
||||
|
||||
The following table shows the peak errors
|
||||
(in units of [@http://en.wikipedia.org/wiki/Machine_epsilon epsilon])
|
||||
found on various platforms with various floating-point types,
|
||||
along with comparisons to the [@http://www.r-project.org/ R-2.5.1 Math library].
|
||||
Unless otherwise specified, any floating-point type that is narrower
|
||||
(in units of [@http://en.wikipedia.org/wiki/Machine_epsilon epsilon])
|
||||
found on various platforms with various floating point types.
|
||||
The failures in the comparison to the [@http://www.r-project.org/ R Math library],
|
||||
seem to be mostly in the corner cases when the probablity would be very small.
|
||||
Unless otherwise specified any floating-point type that is narrower
|
||||
than the one shown will have __zero_error.
|
||||
|
||||
[table Errors In CDF of the Noncentral Chi-Squared
|
||||
[[Significand Size] [Platform and Compiler] [[nu],[lambda] < 200] [[nu],[lambda] > 200]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=50 Mean=9.9
|
||||
[table_non_central_chi_squared_CDF]
|
||||
|
||||
R Peak=685 Mean=109
|
||||
] [Peak=9780 Mean=718
|
||||
[table_non_central_chi_squared_CDF_complement]
|
||||
|
||||
R Peak=3x10[super 8] Mean=2x10[super 7] ] ]
|
||||
[[64] [RedHat Linux IA32, gcc-4.1.1] [Peak=270 Mean=27] [Peak=7900 Mean=900]]
|
||||
|
||||
[[64] [Redhat Linux IA64, gcc-3.4.4] [Peak=107 Mean=17] [Peak=5000 Mean=630]]
|
||||
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=270 Mean=20] [Peak=4600 Mean=560]]
|
||||
]
|
||||
|
||||
Error rates for the complement of the CDF and for the quantile
|
||||
Error rates for the quantile
|
||||
functions are broadly similar. Special mention should go to
|
||||
the `mode` function: there is no closed form for this function,
|
||||
so it is evaluated numerically by finding the maxima of the PDF:
|
||||
|
||||
@@ -82,13 +82,9 @@ 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 Errors In CDF of the Noncentral T Distribution
|
||||
[[Significand Size (bits)] [Platform and Compiler] [[nu], [delta] < 600]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=120 Mean=26 ] ]
|
||||
[[64] [RedHat Linux IA32, gcc-4.1.1] [Peak=121 Mean=26] ]
|
||||
[[64] [Redhat Linux IA64, gcc-3.4.4] [Peak=122 Mean=25] ]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=115 Mean=24] ]
|
||||
]
|
||||
[table_non_central_t_CDF]
|
||||
|
||||
[table_non_central_t_CDF_complement]
|
||||
|
||||
[caution The complexity of the current algorithm is dependent upon
|
||||
[delta][super 2]: consequently the time taken to evaluate the CDF
|
||||
|
||||
19
doc/math.qbk
19
doc/math.qbk
@@ -40,6 +40,8 @@
|
||||
[import ../../../tools/auto_index/include/auto_index_helpers.qbk]
|
||||
[/ Must be first included file!]
|
||||
|
||||
[import ../reporting/accuracy/doc/accuracy_tables.qbk]
|
||||
|
||||
[import html4_symbols.qbk]
|
||||
|
||||
[import overview/common_overviews.qbk] [/ overviews that appear in more than one place!]
|
||||
@@ -647,6 +649,23 @@ and as a CD ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22.
|
||||
[include background/lanczos.qbk]
|
||||
[include background/remez.qbk]
|
||||
[include background/references.qbk]
|
||||
|
||||
[section:logs_and_tables Error logs and tables]
|
||||
|
||||
[section:all_table Tables of Error Rates for all Functions]
|
||||
|
||||
[all_tables]
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:logs Error Logs For Error Rate Tables]
|
||||
|
||||
[all_errors]
|
||||
|
||||
[endsect]
|
||||
|
||||
[endsect]
|
||||
|
||||
[endmathpart] [/section:backgrounders Backgrounders]
|
||||
|
||||
[mathpart status Library Status]
|
||||
|
||||
@@ -63,29 +63,20 @@ a simplified version of this implementation
|
||||
[h4 Accuracy]
|
||||
|
||||
The following tables show how the accuracy of these functions
|
||||
varies on various platforms, along with a comparison to the __gsl library.
|
||||
varies on various platforms, along with comparison to other libraries.
|
||||
Note that only results for the widest floating-point type on the
|
||||
system are given, as narrower types have __zero_error. All values
|
||||
are relative errors in units of epsilon.
|
||||
are relative errors in units of epsilon. Note that our test suite
|
||||
includes some fairly extreme inputs which results in most of the worst
|
||||
problem cases in other libraries:
|
||||
|
||||
[table Errors Rates in cyl_bessel_i
|
||||
[[Significand Size] [Platform and Compiler] [I[sub v]] ]
|
||||
[[53] [Win32 / Visual C++ 8.0] [Peak=10 Mean=3.4
|
||||
GSL Peak=6000] ]
|
||||
[[64] [Red Hat Linux IA64 / G++ 3.4] [Peak=11 Mean=3] ]
|
||||
[[64] [SUSE Linux AMD64 / G++ 4.1] [Peak=11 Mean=4] ]
|
||||
[[113] [HP-UX / HP aCC 6] [Peak=15 Mean=4] ]
|
||||
]
|
||||
[table_cyl_bessel_i_integer_orders_]
|
||||
|
||||
[table Errors Rates in cyl_bessel_k
|
||||
[[Significand Size] [Platform and Compiler] [K[sub v]] ]
|
||||
[[53] [Win32 / Visual C++ 8.0] [Peak=9 Mean=2
|
||||
[table_cyl_bessel_i]
|
||||
|
||||
GSL Peak=9] ]
|
||||
[[64] [Red Hat Linux IA64 / G++ 3.4] [Peak=10 Mean=2] ]
|
||||
[[64] [SUSE Linux AMD64 / G++ 4.1] [Peak=10 Mean=2] ]
|
||||
[[113] [HP-UX / HP aCC 6] [Peak=12 Mean=5] ]
|
||||
]
|
||||
[table_cyl_bessel_k_integer_orders_]
|
||||
|
||||
[table_cyl_bessel_k]
|
||||
|
||||
[h4 Implementation]
|
||||
|
||||
|
||||
@@ -64,61 +64,26 @@ a simplified version of this implementation
|
||||
[h4 Accuracy]
|
||||
|
||||
The following tables show how the accuracy of these functions
|
||||
varies on various platforms, along with comparisons to the __gsl and
|
||||
__cephes libraries. Note that the cyclic nature of these
|
||||
varies on various platforms, along with comparisons to other
|
||||
libraries. Note that the cyclic nature of these
|
||||
functions means that they have an infinite number of irrational
|
||||
roots: in general these functions have arbitrarily large /relative/
|
||||
errors when the arguments are sufficiently close to a root. Of
|
||||
course the absolute error in such cases is always small.
|
||||
Note that only results for the widest floating-point type on the
|
||||
system are given as narrower types have __zero_error. All values
|
||||
are relative errors in units of epsilon.
|
||||
are relative errors in units of epsilon. Most of the gross errors
|
||||
exhibited by other libraries occur for very large arguments - you will
|
||||
need to drill down into the actual program output if you need more
|
||||
information on this.
|
||||
|
||||
[table Errors Rates in cyl_bessel_j
|
||||
[[Significand Size] [Platform and Compiler] [J[sub 0][space] and J[sub 1]] [J[sub v]] [J[sub v][space] (large values of x > 1000)] ]
|
||||
[[53] [Win32 / Visual C++ 8.0]
|
||||
[Peak=2.5 Mean=1.1
|
||||
[table_cyl_bessel_j_integer_orders_]
|
||||
|
||||
GSL Peak=6.6
|
||||
[table_cyl_bessel_j]
|
||||
|
||||
__cephes Peak=2.5 Mean=1.1]
|
||||
[Peak=11 Mean=2.2
|
||||
[table_cyl_neumann_integer_orders_]
|
||||
|
||||
GSL Peak=11
|
||||
|
||||
__cephes Peak=17 Mean=2.5]
|
||||
[Peak=59 Mean=10
|
||||
|
||||
GSL Peak=6x10[super 11]
|
||||
|
||||
__cephes Peak=2x10[super 5] ] ]
|
||||
[[64] [Red Hat Linux IA64 / G++ 3.4] [Peak=7 Mean=3] [Peak=117 Mean=10] [Peak=2x10[super 4][space] Mean=6x10[super 3]] ]
|
||||
[[64] [SUSE Linux AMD64 / G++ 4.1] [Peak=7 Mean=3] [Peak=400 Mean=40] [Peak=2x10[super 4][space] Mean=1x10[super 4]] ]
|
||||
[[113] [HP-UX / HP aCC 6] [Peak=14 Mean=6] [Peak=29 Mean=3] [Peak=2700 Mean=450] ]
|
||||
]
|
||||
|
||||
[table Errors Rates in cyl_neumann
|
||||
[[Significand Size] [Platform and Compiler] [Y[sub 0][space] and Y[sub 1]] [Y[sub n] (integer orders)] [Y[sub v] (fractional orders)] ]
|
||||
[[53] [Win32 / Visual C++ 8.0]
|
||||
[Peak=4.7 Mean=1.7
|
||||
|
||||
GSL Peak=34 Mean=9
|
||||
|
||||
__cephes Peak=330 Mean=54]
|
||||
[Peak=117 Mean=10
|
||||
|
||||
GSL Peak=500 Mean=54
|
||||
|
||||
__cephes Peak=923 Mean=83]
|
||||
[Peak=800 Mean=40
|
||||
|
||||
GSL Peak=1.4x10[super 6][space] Mean\=7x10[super 4][space]
|
||||
|
||||
__cephes Peak=+INF]]
|
||||
[[64] [Red Hat Linux IA64 / G++ 3.4] [Peak=470 Mean=56] [Peak=843 Mean=51] [Peak=741 Mean=51] ]
|
||||
[[64] [SUSE Linux AMD64 / G++ 4.1] [Peak=1300 Mean=424] [Peak=2x10[super 4][space] Mean=8x10[super 3]] [Peak=1x10[super 5][space] Mean=6x10[super 3]] ]
|
||||
[[113] [HP-UX / HP aCC 6] [Peak=180 Mean=63] [Peak=340 Mean=150] [Peak=2x10[super 4][space] Mean=1200] ]
|
||||
]
|
||||
[table_cyl_neumann]
|
||||
|
||||
Note that for large /x/ these functions are largely dependent on
|
||||
the accuracy of the `std::sin` and `std::cos` functions.
|
||||
|
||||
@@ -65,8 +65,24 @@ does not use.
|
||||
|
||||
[h4 Accuracy]
|
||||
|
||||
The accuracy of these functions is broadly similar to the underlying Bessel functions. Refer to those functions
|
||||
for more information.
|
||||
The accuracy of these functions is broadly similar to the underlying Bessel functions.
|
||||
|
||||
[table_cyl_bessel_i_prime_integer_orders_]
|
||||
|
||||
[table_cyl_bessel_i_prime]
|
||||
|
||||
[table_cyl_bessel_j_prime_integer_orders_]
|
||||
|
||||
[table_cyl_bessel_j_prime]
|
||||
|
||||
[table_cyl_bessel_k_prime_integer_orders_]
|
||||
|
||||
[table_cyl_bessel_k_prime]
|
||||
|
||||
[table_sph_bessel_prime]
|
||||
|
||||
[table_sph_neumann_prime]
|
||||
|
||||
|
||||
[h4 Implementation]
|
||||
|
||||
|
||||
@@ -58,8 +58,9 @@ a simplified version of this implementation
|
||||
|
||||
[h4 Accuracy]
|
||||
|
||||
Other than for some special cases, these functions are computed in terms of
|
||||
__cyl_bessel_j and __cyl_neumann: refer to these functions for accuracy data.
|
||||
[table_sph_bessel]
|
||||
|
||||
[table_sph_neumann]
|
||||
|
||||
[h4 Implementation]
|
||||
|
||||
|
||||
@@ -44,25 +44,7 @@ along with comparisons to the __gsl and __cephes libraries. Note that
|
||||
only results for the widest floating point type on the system are given as
|
||||
narrower types have __zero_error.
|
||||
|
||||
[table Peak Errors In the Beta Function
|
||||
[[Significand Size] [Platform and Compiler] [Errors in range
|
||||
|
||||
0.4 < a,b < 100] [Errors in range
|
||||
|
||||
1e-6 < a,b < 36]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=99 Mean=22
|
||||
|
||||
(GSL Peak=1178 Mean=238)
|
||||
|
||||
(__cephes=1612)] [Peak=10.7 Mean=2.6
|
||||
|
||||
(GSL Peak=12 Mean=2.0)
|
||||
|
||||
(__cephes=174)]]
|
||||
[[64] [Red Hat Linux IA32, g++ 3.4.4] [Peak=112.1 Mean=26.9] [Peak=15.8 Mean=3.6]]
|
||||
[[64] [Red Hat Linux IA64, g++ 3.4.4] [Peak=61.4 Mean=19.5] [Peak=12.2 Mean=3.6]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=42.03 Mean=13.94] [Peak=9.8 Mean=3.1]]
|
||||
]
|
||||
[table_beta]
|
||||
|
||||
Note that the worst errors occur when a or b are large, and that
|
||||
when this is the case the result is very close to zero, so absolute
|
||||
|
||||
@@ -37,13 +37,7 @@ 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 Positive Values] [Values Near The Positive Root] [Values Near Zero] [Negative Values]]
|
||||
[[53] [Win32 Visual C++ 8] [Peak=0.98 Mean=0.36] [Peak=0.99 Mean=0.5] [Peak=0.95 Mean=0.5] [Peak=214 Mean=16] ]
|
||||
[[64] [Linux IA32 / GCC] [Peak=1.4 Mean=0.4] [Peak=1.3 Mean=0.45] [Peak=0.98 Mean=0.35] [Peak=180 Mean=13] ]
|
||||
[[64] [Linux IA64 / GCC] [Peak=0.92 Mean=0.4] [Peak=1.3 Mean=0.45] [Peak=0.98 Mean=0.4] [Peak=180 Mean=13] ]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=0.9 Mean=0.4] [Peak=1.1 Mean=0.5] [Peak=0.99 Mean=0.4] [Peak=64 Mean=6] ]
|
||||
]
|
||||
[table_digamma]
|
||||
|
||||
As shown above, error rates for positive arguments are generally very low.
|
||||
For negative arguments there are an infinite number of irrational roots:
|
||||
|
||||
@@ -207,12 +207,16 @@ Note that only results for the widest floating-point type on the
|
||||
system are given as narrower types have __zero_error. All values
|
||||
are relative errors in units of epsilon.
|
||||
|
||||
[table Errors Rates in the Carlson Elliptic Integrals
|
||||
[[Significand Size] [Platform and Compiler] [R[sub F]] [R[sub D]] [R[sub J]] [R[sub C]]]
|
||||
[[53] [Win32 / Visual C++ 8.0] [Peak=2.9 Mean=0.75] [Peak=2.6 Mean=0.9] [Peak=108 Mean=6.9] [Peak=2.4 Mean=0.6] ]
|
||||
[[64] [Red Hat Linux / G++ 3.4] [Peak=2.5 Mean=0.75] [Peak=2.7 Mean=0.9] [Peak=105 Mean=8] [Peak=1.9 Mean=0.7] ]
|
||||
[[113] [HP-UX / HP aCC 6] [Peak=5.3 Mean=1.6] [Peak=2.9 Mean=0.99] [Peak=180 Mean=12] [Peak=1.8 Mean=0.7] ]
|
||||
]
|
||||
[table_ellint_rc]
|
||||
|
||||
[table_ellint_rd]
|
||||
|
||||
[table_ellint_rg]
|
||||
|
||||
[table_ellint_rf]
|
||||
|
||||
[table_ellint_rj]
|
||||
|
||||
|
||||
[heading Implementation]
|
||||
|
||||
|
||||
@@ -77,13 +77,7 @@ Note that only results for the widest floating point type on the
|
||||
system are given as narrower types have __zero_error. All values
|
||||
are relative errors in units of epsilon.
|
||||
|
||||
[table Errors Rates in the Elliptic Integrals of the First Kind
|
||||
[[Significand Size] [Platform and Compiler] [F([phi], k)] [K(k)] ]
|
||||
[[53] [Win32 / Visual C++ 8.0] [Peak=3 Mean=0.8] [Peak=1.8 Mean=0.7] ]
|
||||
[[64] [Red Hat Linux / G++ 3.4] [Peak=2.6 Mean=1.7] [Peak=2.2 Mean=1.8] ]
|
||||
[[113] [HP-UX / HP aCC 6] [Peak=4.6 Mean=1.5] [Peak=3.7 Mean=1.5] ]
|
||||
]
|
||||
|
||||
[table_ellint_1]
|
||||
|
||||
[heading Testing]
|
||||
|
||||
@@ -177,13 +171,7 @@ Note that only results for the widest floating point type on the
|
||||
system are given as narrower types have __zero_error. All values
|
||||
are relative errors in units of epsilon.
|
||||
|
||||
[table Errors Rates in the Elliptic Integrals of the Second Kind
|
||||
[[Significand Size] [Platform and Compiler] [F([phi], k)] [K(k)] ]
|
||||
[[53] [Win32 / Visual C++ 8.0] [Peak=4.6 Mean=1.2] [Peak=3.5 Mean=1.0] ]
|
||||
[[64] [Red Hat Linux / G++ 3.4] [Peak=4.3 Mean=1.1] [Peak=4.6 Mean=1.2] ]
|
||||
[[113] [HP-UX / HP aCC 6] [Peak=5.8 Mean=2.2] [Peak=10.8 Mean=2.3] ]
|
||||
]
|
||||
|
||||
[table_ellint_2]
|
||||
|
||||
[heading Testing]
|
||||
|
||||
@@ -280,13 +268,7 @@ Note that only results for the widest floating point type on the
|
||||
system are given as narrower types have __zero_error. All values
|
||||
are relative errors in units of epsilon.
|
||||
|
||||
[table Errors Rates in the Elliptic Integrals of the Third Kind
|
||||
[[Significand Size] [Platform and Compiler] [[Pi](n, [phi], k)] [[Pi](n, k)] ]
|
||||
[[53] [Win32 / Visual C++ 8.0] [Peak=29 Mean=2.2] [Peak=3 Mean=0.8] ]
|
||||
[[64] [Red Hat Linux / G++ 3.4] [Peak=14 Mean=1.3] [Peak=2.3 Mean=0.8] ]
|
||||
[[113] [HP-UX / HP aCC 6] [Peak=10 Mean=1.4] [Peak=4.2 Mean=1.1] ]
|
||||
]
|
||||
|
||||
[table_ellint_3]
|
||||
|
||||
[heading Testing]
|
||||
|
||||
@@ -406,6 +388,10 @@ These functions are trivially computed in terms of other elliptic integrals
|
||||
and generally have very low error rates (a few epsilon) unless parameter [phi]
|
||||
is very large, in which case the usual trigonometric function argument-reduction issues apply.
|
||||
|
||||
[table_ellint_d_complete_]
|
||||
|
||||
[table_ellint_d]
|
||||
|
||||
[heading Testing]
|
||||
|
||||
The tests use a mixture of spot test values calculated using
|
||||
@@ -475,6 +461,8 @@ These functions are trivially computed in terms of other elliptic integrals
|
||||
and generally have very low error rates (a few epsilon) unless parameter [phi]
|
||||
is very large, in which case the usual trigonometric function argument-reduction issues apply.
|
||||
|
||||
[table_jacobi_zeta]
|
||||
|
||||
[heading Testing]
|
||||
|
||||
The tests use a mixture of spot test values calculated using
|
||||
@@ -543,6 +531,8 @@ These functions are trivially computed in terms of other elliptic integrals
|
||||
and generally have very low error rates (a few epsilon) unless parameter [phi]
|
||||
is very large, in which case the usual trigonometric function argument-reduction issues apply.
|
||||
|
||||
[table_heuman_lambda]
|
||||
|
||||
[heading Testing]
|
||||
|
||||
The tests use a mixture of spot test values calculated using
|
||||
|
||||
@@ -62,81 +62,9 @@ along with comparisons to the __gsl, __glibc, __hpc and __cephes libraries.
|
||||
Unless otherwise specified any floating point type that is narrower
|
||||
than the one shown will have __zero_error.
|
||||
|
||||
[table Errors In the Function erf(z)
|
||||
[[Significand Size] [Platform and Compiler] [z < 0.5] [0.5 < z < 8] [z > 8]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=0 Mean=0
|
||||
[table_erf]
|
||||
|
||||
GSL Peak=2.0 Mean=0.3
|
||||
|
||||
__cephes Peak=1.1 Mean=0.7] [Peak=0.9 Mean=0.09
|
||||
|
||||
GSL Peak=2.3 Mean=0.3
|
||||
|
||||
__cephes Peak=1.3 Mean=0.2] [Peak=0 Mean=0
|
||||
|
||||
GSL Peak=0 Mean=0
|
||||
|
||||
__cephes Peak=0 Mean=0]]
|
||||
[[64] [RedHat Linux IA32, gcc-3.3] [Peak=0.7 Mean=0.07
|
||||
|
||||
__glibc Peak=0.9 Mean=0.2] [Peak=0.9 Mean=0.2
|
||||
|
||||
__glibc Peak=0.9 Mean=0.07] [Peak=0 Mean=0
|
||||
|
||||
__glibc Peak=0 Mean=0]]
|
||||
[[64] [Redhat Linux IA64, gcc-3.4.4] [Peak=0.7 Mean=0.07
|
||||
|
||||
__glibc Peak=0 Mean=0] [Peak=0.9 Mean=0.1
|
||||
|
||||
__glibc Peak=0.5 Mean=0.03] [Peak=0 Mean=0
|
||||
|
||||
__glibc Peak=0 Mean=0]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=0.8 Mean=0.1
|
||||
|
||||
__hpc Lib Peak=0.9 Mean=0.2] [Peak=0.9 Mean=0.1
|
||||
|
||||
__hpc Lib Peak=0.5 Mean=0.02] [Peak=0 Mean=0
|
||||
|
||||
__hpc Lib Peak=0 Mean=0]]
|
||||
]
|
||||
|
||||
[table Errors In the Function erfc(z)
|
||||
[[Significand Size] [Platform and Compiler] [z < 0.5] [0.5 < z < 8] [z > 8]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=0.7 Mean=0.06
|
||||
|
||||
GSL Peak=1.0 Mean=0.4
|
||||
|
||||
__cephes Peak=0.7 Mean=0.06] [Peak=0.99 Mean=0.3
|
||||
|
||||
GSL Peak=2.6 Mean=0.6
|
||||
|
||||
__cephes Peak=3.6 Mean=0.7] [Peak=1.0 Mean=0.2
|
||||
|
||||
GSL Peak=3.9 Mean=0.4
|
||||
|
||||
__cephes Peak=2.7 Mean=0.4]]
|
||||
[[64] [RedHat Linux IA32, gcc-3.3] [Peak=0 Mean=0
|
||||
|
||||
__glibc Peak=0 Mean=0] [Peak=1.4 Mean=0.3
|
||||
|
||||
__glibc Peak=1.3 Mean=0.3] [Peak=1.6 Mean=0.4
|
||||
|
||||
__glibc Peak=1.3 Mean=0.4]]
|
||||
[[64] [Redhat Linux IA64, gcc-3.4.4] [Peak=0 Mean=0
|
||||
|
||||
__glibc Peak=0 Mean=0] [Peak=1.4 Mean=0.3
|
||||
|
||||
__glibc Peak=0 Mean=0] [Peak=1.5 Mean=0.4
|
||||
|
||||
__glibc Peak=0 Mean=0] ]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=0 Mean=0
|
||||
|
||||
__hpc Peak=0 Mean=0] [Peak=1.5 Mean=0.3
|
||||
|
||||
__hpc Peak=0.9 Mean=0.08] [Peak=1.6 Mean=0.4
|
||||
|
||||
__hpc Peak=0.9 Mean=0.1]]
|
||||
]
|
||||
[table_erfc]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
|
||||
@@ -62,6 +62,10 @@ are accurate to less than ~ 2 epsilon. For higher precision types these
|
||||
functions have the same accuracy as the
|
||||
[link math_toolkit.sf_erf.error_function forward error functions].
|
||||
|
||||
[table_erf_inv]
|
||||
|
||||
[table_erfc_inv]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
There are two sets of tests:
|
||||
|
||||
@@ -42,23 +42,11 @@ of z:
|
||||
|
||||
The following table shows the peak errors (in units of epsilon)
|
||||
found on various platforms with various floating point types,
|
||||
along with comparisons to the __cephes library.
|
||||
along with comparisons to other libraries.
|
||||
Unless otherwise specified any floating point type that is narrower
|
||||
than the one shown will have __zero_error.
|
||||
|
||||
[table Errors In the Function expint(n, z)
|
||||
[[Significand Size] [Platform and Compiler] [En][E1]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=7.1 Mean=1.8
|
||||
|
||||
__cephes Peak=5.1 Mean=1.3
|
||||
]
|
||||
[Peak=0.99 Mean=0.5
|
||||
|
||||
__cephes Peak=3.1 Mean=1.1]]
|
||||
[[64] [RedHat Linux IA_EM64, gcc-4.1] [Peak=9.9 Mean=2.1] [Peak=0.97 Mean=0.4]]
|
||||
[[64] [Redhat Linux IA64, gcc-4.1] [Peak=9.9 Mean=2.1] [Peak=0.97 Mean=0.4]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=23.3 Mean=3.7] [Peak=1.6 Mean=0.5]]
|
||||
]
|
||||
[table_expint_En_]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
@@ -147,18 +135,7 @@ along with comparisons to Cody's SPECFUN implementation and the __gsl library.
|
||||
Unless otherwise specified any floating point type that is narrower
|
||||
than the one shown will have __zero_error.
|
||||
|
||||
[table Errors In the Function expint(z)
|
||||
[[Significand Size] [Platform and Compiler] [Error]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=2.4 Mean=0.6
|
||||
|
||||
GSL Peak=8.9 Mean=0.7
|
||||
|
||||
SPECFUN (Cody) Peak=2.5 Mean=0.6
|
||||
]]
|
||||
[[64] [RedHat Linux IA_EM64, gcc-4.1] [Peak=5.1 Mean=0.8]]
|
||||
[[64] [Redhat Linux IA64, gcc-4.1] [Peak=5.0 Mean=0.8] ]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=1.9 Mean=0.63]]
|
||||
]
|
||||
[table_expint_Ei_]
|
||||
|
||||
It should be noted that all three libraries tested above
|
||||
offer sub-epsilon precision over most of their range.
|
||||
|
||||
@@ -64,25 +64,9 @@ 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 Errors In the Function tgamma_delta_ratio(a, delta)
|
||||
[[Significand Size] [Platform and Compiler] [20 < a < 80
|
||||
[table_tgamma_delta_ratio]
|
||||
|
||||
and
|
||||
|
||||
delta < 1]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=16.9 Mean=1.7] ]
|
||||
[[64] [Redhat Linux IA32, gcc-3.4.4] [Peak=24 Mean=2.7]]
|
||||
[[64] [Redhat Linux IA64, gcc-3.4.4] [Peak=12.8 Mean=1.8]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=21.4 Mean=2.3] ]
|
||||
]
|
||||
|
||||
[table Errors In the Function tgamma_ratio(a, b)
|
||||
[[Significand Size] [Platform and Compiler] [6 < a,b < 50]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=34 Mean=9] ]
|
||||
[[64] [Redhat Linux IA32, gcc-3.4.4] [Peak=91 Mean=23]]
|
||||
[[64] [Redhat Linux IA64, gcc-3.4.4] [Peak=35.6 Mean=9.3]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=43.9 Mean=13.2] ]
|
||||
]
|
||||
[table_tgamma_ratio]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
|
||||
@@ -76,15 +76,7 @@ for various domains of input arguments.
|
||||
Note that only results for the widest floating point type on the system are
|
||||
given as narrower types have __zero_error.
|
||||
|
||||
[table Peak Errors In the Hermite Polynomial
|
||||
[[Significand Size] [Platform and Compiler] [Errors in range
|
||||
|
||||
0 < l < 20] ]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=4.5 Mean=1.5] ]
|
||||
[[64] [Red Hat Linux IA32, g++ 4.1] [Peak=6 Mean=2]]
|
||||
[[64] [Red Hat Linux IA64, g++ 3.4.4] [Peak=6 Mean=2] ]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=6 Mean=4]]
|
||||
]
|
||||
[table_hermite]
|
||||
|
||||
Note that the worst errors occur when the degree increases, values greater than
|
||||
~120 are very unlikely to produce sensible results, especially in the associated
|
||||
|
||||
105
doc/sf/ibeta.qbk
105
doc/sf/ibeta.qbk
@@ -111,110 +111,13 @@ more extreme test cases to be tested. For example expected results that
|
||||
are zero at double precision, may be finite but exceptionally small with
|
||||
the wider exponent range of the long double types.
|
||||
|
||||
[table Errors In the Function ibeta(a,b,x)
|
||||
[[Significand Size] [Platform and Compiler] [0 < a,b < 10
|
||||
[table_ibeta]
|
||||
|
||||
and
|
||||
[table_ibetac]
|
||||
|
||||
0 < x < 1] [0 < a,b < 100
|
||||
[table_beta_incomplete_]
|
||||
|
||||
and
|
||||
|
||||
0 < x < 1][1x10[super -5] < a,b < 1x10[super 5]
|
||||
|
||||
and
|
||||
|
||||
0 < x < 1]]
|
||||
[[53] [Win32, Visual C++ 8]
|
||||
[Peak=42.3 Mean=2.9
|
||||
|
||||
(GSL Peak=682 Mean=32.5)
|
||||
|
||||
(__cephes Peak=42.7 Mean=7.0)]
|
||||
[Peak=108 Mean=16.6
|
||||
|
||||
(GSL Peak=690 Mean=151)
|
||||
|
||||
(__cephes Peak=1545 Mean=218)]
|
||||
[Peak=4x10[super 3][space] Mean=203
|
||||
|
||||
(GSL Peak~3x10[super 5][space] Mean~2x10[super 4][space])
|
||||
|
||||
(__cephes Peak~5x10[super 5][space] Mean~2x10[super 4][space])]]
|
||||
[[64] [Redhat Linux IA32, gcc-3.4.4] [Peak=21.9 Mean=3.1]
|
||||
[Peak=270.7 Mean=26.8] [Peak~5x10[super 4][space] Mean=3x10[super 3][space] ]]
|
||||
[[64] [Redhat Linux IA64, gcc-3.4.4] [Peak=15.4 Mean=3.0] [Peak=112.9 Mean=14.3]
|
||||
[Peak~5x10[super 4][space] Mean=3x10[super 3][space]]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=20.9 Mean=2.6] [Peak=88.1 Mean=14.3]
|
||||
[Peak~2x10[super 4][space] Mean=1x10[super 3][space] ]]
|
||||
]
|
||||
|
||||
[table Errors In the Function ibetac(a,b,x)
|
||||
[[Significand Size] [Platform and Compiler] [0 < a,b < 10
|
||||
|
||||
and
|
||||
|
||||
0 < x < 1] [0 < a,b < 100
|
||||
|
||||
and
|
||||
|
||||
0 < x < 1][1x10[super -5] < a,b < 1x10[super 5]
|
||||
|
||||
and
|
||||
|
||||
0 < x < 1]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=13.9 Mean=2.0]
|
||||
[Peak=56.2 Mean=14] [Peak=3x10[super 3][space] Mean=159]]
|
||||
[[64] [Redhat Linux IA32, gcc-3.4.4] [Peak=21.1 Mean=3.6]
|
||||
[Peak=221.7 Mean=25.8]
|
||||
[Peak~9x10[super 4][space] Mean=3x10[super 3][space] ]]
|
||||
[[64] [Redhat Linux IA64, gcc-3.4.4] [Peak=10.6 Mean=2.2]
|
||||
[Peak=73.9 Mean=11.9]
|
||||
[Peak~9x10[super 4][space] Mean=3x10[super 3][space] ]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=9.9 Mean=2.6]
|
||||
[Peak=117.7 Mean=15.1]
|
||||
[Peak~3x10[super 4][space] Mean=1x10[super 3][space] ]]
|
||||
]
|
||||
|
||||
[table Errors In the Function beta(a, b, x)
|
||||
[[Significand Size] [Platform and Compiler] [0 < a,b < 10
|
||||
|
||||
and
|
||||
|
||||
0 < x < 1] [0 < a,b < 100
|
||||
|
||||
and
|
||||
|
||||
0 < x < 1][1x10[super -5] < a,b < 1x10[super 5]
|
||||
|
||||
and
|
||||
|
||||
0 < x < 1]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=39 Mean=2.9] [Peak=91 Mean=12.7] [Peak=635 Mean=25]]
|
||||
[[64] [Redhat Linux IA32, gcc-3.4.4] [Peak=26 Mean=3.6] [Peak=180.7 Mean=30.1] [Peak~7x10[super 4][space] Mean=3x10[super 3][space] ]]
|
||||
[[64] [Redhat Linux IA64, gcc-3.4.4] [Peak=13 Mean=2.4] [Peak=67.1 Mean=13.4] [Peak~7x10[super 4][space] Mean=3x10[super 3][space] ]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=27.3 Mean=3.6] [Peak=49.8 Mean=9.1] [Peak~6x10[super 4][space] Mean=3x10[super 3][space] ]]
|
||||
]
|
||||
|
||||
[table Errors In the Function betac(a,b,x)
|
||||
[[Significand Size] [Platform and Compiler] [0 < a,b < 10
|
||||
|
||||
and
|
||||
|
||||
0 < x < 1] [0 < a,b < 100
|
||||
|
||||
and
|
||||
|
||||
0 < x < 1][1x10[super -5] < a,b < 1x10[super 5]
|
||||
|
||||
and
|
||||
|
||||
0 < x < 1]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=12.0 Mean=2.4] [Peak=91 Mean=15] [Peak=4x10[super 3][space] Mean=113]]
|
||||
[[64] [Redhat Linux IA32, gcc-3.4.4] [Peak=19.8 Mean=3.8] [Peak=295.1 Mean=33.9] [Peak~1x10[super 5][space] Mean=5x10[super 3][space] ]]
|
||||
[[64] [Redhat Linux IA64, gcc-3.4.4] [Peak=11.2 Mean=2.4] [Peak=63.5 Mean=13.6] [Peak~1x10[super 5][space] Mean=5x10[super 3][space] ]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=15.6 Mean=3.5] [Peak=39.8 Mean=8.9] [Peak~9x10[super 4][space] Mean=5x10[super 3][space] ]]
|
||||
]
|
||||
[table_betac]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
|
||||
@@ -182,6 +182,22 @@ note that in some parts of their domain, these functions can
|
||||
be extremely sensitive to changes in input, particularly when
|
||||
the argument /p/ (or it's complement /q/) is very close to `0` or `1`.
|
||||
|
||||
Comparisons to other libraries are shown below, note that our test data
|
||||
exercises some rather extreme cases in the incomplete beta function
|
||||
which many other libraries fail to handle:
|
||||
|
||||
[table_ibeta_inv]
|
||||
|
||||
[table_ibetac_inv]
|
||||
|
||||
[table_ibeta_inva]
|
||||
|
||||
[table_ibetac_inva]
|
||||
|
||||
[table_ibeta_invb]
|
||||
|
||||
[table_ibetac_invb]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
There are two sets of tests:
|
||||
|
||||
@@ -117,109 +117,13 @@ reflect the more extreme nature of the tests conducted for these types.
|
||||
|
||||
All values are in units of epsilon.
|
||||
|
||||
[table Errors In the Function gamma_p(a,z)
|
||||
[[Significand Size] [Platform and Compiler]
|
||||
[0.5 < a < 100
|
||||
[table_gamma_p]
|
||||
|
||||
and
|
||||
[table_gamma_q]
|
||||
|
||||
0.01*a < z < 100*a]
|
||||
[1x10[super -12] < a < 5x10[super -2]
|
||||
[table_tgamma_lower]
|
||||
|
||||
and
|
||||
|
||||
0.01*a < z < 100*a]
|
||||
[1e-6 < a < 1.7x10[super 6]
|
||||
|
||||
and
|
||||
|
||||
1 < z < 100*a]]
|
||||
[[53] [Win32, Visual C++ 8]
|
||||
[Peak=36 Mean=9.1
|
||||
|
||||
(GSL Peak=342 Mean=46)
|
||||
|
||||
(__cephes Peak=491 Mean=102)]
|
||||
[Peak=4.5 Mean=1.4
|
||||
|
||||
(GSL Peak=4.8 Mean=0.76)
|
||||
|
||||
(__cephes Peak=21 Mean=5.6)]
|
||||
[Peak=244 Mean=21
|
||||
|
||||
(GSL Peak=1022 Mean=1054)
|
||||
|
||||
(__cephes Peak~8x10[super 6] Mean~7x10[super 4])]]
|
||||
[[64] [RedHat Linux IA32, gcc-3.3] [Peak=241 Mean=36] [Peak=4.7 Mean=1.5] [Peak~30,220 Mean=1929]]
|
||||
[[64] [Redhat Linux IA64, gcc-3.4] [Peak=41 Mean=10] [Peak=4.7 Mean=1.4] [Peak~30,790 Mean=1864]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=40.2 Mean=10.2] [Peak=5 Mean=1.6] [Peak=5,476 Mean=440]]
|
||||
]
|
||||
|
||||
[table Errors In the Function gamma_q(a,z)
|
||||
[[Significand Size] [Platform and Compiler]
|
||||
[0.5 < a < 100
|
||||
|
||||
and
|
||||
|
||||
0.01*a < z < 100*a]
|
||||
[1x10[super -12] < a < 5x10[super -2]
|
||||
|
||||
and
|
||||
|
||||
0.01*a < z < 100*a] [1x10[super -6] < a < 1.7x10[super 6]
|
||||
|
||||
and
|
||||
|
||||
1 < z < 100*a]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=28.3 Mean=7.2
|
||||
|
||||
(GSL Peak=201 Mean=13)
|
||||
|
||||
(__cephes Peak=556 Mean=97)] [Peak=4.8 Mean=1.6
|
||||
|
||||
(GSL Peak~1.3x10[super 10] Mean=1x10[super +9])
|
||||
|
||||
(__cephes Peak~3x10[super 11] Mean=4x10[super 10])] [Peak=469 Mean=33
|
||||
|
||||
(GSL Peak=27,050 Mean=2159)
|
||||
|
||||
(__cephes Peak~8x10[super 6] Mean~7x10[super 5])]]
|
||||
[[64] [RedHat Linux IA32, gcc-3.3] [Peak=280 Mean=33] [Peak=4.1 Mean=1.6] [Peak=11,490 Mean=732]]
|
||||
[[64] [Redhat Linux IA64, gcc-3.4] [Peak=32 Mean=9.4] [Peak=4.7 Mean=1.5] [Peak=6815 Mean=414]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=37 Mean=10] [Peak=11.2 Mean=2.0] [Peak=4,999 Mean=298]]
|
||||
]
|
||||
|
||||
[table Errors In the Function tgamma_lower(a,z)
|
||||
[[Significand Size] [Platform and Compiler] [0.5 < a < 100
|
||||
|
||||
and
|
||||
|
||||
0.01*a < z < 100*a] [1x10[super -12] < a < 5x10[super -2]
|
||||
|
||||
and
|
||||
|
||||
0.01*a < z < 100*a]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=5.5 Mean=1.4] [Peak=3.6 Mean=0.78]]
|
||||
[[64] [RedHat Linux IA32, gcc-3.3] [Peak=402 Mean=79] [Peak=3.4 Mean=0.8]]
|
||||
[[64] [Redhat Linux IA64, gcc-3.4] [Peak=6.8 Mean=1.4] [Peak=3.4 Mean=0.78]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=6.1 Mean=1.8] [Peak=3.7 Mean=0.89]]
|
||||
]
|
||||
|
||||
[table Errors In the Function tgamma(a,z)
|
||||
[[Significand Size] [Platform and Compiler] [0.5 < a < 100
|
||||
|
||||
and
|
||||
|
||||
0.01*a < z < 100*a] [1x10[super -12] < a < 5x10[super -2]
|
||||
|
||||
and
|
||||
|
||||
0.01*a < z < 100*a]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=5.9 Mean=1.5] [Peak=1.8 Mean=0.6]]
|
||||
[[64] [RedHat Linux IA32, gcc-3.3] [Peak=596 Mean=116] [Peak=3.2 Mean=0.84]]
|
||||
[[64] [Redhat Linux IA64, gcc-3.4.4] [Peak=40.2 Mean=2.5] [Peak=3.2 Mean=0.8]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=364 Mean=17.6] [Peak=12.7 Mean=1.8]]
|
||||
]
|
||||
[table_tgamma_incomplete_]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
|
||||
@@ -105,7 +105,15 @@ they are deliberately "detuned" so as not to be too accurate: it is in
|
||||
any case impossible for these function to be more accurate than the
|
||||
regular forward incomplete gamma functions. In practice, the accuracy
|
||||
of these functions is very similar to that of __gamma_p and __gamma_q
|
||||
functions.
|
||||
functions:
|
||||
|
||||
[table_gamma_p_inv]
|
||||
|
||||
[table_gamma_q_inv]
|
||||
|
||||
[table_gamma_p_inva]
|
||||
|
||||
[table_gamma_q_inva]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
|
||||
@@ -132,12 +132,11 @@ Note that only results for the widest floating point type on the
|
||||
system are given as narrower types have __zero_error. All values
|
||||
are relative errors in units of epsilon.
|
||||
|
||||
[table Errors Rates in the Jacobi Elliptic Functions
|
||||
[[Significand Size] [Platform and Compiler] [u < 1] [Large u] ]
|
||||
[[53] [Win32 / Visual C++ 8.0] [Peak=2 Mean=0.5] [Peak=44000 Mean=2500] ]
|
||||
[[64] [Ubuntu Linux / G++ 4.7] [Peak=2.0 Mean=0.5] [Peak=25000 Mean=1500] ]
|
||||
]
|
||||
[table_jacobi_cn]
|
||||
|
||||
[table_jacobi_dn]
|
||||
|
||||
[table_jacobi_sn]
|
||||
|
||||
[heading Testing]
|
||||
|
||||
|
||||
@@ -126,25 +126,9 @@ for various domains of input arguments.
|
||||
Note that only results for the widest floating point type on the system are
|
||||
given as narrower types have __zero_error.
|
||||
|
||||
[table Peak Errors In the Laguerre Polynomial
|
||||
[[Significand Size] [Platform and Compiler] [Errors in range
|
||||
[table_laguerre_n_x_]
|
||||
|
||||
0 < l < 20] ]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=3000 Mean=185] ]
|
||||
[[64] [SUSE Linux IA32, g++ 4.1] [Peak=1x10[super 4] Mean=828]]
|
||||
[[64] [Red Hat Linux IA64, g++ 3.4.4] [Peak=1x10[super 4] Mean=828] ]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=680 Mean=40]]
|
||||
]
|
||||
|
||||
[table Peak Errors In the Associated Laguerre Polynomial
|
||||
[[Significand Size] [Platform and Compiler] [Errors in range
|
||||
|
||||
0 < l < 20] ]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=433 Mean=11]]
|
||||
[[64] [SUSE Linux IA32, g++ 4.1] [Peak=61.4 Mean=19.5]]
|
||||
[[64] [Red Hat Linux IA64, g++ 3.4.4] [Peak=61.4 Mean=19.5] ]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=540 Mean=13.94] ]
|
||||
]
|
||||
[table_laguerre_n_m_x_]
|
||||
|
||||
Note that the worst errors occur when the degree increases, values greater than
|
||||
~120 are very unlikely to produce sensible results, especially in the associated
|
||||
|
||||
@@ -193,49 +193,17 @@ for various domains of input arguments.
|
||||
Note that only results for the widest floating point type on the system are
|
||||
given as narrower types have __zero_error.
|
||||
|
||||
[table Peak Errors In the Legendre P Function
|
||||
[[Significand Size] [Platform and Compiler] [Errors in range
|
||||
[table_legendre_p]
|
||||
|
||||
0 < l < 20] [Errors in range
|
||||
[table_legendre_q]
|
||||
|
||||
20 < l < 120]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=211 Mean=20] [Peak=300 Mean=33]]
|
||||
[[64] [SUSE Linux IA32, g++ 4.1] [Peak=70 Mean=10] [Peak=700 Mean=60]]
|
||||
[[64] [Red Hat Linux IA64, g++ 3.4.4] [Peak=70 Mean=10] [Peak=700 Mean=60]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=35 Mean=6] [Peak=292 Mean=41]]
|
||||
]
|
||||
|
||||
[table Peak Errors In the Associated Legendre P Function
|
||||
[[Significand Size] [Platform and Compiler] [Errors in range
|
||||
|
||||
0 < l < 20] ]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=1200 Mean=7]]
|
||||
[[64] [SUSE Linux IA32, g++ 4.1] [Peak=80 Mean=5]]
|
||||
[[64] [Red Hat Linux IA64, g++ 3.4.4] [Peak=80 Mean=5] ]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=42 Mean=4] ]
|
||||
]
|
||||
|
||||
[table Peak Errors In the Legendre Q Function
|
||||
[[Significand Size] [Platform and Compiler] [Errors in range
|
||||
|
||||
0 < l < 20] [Errors in range
|
||||
|
||||
20 < l < 120]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=50 Mean=7] [Peak=4600 Mean=370]]
|
||||
[[64] [SUSE Linux IA32, g++ 4.1] [Peak=51 Mean=8] [Peak=6000 Mean=480]]
|
||||
[[64] [Red Hat Linux IA64, g++ 3.4.4] [Peak=51 Mean=8] [Peak=6000 Mean=480]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=90 Mean=10] [Peak=1700 Mean=140]]
|
||||
]
|
||||
[table_legendre_p_associated_]
|
||||
|
||||
Note that the worst errors occur when the order increases, values greater than
|
||||
~120 are very unlikely to produce sensible results, especially in the associated
|
||||
polynomial case when the degree is also large. Further the relative errors
|
||||
are likely to grow arbitrarily large when the function is very close to a root.
|
||||
|
||||
No comparisons to other libraries are shown here: there appears to be only one
|
||||
viable implementation method for these functions, the comparisons to other
|
||||
libraries that have been run show identical error rates to those given here.
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
A mixture of spot tests of values calculated using functions.wolfram.com,
|
||||
|
||||
@@ -50,9 +50,8 @@ the result is of type `double` if T is an integer type, or type T otherwise.
|
||||
|
||||
The following table shows the peak errors (in units of epsilon)
|
||||
found on various platforms
|
||||
with various floating point types, along with comparisons to the
|
||||
__gsl, __glibc, __hpc and
|
||||
__cephes libraries. Unless otherwise specified any
|
||||
with various floating point types, along with comparisons to
|
||||
various other libraries. Unless otherwise specified any
|
||||
floating point type that is narrower than the one shown will have
|
||||
__zero_error.
|
||||
|
||||
@@ -61,63 +60,7 @@ are very low, the lgamma function has an infinite number of irrational
|
||||
roots for negative arguments: very close to these negative roots only
|
||||
a low absolute error can be guaranteed.
|
||||
|
||||
[table
|
||||
[[Significand Size] [Platform and Compiler] [Factorials and Half factorials] [Values Near Zero] [Values Near 1 or 2] [Values Near a Negative Pole]]
|
||||
[[53] [Win32 Visual C++ 8]
|
||||
[Peak=0.88 Mean=0.14
|
||||
|
||||
(GSL=33) (__cephes=1.5)]
|
||||
[Peak=0.96 Mean=0.46
|
||||
|
||||
(GSL=5.2) (__cephes=1.1)]
|
||||
[Peak=0.86 Mean=0.46
|
||||
|
||||
(GSL=1168) (__cephes~500000)]
|
||||
[Peak=4.2 Mean=1.3
|
||||
|
||||
(GSL=25) (__cephes=1.6)] ]
|
||||
[[64] [Linux IA32 / GCC]
|
||||
[Peak=1.9 Mean=0.43
|
||||
|
||||
(__glibc Peak=1.7 Mean=0.49)]
|
||||
[Peak=1.4 Mean=0.57
|
||||
|
||||
(__glibc Peak= 0.96 Mean=0.54)]
|
||||
[Peak=0.86 Mean=0.35
|
||||
|
||||
(__glibc Peak=0.74 Mean=0.26)]
|
||||
|
||||
[Peak=6.0 Mean=1.8
|
||||
|
||||
(__glibc Peak=3.0 Mean=0.86)] ]
|
||||
[[64] [Linux IA64 / GCC]
|
||||
[Peak=0.99 Mean=0.12
|
||||
|
||||
(__glibc Peak 0)]
|
||||
|
||||
[Pek=1.2 Mean=0.6
|
||||
|
||||
(__glibc Peak 0)]
|
||||
[Peak=0.86 Mean=0.16
|
||||
|
||||
(__glibc Peak 0)]
|
||||
[Peak=2.3 Mean=0.69
|
||||
|
||||
(__glibc Peak 0)] ]
|
||||
[[113] [HPUX IA64, aCC A.06.06]
|
||||
[Peak=0.96 Mean=0.13
|
||||
|
||||
(__hpc Peak 0)]
|
||||
[Peak=0.99 Mean=0.53
|
||||
|
||||
(__hpc Peak 0)]
|
||||
[Peak=0.9 Mean=0.4
|
||||
|
||||
(__hpc Peak 0)]
|
||||
[Peak=3.0 Mean=0.9
|
||||
|
||||
(__hpc Peak 0)] ]
|
||||
]
|
||||
[table_lgamma]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ where G(h) is the univariate normal with zero mean and unit variance integral fr
|
||||
Over the built-in types and range tested,
|
||||
errors are less than 10 * std::numeric_limits<RealType>::epsilon().
|
||||
|
||||
[table_owens_t]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
Test data was generated by Patefield and Tandy algorithms T1 and T4,
|
||||
|
||||
@@ -40,12 +40,7 @@ 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] [Small-medium positive arguments] [Small-medium negative x] ]
|
||||
[[53] [Win32 Visual C++ 12] [Peak=5.0 Mean=1] [Peak=1200 Mean=65]]
|
||||
[[64] [Win64 Mingw GCC] [Peak=16 Mean=3] [Peak=33 Mean=3] ]
|
||||
[[113] [Win64 Mingw GCC __float128] [Peak=6.5 Mean=1][Peak=30 Mean=4] ]
|
||||
]
|
||||
[table_polygamma]
|
||||
|
||||
As shown above, error rates are generally very acceptable for moderately sized
|
||||
arguments. Error rates should stay low for exact inputs, however, please note that the
|
||||
|
||||
@@ -25,6 +25,8 @@ the return is `double` when /x/ is an integer type and T otherwise.
|
||||
|
||||
This function performs exact all-integer arithmetic argument reduction before computing the sine of ['[pi]x].
|
||||
|
||||
[table_sin_pi]
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:cos_pi cos_pi]
|
||||
@@ -52,6 +54,8 @@ the return is `double` when /x/ is an integer type and T otherwise.
|
||||
|
||||
This function performs exact all-integer arithmetic argument reduction before computing the cosine of ['[pi]x].
|
||||
|
||||
[table_cos_pi]
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:log1p log1p]
|
||||
@@ -107,6 +111,8 @@ The following graph illustrates the behaviour of log1p:
|
||||
For built in floating point types `log1p`
|
||||
should have approximately 1 epsilon accuracy.
|
||||
|
||||
[table_log1p]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
A mixture of spot test sanity checks, and random high precision test values
|
||||
@@ -155,6 +161,8 @@ The following graph illustrates the behaviour of expm1:
|
||||
For built in floating point types `expm1`
|
||||
should have approximately 1 epsilon accuracy.
|
||||
|
||||
[table_expm1]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
A mixture of spot test sanity checks, and random high precision test values
|
||||
@@ -196,6 +204,8 @@ The following graph illustrates the behaviour of cbrt:
|
||||
For built in floating-point types `cbrt`
|
||||
should have approximately 2 epsilon accuracy.
|
||||
|
||||
[table_cbrt]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
A mixture of spot test sanity checks, and random high precision test values
|
||||
@@ -240,6 +250,8 @@ The following graph illustrates the behaviour of sqrt1pm1:
|
||||
For built in floating-point types `sqrt1pm1`
|
||||
should have approximately 3 epsilon accuracy.
|
||||
|
||||
[table_sqrt1pm1]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
A selection of random high precision test values
|
||||
@@ -283,6 +295,8 @@ The following graph illustrates the behaviour of powm1:
|
||||
|
||||
Should have approximately 2-3 epsilon accuracy.
|
||||
|
||||
[table_powm1]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
A selection of random high precision test values
|
||||
|
||||
@@ -107,15 +107,9 @@ roots of the associated Legendre function.
|
||||
|
||||
All values are in units of epsilon.
|
||||
|
||||
[table Peak Errors In the Sperical Harmonic Functions
|
||||
[[Significand Size] [Platform and Compiler] [Errors in range
|
||||
[table_spherical_harmonic_r]
|
||||
|
||||
0 < l < 20] ]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=2x10[super 4] Mean=700] ]
|
||||
[[64] [SUSE Linux IA32, g++ 4.1] [Peak=2900 Mean=100]]
|
||||
[[64] [Red Hat Linux IA64, g++ 3.4.4] [Peak=2900 Mean=100] ]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=6700 Mean=230]]
|
||||
]
|
||||
[table_spherical_harmonic_i]
|
||||
|
||||
Note that the worst errors occur when the degree increases, values greater than
|
||||
~120 are very unlikely to produce sensible results, especially
|
||||
|
||||
@@ -71,73 +71,13 @@ the result is `double` when T is an integer type, and T otherwise.
|
||||
|
||||
The following table shows the peak errors (in units of epsilon)
|
||||
found on various platforms with various floating point types,
|
||||
along with comparisons to the __gsl, __glibc, __hpc and __cephes libraries.
|
||||
along with comparisons to other common libraries.
|
||||
Unless otherwise specified any floating point type that is narrower
|
||||
than the one shown will have __zero_error.
|
||||
|
||||
[table
|
||||
[[Significand Size] [Platform and Compiler] [Factorials and Half factorials] [Values Near Zero] [Values Near 1 or 2] [Values Near a Negative Pole]]
|
||||
[[53] [Win32 Visual C++ 8]
|
||||
[Peak=1.9 Mean=0.7
|
||||
[table_tgamma]
|
||||
|
||||
(GSL=3.9)
|
||||
|
||||
(__cephes=3.0)]
|
||||
[Peak=2.0 Mean=1.1
|
||||
|
||||
(GSL=4.5)
|
||||
|
||||
(__cephes=1)]
|
||||
[Peak=2.0 Mean=1.1
|
||||
|
||||
(GSL=7.9)
|
||||
|
||||
(__cephes=1.0)]
|
||||
[Peak=2.6 Mean=1.3
|
||||
|
||||
(GSL=2.5)
|
||||
|
||||
(__cephes=2.7)] ]
|
||||
[[64] [Linux IA32 / GCC]
|
||||
[Peak=300 Mean=49.5
|
||||
|
||||
(__glibc Peak=395 Mean=89)]
|
||||
[Peak=3.0 Mean=1.4
|
||||
|
||||
(__glibc Peak=11 Mean=3.3)]
|
||||
[Peak=5.0 Mean=1.8
|
||||
|
||||
(__glibc Peak=0.92 Mean=0.2)]
|
||||
[Peak=157 Mean=65
|
||||
|
||||
(__glibc Peak=205 Mean=108)] ]
|
||||
[[64] [Linux IA64 / GCC]
|
||||
[__glibc Peak 2.8 Mean=0.9
|
||||
|
||||
(__glibc Peak 0.7)]
|
||||
[Peak=4.8 Mean=1.5
|
||||
|
||||
(__glibc Peak 0)]
|
||||
[Peak=4.8 Mean=1.5
|
||||
|
||||
(__glibc Peak 0)]
|
||||
|
||||
[Peak=5.0 Mean=1.7
|
||||
(__glibc Peak 0)] ]
|
||||
[[113] [HPUX IA64, aCC A.06.06]
|
||||
[Peak=2.5 Mean=1.1
|
||||
|
||||
(__hpc Peak 0)]
|
||||
[Peak=3.5 Mean=1.7
|
||||
|
||||
(__hpc Peak 0)]
|
||||
[Peak=3.5 Mean=1.6
|
||||
|
||||
(__hpc Peak 0)]
|
||||
[Peak=5.2 Mean=1.92
|
||||
|
||||
(__hpc Peak 0)] ]
|
||||
]
|
||||
[table_tgamma1pm1]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
|
||||
@@ -37,12 +37,7 @@ 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] ]
|
||||
]
|
||||
[table_trigamma]
|
||||
|
||||
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
|
||||
|
||||
@@ -46,23 +46,7 @@ along with comparisons to the __gsl and __cephes libraries.
|
||||
Unless otherwise specified any floating point type that is narrower
|
||||
than the one shown will have __zero_error.
|
||||
|
||||
[table Errors In the Function zeta(z)
|
||||
[[Significand Size] [Platform and Compiler] [z > 0][z < 0]]
|
||||
[[53] [Win32, Visual C++ 8] [Peak=0.99 Mean=0.1
|
||||
|
||||
GSL Peak=8.7 Mean=1.0
|
||||
|
||||
__cephes Peak=2.1 Mean=1.1
|
||||
] [Peak=7.1 Mean=3.0
|
||||
|
||||
GSL Peak=137 Mean=14
|
||||
|
||||
__cephes Peak=5084 Mean=470
|
||||
]]
|
||||
[[64] [RedHat Linux IA_EM64, gcc-4.1] [Peak=0.99 Mean=0.5] [Peak=570 Mean=60]]
|
||||
[[64] [Redhat Linux IA64, gcc-4.1] [Peak=0.99 Mean=0.5] [Peak=559 Mean=56]]
|
||||
[[113] [HPUX IA64, aCC A.06.06] [Peak=1.0 Mean=0.4] [Peak=1018 Mean=79]]
|
||||
]
|
||||
[table_zeta]
|
||||
|
||||
[h4 Testing]
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -424,7 +424,7 @@ void handle_test_result(const boost::math::tools::test_result<T>& result,
|
||||
std::stringstream ss;
|
||||
ss << std::setprecision(3);
|
||||
if(std::string(TEST_LIBRARY_NAME) != "boost")
|
||||
ss << "(" << TEST_LIBRARY_NAME << " = ";
|
||||
ss << "(['" << TEST_LIBRARY_NAME << ":] ";
|
||||
else
|
||||
ss << "[role blue ";
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,8 +5,8 @@
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "bindings.hpp"
|
||||
#include "../../test/test_jacobi.hpp"
|
||||
#include <boost/math/special_functions/jacobi_elliptic.hpp>
|
||||
#include "../../test/test_jacobi_zeta.hpp"
|
||||
#include <boost/math/special_functions/jacobi_zeta.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_main, *boost::unit_test::expected_failures(10000))
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ BOOST_AUTO_TEST_CASE(test_main, *boost::unit_test::expected_failures(10000))
|
||||
|
||||
#ifdef TYPE_TO_TEST
|
||||
|
||||
test_spots(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
test_laguerre(static_cast<TYPE_TO_TEST>(0), NAME_OF_TYPE_TO_TEST);
|
||||
|
||||
#else
|
||||
bool test_float = false;
|
||||
@@ -46,13 +46,13 @@ BOOST_AUTO_TEST_CASE(test_main, *boost::unit_test::expected_failures(10000))
|
||||
#endif
|
||||
|
||||
if(test_float)
|
||||
test_spots(0.0f, "float");
|
||||
test_laguerre(0.0f, "float");
|
||||
if(test_double)
|
||||
test_spots(0.0, "double");
|
||||
test_laguerre(0.0, "double");
|
||||
if(test_long_double)
|
||||
test_spots(0.0L, "long double");
|
||||
test_laguerre(0.0L, "long double");
|
||||
#ifdef BOOST_MATH_USE_FLOAT128
|
||||
//test_spots(0.0Q, "__float128");
|
||||
//test_laguerre(0.0Q, "__float128");
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -197,6 +197,7 @@ void test_beta(T, const char* name)
|
||||
|
||||
test_inverses<T>(ibeta_large_data);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(TEST_REAL_CONCEPT) || defined(FULL_TEST) || (TEST_DATA == 4)
|
||||
if(boost::is_floating_point<T>::value){
|
||||
@@ -211,6 +212,5 @@ void test_beta(T, const char* name)
|
||||
test_inverses2<T>(ibeta_inva_data, name, "Inverse incomplete beta");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user