20 January 2020 09:15:51 AM hermite_integrands_TEST C version Test the hermite_integrands library. TEST01 P00_PROBLEM_NUM returns the number of problems. P00_TITLE returns the title of a problem. P00_PROBLEM_NUM: number of problems is 8 Problem Title 1 "exp(-x*x) * cos(2*omega*x)". 2 "exp(-x*x)". 3 "exp(-px) / ( 1 + exp(-qx) )". 4 "sin(x^2)". 5 "1/( (1+x^2) sqrt(4+3x^2) )". 6 "x^m exp(-x*x)". 7 "x^2 cos ( x ) exp(-x*x)". 8 "sqrt(1+x*x/2) * exp(-x*x/2)". TEST02 P00_EXACT returns the "exact" integral. Problem EXACT 1 0.6520493321732922 2 1.772453850905516 3 1.209199576156145 4 1.2533141373155 5 1.047197551196598 6 1.329340388179137 7 0.3450971117607857 8 3.008823566113644 TEST03 P00_GAUSS_HERMITE applies a Gauss-Hermite rule to estimate an integral on (-oo,+oo). Problem Order Estimate Exact Error 1 1 1.77245 0.652049 1.1204 1 2 0.276403 0.652049 0.375646 1 4 0.641433 0.652049 0.010616 1 8 0.652049 0.652049 5.42791e-07 1 16 0.652049 0.652049 7.95919e-13 1 32 0.652049 0.652049 2.05269e-12 1 64 0.652049 0.652049 1.21381e-12 2 1 1.77245 1.77245 5.51581e-12 2 2 1.77245 1.77245 5.51625e-12 2 4 1.77245 1.77245 5.51603e-12 2 8 1.77245 1.77245 5.51603e-12 2 16 1.77245 1.77245 6.93956e-12 2 32 1.77245 1.77245 5.54645e-12 2 64 1.77245 1.77245 6.83786e-12 3 1 0.886227 1.2092 0.322973 3 2 0.960529 1.2092 0.24867 3 4 1.10876 1.2092 0.10044 3 8 1.1801 1.2092 0.029104 3 16 1.20387 1.2092 0.00532531 3 32 1.2087 1.2092 0.000497008 3 64 1.20918 1.2092 1.75953e-05 4 1 0 1.25331 1.25331 4 2 1.40102 1.25331 0.147703 4 4 1.58047 1.25331 0.327152 4 8 2.12994 1.25331 0.87663 4 16 1.55094 1.25331 0.29763 4 32 2.29436 1.25331 1.04105 4 64 -0.498965 1.25331 1.75228 5 1 0.886227 1.0472 0.160971 5 2 0.83071 1.0472 0.216487 5 4 0.94759 1.0472 0.0996079 5 8 1.00288 1.0472 0.0443171 5 16 1.02654 1.0472 0.0206547 5 32 1.03729 1.0472 0.00990572 5 64 1.04239 1.0472 0.00480589 6 1 0 1.32934 1.32934 6 2 0.443113 1.32934 0.886227 6 4 1.32934 1.32934 4.13736e-12 6 8 1.32934 1.32934 4.13825e-12 6 16 1.32934 1.32934 1.18152e-11 6 32 1.32934 1.32934 4.31766e-12 6 64 1.32934 1.32934 6.71663e-12 7 1 0 0.345097 0.345097 7 2 0.673749 0.345097 0.328652 7 4 0.348155 0.345097 0.00305786 7 8 0.345097 0.345097 2.74859e-09 7 16 0.345097 0.345097 1.21686e-12 7 32 0.345097 0.345097 1.05588e-12 7 64 0.345097 0.345097 1.71196e-12 8 1 1.77245 3.00882 1.23637 8 2 2.54451 3.00882 0.464317 8 4 2.94657 3.00882 0.0622519 8 8 3.00785 3.00882 0.000972964 8 16 3.00882 3.00882 1.70381e-07 8 32 3.00882 3.00882 1.26961e-11 8 64 3.00882 3.00882 1.27955e-11 TEST04 P00_TURING applies a Turing procedure to estimate an integral on (-oo,+oo). Using a tolerance of TOL = 0.0001 Problem Order Estimate Exact Error 1 1 4 0.670109 0.652049 0.0180601 1 0.5 7 0.652049 0.652049 1.78494e-08 1 0.25 13 0.652047 0.652049 1.92583e-06 1 0.125 26 0.652046 0.652049 3.76749e-06 1 0.0625 51 0.652041 0.652049 8.16511e-06 1 0.03125 101 0.652038 0.652049 1.16531e-05 1 0.015625 151 0.651546 0.652049 0.000503673 2 1 4 1.77264 1.77245 0.000183354 2 0.5 7 1.77245 1.77245 1.14154e-07 2 0.25 13 1.77245 1.77245 2.84744e-06 2 0.125 26 1.77245 1.77245 4.82675e-06 2 0.0625 51 1.77244 1.77245 9.35244e-06 2 0.03125 101 1.77244 1.77245 1.28587e-05 2 0.015625 202 1.77244 1.77245 1.35593e-05 3 1 10 1.21422 1.2092 0.00501647 3 0.5 19 1.20915 1.2092 5.07025e-05 3 0.25 37 1.20911 1.2092 8.46013e-05 3 0.125 74 1.20911 1.2092 9.02339e-05 3 0.0625 148 1.20911 1.2092 9.31438e-05 3 0.03125 295 1.2091 1.2092 9.7626e-05 3 0.015625 590 1.2091 1.2092 9.83947e-05 4 1 33599 34.7886 1.25331 33.5353 4 0.5 36115 192.753 1.25331 191.5 4 0.25 72230 71.5169 1.25331 70.2635 4 0.125 50969 32.4151 1.25331 31.1618 P00_TURING - Warning! Number of steps exceeded N_TOO_MANY = 100000 4 0.0625 100000 7.77694 1.25331 6.52362 P00_TURING - Warning! Number of steps exceeded N_TOO_MANY = 100000 4 0.03125 100000 2.38535 1.25331 1.13204 4 0.015625 14535 3.99397 1.25331 2.74066 5 1 23 1.05625 1.0472 0.009048 5 0.5 46 1.04615 1.0472 0.00104531 5 0.25 91 1.0461 1.0472 0.00110157 5 0.125 181 1.04608 1.0472 0.00111985 5 0.0625 362 1.04607 1.0472 0.00112294 5 0.03125 723 1.04607 1.0472 0.0011276 5 0.015625 1445 1.04607 1.0472 0.00112994 6 1 4 1.34191 1.32934 0.0125689 6 0.5 8 1.32934 1.32934 6.66991e-07 6 0.25 16 1.32934 1.32934 2.70826e-06 6 0.125 32 1.32934 1.32934 4.81629e-06 6 0.0625 1 1.89991e-06 1.32934 1.32934 6 0.03125 1 5.95465e-08 1.32934 1.32934 6 0.015625 1 1.86219e-09 1.32934 1.32934 7 1 4 0.334355 0.345097 0.0107424 7 0.5 8 0.345097 0.345097 6.75187e-09 7 0.25 15 0.345098 0.345097 6.49404e-07 7 0.125 29 0.345101 0.345097 3.52199e-06 7 0.0625 57 0.345105 0.345097 7.48815e-06 7 0.03125 113 0.345108 0.345097 1.07085e-05 7 0.015625 225 0.34511 0.345097 1.27481e-05 8 1 5 3.00865 3.00882 0.00017179 8 0.5 10 3.00882 3.00882 1.15982e-06 8 0.25 19 3.00881 3.00882 9.55875e-06 8 0.125 38 3.00881 3.00882 1.3544e-05 8 0.0625 76 3.00881 3.00882 1.59144e-05 8 0.03125 152 3.00881 3.00882 1.71969e-05 8 0.015625 303 3.0088 3.00882 1.92433e-05 Using a tolerance of TOL = 1e-07 Problem Order Estimate Exact Error 1 1 4 0.670109 0.652049 0.0180601 1 0.5 8 0.652049 0.652049 1.47556e-09 1 0.25 16 0.652049 0.652049 5.12318e-09 1 0.125 31 0.652049 0.652049 1.16741e-08 1 0.0625 62 0.652049 0.652049 1.12942e-08 1 0.03125 124 0.652049 0.652049 1.07237e-08 1 0.015625 247 0.652049 0.652049 9.3609e-09 2 1 5 1.77264 1.77245 0.000183354 2 0.5 9 1.77245 1.77245 1.39608e-11 2 0.25 17 1.77245 1.77245 8.89602e-10 2 0.125 33 1.77245 1.77245 5.37981e-09 2 0.0625 66 1.77245 1.77245 7.28341e-09 2 0.03125 132 1.77245 1.77245 8.39373e-09 2 0.015625 263 1.77245 1.77245 1.02632e-08 3 1 17 1.21424 1.2092 0.00504286 3 0.5 33 1.20921 1.2092 6.9383e-06 3 0.25 65 1.2092 1.2092 7.71297e-08 3 0.125 129 1.2092 1.2092 9.32342e-08 3 0.0625 258 1.2092 1.2092 9.62408e-08 3 0.03125 516 1.2092 1.2092 9.77683e-08 3 0.015625 1032 1.2092 1.2092 9.85381e-08 P00_TURING - Warning! Number of steps exceeded N_TOO_MANY = 100000 4 1 100000 301.392 1.25331 300.139 P00_TURING - Warning! Number of steps exceeded N_TOO_MANY = 100000 4 0.5 100000 120.152 1.25331 118.899 P00_TURING - Warning! Number of steps exceeded N_TOO_MANY = 100000 4 0.25 100000 27.1654 1.25331 25.9121 P00_TURING - Warning! Number of steps exceeded N_TOO_MANY = 100000 4 0.125 100000 23.0552 1.25331 21.8018 P00_TURING - Warning! Number of steps exceeded N_TOO_MANY = 100000 4 0.0625 100000 7.77694 1.25331 6.52362 P00_TURING - Warning! Number of steps exceeded N_TOO_MANY = 100000 4 0.03125 100000 2.38535 1.25331 1.13204 P00_TURING - Warning! Number of steps exceeded N_TOO_MANY = 100000 4 0.015625 100000 7.81267 1.25331 6.55936 5 1 227 1.05728 1.0472 0.0100802 5 0.5 453 1.04721 1.0472 9.74568e-06 5 0.25 905 1.04719 1.0472 1.12661e-05 5 0.125 1809 1.04719 1.0472 1.12848e-05 5 0.0625 3617 1.04719 1.0472 1.12942e-05 5 0.03125 7233 1.04719 1.0472 1.12989e-05 5 0.015625 14466 1.04719 1.0472 1.12997e-05 6 1 5 1.34191 1.32934 0.012569 6 0.5 10 1.32934 1.32934 6.6952e-11 6 0.25 20 1.32934 1.32934 4.42681e-10 6 0.125 39 1.32934 1.32934 3.13102e-09 6 0.0625 77 1.32934 1.32934 7.72569e-09 6 0.03125 154 1.32934 1.32934 8.99104e-09 6 0.015625 308 1.32934 1.32934 9.67355e-09 7 1 5 0.334355 0.345097 0.0107424 7 0.5 9 0.345097 0.345097 1.00232e-10 7 0.25 18 0.345097 0.345097 1.25071e-10 7 0.125 35 0.345097 0.345097 1.83235e-09 7 0.0625 70 0.345097 0.345097 3.10895e-09 7 0.03125 139 0.345097 0.345097 5.8339e-09 7 0.015625 278 0.345097 0.345097 6.45572e-09 8 1 7 3.00865 3.00882 0.000171657 8 0.5 13 3.00882 3.00882 6.24212e-09 8 0.25 25 3.00882 3.00882 1.95499e-09 8 0.125 49 3.00882 3.00882 6.87079e-09 8 0.0625 97 3.00882 3.00882 1.24539e-08 8 0.03125 194 3.00882 3.00882 1.37587e-08 8 0.015625 388 3.00882 3.00882 1.44441e-08 TEST05 P00_GAUSS_HERMITE applies a Gauss-Hermite rule to estimate the integral x^m exp(-x*x) over (-oo,+oo). M Order Estimate Exact Error 0 1 1.77245 1.77245 5.51581e-12 0 2 1.77245 1.77245 5.51625e-12 0 3 1.77245 1.77245 5.51537e-12 1 1 0 0 0 1 2 0 0 0 1 3 0 0 0 2 1 0 0.886227 0.886227 2 2 0.886227 0.886227 2.75835e-12 2 3 0.886227 0.886227 2.75768e-12 2 4 0.886227 0.886227 2.75813e-12 3 1 0 0 0 3 2 0 0 0 3 3 0 0 0 3 4 -5.55112e-17 0 5.55112e-17 4 1 0 1.32934 1.32934 4 2 0.443113 1.32934 0.886227 4 3 1.32934 1.32934 4.13691e-12 4 4 1.32934 1.32934 4.13736e-12 4 5 1.32934 1.32934 4.13669e-12 5 1 0 0 0 5 2 0 0 0 5 3 0 0 0 5 4 -1.11022e-16 0 1.11022e-16 5 5 0 0 0 6 1 0 3.32335 3.32335 6 2 0.221557 3.32335 3.10179 6 3 1.99401 3.32335 1.32934 6 4 3.32335 3.32335 1.03428e-11 6 5 3.32335 3.32335 1.03406e-11 6 6 3.32335 3.32335 2.97562e-11 TEST06 P00_MONTE_CARLO uses a weighted form of the Monte Carlo method to estimate a Hermite integral on (-oo,+oo). Problem Order Estimate Exact Error 1 128 0.710875 0.652049 0.058826 1 512 0.671919 0.652049 0.0198693 1 2048 0.658156 0.652049 0.00610633 1 8192 0.672415 0.652049 0.0203659 1 32768 0.653297 0.652049 0.0012476 1 131072 0.648537 0.652049 0.00351272 1 524288 0.65117 0.652049 0.000879272 2 128 1.75646 1.77245 0.0159953 2 512 1.77985 1.77245 0.00739278 2 2048 1.77717 1.77245 0.00471585 2 8192 1.77541 1.77245 0.00295467 2 32768 1.76978 1.77245 0.00267609 2 131072 1.76995 1.77245 0.00250111 2 524288 1.77225 1.77245 0.000204005 3 128 1.201 1.2092 0.00820257 3 512 1.19308 1.2092 0.016119 3 2048 1.19718 1.2092 0.0120156 3 8192 1.19618 1.2092 0.0130233 3 32768 1.23844 1.2092 0.0292399 3 131072 1.21142 1.2092 0.00221715 3 524288 1.20744 1.2092 0.00175582 4 128 1.31349 1.25331 0.0601719 4 512 0.899154 1.25331 0.35416 4 2048 1.51914 1.25331 0.265823 4 8192 1.40893 1.25331 0.155618 4 32768 3.59332 1.25331 2.34 4 131072 2.55785 1.25331 1.30454 4 524288 1.12211 1.25331 0.131203 5 128 1.01431 1.0472 0.0328851 5 512 1.02373 1.0472 0.0234704 5 2048 1.004 1.0472 0.043196 5 8192 1.01413 1.0472 0.0330681 5 32768 1.03937 1.0472 0.0078265 5 131072 1.03111 1.0472 0.0160852 5 524288 1.02676 1.0472 0.0204419 6 128 1.38202 1.32934 0.0526798 6 512 1.27475 1.32934 0.0545863 6 2048 1.30954 1.32934 0.0198033 6 8192 1.32287 1.32934 0.00647487 6 32768 1.33616 1.32934 0.00681863 6 131072 1.33575 1.32934 0.00640874 6 524288 1.32996 1.32934 0.000617572 7 128 0.30184 0.345097 0.0432569 7 512 0.349257 0.345097 0.00415954 7 2048 0.348001 0.345097 0.00290397 7 8192 0.337856 0.345097 0.00724081 7 32768 0.342165 0.345097 0.00293211 7 131072 0.344584 0.345097 0.000513491 7 524288 0.34532 0.345097 0.000222933 8 128 3.03968 3.00882 0.0308557 8 512 3.01436 3.00882 0.00553363 8 2048 3.00635 3.00882 0.00247459 8 8192 3.01035 3.00882 0.00152182 8 32768 3.01233 3.00882 0.00351009 8 131072 3.01079 3.00882 0.00196609 8 524288 3.00877 3.00882 5.12057e-05 hermite_integrands_TEST Normal end of execution. 20 January 2020 09:15:51 AM