diff --git a/doc/graphs/Ai_Prime__80_bit_long_double.svg b/doc/graphs/Ai_Prime__80_bit_long_double.svg new file mode 100644 index 000000000..9672b8840 --- /dev/null +++ b/doc/graphs/Ai_Prime__80_bit_long_double.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +20 +40 +60 +80 +100 +0 +-20 +-40 +-60 +-80 +-100 + + + +x + + + + + + + +Errors in Ai Prime, 80 bit long double + + + diff --git a/doc/graphs/Ai_Prime____float128.svg b/doc/graphs/Ai_Prime____float128.svg new file mode 100644 index 000000000..2ebe81d64 --- /dev/null +++ b/doc/graphs/Ai_Prime____float128.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +20 +40 +60 +80 +100 +0 +-20 +-40 +-60 +-80 +-100 + + + +x + + + + + + + +Errors in Ai Prime, __float128 + + + diff --git a/doc/graphs/Ai_Prime__double.svg b/doc/graphs/Ai_Prime__double.svg new file mode 100644 index 000000000..8bf87c698 --- /dev/null +++ b/doc/graphs/Ai_Prime__double.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +2 +4 +6 +0 +-2 +-4 +-6 +-8 +-10 + + + +x + + + + + + + +Errors in Ai Prime, double + + + diff --git a/doc/graphs/Ai__80_bit_long_double.svg b/doc/graphs/Ai__80_bit_long_double.svg new file mode 100644 index 000000000..75965fe0a --- /dev/null +++ b/doc/graphs/Ai__80_bit_long_double.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +20 +40 +60 +80 +100 +0 +-20 +-40 +-60 +-80 +-100 + + + +x + + + + + + + +Errors in Ai, 80 bit long double + + + diff --git a/doc/graphs/Ai____float128.svg b/doc/graphs/Ai____float128.svg new file mode 100644 index 000000000..46b46300c --- /dev/null +++ b/doc/graphs/Ai____float128.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +20 +40 +60 +80 +100 +0 +-20 +-40 +-60 +-80 +-100 + + + +x + + + + + + + +Errors in Ai, __float128 + + + diff --git a/doc/graphs/Ai__double.svg b/doc/graphs/Ai__double.svg new file mode 100644 index 000000000..0b2b88549 --- /dev/null +++ b/doc/graphs/Ai__double.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +20 +40 +60 +80 +0 + + + +x + + + + + + + +Errors in Ai, double + + + diff --git a/doc/graphs/Bi_Prime__80_bit_long_double.svg b/doc/graphs/Bi_Prime__80_bit_long_double.svg new file mode 100644 index 000000000..3829a4c99 --- /dev/null +++ b/doc/graphs/Bi_Prime__80_bit_long_double.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +20 +40 +60 +80 +100 +0 +-20 +-40 +-60 +-80 +-100 + + + +x + + + + + + + +Errors in Bi Prime, 80 bit long double + + + diff --git a/doc/graphs/Bi_Prime____float128.svg b/doc/graphs/Bi_Prime____float128.svg new file mode 100644 index 000000000..ada4ef43c --- /dev/null +++ b/doc/graphs/Bi_Prime____float128.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +20 +40 +60 +80 +100 +0 +-20 +-40 +-60 +-80 +-100 + + + +x + + + + + + + +Errors in Bi Prime, __float128 + + + diff --git a/doc/graphs/Bi_Prime__double.svg b/doc/graphs/Bi_Prime__double.svg new file mode 100644 index 000000000..194d5347a --- /dev/null +++ b/doc/graphs/Bi_Prime__double.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +2 +4 +0 +-2 +-4 +-6 +-8 +-10 +-12 +-14 +-16 + + + +x + + + + + + + +Errors in Bi Prime, double + + + diff --git a/doc/graphs/Bi__80_bit_long_double.svg b/doc/graphs/Bi__80_bit_long_double.svg new file mode 100644 index 000000000..736cbb179 --- /dev/null +++ b/doc/graphs/Bi__80_bit_long_double.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +20 +40 +60 +80 +100 +0 +-20 +-40 +-60 +-80 +-100 + + + +x + + + + + + + +Errors in Bi, 80 bit long double + + + diff --git a/doc/graphs/Bi____float128.svg b/doc/graphs/Bi____float128.svg new file mode 100644 index 000000000..65516df37 --- /dev/null +++ b/doc/graphs/Bi____float128.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +20 +40 +60 +80 +100 +0 +-20 +-40 +-60 +-80 +-100 + + + +x + + + + + + + +Errors in Bi, __float128 + + + diff --git a/doc/graphs/Bi__double.svg b/doc/graphs/Bi__double.svg new file mode 100644 index 000000000..5da6361b1 --- /dev/null +++ b/doc/graphs/Bi__double.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +2 +4 +6 +8 +10 +12 +14 +16 +18 +20 +0 +-2 +-4 +-6 +-8 + + + +x + + + + + + + +Errors in Bi, double + + + diff --git a/doc/graphs/Elliptic_Integral_D__80_bit_long_double.svg b/doc/graphs/Elliptic_Integral_D__80_bit_long_double.svg new file mode 100644 index 000000000..b5a29980c --- /dev/null +++ b/doc/graphs/Elliptic_Integral_D__80_bit_long_double.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +0 +-1 + +0 +20 +0 +-20 +-40 + + + +x + + + + + + + +Errors in Elliptic Integral D, 80 bit long double + + + diff --git a/doc/graphs/Elliptic_Integral_D____float128.svg b/doc/graphs/Elliptic_Integral_D____float128.svg new file mode 100644 index 000000000..b5b2a060f --- /dev/null +++ b/doc/graphs/Elliptic_Integral_D____float128.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +0 +-1 + +0 +20 +0 +-20 +-40 +-60 + + + +x + + + + + + + +Errors in Elliptic Integral D, __float128 + + + diff --git a/doc/graphs/Elliptic_Integral_D__double.svg b/doc/graphs/Elliptic_Integral_D__double.svg new file mode 100644 index 000000000..245e78a12 --- /dev/null +++ b/doc/graphs/Elliptic_Integral_D__double.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +0 +-1 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 +-1.2 +-1.4 +-1.6 +-1.8 +-2 +-2.2 +-2.4 +-2.6 +-2.8 +-3 +-3.2 +-3.4 +-3.6 +-3.8 +-4 +-4.2 +-4.4 +-4.6 +-4.8 +-5 +-5.2 +-5.4 +-5.6 +-5.8 +-6 +-6.2 +-6.4 +-6.6 +-6.8 +-7 +-7.2 +-7.4 +-7.6 +-7.8 +-8 +-8.2 +-8.4 +-8.6 +-8.8 +-9 +-9.2 +-9.4 +-9.6 +-9.8 +-10 +-10.2 +-10.4 +-10.6 +-10.8 +-11 +-11.2 +-11.4 +-11.6 +-11.8 +-12 + + + +x + + + + + + + +Errors in Elliptic Integral D, double + + + diff --git a/doc/graphs/Elliptic_Integral_E__80_bit_long_double.svg b/doc/graphs/Elliptic_Integral_E__80_bit_long_double.svg new file mode 100644 index 000000000..9dfe3e317 --- /dev/null +++ b/doc/graphs/Elliptic_Integral_E__80_bit_long_double.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +0 +-1 + +0 +2 +0 +-2 + + + +x + + + + + + + +Errors in Elliptic Integral E, 80 bit long double + + + diff --git a/doc/graphs/Elliptic_Integral_E____float128.svg b/doc/graphs/Elliptic_Integral_E____float128.svg new file mode 100644 index 000000000..7820e7f95 --- /dev/null +++ b/doc/graphs/Elliptic_Integral_E____float128.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +0 +-1 + +0 +2 +0 +-2 + + + +x + + + + + + + +Errors in Elliptic Integral E, __float128 + + + diff --git a/doc/graphs/Elliptic_Integral_E__double.svg b/doc/graphs/Elliptic_Integral_E__double.svg new file mode 100644 index 000000000..bf61d55d3 --- /dev/null +++ b/doc/graphs/Elliptic_Integral_E__double.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +0 +-1 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in Elliptic Integral E, double + + + diff --git a/doc/graphs/Elliptic_Integral_K__80_bit_long_double.svg b/doc/graphs/Elliptic_Integral_K__80_bit_long_double.svg new file mode 100644 index 000000000..133d9a77e --- /dev/null +++ b/doc/graphs/Elliptic_Integral_K__80_bit_long_double.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +0 +-1 + +0 +20 +0 +-20 +-40 + + + +x + + + + + + + +Errors in Elliptic Integral K, 80 bit long double + + + diff --git a/doc/graphs/Elliptic_Integral_K____float128.svg b/doc/graphs/Elliptic_Integral_K____float128.svg new file mode 100644 index 000000000..ad3afce53 --- /dev/null +++ b/doc/graphs/Elliptic_Integral_K____float128.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +0 +-1 + +0 +20 +0 +-20 +-40 + + + +x + + + + + + + +Errors in Elliptic Integral K, __float128 + + + diff --git a/doc/graphs/Elliptic_Integral_K__double.svg b/doc/graphs/Elliptic_Integral_K__double.svg new file mode 100644 index 000000000..4d2cf8087 --- /dev/null +++ b/doc/graphs/Elliptic_Integral_K__double.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +0 +-1 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 +-1.2 +-1.4 +-1.6 +-1.8 +-2 +-2.2 +-2.4 +-2.6 +-2.8 +-3 +-3.2 +-3.4 +-3.6 +-3.8 +-4 +-4.2 +-4.4 +-4.6 +-4.8 +-5 +-5.2 +-5.4 +-5.6 +-5.8 +-6 +-6.2 +-6.4 +-6.6 +-6.8 +-7 +-7.2 +-7.4 +-7.6 +-7.8 +-8 +-8.2 +-8.4 +-8.6 +-8.8 +-9 +-9.2 +-9.4 +-9.6 +-9.8 +-10 +-10.2 +-10.4 +-10.6 +-10.8 +-11 +-11.2 +-11.4 +-11.6 +-11.8 +-12 + + + +x + + + + + + + +Errors in Elliptic Integral K, double + + + diff --git a/doc/graphs/Exponential_Integral_Ei__80_bit_long_double.svg b/doc/graphs/Exponential_Integral_Ei__80_bit_long_double.svg new file mode 100644 index 000000000..26c7a23bc --- /dev/null +++ b/doc/graphs/Exponential_Integral_Ei__80_bit_long_double.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +2 +4 +6 +0 +-2 +-4 + + + +x + + + + + + + +Errors in Exponential Integral Ei, 80 bit long double + + + diff --git a/doc/graphs/Exponential_Integral_Ei____float128.svg b/doc/graphs/Exponential_Integral_Ei____float128.svg new file mode 100644 index 000000000..bdc74332d --- /dev/null +++ b/doc/graphs/Exponential_Integral_Ei____float128.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +2 +4 +6 +0 +-2 +-4 +-6 +-8 +-10 + + + +x + + + + + + + +Errors in Exponential Integral Ei, __float128 + + + diff --git a/doc/graphs/Exponential_Integral_Ei__double.svg b/doc/graphs/Exponential_Integral_Ei__double.svg new file mode 100644 index 000000000..16842736a --- /dev/null +++ b/doc/graphs/Exponential_Integral_Ei__double.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in Exponential Integral Ei, double + + + diff --git a/doc/graphs/Zeta__80_bit_long_double.svg b/doc/graphs/Zeta__80_bit_long_double.svg new file mode 100644 index 000000000..aac6c3829 --- /dev/null +++ b/doc/graphs/Zeta__80_bit_long_double.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +2 +4 +6 +8 +0 +-2 +-4 +-6 +-8 + + + +x + + + + + + + +Errors in Zeta, 80 bit long double + + + diff --git a/doc/graphs/Zeta____float128.svg b/doc/graphs/Zeta____float128.svg new file mode 100644 index 000000000..3a6527587 --- /dev/null +++ b/doc/graphs/Zeta____float128.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +2 +4 +6 +8 +10 +12 +14 +16 +0 +-2 +-4 +-6 +-8 +-10 +-12 +-14 +-16 + + + +x + + + + + + + +Errors in Zeta, __float128 + + + diff --git a/doc/graphs/Zeta__double.svg b/doc/graphs/Zeta__double.svg new file mode 100644 index 000000000..e1ad2f6ac --- /dev/null +++ b/doc/graphs/Zeta__double.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +0 +-10 +-20 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in Zeta, double + + + diff --git a/doc/graphs/digamma__80_bit_long_double.svg b/doc/graphs/digamma__80_bit_long_double.svg new file mode 100644 index 000000000..58de11342 --- /dev/null +++ b/doc/graphs/digamma__80_bit_long_double.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +1.2 +1.4 +1.6 +1.8 +2 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 +-1.2 +-1.4 +-1.6 +-1.8 +-2 +-2.2 +-2.4 +-2.6 +-2.8 + + + +x + + + + + + + +Errors in digamma, 80-bit long double + + + diff --git a/doc/graphs/digamma____float128.svg b/doc/graphs/digamma____float128.svg new file mode 100644 index 000000000..facb17e23 --- /dev/null +++ b/doc/graphs/digamma____float128.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +1.2 +1.4 +1.6 +1.8 +2 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 +-1.2 +-1.4 +-1.6 +-1.8 +-2 + + + +x + + + + + + + +Errors in digamma, __float128 + + + diff --git a/doc/graphs/digamma__double.svg b/doc/graphs/digamma__double.svg new file mode 100644 index 000000000..c981cba96 --- /dev/null +++ b/doc/graphs/digamma__double.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in digamma, double + + + diff --git a/doc/graphs/erf__80_bit___float128.svg b/doc/graphs/erf__80_bit___float128.svg new file mode 100644 index 000000000..c09ad9460 --- /dev/null +++ b/doc/graphs/erf__80_bit___float128.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +2 +3 +4 +5 +0 +-1 +-2 +-3 +-4 +-5 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 +-1.2 +-1.4 +-1.6 +-1.8 +-2 + + + +x + + + + + + + +Errors in erf, 80-bit __float128 + + + diff --git a/doc/graphs/erf__80_bit_long_double.svg b/doc/graphs/erf__80_bit_long_double.svg new file mode 100644 index 000000000..ba9bc84c7 --- /dev/null +++ b/doc/graphs/erf__80_bit_long_double.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +2 +3 +4 +5 +0 +-1 +-2 +-3 +-4 +-5 + +0 +0.2 +0.4 +0.6 +0.8 +1 +1.2 +1.4 +1.6 +1.8 +2 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in erf, 80-bit long double + + + diff --git a/doc/graphs/erf__double.svg b/doc/graphs/erf__double.svg new file mode 100644 index 000000000..32222903c --- /dev/null +++ b/doc/graphs/erf__double.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +2 +3 +4 +5 +0 +-1 +-2 +-3 +-4 +-5 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in erf, double + + + diff --git a/doc/graphs/erfc__80_bit_long_double.svg b/doc/graphs/erfc__80_bit_long_double.svg new file mode 100644 index 000000000..c0c1ab76e --- /dev/null +++ b/doc/graphs/erfc__80_bit_long_double.svg @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +60 +70 +80 +90 +100 +110 +120 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +1.2 +1.4 +1.6 +1.8 +2 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 +-1.2 +-1.4 +-1.6 +-1.8 +-2 +-2.2 +-2.4 +-2.6 +-2.8 + + + +x + + + + + + + +Errors in erfc, 80-bit long double + + + diff --git a/doc/graphs/erfc____float128.svg b/doc/graphs/erfc____float128.svg new file mode 100644 index 000000000..cf65c8b3c --- /dev/null +++ b/doc/graphs/erfc____float128.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +60 +70 +80 +90 +100 +110 +120 +0 + +0 +2 +0 +-2 + + + +x + + + + + + + +Errors in erfc, __float128 + + + diff --git a/doc/graphs/erfc__double.svg b/doc/graphs/erfc__double.svg new file mode 100644 index 000000000..c56913d7f --- /dev/null +++ b/doc/graphs/erfc__double.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in erfc, double + + + diff --git a/doc/graphs/i0__80_bit_long_double.svg b/doc/graphs/i0__80_bit_long_double.svg new file mode 100644 index 000000000..52b715910 --- /dev/null +++ b/doc/graphs/i0__80_bit_long_double.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +1.2 +1.4 +1.6 +1.8 +2 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 +-1.2 +-1.4 +-1.6 +-1.8 +-2 + + + +x + + + + + + + +Errors in i0, 80 bit long double + + + diff --git a/doc/graphs/i0____float128.svg b/doc/graphs/i0____float128.svg new file mode 100644 index 000000000..529db3295 --- /dev/null +++ b/doc/graphs/i0____float128.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +2 +4 +0 +-2 +-4 + + + +x + + + + + + + +Errors in i0, __float128 + + + diff --git a/doc/graphs/i0__double.svg b/doc/graphs/i0__double.svg new file mode 100644 index 000000000..ae49eb434 --- /dev/null +++ b/doc/graphs/i0__double.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in i0, double + + + diff --git a/doc/graphs/i1__80_bit_long_double.svg b/doc/graphs/i1__80_bit_long_double.svg new file mode 100644 index 000000000..e1d26aba7 --- /dev/null +++ b/doc/graphs/i1__80_bit_long_double.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +2 +0 +-2 +-4 + + + +x + + + + + + + +Errors in i1, 80 bit long double + + + diff --git a/doc/graphs/i1____float128.svg b/doc/graphs/i1____float128.svg new file mode 100644 index 000000000..774177fd6 --- /dev/null +++ b/doc/graphs/i1____float128.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +2 +4 +0 +-2 +-4 + + + +x + + + + + + + +Errors in i1, __float128 + + + diff --git a/doc/graphs/i1__double.svg b/doc/graphs/i1__double.svg new file mode 100644 index 000000000..5ca150601 --- /dev/null +++ b/doc/graphs/i1__double.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in i1, double + + + diff --git a/doc/graphs/j0__80_bit_long_double.svg b/doc/graphs/j0__80_bit_long_double.svg new file mode 100644 index 000000000..1ce1e2259 --- /dev/null +++ b/doc/graphs/j0__80_bit_long_double.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +20 +40 +0 +-20 +-40 + + + +x + + + + + + + +Errors in j0, 80 bit long double + + + diff --git a/doc/graphs/j0____float128.svg b/doc/graphs/j0____float128.svg new file mode 100644 index 000000000..6ea9bc165 --- /dev/null +++ b/doc/graphs/j0____float128.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +20 +40 +0 +-20 +-40 + + + +x + + + + + + + +Errors in j0, __float128 + + + diff --git a/doc/graphs/j0__double.svg b/doc/graphs/j0__double.svg new file mode 100644 index 000000000..1c63eb4f2 --- /dev/null +++ b/doc/graphs/j0__double.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +1.2 +1.4 +1.6 +1.8 +2 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in j0, double + + + diff --git a/doc/graphs/j1__80_bit_long_double.svg b/doc/graphs/j1__80_bit_long_double.svg new file mode 100644 index 000000000..681438e84 --- /dev/null +++ b/doc/graphs/j1__80_bit_long_double.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +20 +40 +0 +-20 +-40 + + + +x + + + + + + + +Errors in j1, 80 bit long double + + + diff --git a/doc/graphs/j1____float128.svg b/doc/graphs/j1____float128.svg new file mode 100644 index 000000000..7fe108afb --- /dev/null +++ b/doc/graphs/j1____float128.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +20 +40 +0 +-20 +-40 + + + +x + + + + + + + +Errors in j1, __float128 + + + diff --git a/doc/graphs/j1__double.svg b/doc/graphs/j1__double.svg new file mode 100644 index 000000000..d979960e1 --- /dev/null +++ b/doc/graphs/j1__double.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in j1, double + + + diff --git a/doc/graphs/k0__80_bit_long_double.svg b/doc/graphs/k0__80_bit_long_double.svg new file mode 100644 index 000000000..08e1c498d --- /dev/null +++ b/doc/graphs/k0__80_bit_long_double.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +1.2 +1.4 +1.6 +1.8 +2 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 +-1.2 +-1.4 +-1.6 +-1.8 +-2 + + + +x + + + + + + + +Errors in k0, 80 bit long double + + + diff --git a/doc/graphs/k0____float128.svg b/doc/graphs/k0____float128.svg new file mode 100644 index 000000000..2f5d47d81 --- /dev/null +++ b/doc/graphs/k0____float128.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +1.2 +1.4 +1.6 +1.8 +2 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 +-1.2 +-1.4 +-1.6 +-1.8 +-2 + + + +x + + + + + + + +Errors in k0, __float128 + + + diff --git a/doc/graphs/k0__double.svg b/doc/graphs/k0__double.svg new file mode 100644 index 000000000..8a91ce51e --- /dev/null +++ b/doc/graphs/k0__double.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in k0, double + + + diff --git a/doc/graphs/k1__80_bit_long_double.svg b/doc/graphs/k1__80_bit_long_double.svg new file mode 100644 index 000000000..81c5bd5e8 --- /dev/null +++ b/doc/graphs/k1__80_bit_long_double.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +1.2 +1.4 +1.6 +1.8 +2 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 +-1.2 +-1.4 +-1.6 +-1.8 +-2 + + + +x + + + + + + + +Errors in k1, 80 bit long double + + + diff --git a/doc/graphs/k1____float128.svg b/doc/graphs/k1____float128.svg new file mode 100644 index 000000000..b1ac84541 --- /dev/null +++ b/doc/graphs/k1____float128.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +1.2 +1.4 +1.6 +1.8 +2 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 +-1.2 +-1.4 +-1.6 +-1.8 +-2 + + + +x + + + + + + + +Errors in k1, __float128 + + + diff --git a/doc/graphs/k1__double.svg b/doc/graphs/k1__double.svg new file mode 100644 index 000000000..91009e7f2 --- /dev/null +++ b/doc/graphs/k1__double.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in k1, double + + + diff --git a/doc/graphs/lgamma__80_bit_long_double.svg b/doc/graphs/lgamma__80_bit_long_double.svg new file mode 100644 index 000000000..e7ca2722c --- /dev/null +++ b/doc/graphs/lgamma__80_bit_long_double.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +100 +200 +300 +400 +500 +600 +700 +800 +900 +1e3 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +1.2 +1.4 +1.6 +1.8 +2 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 +-1.2 +-1.4 +-1.6 +-1.8 +-2 + + + +x + + + + + + + +Errors in lgamma, 80-bit long double + + + diff --git a/doc/graphs/lgamma____float128.svg b/doc/graphs/lgamma____float128.svg new file mode 100644 index 000000000..a42e5f11d --- /dev/null +++ b/doc/graphs/lgamma____float128.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +100 +200 +300 +400 +500 +600 +700 +800 +900 +1e3 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +1.2 +1.4 +1.6 +1.8 +2 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 +-1.2 +-1.4 +-1.6 +-1.8 +-2 + + + +x + + + + + + + +Errors in lgamma, __float128 + + + diff --git a/doc/graphs/lgamma__double.svg b/doc/graphs/lgamma__double.svg new file mode 100644 index 000000000..7ed66753d --- /dev/null +++ b/doc/graphs/lgamma__double.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +100 +200 +300 +400 +500 +600 +700 +800 +900 +1e3 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in lgamma, double + + + diff --git a/doc/graphs/plot_1d_errors.cpp b/doc/graphs/plot_1d_errors.cpp new file mode 100644 index 000000000..5e34c5bd3 --- /dev/null +++ b/doc/graphs/plot_1d_errors.cpp @@ -0,0 +1,404 @@ + +#include +#include +#include +#ifdef BOOST_HAS_FLOAT128 +#include +#endif +#include + +template +Real interval_from_range(Real x) +{ + BOOST_MATH_STD_USING + Real l = floor(log10(x)); + l = pow(10, l); + if (x / l < 2) + l /= 10; + return l; +} + +std::string normalise_filename(std::string name) +{ + for(std::string::size_type i = 0; i < name.size(); ++i) + { + if(!std::isalnum(name[i])) + name[i] = '_'; + } + return name; +} + +template +void plot_errors_1d(F f, Real start, Real end, unsigned points, const char* function_name, Real max_y_scale = (std::numeric_limits::max)(), unsigned num_bins = 200) +{ + BOOST_MATH_STD_USING + std::cout << "Generating points for " << function_name << std::endl; + Real pos = start; + Real interval = (end - start) / points; + + std::map points_upper, points_lower; + + Real max_distance(0), min_distance(0), max_error(0), max_error_location(0); + + constexpr unsigned limb_bits = (sizeof(boost::multiprecision::limb_type) * CHAR_BIT); + constexpr unsigned mp_digits = (((std::numeric_limits::digits * 2) / limb_bits + ((std::numeric_limits::digits * 2) % limb_bits ? 1 : 0))) * limb_bits; + + typedef boost::multiprecision::number > mp_type; + + while (pos <= end) + { + try + { + Real found_value = f(pos); + Real exact_value = static_cast(f(mp_type(pos))); + Real distance = boost::math::sign(found_value - exact_value) * boost::math::epsilon_difference(found_value, exact_value); + Real bin = start + ((end - start) / num_bins) * boost::math::itrunc(num_bins * (pos - start) / (end - start)); + if (points_lower.find(bin) == points_lower.end()) + points_lower[bin] = 0; + if (points_upper.find(bin) == points_upper.end()) + points_upper[bin] = 0; + if (distance > 0) + { + if (points_upper[bin] < distance) + points_upper[bin] = (std::min)(distance, max_y_scale); + } + else + { + if (points_lower[bin] > distance) + points_lower[bin] = (std::max)(distance, -max_y_scale); + } + if (max_distance < distance) + max_distance = (std::min)(distance, max_y_scale); + if (min_distance > distance) + min_distance = (std::max)(distance, -max_y_scale); + if (fabs(distance) > max_error) + { + max_error = fabs(distance); + max_error_location = pos; + } + pos += interval; + } + catch (const std::exception& e) + { + std::cout << "Found exception at point " << pos << " : " << e.what() << std::endl; + pos += interval; + } + } + + std::cout << "Max error was " << std::setprecision(3) << max_error << " at location " << std::setprecision(std::numeric_limits::max_digits10) << max_error_location << std::endl; + + boost::svg::svg_2d_plot plot; + Real x_start(start), x_end(end); + if (end - start > 3) + { + x_start = floor(start); + x_end = ceil(end); + } + if (min_distance == 0) + min_distance = -1; + if (max_distance == 0) + max_distance = 1; + + + plot.title(std::string("Errors in ") + function_name).x_range((double)x_start, (double)x_end).image_x_size(700).legend_border_color(boost::svg::lightgray).plot_border_color(boost::svg::lightgray).background_border_color(boost::svg::lightgray) + .y_range((int)floor(min_distance), (int)ceil(max_distance)).x_label("x").y_major_interval((double)interval_from_range(max_distance) * 2).x_major_interval((double)interval_from_range(end - start)).legend_on(true).plot_window_on(true).legend_on(false); + plot.plot(points_upper).stroke_color(boost::svg::green).fill_color(boost::svg::green).size(1).line_on(true).area_fill(boost::svg::green); + plot.plot(points_lower).stroke_color(boost::svg::green).fill_color(boost::svg::green).size(1).line_on(true).area_fill(boost::svg::green); + + plot.write(normalise_filename(function_name) + ".svg"); + +} + +#include + +struct digamma_func +{ + template + T operator()(T x) + { + return boost::math::digamma(x); + } +}; + +struct tgamma_func +{ + template + T operator()(T x) + { + return boost::math::tgamma(x); + } +}; + +struct lgamma_func +{ + template + T operator()(T x) + { + return boost::math::lgamma(x); + } +}; + +struct trigamma_func +{ + template + T operator()(T x) + { + return boost::math::tgamma(x); + } +}; + +struct erf_func +{ + template + T operator()(T x) + { + return boost::math::erf(x); + } +}; + +struct erfc_func +{ + template + T operator()(T x) + { + return boost::math::erfc(x); + } +}; + +struct j0_func +{ + template + T operator()(T x) + { + return boost::math::cyl_bessel_j(0, x); + } +}; + +struct j1_func +{ + template + T operator()(T x) + { + return boost::math::cyl_bessel_j(1, x); + } +}; + +struct y0_func +{ + template + T operator()(T x) + { + return boost::math::cyl_neumann(0, x); + } +}; + +struct y1_func +{ + template + T operator()(T x) + { + return boost::math::cyl_neumann(1, x); + } +}; + +struct i0_func +{ + template + T operator()(T x) + { + return boost::math::cyl_bessel_i(0, x); + } +}; + +struct i1_func +{ + template + T operator()(T x) + { + return boost::math::cyl_bessel_i(1, x); + } +}; + +struct k0_func +{ + template + T operator()(T x) + { + return boost::math::cyl_bessel_k(0, x); + } +}; + +struct k1_func +{ + template + T operator()(T x) + { + return boost::math::cyl_bessel_k(1, x); + } +}; + +struct ai_func +{ + template + T operator()(T x) + { + return boost::math::airy_ai(x); + } +}; + +struct aip_func +{ + template + T operator()(T x) + { + return boost::math::airy_ai_prime(x); + } +}; + +struct bi_func +{ + template + T operator()(T x) + { + return boost::math::airy_bi(x); + } +}; + +struct bip_func +{ + template + T operator()(T x) + { + return boost::math::airy_bi_prime(x); + } +}; + +struct ellint_1_func +{ + template + T operator()(T x) + { + return boost::math::ellint_1(x); + } +}; + +struct ellint_2_func +{ + template + T operator()(T x) + { + return boost::math::ellint_2(x); + } +}; + +struct ellint_d_func +{ + template + T operator()(T x) + { + return boost::math::ellint_d(x); + } +}; + +struct zeta_func +{ + template + T operator()(T x) + { + return boost::math::zeta(x); + } +}; + +struct ei_func +{ + template + T operator()(T x) + { + return boost::math::expint(x); + } +}; + +int main() +{ + plot_errors_1d(digamma_func(), 1e-200, 10.0, 10000, "digamma, double"); + plot_errors_1d(tgamma_func(), 1e-200, 150.0, 10000, "tgamma, double"); + plot_errors_1d(lgamma_func(), 1e-200, 1000.0, 10000, "lgamma, double"); + plot_errors_1d(trigamma_func(), 1e-200, 10.0, 10000, "trigamma, double"); + plot_errors_1d(erf_func(), -5.0, 5.0, 10000, "erf, double"); + plot_errors_1d(erfc_func(), -5.0, 30.0, 10000, "erfc, double"); + plot_errors_1d(j0_func(), 0.0, 50.0, 10000, "j0, double", 50.0); + plot_errors_1d(j1_func(), 0.0, 50.0, 10000, "j1, double", 50.0); + plot_errors_1d(y0_func(), 1e-100, 50.0, 10000, "y0, double", 50.0); + plot_errors_1d(y1_func(), 1e-100, 50.0, 10000, "y1, double", 50.0); + plot_errors_1d(i0_func(), 0.0, 50.0, 10000, "i0, double"); + plot_errors_1d(i1_func(), 0.0, 50.0, 10000, "i1, double"); + plot_errors_1d(k0_func(), 1e-100, 50.0, 10000, "k0, double"); + plot_errors_1d(k1_func(), 1e-100, 50.0, 10000, "k1, double"); + plot_errors_1d(ai_func(), -20.0, 20.0, 10000, "Ai, double", 100.0); + plot_errors_1d(bi_func(), -20.0, 20.0, 10000, "Bi, double", 100.0); + plot_errors_1d(aip_func(), -20.0, 20.0, 10000, "Ai Prime, double", 100.0); + plot_errors_1d(bip_func(), -20.0, 20.0, 10000, "Bi Prime, double", 100.0); + + plot_errors_1d(ellint_1_func(), -1.0, 1.0, 10000, "Elliptic Integral K, double"); + plot_errors_1d(ellint_2_func(), -1.0, 1.0, 10000, "Elliptic Integral E, double"); + plot_errors_1d(ellint_d_func(), -1.0, 1.0, 10000, "Elliptic Integral D, double"); + + plot_errors_1d(zeta_func(), -20.0, 20.0, 10000, "Zeta, double"); + plot_errors_1d(ei_func(), -20.0, 20.0, 10000, "Exponential Integral Ei, double"); + +#if LDBL_MANT_DIG == 64 + plot_errors_1d(digamma_func(), 1e-200L, 10.0L, 10000, "digamma, 80-bit long double"); + plot_errors_1d(tgamma_func(), 1e-200L, 150.0L, 10000, "tgamma, 80-bit long double"); + plot_errors_1d(lgamma_func(), 1e-200L, 1000.0L, 10000, "lgamma, 80-bit long double"); + plot_errors_1d(trigamma_func(), 1e-200L, 10.0L, 10000, "trigamma, 80-bit long double"); + plot_errors_1d(erf_func(), -5.0L, 5.0L, 10000, "erf, 80-bit long double"); + plot_errors_1d(erfc_func(), -5.0L, 120.0L, 10000, "erfc, 80-bit long double"); + plot_errors_1d(j0_func(), 0.0L, 50.0L, 10000, "j0, 80 bit long double", 50.0L); + plot_errors_1d(j1_func(), 0.0L, 50.0L, 10000, "j1, 80 bit long double", 50.0L); + plot_errors_1d(y0_func(), 1e-100L, 50.0L, 10000, "y0, 80 bit long double", 50.0L); + plot_errors_1d(y1_func(), 1e-100L, 50.0L, 10000, "y1, 80 bit long double", 50.0L); + plot_errors_1d(i0_func(), 0.0L, 50.0L, 10000, "i0, 80 bit long double"); + plot_errors_1d(i1_func(), 0.0L, 50.0L, 10000, "i1, 80 bit long double"); + plot_errors_1d(k0_func(), 1e-100L, 50.0L, 10000, "k0, 80 bit long double"); + plot_errors_1d(k1_func(), 1e-100L, 50.0L, 10000, "k1, 80 bit long double"); + plot_errors_1d(ai_func(), -20.0L, 20.0L, 10000, "Ai, 80 bit long double", 100.0L); + plot_errors_1d(bi_func(), -20.0L, 20.0L, 10000, "Bi, 80 bit long double", 100.0L); + plot_errors_1d(aip_func(), -20.0L, 20.0L, 10000, "Ai Prime, 80 bit long double", 100.0L); + plot_errors_1d(bip_func(), -20.0L, 20.0L, 10000, "Bi Prime, 80 bit long double", 100.0L); + + plot_errors_1d(ellint_1_func(), -1.0L, 1.0L, 10000, "Elliptic Integral K, 80 bit long double"); + plot_errors_1d(ellint_2_func(), -1.0L, 1.0L, 10000, "Elliptic Integral E, 80 bit long double"); + plot_errors_1d(ellint_d_func(), -1.0L, 1.0L, 10000, "Elliptic Integral D, 80 bit long double"); + + plot_errors_1d(zeta_func(), -20.0L, 20.0L, 10000, "Zeta, 80 bit long double"); + plot_errors_1d(ei_func(), -20.0L, 20.0L, 10000, "Exponential Integral Ei, 80 bit long double"); +#endif +#ifdef BOOST_HAS_FLOAT128 + plot_errors_1d(digamma_func(), boost::multiprecision::float128(1e-200), boost::multiprecision::float128(10.0), 10000, "digamma, __float128"); + plot_errors_1d(tgamma_func(), boost::multiprecision::float128(1e-200), boost::multiprecision::float128(150.0), 10000, "tgamma, __float128"); + plot_errors_1d(lgamma_func(), boost::multiprecision::float128(1e-200), boost::multiprecision::float128(1000.0), 10000, "lgamma, __float128"); + plot_errors_1d(trigamma_func(), boost::multiprecision::float128(1e-200), boost::multiprecision::float128(10.0), 10000, "trigamma, __float128"); + plot_errors_1d(erf_func(), -boost::multiprecision::float128(5.0), boost::multiprecision::float128(5.0), 10000, "erf, 80-bit __float128"); + plot_errors_1d(erfc_func(), -boost::multiprecision::float128(5.0), boost::multiprecision::float128(120.0), 10000, "erfc, __float128"); + plot_errors_1d(j0_func(), boost::multiprecision::float128(0.0), boost::multiprecision::float128(50.0), 10000, "j0, __float128", boost::multiprecision::float128(50.0)); + plot_errors_1d(j1_func(), boost::multiprecision::float128(0.0), boost::multiprecision::float128(50.0), 10000, "j1, __float128", boost::multiprecision::float128(50.0)); + plot_errors_1d(y0_func(), boost::multiprecision::float128(1e-100), boost::multiprecision::float128(50.0), 10000, "y0, __float128", boost::multiprecision::float128(50.0)); + plot_errors_1d(y1_func(), boost::multiprecision::float128(1e-100), boost::multiprecision::float128(50.0), 10000, "y1, __float128", boost::multiprecision::float128(50.0)); + plot_errors_1d(i0_func(), boost::multiprecision::float128(0.0), boost::multiprecision::float128(50.0), 10000, "i0, __float128"); + plot_errors_1d(i1_func(), boost::multiprecision::float128(0.0), boost::multiprecision::float128(50.0), 10000, "i1, __float128"); + plot_errors_1d(k0_func(), boost::multiprecision::float128(1e-100), boost::multiprecision::float128(50.0), 10000, "k0, __float128"); + plot_errors_1d(k1_func(), boost::multiprecision::float128(1e-100), boost::multiprecision::float128(50.0), 10000, "k1, __float128"); + plot_errors_1d(ai_func(), -boost::multiprecision::float128(20.0), boost::multiprecision::float128(20.0), 10000, "Ai, __float128", boost::multiprecision::float128(100.0)); + plot_errors_1d(bi_func(), -boost::multiprecision::float128(20.0), boost::multiprecision::float128(20.0), 10000, "Bi, __float128", boost::multiprecision::float128(100.0)); + plot_errors_1d(aip_func(), -boost::multiprecision::float128(20.0), boost::multiprecision::float128(20.0), 10000, "Ai Prime, __float128", boost::multiprecision::float128(100.0)); + plot_errors_1d(bip_func(), -boost::multiprecision::float128(20.0), boost::multiprecision::float128(20.0), 10000, "Bi Prime, __float128", boost::multiprecision::float128(100.0)); + + plot_errors_1d(ellint_1_func(), -boost::multiprecision::float128(1.0), boost::multiprecision::float128(1.0), 10000, "Elliptic Integral K, __float128"); + plot_errors_1d(ellint_2_func(), -boost::multiprecision::float128(1.0), boost::multiprecision::float128(1.0), 10000, "Elliptic Integral E, __float128"); + plot_errors_1d(ellint_d_func(), -boost::multiprecision::float128(1.0), boost::multiprecision::float128(1.0), 10000, "Elliptic Integral D, __float128"); + + plot_errors_1d(zeta_func(), -boost::multiprecision::float128(20.0), boost::multiprecision::float128(20.0), 10000, "Zeta, __float128"); + plot_errors_1d(ei_func(), -boost::multiprecision::float128(20.0), boost::multiprecision::float128(20.0), 10000, "Exponential Integral Ei, __float128"); +#endif + return 0; +} diff --git a/doc/graphs/tgamma__80_bit_long_double.svg b/doc/graphs/tgamma__80_bit_long_double.svg new file mode 100644 index 000000000..654ed958f --- /dev/null +++ b/doc/graphs/tgamma__80_bit_long_double.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +60 +70 +80 +90 +100 +110 +120 +130 +140 +150 +0 + +0 +2 +4 +6 +8 +10 +0 +-2 +-4 +-6 +-8 +-10 + + + +x + + + + + + + +Errors in tgamma, 80-bit long double + + + diff --git a/doc/graphs/tgamma____float128.svg b/doc/graphs/tgamma____float128.svg new file mode 100644 index 000000000..bdd442e47 --- /dev/null +++ b/doc/graphs/tgamma____float128.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +60 +70 +80 +90 +100 +110 +120 +130 +140 +150 +0 + +0 +2 +4 +6 +8 +10 +12 +0 +-2 +-4 +-6 +-8 +-10 +-12 +-14 + + + +x + + + + + + + +Errors in tgamma, __float128 + + + diff --git a/doc/graphs/tgamma__double.svg b/doc/graphs/tgamma__double.svg new file mode 100644 index 000000000..d80deb600 --- /dev/null +++ b/doc/graphs/tgamma__double.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +60 +70 +80 +90 +100 +110 +120 +130 +140 +150 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in tgamma, double + + + diff --git a/doc/graphs/trigamma__80_bit_long_double.svg b/doc/graphs/trigamma__80_bit_long_double.svg new file mode 100644 index 000000000..8f407d473 --- /dev/null +++ b/doc/graphs/trigamma__80_bit_long_double.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +0 + +0 +2 +4 +6 +8 +10 +0 +-2 +-4 +-6 +-8 +-10 + + + +x + + + + + + + +Errors in trigamma, 80-bit long double + + + diff --git a/doc/graphs/trigamma____float128.svg b/doc/graphs/trigamma____float128.svg new file mode 100644 index 000000000..d582d1e6b --- /dev/null +++ b/doc/graphs/trigamma____float128.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +0 + +0 +2 +4 +6 +8 +10 +12 +0 +-2 +-4 +-6 +-8 +-10 +-12 + + + +x + + + + + + + +Errors in trigamma, __float128 + + + diff --git a/doc/graphs/trigamma__double.svg b/doc/graphs/trigamma__double.svg new file mode 100644 index 000000000..25a7fcfe0 --- /dev/null +++ b/doc/graphs/trigamma__double.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in trigamma, double + + + diff --git a/doc/graphs/y0__80_bit_long_double.svg b/doc/graphs/y0__80_bit_long_double.svg new file mode 100644 index 000000000..642eea491 --- /dev/null +++ b/doc/graphs/y0__80_bit_long_double.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +20 +40 +0 +-20 +-40 + + + +x + + + + + + + +Errors in y0, 80 bit long double + + + diff --git a/doc/graphs/y0____float128.svg b/doc/graphs/y0____float128.svg new file mode 100644 index 000000000..b8588b72a --- /dev/null +++ b/doc/graphs/y0____float128.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +20 +40 +0 +-20 +-40 + + + +x + + + + + + + +Errors in y0, __float128 + + + diff --git a/doc/graphs/y0__double.svg b/doc/graphs/y0__double.svg new file mode 100644 index 000000000..7444c0d6f --- /dev/null +++ b/doc/graphs/y0__double.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +2 +0 +-2 + + + +x + + + + + + + +Errors in y0, double + + + diff --git a/doc/graphs/y1__80_bit_long_double.svg b/doc/graphs/y1__80_bit_long_double.svg new file mode 100644 index 000000000..1623cee0d --- /dev/null +++ b/doc/graphs/y1__80_bit_long_double.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +20 +40 +0 +-20 +-40 + + + +x + + + + + + + +Errors in y1, 80 bit long double + + + diff --git a/doc/graphs/y1____float128.svg b/doc/graphs/y1____float128.svg new file mode 100644 index 000000000..0ac63a4e5 --- /dev/null +++ b/doc/graphs/y1____float128.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +20 +40 +0 +-20 +-40 + + + +x + + + + + + + +Errors in y1, __float128 + + + diff --git a/doc/graphs/y1__double.svg b/doc/graphs/y1__double.svg new file mode 100644 index 000000000..fc46f7f96 --- /dev/null +++ b/doc/graphs/y1__double.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 +50 +0 + +0 +0.2 +0.4 +0.6 +0.8 +1 +0 +-0.2 +-0.4 +-0.6 +-0.8 +-1 + + + +x + + + + + + + +Errors in y1, double + + + diff --git a/tools/plot_1d_errors.cpp b/tools/plot_1d_errors.cpp deleted file mode 100644 index 9697cde9d..000000000 --- a/tools/plot_1d_errors.cpp +++ /dev/null @@ -1,346 +0,0 @@ - -#include -#include -#include -#ifdef BOOST_HAS_FLOAT128 -#include -#endif -#include - -template -Real interval_from_range(Real x) -{ - BOOST_MATH_STD_USING - Real l = floor(log10(x)); - l = pow(10, l); - if (x / l < 2) - l /= 10; - return l; -} - -template -void plot_errors_1d(F f, Real start, Real end, unsigned points, const char* function_name, Real max_y_scale = (std::numeric_limits::max)(), unsigned num_bins = 500) -{ - BOOST_MATH_STD_USING - std::cout << "Generating points for " << function_name << std::endl; - Real pos = start; - Real interval = (end - start) / points; - - std::map points_upper, points_lower; - - Real max_distance(0), min_distance(0), max_error(0), max_error_location(0); - - constexpr unsigned limb_bits = (sizeof(boost::multiprecision::limb_type) * CHAR_BIT); - constexpr unsigned mp_digits = (((std::numeric_limits::digits * 2) / limb_bits + ((std::numeric_limits::digits * 2) % limb_bits ? 1 : 0))) * limb_bits; - - typedef boost::multiprecision::number > mp_type; - - while (pos <= end) - { - try - { - Real found_value = f(pos); - Real exact_value = static_cast(f(mp_type(pos))); - Real distance = boost::math::sign(found_value - exact_value) * boost::math::epsilon_difference(found_value, exact_value); - Real bin = start + ((end - start) / num_bins) * boost::math::itrunc(num_bins * (pos - start) / (end - start)); - if (points_lower.find(bin) == points_lower.end()) - points_lower[bin] = 0; - if (points_upper.find(bin) == points_upper.end()) - points_upper[bin] = 0; - if (distance > 0) - { - if (points_upper[bin] < distance) - points_upper[bin] = (std::min)(distance, max_y_scale); - } - else - { - if (points_lower[bin] > distance) - points_lower[bin] = (std::max)(distance, -max_y_scale); - } - if (max_distance < distance) - max_distance = (std::min)(distance, max_y_scale); - if (min_distance > distance) - min_distance = (std::max)(distance, -max_y_scale); - if (fabs(distance) > max_error) - { - max_error = fabs(distance); - max_error_location = pos; - } - pos += interval; - } - catch (const std::exception& e) - { - std::cout << "Found exception at point " << pos << " : " << e.what() << std::endl; - pos += interval; - } - } - - std::cout << "Max error was " << std::setprecision(3) << max_error << " at location " << std::setprecision(std::numeric_limits::max_digits10) << max_error_location << std::endl; - - boost::svg::svg_2d_plot plot; - Real x_start(start), x_end(end); - if (end - start > 3) - { - x_start = floor(start); - x_end = ceil(end); - } - if (min_distance == 0) - min_distance = -1; - if (max_distance == 0) - max_distance = 1; - - - plot.title(function_name).x_range((double)x_start, (double)x_end).image_x_size(700).legend_border_color(boost::svg::lightgray).plot_border_color(boost::svg::lightgray).background_border_color(boost::svg::lightgray) - .y_range((int)floor(min_distance), (int)ceil(max_distance)).x_label("x").y_major_interval((double)interval_from_range(max_distance) * 2).x_major_interval((double)interval_from_range(end - start)).legend_on(true).plot_window_on(true).legend_on(false); - plot.plot(points_upper).stroke_color(boost::svg::green).fill_color(boost::svg::green).size(1).line_on(true).area_fill(boost::svg::green); - plot.plot(points_lower).stroke_color(boost::svg::green).fill_color(boost::svg::green).size(1).line_on(true).area_fill(boost::svg::green); - - plot.write(std::string(function_name) + ".svg"); - -} - -#include - -struct digamma_func -{ - template - T operator()(T x) - { - return boost::math::digamma(x); - } -}; - -struct tgamma_func -{ - template - T operator()(T x) - { - return boost::math::tgamma(x); - } -}; - -struct lgamma_func -{ - template - T operator()(T x) - { - return boost::math::lgamma(x); - } -}; - -struct trigamma_func -{ - template - T operator()(T x) - { - return boost::math::tgamma(x); - } -}; - -struct erf_func -{ - template - T operator()(T x) - { - return boost::math::erf(x); - } -}; - -struct erfc_func -{ - template - T operator()(T x) - { - return boost::math::erfc(x); - } -}; - -struct j0_func -{ - template - T operator()(T x) - { - return boost::math::cyl_bessel_j(0, x); - } -}; - -struct j1_func -{ - template - T operator()(T x) - { - return boost::math::cyl_bessel_j(1, x); - } -}; - -struct y0_func -{ - template - T operator()(T x) - { - return boost::math::cyl_neumann(0, x); - } -}; - -struct y1_func -{ - template - T operator()(T x) - { - return boost::math::cyl_neumann(1, x); - } -}; - -struct i0_func -{ - template - T operator()(T x) - { - return boost::math::cyl_bessel_i(0, x); - } -}; - -struct i1_func -{ - template - T operator()(T x) - { - return boost::math::cyl_bessel_i(1, x); - } -}; - -struct k0_func -{ - template - T operator()(T x) - { - return boost::math::cyl_bessel_k(0, x); - } -}; - -struct k1_func -{ - template - T operator()(T x) - { - return boost::math::cyl_bessel_k(1, x); - } -}; - -struct ai_func -{ - template - T operator()(T x) - { - return boost::math::airy_ai(x); - } -}; - -struct aip_func -{ - template - T operator()(T x) - { - return boost::math::airy_ai_prime(x); - } -}; - -struct bi_func -{ - template - T operator()(T x) - { - return boost::math::airy_bi(x); - } -}; - -struct bip_func -{ - template - T operator()(T x) - { - return boost::math::airy_bi_prime(x); - } -}; - -struct ellint_1_func -{ - template - T operator()(T x) - { - return boost::math::ellint_1(x); - } -}; - -struct ellint_2_func -{ - template - T operator()(T x) - { - return boost::math::ellint_2(x); - } -}; - -struct ellint_d_func -{ - template - T operator()(T x) - { - return boost::math::ellint_d(x); - } -}; - -struct zeta_func -{ - template - T operator()(T x) - { - return boost::math::zeta(x); - } -}; - -struct ei_func -{ - template - T operator()(T x) - { - return boost::math::expint(x); - } -}; - -int main() -{ - plot_errors_1d(digamma_func(), 1e-200, 10.0, 10000, "digamma"); - plot_errors_1d(tgamma_func(), 1e-200, 150.0, 10000, "tgamma"); - plot_errors_1d(lgamma_func(), 1e-200, 1000.0, 10000, "lgamma"); - plot_errors_1d(trigamma_func(), 1e-200, 10.0, 10000, "trigamma"); - plot_errors_1d(erf_func(), -5.0, 5.0, 10000, "erf"); - plot_errors_1d(erfc_func(), -5.0, 30.0, 10000, "erfc, double"); - plot_errors_1d(erfc_func(), -5.0f, 30.0f, 10000, "erfc, float"); -#if LDBL_MANT_DIG == 64 - plot_errors_1d(erfc_func(), -5.0L, 120.0L, 10000, "erfc, 80-bit long double"); -#endif -#ifdef BOOST_HAS_FLOAT128 - plot_errors_1d(erfc_func(), boost::multiprecision::float128(-5.0), boost::multiprecision::float128(120), 10000, "erfc, __float128"); -#endif - plot_errors_1d(j0_func(), 0.0, 50.0, 10000, "j0", 50.0); - plot_errors_1d(j1_func(), 0.0, 50.0, 10000, "j1", 50.0); - plot_errors_1d(y0_func(), 1e-100, 50.0, 10000, "y0", 50.0); - plot_errors_1d(y1_func(), 1e-100, 50.0, 10000, "y1", 50.0); - plot_errors_1d(i0_func(), 0.0, 50.0, 10000, "i0"); - plot_errors_1d(i1_func(), 0.0, 50.0, 10000, "i1"); - plot_errors_1d(k0_func(), 1e-100, 50.0, 10000, "k0"); - plot_errors_1d(k1_func(), 1e-100, 50.0, 10000, "k1"); - plot_errors_1d(ai_func(), -20.0, 20.0, 10000, "Ai", 100.0); - plot_errors_1d(bi_func(), -20.0, 20.0, 10000, "Bi", 100.0); - plot_errors_1d(aip_func(), -20.0, 20.0, 10000, "Ai Prime", 100.0); - plot_errors_1d(bip_func(), -20.0, 20.0, 10000, "Bi Prime", 100.0); - - plot_errors_1d(ellint_1_func(), -1.0, 1.0, 10000, "Elliptic Integral K"); - plot_errors_1d(ellint_2_func(), -1.0, 1.0, 10000, "Elliptic Integral E"); - plot_errors_1d(ellint_d_func(), -1.0, 1.0, 10000, "Elliptic Integral D"); - - plot_errors_1d(zeta_func(), -20.0, 20.0, 10000, "Zeta"); - plot_errors_1d(ei_func(), -20.0, 20.0, 10000, "Exponential Integral Ei"); - return 0; -}