12 April 2007 07:03:30 AM TEST_TRI_INT_PRB: C++ version, Test the routines in the TEST_TRI_INT library. TEST01 GET_PROB_NUM reports the number of problems. P00_TITLE returns a title for each problem. The number of problems available is 22 The problem titles: 1 f(x,y) = 2 2 f(x,y) = 6 * x 3 f(x,y) = 6 * y 4 f(x,y) = 12 * x^2 5 f(x,y) = 24 * x*y 6 f(x,y) = 12 * y^2 7 f(x,y) = 20 * x^3 8 f(x,y) = 30 * x^4 9 f(x,y) = 42 * x^5 10 f(x,y) = x^(-0.2) on ((1,0),(5,0),(5,1)) 11 f(x,y) = (x+y)^(-0.2) 12 f(x,y) = (1-x-y)^(-0.2) on ((-1,-3),(3,-2),(-1,2)) 13 f(x,y) = (x*y)^(-0.2) on ((0,0),(-7,0),(0,-3)) 14 f(x,y) = 1/sqrt(x) + 1/sqrt(y) + 1/sqrt(x+y) 15 f(x,y) = 1/sqrt(1-x-y) 16 f(x,y) = log(x*y) 17 f(x,y) = 1/sqrt(|x-1/4|) + 1/sqrt(|y-1/2|) 18 f(x,y) = log ( x + y ) 19 f(x,y) = sin ( x ) cos ( 5 y ) 20 f(x,y) = sin ( 11 x ) cos ( y ) 21 f(x,y) = 1 / r = 1 / sqrt ( x^2 + y^2 ) 22 f(x,y) = log ( r ) / r TEST02 P00_MONTE_CARLO applies a Monte Carlo rule. Problem Exact Seed Pts Approx Error f(x,y) = 2 1 1 123456789 1 1 0 2 1 0 4 1 0 8 1 0 16 1 0 32 1 0 64 1 0 128 1 0 256 1 0 512 1 0 1024 1 0 2048 1 0 4096 1 0 8192 1 0 16384 1 0 32768 1 0 f(x,y) = 6 * x 2 1 123456789 1 0.0612453 0.938755 2 1.50154 0.501545 4 0.61539 0.38461 8 1.21254 0.212536 16 0.991138 0.00886202 32 0.825042 0.174958 64 1.10678 0.10678 128 0.925398 0.074602 256 0.98438 0.0156196 512 1.05836 0.0583621 1024 0.99903 0.000969501 2048 0.995304 0.00469587 4096 1.00526 0.00526408 8192 1.00396 0.00395689 16384 0.989842 0.0101578 32768 1.00671 0.00670504 f(x,y) = 6 * y 3 1 123456789 1 1.34081 0.340812 2 0.831281 0.168719 4 0.583719 0.416281 8 0.729951 0.270049 16 1.11545 0.115452 32 1.07875 0.0787547 64 0.890523 0.109477 128 1.08251 0.0825059 256 1.01295 0.012953 512 0.951335 0.0486651 1024 1.00049 0.000491559 2048 1.00111 0.0011085 4096 0.980368 0.0196315 8192 0.994613 0.00538667 16384 1.00582 0.00581982 32768 0.991596 0.00840375 f(x,y) = 12 * x^2 4 1 123456789 1 0.00250065 0.997499 2 1.56468 0.564684 4 0.379164 0.620836 8 1.42457 0.424573 16 0.846655 0.153345 32 0.760299 0.239701 64 1.12747 0.127468 128 0.891333 0.108667 256 0.991921 0.00807857 512 1.09732 0.0973205 1024 1.00934 0.00933712 2048 0.988417 0.0115833 4096 0.999428 0.000572444 8192 1.0009 0.000896874 16384 0.981618 0.0183825 32768 1.01126 0.0112577 f(x,y) = 24 * x*y 5 1 123456789 1 0.109491 0.890509 2 1.37918 0.379183 4 0.374856 0.625144 8 0.796202 0.203798 16 1.44373 0.443728 32 0.789315 0.210685 64 1.08905 0.0890464 128 1.02378 0.0237785 256 0.984806 0.0151941 512 0.999708 0.000292344 1024 1.00157 0.00157462 2048 1.01462 0.014621 4096 0.992402 0.00759806 8192 1.00676 0.00675831 16384 0.994939 0.00506113 32768 0.999391 0.000608523 f(x,y) = 12 * y^2 6 1 123456789 1 1.19852 0.198518 2 0.790582 0.209418 4 0.392641 0.607359 8 0.755518 0.244482 16 1.04476 0.0447598 32 1.20936 0.209363 64 0.784745 0.215255 128 1.10839 0.10839 256 0.992578 0.00742189 512 0.936729 0.0632707 1024 1.00256 0.00256118 2048 1.00036 0.000359706 4096 0.975588 0.0244118 8192 0.98746 0.0125396 16384 1.00795 0.00795205 32768 0.986189 0.0138107 f(x,y) = 20 * x^3 7 1 123456789 1 8.50851e-05 0.999915 2 1.40801 0.408006 4 0.247332 0.752668 8 1.64797 0.647967 16 0.667551 0.332449 32 0.719694 0.280306 64 1.0872 0.0872038 128 0.858408 0.141592 256 0.999956 4.36201e-05 512 1.12478 0.124776 1024 1.02572 0.0257169 2048 0.982511 0.0174888 4096 0.988277 0.0117227 8192 0.994695 0.00530533 16384 0.974094 0.0259056 32768 1.01443 0.0144259 f(x,y) = 30 * x^4 8 1 123456789 1 2.60553e-06 0.999997 2 1.1744 0.174397 4 0.159761 0.840239 8 1.86636 0.866361 16 0.496076 0.503924 32 0.685104 0.314896 64 1.01518 0.0151844 128 0.831394 0.168606 256 1.00359 0.00358982 512 1.14479 0.144786 1024 1.0441 0.0440991 2048 0.975979 0.024021 4096 0.974312 0.0256877 8192 0.987501 0.012499 16384 0.9671 0.0328996 32768 1.01651 0.0165073 f(x,y) = 42 * x^5 9 1 123456789 1 7.4469e-08 1 2 0.935476 0.0645244 4 0.0994793 0.900521 8 2.06993 1.06993 16 0.353322 0.646678 32 0.657976 0.342024 64 0.934428 0.0655724 128 0.814825 0.185175 256 1.0045 0.00450248 512 1.16064 0.16064 1024 1.06201 0.0620094 2048 0.96766 0.0323401 4096 0.959315 0.0406854 8192 0.980225 0.0197746 16384 0.960931 0.0390691 32768 1.01785 0.0178536 f(x,y) = x^(-0.2) on ((1,0),(5,0),(5,1)) 10 1 123456789 1 0.95543 0.0445696 2 0.252799 0.747201 4 1.96288 0.962883 8 0.813416 0.186584 16 0.647212 0.352788 32 0.972663 0.027337 64 1.05558 0.0555758 128 0.855916 0.144084 256 0.820468 0.179532 512 0.854604 0.145396 1024 0.921845 0.0781547 2048 0.969745 0.0302547 4096 0.998925 0.00107548 8192 1.10429 0.104291 16384 0.997019 0.00298114 32768 1.00443 0.00442793 f(x,y) = (x+y)^(-0.2) 11 1 123456789 1 1.04788 0.047885 2 0.949823 0.0501768 4 1.10907 0.10907 8 1.00741 0.00741288 16 0.986717 0.0132833 32 1.01172 0.0117177 64 1.00391 0.00391493 128 0.998868 0.00113215 256 0.997666 0.00233361 512 0.998255 0.00174502 1024 1.00061 0.000612629 2048 1.0015 0.00150352 4096 1.00257 0.00256585 8192 1.00044 0.000444359 16384 1.00014 0.000136965 32768 1.00029 0.00029102 f(x,y) = (1-x-y)^(-0.2) on ((-1,-3),(3,-2),(-1,2)) 12 1 123456789 1 0.816666 0.183334 2 1.02643 0.0264309 4 0.80665 0.19335 8 0.996009 0.00399063 16 1.02526 0.0252618 32 0.944151 0.0558489 64 0.986531 0.0134693 128 0.997809 0.00219108 256 0.992422 0.00757798 512 1.00315 0.00315097 1024 1.00354 0.00354374 2048 1.00091 0.000907162 4096 0.993972 0.00602829 8192 0.997571 0.00242941 16384 0.994953 0.00504658 32768 0.998352 0.00164804 f(x,y) = (x*y)^(-0.2) on ((0,0),(-7,0),(0,-3)) 13 1 123456789 1 1.3492 0.349196 2 0.910937 0.0890627 4 1.13133 0.131334 8 1.32743 0.327426 16 0.878748 0.121252 32 1.06682 0.0668193 64 1.03001 0.0300141 128 1.00428 0.00427674 256 1.01028 0.0102801 512 0.988346 0.0116541 1024 0.999201 0.000799245 2048 1.00105 0.00105142 4096 1.00179 0.00178555 8192 0.999369 0.000630626 16384 1.00094 0.000940141 32768 0.999987 1.27995e-05 f(x,y) = 1/sqrt(x) + 1/sqrt(y) + 1/sqrt(x+y) 14 1 123456789 1 1.49361 0.49361 2 0.855589 0.144411 4 1.07285 0.0728541 8 1.80408 0.804079 16 0.779435 0.220565 32 1.08986 0.089857 64 1.08708 0.0870825 128 0.999524 0.000475852 256 1.01813 0.0181282 512 0.959563 0.0404368 1024 1.00395 0.00395195 2048 1.00451 0.00450674 4096 0.990211 0.0097889 8192 0.992215 0.00778472 16384 0.999214 0.000786351 32768 0.999784 0.000215577 f(x,y) = 1/sqrt(1-x-y) 15 1 123456789 1 0.51382 0.48618 2 0.942151 0.0578486 4 0.502022 0.497978 8 0.913783 0.0862173 16 0.981295 0.0187047 32 0.783267 0.216733 64 0.932528 0.0674715 128 0.970594 0.0294062 256 0.952949 0.0470506 512 0.995725 0.00427548 1024 0.990703 0.00929739 2048 0.994888 0.00511238 4096 0.979987 0.020013 8192 0.98016 0.0198401 16384 0.973633 0.0263674 32768 0.980997 0.0190032 f(x,y) = log(x*y) 16 1 123456789 1 1.56561 0.565606 2 0.875334 0.124666 4 1.25417 0.254172 8 1.38719 0.38719 16 0.818921 0.181079 32 1.10157 0.101575 64 1.00211 0.0021136 128 1.01142 0.0114191 256 1.01586 0.0158606 512 0.992191 0.00780922 1024 0.999631 0.000369451 2048 0.997859 0.00214143 4096 1.00432 0.00431694 8192 0.999272 0.000728402 16384 1.00232 0.00232262 32768 1.00029 0.000294724 f(x,y) = 1/sqrt(|x-1/4|) + 1/sqrt(|y-1/2|) 17 1 123456789 1 1.03228 0.0322846 2 1.20819 0.208194 4 0.897696 0.102304 8 0.813318 0.186682 16 0.924351 0.0756486 32 0.932972 0.0670278 64 0.860732 0.139268 128 0.986676 0.0133238 256 0.96968 0.0303202 512 0.935644 0.0643556 1024 0.996428 0.00357228 2048 0.987989 0.0120112 4096 0.988795 0.0112048 8192 1.00091 0.000911515 16384 0.996463 0.00353748 32768 0.989267 0.0107329 f(x,y) = log ( x + y ) 18 1 123456789 1 1.52134 0.521343 2 0.532829 0.467171 4 2.04549 1.04549 8 1.08191 0.0819142 16 0.878808 0.121192 32 1.11626 0.116263 64 1.02922 0.0292249 128 0.991408 0.00859248 256 0.984305 0.0156947 512 0.986551 0.0134488 1024 1.00617 0.00617341 2048 1.01295 0.0129454 4096 1.02315 0.0231478 8192 1.00287 0.00287493 16384 1.00208 0.0020847 32768 1.00274 0.00274072 f(x,y) = sin ( x ) cos ( 5 y ) 19 1 123456789 1 -0.146085 1.14609 2 1.32996 0.329958 4 1.40072 0.400715 8 2.35823 1.35823 16 -0.50872 1.50872 32 0.981222 0.0187778 64 1.10166 0.101659 128 0.552198 0.447802 256 0.915102 0.0848981 512 1.25531 0.255306 1024 1.00974 0.00974332 2048 0.936129 0.0638707 4096 1.05176 0.0517635 8192 0.984651 0.0153485 16384 0.967844 0.0321565 32768 1.02636 0.0263556 f(x,y) = sin ( 11 x ) cos ( y ) 20 1 123456789 1 1.17477 0.174767 2 -1.45384 2.45384 4 2.40614 1.40614 8 1.3681 0.368098 16 -0.141221 1.14122 32 1.19457 0.194566 64 0.735021 0.264979 128 0.879814 0.120186 256 1.24314 0.243144 512 0.9612 0.0388 1024 1.04239 0.0423918 2048 1.04794 0.0479428 4096 1.01827 0.0182705 8192 0.961495 0.0385049 16384 1.03281 0.0328056 32768 1.00385 0.00384555 f(x,y) = 1 / r = 1 / sqrt ( x^2 + y^2 ) 21 1 123456789 1 0.896594 0.103406 2 0.641524 0.358476 4 1.64213 0.642133 8 0.880219 0.119781 16 0.907993 0.0920073 32 0.999494 0.000506337 64 1.02543 0.0254278 128 0.973867 0.0261325 256 0.93993 0.0600701 512 0.957824 0.0421757 1024 0.98722 0.0127798 2048 0.997028 0.00297189 4096 1.0133 0.0132969 8192 1.02834 0.0283439 16384 1.00122 0.00122431 32768 1.00242 0.00242366 f(x,y) = log ( r ) / r 22 1 123456789 1 0.588242 0.411758 2 0.24606 0.75394 4 2.05793 1.05793 8 0.638304 0.361696 16 0.68816 0.31184 32 0.915624 0.0843755 64 1.00423 0.00423071 128 0.879943 0.120057 256 0.80016 0.19984 512 0.842627 0.157373 1024 0.9186 0.0813996 2048 0.950849 0.0491514 4096 1.00313 0.00312604 8192 1.12326 0.123264 16384 1.00592 0.00592304 32768 1.00387 0.00387017 TEST03 P00_VERTEX_SUB applies a vertex rule with subdivision. Problem Exact Pts Approx Error f(x,y) = 2 1 1 3 1 0 6 1 0 15 1 0 45 1 0 153 1 0 f(x,y) = 6 * x 2 1 3 1 0 6 1 0 15 1 0 45 1 0 153 1 0 f(x,y) = 6 * y 3 1 3 1 0 6 1 0 15 1 0 45 1 0 153 1 0 f(x,y) = 12 * x^2 4 1 3 2 1 6 1.25 0.25 15 1.125 0.125 45 1.07812 0.078125 153 1.04688 0.046875 f(x,y) = 24 * x*y 5 1 3 0 1 6 0.75 0.25 15 0.875 0.125 45 0.921875 0.078125 153 0.953125 0.046875 f(x,y) = 12 * y^2 6 1 3 2 1 6 1.25 0.25 15 1.125 0.125 45 1.07812 0.078125 153 1.04688 0.046875 f(x,y) = 20 * x^3 7 1 3 3.33333 2.33333 6 1.45833 0.458333 15 1.22396 0.223958 45 1.14779 0.147786 153 1.09139 0.09139 f(x,y) = 30 * x^4 8 1 3 5 4 6 1.71875 0.71875 15 1.31836 0.318359 45 1.21326 0.213257 153 1.13442 0.134422 f(x,y) = 42 * x^5 9 1 3 7 6 6 2.07812 1.07812 15 1.41162 0.411621 45 1.27415 0.274155 153 1.17573 0.175731 f(x,y) = x^(-0.2) on ((1,0),(5,0),(5,1)) 10 1 Skip this problem, it has edge singularities. f(x,y) = (x+y)^(-0.2) 11 1 Skip this problem, it has vertex singularities. f(x,y) = (1-x-y)^(-0.2) on ((-1,-3),(3,-2),(-1,2)) 12 1 Skip this problem, it has edge singularities. f(x,y) = (x*y)^(-0.2) on ((0,0),(-7,0),(0,-3)) 13 1 Skip this problem, it has edge singularities. f(x,y) = 1/sqrt(x) + 1/sqrt(y) + 1/sqrt(x+y) 14 1 Skip this problem, it has edge singularities. f(x,y) = 1/sqrt(1-x-y) 15 1 Skip this problem, it has edge singularities. f(x,y) = log(x*y) 16 1 Skip this problem, it has edge singularities. f(x,y) = 1/sqrt(|x-1/4|) + 1/sqrt(|y-1/2|) 17 1 Skip this problem, it has internal singularities. f(x,y) = log ( x + y ) 18 1 Skip this problem, it has vertex singularities. f(x,y) = sin ( x ) cos ( 5 y ) 19 1 3 3.25755 2.25755 6 1.09119 0.0911929 15 1.21346 0.213464 45 1.17586 0.175858 153 1.11236 0.112362 f(x,y) = sin ( 11 x ) cos ( y ) 20 1 3 -1.95003 2.95003 6 -2.42494 3.42494 15 0.611848 0.388152 45 0.818723 0.181277 153 0.896438 0.103562 f(x,y) = 1 / r = 1 / sqrt ( x^2 + y^2 ) 21 1 Skip this problem, it has vertex singularities. f(x,y) = log ( r ) / r 22 1 Skip this problem, it has vertex singularities. TEST04 P00_WANDZURA05_SUB applies a Wandzura rule with subdivision. Problem Exact Pts Approx Error f(x,y) = 2 1 1 7 1 1.9984e-14 Accuracy acceptable f(x,y) = 6 * x 2 1 7 1 2.53131e-14 Accuracy acceptable f(x,y) = 6 * y 3 1 7 1 2.53131e-14 Accuracy acceptable f(x,y) = 12 * x^2 4 1 7 1 2.9976e-14 Accuracy acceptable f(x,y) = 24 * x*y 5 1 7 1 3.19744e-14 Accuracy acceptable f(x,y) = 12 * y^2 6 1 7 1 2.9976e-14 Accuracy acceptable f(x,y) = 20 * x^3 7 1 7 1 3.5083e-14 Accuracy acceptable f(x,y) = 30 * x^4 8 1 7 1 3.95239e-14 Accuracy acceptable f(x,y) = 42 * x^5 9 1 7 1 4.28546e-14 Accuracy acceptable f(x,y) = x^(-0.2) on ((1,0),(5,0),(5,1)) 10 1 7 0.798157 0.201843 28 0.883684 0.116316 112 0.933087 0.0669127 448 0.961538 0.0384617 1792 0.977901 0.0220992 7168 0.987305 0.0126952 f(x,y) = (x+y)^(-0.2) 11 1 7 0.998396 0.00160394 28 0.999539 0.000461189 112 0.999868 0.000132455 448 0.999962 3.80379e-05 1792 0.999989 1.09235e-05 7168 0.999997 3.13695e-06 f(x,y) = (1-x-y)^(-0.2) on ((-1,-3),(3,-2),(-1,2)) 12 1 7 0.972572 0.0274276 28 0.983878 0.0161217 112 0.990635 0.00936544 448 0.994591 0.00540946 1792 0.996884 0.00311566 7168 0.998208 0.00179199 f(x,y) = (x*y)^(-0.2) on ((0,0),(-7,0),(0,-3)) 13 1 7 0.94959 0.0504102 28 0.970474 0.0295265 112 0.982868 0.0171322 448 0.990106 0.00989391 1792 0.9943 0.00569963 7168 0.996721 0.00327902 f(x,y) = 1/sqrt(x) + 1/sqrt(y) + 1/sqrt(x+y) 14 1 7 0.873246 0.126754 28 0.909736 0.0902639 112 0.935949 0.0640507 448 0.95463 0.04537 1792 0.96789 0.0321095 7168 0.977285 0.0227148 f(x,y) = 1/sqrt(1-x-y) 15 1 7 0.8438 0.1562 28 0.887964 0.112036 112 0.920217 0.0797828 448 0.943387 0.0566134 1792 0.959898 0.0401018 7168 0.971619 0.0283811 f(x,y) = log(x*y) 16 1 7 0.950264 0.0497358 28 0.974388 0.0256117 112 0.987008 0.012992 448 0.993457 0.00654254 1792 0.996717 0.00328291 7168 0.998356 0.00164436 f(x,y) = 1/sqrt(|x-1/4|) + 1/sqrt(|y-1/2|) 17 1 7 0.864525 0.135475 28 0.965722 0.0342777 112 0.913986 0.0860141 448 0.939178 0.0608216 1792 0.956993 0.0430074 7168 0.969589 0.0304108 f(x,y) = log ( x + y ) 18 1 7 0.991081 0.00891869 28 0.997766 0.00223359 112 0.999442 0.000558483 448 0.99986 0.000139622 1792 0.999965 3.49056e-05 7168 0.999991 8.72639e-06 f(x,y) = sin ( x ) cos ( 5 y ) 19 1 7 0.975991 0.0240086 28 0.99984 0.000160449 112 0.999998 1.97812e-06 448 1 2.92109e-08 Accuracy acceptable f(x,y) = sin ( 11 x ) cos ( y ) 20 1 7 0.0513132 0.948687 28 1.01929 0.0192864 112 1.00013 0.00012925 448 1 1.69194e-06 1792 1 2.53631e-08 Accuracy acceptable f(x,y) = 1 / r = 1 / sqrt ( x^2 + y^2 ) 21 1 7 0.973846 0.0261541 28 0.987025 0.0129754 112 0.993511 0.00648864 448 0.996756 0.00324432 1792 0.998378 0.00162216 7168 0.999189 0.000811081 f(x,y) = log ( r ) / r 22 1 7 0.862016 0.137984 28 0.923815 0.0761854 112 0.958237 0.0417629 448 0.977284 0.0227159 1792 0.987725 0.0122751 7168 0.993404 0.00659617 TEST_TRI_INT_PRB: Normal end of execution. 12 April 2007 07:03:32 AM