! WARNING - this source file auto-generated by ./write_gauss_legendre.csh
! This file created: Sun 25 Feb 2018 14:11:44 GMT
module gauss_legendre

use constants

implicit none

! Maximum order for integration
integer, parameter :: n_order_max = 32
! Gauss-Legendre weights, order =   1
double precision, parameter :: wt01_00 = 2.0000000000000000d0 
! Gauss-Legendre abscissae, order =   1

! Gauss-Legendre weights, order =   2
double precision, parameter :: wt02_01 = 1.0000000000000000d0 
! Gauss-Legendre abscissae, order =   2
double precision, parameter :: xn02_01 = -0.5773502691896256d0 
double precision, parameter :: xp02_01 = +0.5773502691896256d0 

! Gauss-Legendre weights, order =   3
double precision, parameter :: wt03_00 = 0.8888888888888895d0 
double precision, parameter :: wt03_01 = 0.5555555555555554d0 
! Gauss-Legendre abscissae, order =   3
double precision, parameter :: xn03_01 = -0.7745966692414833d0 
double precision, parameter :: xp03_01 = +0.7745966692414832d0 

! Gauss-Legendre weights, order =   4
double precision, parameter :: wt04_01 = 0.6521451548625458d0 
double precision, parameter :: wt04_02 = 0.3478548451374541d0 
! Gauss-Legendre abscissae, order =   4
double precision, parameter :: xn04_02 = -0.8611363115940527d0 
double precision, parameter :: xn04_01 = -0.3399810435848563d0 
double precision, parameter :: xp04_01 = +0.3399810435848563d0 
double precision, parameter :: xp04_02 = +0.8611363115940526d0 

! Gauss-Legendre weights, order =   5
double precision, parameter :: wt05_00 = 0.5688888888888890d0 
double precision, parameter :: wt05_01 = 0.4786286704993672d0 
double precision, parameter :: wt05_02 = 0.2369268850561891d0 
! Gauss-Legendre abscissae, order =   5
double precision, parameter :: xn05_02 = -0.9061798459386641d0 
double precision, parameter :: xn05_01 = -0.5384693101056830d0 
double precision, parameter :: xp05_01 = +0.5384693101056831d0 
double precision, parameter :: xp05_02 = +0.9061798459386639d0 

! Gauss-Legendre weights, order =   6
double precision, parameter :: wt06_01 = 0.4679139345726910d0 
double precision, parameter :: wt06_02 = 0.3607615730481382d0 
double precision, parameter :: wt06_03 = 0.1713244923791708d0 
! Gauss-Legendre abscissae, order =   6
double precision, parameter :: xn06_03 = -0.9324695142031522d0 
double precision, parameter :: xn06_02 = -0.6612093864662647d0 
double precision, parameter :: xn06_01 = -0.2386191860831970d0 
double precision, parameter :: xp06_01 = +0.2386191860831969d0 
double precision, parameter :: xp06_02 = +0.6612093864662647d0 
double precision, parameter :: xp06_03 = +0.9324695142031522d0 

! Gauss-Legendre weights, order =   7
double precision, parameter :: wt07_00 = 0.4179591836734696d0 
double precision, parameter :: wt07_01 = 0.3818300505051192d0 
double precision, parameter :: wt07_02 = 0.2797053914892776d0 
double precision, parameter :: wt07_03 = 0.1294849661688697d0 
! Gauss-Legendre abscissae, order =   7
double precision, parameter :: xn07_03 = -0.9491079123427585d0 
double precision, parameter :: xn07_02 = -0.7415311855993943d0 
double precision, parameter :: xn07_01 = -0.4058451513773971d0 
double precision, parameter :: xp07_01 = +0.4058451513773971d0 
double precision, parameter :: xp07_02 = +0.7415311855993943d0 
double precision, parameter :: xp07_03 = +0.9491079123427584d0 

! Gauss-Legendre weights, order =   8
double precision, parameter :: wt08_01 = 0.3626837833783619d0 
double precision, parameter :: wt08_02 = 0.3137066458778869d0 
double precision, parameter :: wt08_03 = 0.2223810344533742d0 
double precision, parameter :: wt08_04 = 0.1012285362903759d0 
! Gauss-Legendre abscissae, order =   8
double precision, parameter :: xn08_04 = -0.9602898564975365d0 
double precision, parameter :: xn08_03 = -0.7966664774136270d0 
double precision, parameter :: xn08_02 = -0.5255324099163290d0 
double precision, parameter :: xn08_01 = -0.1834346424956498d0 
double precision, parameter :: xp08_01 = +0.1834346424956496d0 
double precision, parameter :: xp08_02 = +0.5255324099163292d0 
double precision, parameter :: xp08_03 = +0.7966664774136268d0 
double precision, parameter :: xp08_04 = +0.9602898564975364d0 

! Gauss-Legendre weights, order =   9
double precision, parameter :: wt09_00 = 0.3302393550012602d0 
double precision, parameter :: wt09_01 = 0.3123470770400024d0 
double precision, parameter :: wt09_02 = 0.2606106964029365d0 
double precision, parameter :: wt09_03 = 0.1806481606948582d0 
double precision, parameter :: wt09_04 = 0.0812743883615742d0 
! Gauss-Legendre abscissae, order =   9
double precision, parameter :: xn09_04 = -0.9681602395076260d0 
double precision, parameter :: xn09_03 = -0.8360311073266360d0 
double precision, parameter :: xn09_02 = -0.6133714327005900d0 
double precision, parameter :: xn09_01 = -0.3242534234038094d0 
double precision, parameter :: xp09_01 = +0.3242534234038092d0 
double precision, parameter :: xp09_02 = +0.6133714327005907d0 
double precision, parameter :: xp09_03 = +0.8360311073266359d0 
double precision, parameter :: xp09_04 = +0.9681602395076259d0 

! Gauss-Legendre weights, order =   10
double precision, parameter :: wt10_01 = 0.2955242247147531d0 
double precision, parameter :: wt10_02 = 0.2692667193099947d0 
double precision, parameter :: wt10_03 = 0.2190863625159819d0 
double precision, parameter :: wt10_04 = 0.1494513491505811d0 
double precision, parameter :: wt10_05 = 0.0666713443086885d0 
! Gauss-Legendre abscissae, order =   10
double precision, parameter :: xn10_05 = -0.9739065285171715d0 
double precision, parameter :: xn10_04 = -0.8650633666889844d0 
double precision, parameter :: xn10_03 = -0.6794095682990244d0 
double precision, parameter :: xn10_02 = -0.4333953941292472d0 
double precision, parameter :: xn10_01 = -0.1488743389816311d0 
double precision, parameter :: xp10_01 = +0.1488743389816314d0 
double precision, parameter :: xp10_02 = +0.4333953941292472d0 
double precision, parameter :: xp10_03 = +0.6794095682990243d0 
double precision, parameter :: xp10_04 = +0.8650633666889843d0 
double precision, parameter :: xp10_05 = +0.9739065285171714d0 

! Gauss-Legendre weights, order =   11
double precision, parameter :: wt11_00 = 0.2729250867779020d0 
double precision, parameter :: wt11_01 = 0.2628045445102476d0 
double precision, parameter :: wt11_02 = 0.2331937645919900d0 
double precision, parameter :: wt11_03 = 0.1862902109277343d0 
double precision, parameter :: wt11_04 = 0.1255803694649036d0 
double precision, parameter :: wt11_05 = 0.0556685671161739d0 
! Gauss-Legendre abscissae, order =   11
double precision, parameter :: xn11_05 = -0.9782286581460572d0 
double precision, parameter :: xn11_04 = -0.8870625997680951d0 
double precision, parameter :: xn11_03 = -0.7301520055740490d0 
double precision, parameter :: xn11_02 = -0.5190961292068114d0 
double precision, parameter :: xn11_01 = -0.2695431559523447d0 
double precision, parameter :: xp11_01 = +0.2695431559523446d0 
double precision, parameter :: xp11_02 = +0.5190961292068114d0 
double precision, parameter :: xp11_03 = +0.7301520055740490d0 
double precision, parameter :: xp11_04 = +0.8870625997680952d0 
double precision, parameter :: xp11_05 = +0.9782286581460566d0 

! Gauss-Legendre weights, order =   12
double precision, parameter :: wt12_01 = 0.2491470458134031d0 
double precision, parameter :: wt12_02 = 0.2334925365383546d0 
double precision, parameter :: wt12_03 = 0.2031674267230659d0 
double precision, parameter :: wt12_04 = 0.1600783285433468d0 
double precision, parameter :: wt12_05 = 0.1069393259953185d0 
double precision, parameter :: wt12_06 = 0.0471753363865117d0 
! Gauss-Legendre abscissae, order =   12
double precision, parameter :: xn12_06 = -0.9815606342467192d0 
double precision, parameter :: xn12_05 = -0.9041172563704749d0 
double precision, parameter :: xn12_04 = -0.7699026741943049d0 
double precision, parameter :: xn12_03 = -0.5873179542866171d0 
double precision, parameter :: xn12_02 = -0.3678314989981802d0 
double precision, parameter :: xn12_01 = -0.1252334085114693d0 
double precision, parameter :: xp12_01 = +0.1252334085114693d0 
double precision, parameter :: xp12_02 = +0.3678314989981800d0 
double precision, parameter :: xp12_03 = +0.5873179542866173d0 
double precision, parameter :: xp12_04 = +0.7699026741943049d0 
double precision, parameter :: xp12_05 = +0.9041172563704751d0 
double precision, parameter :: xp12_06 = +0.9815606342467195d0 

! Gauss-Legendre weights, order =   13
double precision, parameter :: wt13_00 = 0.2325515532308741d0 
double precision, parameter :: wt13_01 = 0.2262831802628971d0 
double precision, parameter :: wt13_02 = 0.2078160475368892d0 
double precision, parameter :: wt13_03 = 0.1781459807619459d0 
double precision, parameter :: wt13_04 = 0.1388735102197870d0 
double precision, parameter :: wt13_05 = 0.0921214998377283d0 
double precision, parameter :: wt13_06 = 0.0404840047653150d0 
! Gauss-Legendre abscissae, order =   13
double precision, parameter :: xn13_06 = -0.9841830547185882d0 
double precision, parameter :: xn13_05 = -0.9175983992229779d0 
double precision, parameter :: xn13_04 = -0.8015780907333098d0 
double precision, parameter :: xn13_03 = -0.6423493394403403d0 
double precision, parameter :: xn13_02 = -0.4484927510364469d0 
double precision, parameter :: xn13_01 = -0.2304583159551346d0 
double precision, parameter :: xp13_01 = +0.2304583159551351d0 
double precision, parameter :: xp13_02 = +0.4484927510364471d0 
double precision, parameter :: xp13_03 = +0.6423493394403402d0 
double precision, parameter :: xp13_04 = +0.8015780907333100d0 
double precision, parameter :: xp13_05 = +0.9175983992229779d0 
double precision, parameter :: xp13_06 = +0.9841830547185881d0 

! Gauss-Legendre weights, order =   14
double precision, parameter :: wt14_01 = 0.2152638534631575d0 
double precision, parameter :: wt14_02 = 0.2051984637212951d0 
double precision, parameter :: wt14_03 = 0.1855383974779378d0 
double precision, parameter :: wt14_04 = 0.1572031671581938d0 
double precision, parameter :: wt14_05 = 0.1215185706879029d0 
double precision, parameter :: wt14_06 = 0.0801580871597600d0 
double precision, parameter :: wt14_07 = 0.0351194603317518d0 
! Gauss-Legendre abscissae, order =   14
double precision, parameter :: xn14_07 = -0.9862838086968126d0 
double precision, parameter :: xn14_06 = -0.9284348836635737d0 
double precision, parameter :: xn14_05 = -0.8272013150697650d0 
double precision, parameter :: xn14_04 = -0.6872929048116854d0 
double precision, parameter :: xn14_03 = -0.5152486363581541d0 
double precision, parameter :: xn14_02 = -0.3191123689278898d0 
double precision, parameter :: xn14_01 = -0.1080549487073434d0 
double precision, parameter :: xp14_01 = +0.1080549487073437d0 
double precision, parameter :: xp14_02 = +0.3191123689278899d0 
double precision, parameter :: xp14_03 = +0.5152486363581542d0 
double precision, parameter :: xp14_04 = +0.6872929048116855d0 
double precision, parameter :: xp14_05 = +0.8272013150697648d0 
double precision, parameter :: xp14_06 = +0.9284348836635735d0 
double precision, parameter :: xp14_07 = +0.9862838086968123d0 

! Gauss-Legendre weights, order =   15
double precision, parameter :: wt15_00 = 0.2025782419255613d0 
double precision, parameter :: wt15_01 = 0.1984314853271111d0 
double precision, parameter :: wt15_02 = 0.1861610000155626d0 
double precision, parameter :: wt15_03 = 0.1662692058169944d0 
double precision, parameter :: wt15_04 = 0.1395706779261534d0 
double precision, parameter :: wt15_05 = 0.1071592204671729d0 
double precision, parameter :: wt15_06 = 0.0703660474881079d0 
double precision, parameter :: wt15_07 = 0.0307532419961174d0 
! Gauss-Legendre abscissae, order =   15
double precision, parameter :: xn15_07 = -0.9879925180204860d0 
double precision, parameter :: xn15_06 = -0.9372733924007061d0 
double precision, parameter :: xn15_05 = -0.8482065834104269d0 
double precision, parameter :: xn15_04 = -0.7244177313601700d0 
double precision, parameter :: xn15_03 = -0.5709721726085385d0 
double precision, parameter :: xn15_02 = -0.3941513470775634d0 
double precision, parameter :: xn15_01 = -0.2011940939974347d0 
double precision, parameter :: xp15_01 = +0.2011940939974347d0 
double precision, parameter :: xp15_02 = +0.3941513470775637d0 
double precision, parameter :: xp15_03 = +0.5709721726085392d0 
double precision, parameter :: xp15_04 = +0.7244177313601701d0 
double precision, parameter :: xp15_05 = +0.8482065834104270d0 
double precision, parameter :: xp15_06 = +0.9372733924007057d0 
double precision, parameter :: xp15_07 = +0.9879925180204853d0 

! Gauss-Legendre weights, order =   16
double precision, parameter :: wt16_01 = 0.1894506104550696d0 
double precision, parameter :: wt16_02 = 0.1826034150449225d0 
double precision, parameter :: wt16_03 = 0.1691565193950032d0 
double precision, parameter :: wt16_04 = 0.1495959888165764d0 
double precision, parameter :: wt16_05 = 0.1246289712555355d0 
double precision, parameter :: wt16_06 = 0.0951585116824927d0 
double precision, parameter :: wt16_07 = 0.0622535239386479d0 
double precision, parameter :: wt16_08 = 0.0271524594117541d0 
! Gauss-Legendre abscissae, order =   16
double precision, parameter :: xn16_08 = -0.9894009349916500d0 
double precision, parameter :: xn16_07 = -0.9445750230732329d0 
double precision, parameter :: xn16_06 = -0.8656312023878321d0 
double precision, parameter :: xn16_05 = -0.7554044083550031d0 
double precision, parameter :: xn16_04 = -0.6178762444026439d0 
double precision, parameter :: xn16_03 = -0.4580167776572275d0 
double precision, parameter :: xn16_02 = -0.2816035507792586d0 
double precision, parameter :: xn16_01 = -0.0950125098376371d0 
double precision, parameter :: xp16_01 = +0.0950125098376375d0 
double precision, parameter :: xp16_02 = +0.2816035507792591d0 
double precision, parameter :: xp16_03 = +0.4580167776572271d0 
double precision, parameter :: xp16_04 = +0.6178762444026440d0 
double precision, parameter :: xp16_05 = +0.7554044083550032d0 
double precision, parameter :: xp16_06 = +0.8656312023878318d0 
double precision, parameter :: xp16_07 = +0.9445750230732323d0 
double precision, parameter :: xp16_08 = +0.9894009349916499d0 

! Gauss-Legendre weights, order =   17
double precision, parameter :: wt17_00 = 0.1794464703562078d0 
double precision, parameter :: wt17_01 = 0.1765627053669928d0 
double precision, parameter :: wt17_02 = 0.1680041021564498d0 
double precision, parameter :: wt17_03 = 0.1540457610768096d0 
double precision, parameter :: wt17_04 = 0.1351363684685257d0 
double precision, parameter :: wt17_05 = 0.1118838471934034d0 
double precision, parameter :: wt17_06 = 0.0850361483171797d0 
double precision, parameter :: wt17_07 = 0.0554595293739866d0 
double precision, parameter :: wt17_08 = 0.0241483028685479d0 
! Gauss-Legendre abscissae, order =   17
double precision, parameter :: xn17_08 = -0.9905754753144169d0 
double precision, parameter :: xn17_07 = -0.9506755217687677d0 
double precision, parameter :: xn17_06 = -0.8802391537269858d0 
double precision, parameter :: xn17_05 = -0.7815140038968016d0 
double precision, parameter :: xn17_04 = -0.6576711592166906d0 
double precision, parameter :: xn17_03 = -0.5126905370864765d0 
double precision, parameter :: xn17_02 = -0.3512317634538769d0 
double precision, parameter :: xn17_01 = -0.1784841814958478d0 
double precision, parameter :: xp17_01 = +0.1784841814958478d0 
double precision, parameter :: xp17_02 = +0.3512317634538766d0 
double precision, parameter :: xp17_03 = +0.5126905370864765d0 
double precision, parameter :: xp17_04 = +0.6576711592166906d0 
double precision, parameter :: xp17_05 = +0.7815140038968011d0 
double precision, parameter :: xp17_06 = +0.8802391537269856d0 
double precision, parameter :: xp17_07 = +0.9506755217687677d0 
double precision, parameter :: xp17_08 = +0.9905754753144173d0 

! Gauss-Legendre weights, order =   18
double precision, parameter :: wt18_01 = 0.1691423829631434d0 
double precision, parameter :: wt18_02 = 0.1642764837458328d0 
double precision, parameter :: wt18_03 = 0.1546846751262653d0 
double precision, parameter :: wt18_04 = 0.1406429146706505d0 
double precision, parameter :: wt18_05 = 0.1225552067114788d0 
double precision, parameter :: wt18_06 = 0.1009420441062872d0 
double precision, parameter :: wt18_07 = 0.0764257302548891d0 
double precision, parameter :: wt18_08 = 0.0497145488949692d0 
double precision, parameter :: wt18_09 = 0.0216160135264827d0 
! Gauss-Legendre abscissae, order =   18
double precision, parameter :: xn18_09 = -0.9915651684209310d0 
double precision, parameter :: xn18_08 = -0.9558239495713977d0 
double precision, parameter :: xn18_07 = -0.8926024664975558d0 
double precision, parameter :: xn18_06 = -0.8037049589725230d0 
double precision, parameter :: xn18_05 = -0.6916870430603533d0 
double precision, parameter :: xn18_04 = -0.5597708310739477d0 
double precision, parameter :: xn18_03 = -0.4117511614628424d0 
double precision, parameter :: xn18_02 = -0.2518862256915056d0 
double precision, parameter :: xn18_01 = -0.0847750130417347d0 
double precision, parameter :: xp18_01 = +0.0847750130417353d0 
double precision, parameter :: xp18_02 = +0.2518862256915056d0 
double precision, parameter :: xp18_03 = +0.4117511614628425d0 
double precision, parameter :: xp18_04 = +0.5597708310739474d0 
double precision, parameter :: xp18_05 = +0.6916870430603530d0 
double precision, parameter :: xp18_06 = +0.8037049589725234d0 
double precision, parameter :: xp18_07 = +0.8926024664975557d0 
double precision, parameter :: xp18_08 = +0.9558239495713978d0 
double precision, parameter :: xp18_09 = +0.9915651684209308d0 

! Gauss-Legendre weights, order =   19
double precision, parameter :: wt19_00 = 0.1610544498487837d0 
double precision, parameter :: wt19_01 = 0.1589688433939540d0 
double precision, parameter :: wt19_02 = 0.1527660420658593d0 
double precision, parameter :: wt19_03 = 0.1426067021736076d0 
double precision, parameter :: wt19_04 = 0.1287539625393368d0 
double precision, parameter :: wt19_05 = 0.1115666455473341d0 
double precision, parameter :: wt19_06 = 0.0914900216224497d0 
double precision, parameter :: wt19_07 = 0.0690445427376412d0 
double precision, parameter :: wt19_08 = 0.0448142267656992d0 
double precision, parameter :: wt19_09 = 0.0194617882297266d0 
! Gauss-Legendre abscissae, order =   19
double precision, parameter :: xn19_09 = -0.9924068438435842d0 
double precision, parameter :: xn19_08 = -0.9602081521348304d0 
double precision, parameter :: xn19_07 = -0.9031559036148182d0 
double precision, parameter :: xn19_06 = -0.8227146565371429d0 
double precision, parameter :: xn19_05 = -0.7209661773352291d0 
double precision, parameter :: xn19_04 = -0.6005453046616805d0 
double precision, parameter :: xn19_03 = -0.4645707413759609d0 
double precision, parameter :: xn19_02 = -0.3165640999636295d0 
double precision, parameter :: xn19_01 = -0.1603586456402254d0 
double precision, parameter :: xp19_01 = +0.1603586456402253d0 
double precision, parameter :: xp19_02 = +0.3165640999636297d0 
double precision, parameter :: xp19_03 = +0.4645707413759609d0 
double precision, parameter :: xp19_04 = +0.6005453046616809d0 
double precision, parameter :: xp19_05 = +0.7209661773352291d0 
double precision, parameter :: xp19_06 = +0.8227146565371429d0 
double precision, parameter :: xp19_07 = +0.9031559036148178d0 
double precision, parameter :: xp19_08 = +0.9602081521348298d0 
double precision, parameter :: xp19_09 = +0.9924068438435842d0 

! Gauss-Legendre weights, order =   20
double precision, parameter :: wt20_01 = 0.1527533871307260d0 
double precision, parameter :: wt20_02 = 0.1491729864726043d0 
double precision, parameter :: wt20_03 = 0.1420961093183828d0 
double precision, parameter :: wt20_04 = 0.1316886384491771d0 
double precision, parameter :: wt20_05 = 0.1181945319615193d0 
double precision, parameter :: wt20_06 = 0.1019301198172400d0 
double precision, parameter :: wt20_07 = 0.0832767415767039d0 
double precision, parameter :: wt20_08 = 0.0626720483341093d0 
double precision, parameter :: wt20_09 = 0.0406014298003861d0 
double precision, parameter :: wt20_10 = 0.0176140071391524d0 
! Gauss-Legendre abscissae, order =   20
double precision, parameter :: xn20_10 = -0.9931285991850950d0 
double precision, parameter :: xn20_09 = -0.9639719272779136d0 
double precision, parameter :: xn20_08 = -0.9122344282513257d0 
double precision, parameter :: xn20_07 = -0.8391169718222189d0 
double precision, parameter :: xn20_06 = -0.7463319064601508d0 
double precision, parameter :: xn20_05 = -0.6360536807265149d0 
double precision, parameter :: xn20_04 = -0.5108670019508270d0 
double precision, parameter :: xn20_03 = -0.3737060887154196d0 
double precision, parameter :: xn20_02 = -0.2277858511416451d0 
double precision, parameter :: xn20_01 = -0.0765265211334974d0 
double precision, parameter :: xp20_01 = +0.0765265211334973d0 
double precision, parameter :: xp20_02 = +0.2277858511416456d0 
double precision, parameter :: xp20_03 = +0.3737060887154196d0 
double precision, parameter :: xp20_04 = +0.5108670019508271d0 
double precision, parameter :: xp20_05 = +0.6360536807265151d0 
double precision, parameter :: xp20_06 = +0.7463319064601509d0 
double precision, parameter :: xp20_07 = +0.8391169718222189d0 
double precision, parameter :: xp20_08 = +0.9122344282513254d0 
double precision, parameter :: xp20_09 = +0.9639719272779137d0 
double precision, parameter :: xp20_10 = +0.9931285991850947d0 

! Gauss-Legendre weights, order =   21
double precision, parameter :: wt21_00 = 0.1460811336496907d0 
double precision, parameter :: wt21_01 = 0.1445244039899700d0 
double precision, parameter :: wt21_02 = 0.1398873947910719d0 
double precision, parameter :: wt21_03 = 0.1322689386333376d0 
double precision, parameter :: wt21_04 = 0.1218314160537284d0 
double precision, parameter :: wt21_05 = 0.1087972991671481d0 
double precision, parameter :: wt21_06 = 0.0934444234560340d0 
double precision, parameter :: wt21_07 = 0.0761001136283794d0 
double precision, parameter :: wt21_08 = 0.0571344254268581d0 
double precision, parameter :: wt21_09 = 0.0369537897708529d0 
double precision, parameter :: wt21_10 = 0.0160172282577745d0 
! Gauss-Legendre abscissae, order =   21
double precision, parameter :: xn21_10 = -0.9937521706203893d0 
double precision, parameter :: xn21_09 = -0.9672268385663063d0 
double precision, parameter :: xn21_08 = -0.9200993341504007d0 
double precision, parameter :: xn21_07 = -0.8533633645833171d0 
double precision, parameter :: xn21_06 = -0.7684399634756779d0 
double precision, parameter :: xn21_05 = -0.6671388041974122d0 
double precision, parameter :: xn21_04 = -0.5516188358872202d0 
double precision, parameter :: xn21_03 = -0.4243421202074387d0 
double precision, parameter :: xn21_02 = -0.2880213168024012d0 
double precision, parameter :: xn21_01 = -0.1455618541608952d0 
double precision, parameter :: xp21_01 = +0.1455618541608948d0 
double precision, parameter :: xp21_02 = +0.2880213168024012d0 
double precision, parameter :: xp21_03 = +0.4243421202074386d0 
double precision, parameter :: xp21_04 = +0.5516188358872197d0 
double precision, parameter :: xp21_05 = +0.6671388041974126d0 
double precision, parameter :: xp21_06 = +0.7684399634756779d0 
double precision, parameter :: xp21_07 = +0.8533633645833174d0 
double precision, parameter :: xp21_08 = +0.9200993341504010d0 
double precision, parameter :: xp21_09 = +0.9672268385663062d0 
double precision, parameter :: xp21_10 = +0.9937521706203895d0 

! Gauss-Legendre weights, order =   22
double precision, parameter :: wt22_01 = 0.1392518728556313d0 
double precision, parameter :: wt22_02 = 0.1365414983460148d0 
double precision, parameter :: wt22_03 = 0.1311735047870616d0 
double precision, parameter :: wt22_04 = 0.1232523768105135d0 
double precision, parameter :: wt22_05 = 0.1129322960805383d0 
double precision, parameter :: wt22_06 = 0.1004141444428805d0 
double precision, parameter :: wt22_07 = 0.0859416062170682d0 
double precision, parameter :: wt22_08 = 0.0697964684245205d0 
double precision, parameter :: wt22_09 = 0.0522933351526837d0 
double precision, parameter :: wt22_10 = 0.0337749015848142d0 
double precision, parameter :: wt22_11 = 0.0146279952982713d0 
! Gauss-Legendre abscissae, order =   22
double precision, parameter :: xn22_11 = -0.9942945854823991d0 
double precision, parameter :: xn22_10 = -0.9700604978354286d0 
double precision, parameter :: xn22_09 = -0.9269567721871742d0 
double precision, parameter :: xn22_08 = -0.8658125777203004d0 
double precision, parameter :: xn22_07 = -0.7878168059792084d0 
double precision, parameter :: xn22_06 = -0.6944872631866826d0 
double precision, parameter :: xn22_05 = -0.5876404035069112d0 
double precision, parameter :: xn22_04 = -0.4693558379867572d0 
double precision, parameter :: xn22_03 = -0.3419358208920850d0 
double precision, parameter :: xn22_02 = -0.2078604266882214d0 
double precision, parameter :: xn22_01 = -0.0697392733197224d0 
double precision, parameter :: xp22_01 = +0.0697392733197225d0 
double precision, parameter :: xp22_02 = +0.2078604266882215d0 
double precision, parameter :: xp22_03 = +0.3419358208920845d0 
double precision, parameter :: xp22_04 = +0.4693558379867572d0 
double precision, parameter :: xp22_05 = +0.5876404035069118d0 
double precision, parameter :: xp22_06 = +0.6944872631866831d0 
double precision, parameter :: xp22_07 = +0.7878168059792081d0 
double precision, parameter :: xp22_08 = +0.8658125777203003d0 
double precision, parameter :: xp22_09 = +0.9269567721871738d0 
double precision, parameter :: xp22_10 = +0.9700604978354286d0 
double precision, parameter :: xp22_11 = +0.9942945854823994d0 

! Gauss-Legendre weights, order =   23
double precision, parameter :: wt23_00 = 0.1336545721861070d0 
double precision, parameter :: wt23_01 = 0.1324620394046966d0 
double precision, parameter :: wt23_02 = 0.1289057221880811d0 
double precision, parameter :: wt23_03 = 0.1230490843067304d0 
double precision, parameter :: wt23_04 = 0.1149966402224111d0 
double precision, parameter :: wt23_05 = 0.1048920914645406d0 
double precision, parameter :: wt23_06 = 0.0929157660600360d0 
double precision, parameter :: wt23_07 = 0.0792814117767188d0 
double precision, parameter :: wt23_08 = 0.0642324214085253d0 
double precision, parameter :: wt23_09 = 0.0480376717310852d0 
double precision, parameter :: wt23_10 = 0.0309880058569793d0 
double precision, parameter :: wt23_11 = 0.0134118594871419d0 
! Gauss-Legendre abscissae, order =   23
double precision, parameter :: xn23_11 = -0.9947693349975517d0 
double precision, parameter :: xn23_10 = -0.9725424712181150d0 
double precision, parameter :: xn23_09 = -0.9329710868260160d0 
double precision, parameter :: xn23_08 = -0.8767523582704413d0 
double precision, parameter :: xn23_07 = -0.8048884016188398d0 
double precision, parameter :: xn23_06 = -0.7186613631319499d0 
double precision, parameter :: xn23_05 = -0.6196098757636458d0 
double precision, parameter :: xn23_04 = -0.5095014778460073d0 
double precision, parameter :: xn23_03 = -0.3903010380302910d0 
double precision, parameter :: xn23_02 = -0.2641356809703450d0 
double precision, parameter :: xn23_01 = -0.1332568242984663d0 
double precision, parameter :: xp23_01 = +0.1332568242984659d0 
double precision, parameter :: xp23_02 = +0.2641356809703447d0 
double precision, parameter :: xp23_03 = +0.3903010380302909d0 
double precision, parameter :: xp23_04 = +0.5095014778460072d0 
double precision, parameter :: xp23_05 = +0.6196098757636458d0 
double precision, parameter :: xp23_06 = +0.7186613631319502d0 
double precision, parameter :: xp23_07 = +0.8048884016188395d0 
double precision, parameter :: xp23_08 = +0.8767523582704417d0 
double precision, parameter :: xp23_09 = +0.9329710868260158d0 
double precision, parameter :: xp23_10 = +0.9725424712181153d0 
double precision, parameter :: xp23_11 = +0.9947693349975519d0 

! Gauss-Legendre weights, order =   24
double precision, parameter :: wt24_01 = 0.1279381953467525d0 
double precision, parameter :: wt24_02 = 0.1258374563468276d0 
double precision, parameter :: wt24_03 = 0.1216704729278027d0 
double precision, parameter :: wt24_04 = 0.1155056680537268d0 
double precision, parameter :: wt24_05 = 0.1074442701159653d0 
double precision, parameter :: wt24_06 = 0.0976186521041125d0 
double precision, parameter :: wt24_07 = 0.0861901615319528d0 
double precision, parameter :: wt24_08 = 0.0733464814110806d0 
double precision, parameter :: wt24_09 = 0.0592985849154366d0 
double precision, parameter :: wt24_10 = 0.0442774388174198d0 
double precision, parameter :: wt24_11 = 0.0285313886289335d0 
double precision, parameter :: wt24_12 = 0.0123412297999881d0 
! Gauss-Legendre abscissae, order =   24
double precision, parameter :: xn24_12 = -0.9951872199970216d0 
double precision, parameter :: xn24_11 = -0.9747285559713099d0 
double precision, parameter :: xn24_10 = -0.9382745520027326d0 
double precision, parameter :: xn24_09 = -0.8864155270044010d0 
double precision, parameter :: xn24_08 = -0.8200019859739033d0 
double precision, parameter :: xn24_07 = -0.7401241915785545d0 
double precision, parameter :: xn24_06 = -0.6480936519369757d0 
double precision, parameter :: xn24_05 = -0.5454214713888396d0 
double precision, parameter :: xn24_04 = -0.4337935076260451d0 
double precision, parameter :: xn24_03 = -0.3150426796961635d0 
double precision, parameter :: xn24_02 = -0.1911188674736164d0 
double precision, parameter :: xn24_01 = -0.0640568928626056d0 
double precision, parameter :: xp24_01 = +0.0640568928626057d0 
double precision, parameter :: xp24_02 = +0.1911188674736164d0 
double precision, parameter :: xp24_03 = +0.3150426796961634d0 
double precision, parameter :: xp24_04 = +0.4337935076260452d0 
double precision, parameter :: xp24_05 = +0.5454214713888392d0 
double precision, parameter :: xp24_06 = +0.6480936519369755d0 
double precision, parameter :: xp24_07 = +0.7401241915785547d0 
double precision, parameter :: xp24_08 = +0.8200019859739031d0 
double precision, parameter :: xp24_09 = +0.8864155270044012d0 
double precision, parameter :: xp24_10 = +0.9382745520027329d0 
double precision, parameter :: xp24_11 = +0.9747285559713098d0 
double precision, parameter :: xp24_12 = +0.9951872199970214d0 

! Gauss-Legendre weights, order =   25
double precision, parameter :: wt25_00 = 0.1231760537267146d0 
double precision, parameter :: wt25_01 = 0.1222424429903089d0 
double precision, parameter :: wt25_02 = 0.1194557635357851d0 
double precision, parameter :: wt25_03 = 0.1148582591457117d0 
double precision, parameter :: wt25_04 = 0.1085196244742642d0 
double precision, parameter :: wt25_05 = 0.1005359490670499d0 
double precision, parameter :: wt25_06 = 0.0910282619829639d0 
double precision, parameter :: wt25_07 = 0.0801407003350019d0 
double precision, parameter :: wt25_08 = 0.0680383338123565d0 
double precision, parameter :: wt25_09 = 0.0549046959758357d0 
double precision, parameter :: wt25_10 = 0.0409391567013060d0 
double precision, parameter :: wt25_11 = 0.0263549866150312d0 
double precision, parameter :: wt25_12 = 0.0113937985010263d0 
! Gauss-Legendre abscissae, order =   25
double precision, parameter :: xn25_12 = -0.9955569697904979d0 
double precision, parameter :: xn25_11 = -0.9766639214595174d0 
double precision, parameter :: xn25_10 = -0.9429745712289743d0 
double precision, parameter :: xn25_09 = -0.8949919978782757d0 
double precision, parameter :: xn25_08 = -0.8334426287608341d0 
double precision, parameter :: xn25_07 = -0.7592592630373576d0 
double precision, parameter :: xn25_06 = -0.6735663684734683d0 
double precision, parameter :: xn25_05 = -0.5776629302412227d0 
double precision, parameter :: xn25_04 = -0.4730027314457150d0 
double precision, parameter :: xn25_03 = -0.3611723058093879d0 
double precision, parameter :: xn25_02 = -0.2438668837209885d0 
double precision, parameter :: xn25_01 = -0.1228646926107104d0 
double precision, parameter :: xp25_01 = +0.1228646926107104d0 
double precision, parameter :: xp25_02 = +0.2438668837209885d0 
double precision, parameter :: xp25_03 = +0.3611723058093876d0 
double precision, parameter :: xp25_04 = +0.4730027314457147d0 
double precision, parameter :: xp25_05 = +0.5776629302412226d0 
double precision, parameter :: xp25_06 = +0.6735663684734685d0 
double precision, parameter :: xp25_07 = +0.7592592630373574d0 
double precision, parameter :: xp25_08 = +0.8334426287608339d0 
double precision, parameter :: xp25_09 = +0.8949919978782753d0 
double precision, parameter :: xp25_10 = +0.9429745712289744d0 
double precision, parameter :: xp25_11 = +0.9766639214595174d0 
double precision, parameter :: xp25_12 = +0.9955569697904981d0 

! Gauss-Legendre weights, order =   26
double precision, parameter :: wt26_01 = 0.1183214152792631d0 
double precision, parameter :: wt26_02 = 0.1166604434852970d0 
double precision, parameter :: wt26_03 = 0.1133618165463193d0 
double precision, parameter :: wt26_04 = 0.1084718405285774d0 
double precision, parameter :: wt26_05 = 0.1020591610944255d0 
double precision, parameter :: wt26_06 = 0.0942138003559143d0 
double precision, parameter :: wt26_07 = 0.0850458943134850d0 
double precision, parameter :: wt26_08 = 0.0746841497656598d0 
double precision, parameter :: wt26_09 = 0.0632740463295754d0 
double precision, parameter :: wt26_10 = 0.0509758252971480d0 
double precision, parameter :: wt26_11 = 0.0379623832943635d0 
double precision, parameter :: wt26_12 = 0.0244178510926324d0 
double precision, parameter :: wt26_13 = 0.0105513726173431d0 
! Gauss-Legendre abscissae, order =   26
double precision, parameter :: xn26_13 = -0.9958857011456167d0 
double precision, parameter :: xn26_12 = -0.9783854459564708d0 
double precision, parameter :: xn26_11 = -0.9471590666617142d0 
double precision, parameter :: xn26_10 = -0.9026378619843067d0 
double precision, parameter :: xn26_09 = -0.8454459427884981d0 
double precision, parameter :: xn26_08 = -0.7763859488206791d0 
double precision, parameter :: xn26_07 = -0.6964272604199576d0 
double precision, parameter :: xn26_06 = -0.6066922930176182d0 
double precision, parameter :: xn26_05 = -0.5084407148245058d0 
double precision, parameter :: xn26_04 = -0.4030517551234863d0 
double precision, parameter :: xn26_03 = -0.2920048394859570d0 
double precision, parameter :: xn26_02 = -0.1768588203568902d0 
double precision, parameter :: xn26_01 = -0.0592300934293134d0 
double precision, parameter :: xp26_01 = +0.0592300934293131d0 
double precision, parameter :: xp26_02 = +0.1768588203568901d0 
double precision, parameter :: xp26_03 = +0.2920048394859567d0 
double precision, parameter :: xp26_04 = +0.4030517551234863d0 
double precision, parameter :: xp26_05 = +0.5084407148245057d0 
double precision, parameter :: xp26_06 = +0.6066922930176182d0 
double precision, parameter :: xp26_07 = +0.6964272604199576d0 
double precision, parameter :: xp26_08 = +0.7763859488206790d0 
double precision, parameter :: xp26_09 = +0.8454459427884982d0 
double precision, parameter :: xp26_10 = +0.9026378619843073d0 
double precision, parameter :: xp26_11 = +0.9471590666617146d0 
double precision, parameter :: xp26_12 = +0.9783854459564709d0 
double precision, parameter :: xp26_13 = +0.9958857011456171d0 

! Gauss-Legendre weights, order =   27
double precision, parameter :: wt27_00 = 0.1142208673789566d0 
double precision, parameter :: wt27_01 = 0.1134763461089659d0 
double precision, parameter :: wt27_02 = 0.1112524883568452d0 
double precision, parameter :: wt27_03 = 0.1075782857885327d0 
double precision, parameter :: wt27_04 = 0.1025016378177455d0 
double precision, parameter :: wt27_05 = 0.0960887273700293d0 
double precision, parameter :: wt27_06 = 0.0884231585437571d0 
double precision, parameter :: wt27_07 = 0.0796048677730568d0 
double precision, parameter :: wt27_08 = 0.0697488237662459d0 
double precision, parameter :: wt27_09 = 0.0589835368598340d0 
double precision, parameter :: wt27_10 = 0.0474494125206155d0 
double precision, parameter :: wt27_11 = 0.0352970537574188d0 
double precision, parameter :: wt27_12 = 0.0226862315961806d0 
double precision, parameter :: wt27_13 = 0.0097989960512942d0 
! Gauss-Legendre abscissae, order =   27
double precision, parameter :: xn27_13 = -0.9961792628889884d0 
double precision, parameter :: xn27_12 = -0.9799234759615013d0 
double precision, parameter :: xn27_11 = -0.9509005578147052d0 
double precision, parameter :: xn27_10 = -0.9094823206774911d0 
double precision, parameter :: xn27_09 = -0.8562079080182947d0 
double precision, parameter :: xn27_08 = -0.7917716390705080d0 
double precision, parameter :: xn27_07 = -0.7170134737394234d0 
double precision, parameter :: xn27_06 = -0.6329079719464950d0 
double precision, parameter :: xn27_05 = -0.5405515645794570d0 
double precision, parameter :: xn27_04 = -0.4411482517500268d0 
double precision, parameter :: xn27_03 = -0.3359939036385085d0 
double precision, parameter :: xn27_02 = -0.2264593654395370d0 
double precision, parameter :: xn27_01 = -0.1139725856095302d0 
double precision, parameter :: xp27_01 = +0.1139725856095299d0 
double precision, parameter :: xp27_02 = +0.2264593654395370d0 
double precision, parameter :: xp27_03 = +0.3359939036385094d0 
double precision, parameter :: xp27_04 = +0.4411482517500274d0 
double precision, parameter :: xp27_05 = +0.5405515645794569d0 
double precision, parameter :: xp27_06 = +0.6329079719464948d0 
double precision, parameter :: xp27_07 = +0.7170134737394235d0 
double precision, parameter :: xp27_08 = +0.7917716390705083d0 
double precision, parameter :: xp27_09 = +0.8562079080182944d0 
double precision, parameter :: xp27_10 = +0.9094823206774910d0 
double precision, parameter :: xp27_11 = +0.9509005578147049d0 
double precision, parameter :: xp27_12 = +0.9799234759615009d0 
double precision, parameter :: xp27_13 = +0.9961792628889885d0 

! Gauss-Legendre weights, order =   28
double precision, parameter :: wt28_01 = 0.1100470130164743d0 
double precision, parameter :: wt28_02 = 0.1087111922582938d0 
double precision, parameter :: wt28_03 = 0.1060557659228471d0 
double precision, parameter :: wt28_04 = 0.1021129675780604d0 
double precision, parameter :: wt28_05 = 0.0969306579979306d0 
double precision, parameter :: wt28_06 = 0.0905717443930339d0 
double precision, parameter :: wt28_07 = 0.0831134172289013d0 
double precision, parameter :: wt28_08 = 0.0746462142345687d0 
double precision, parameter :: wt28_09 = 0.0652729239669993d0 
double precision, parameter :: wt28_10 = 0.0551073456757172d0 
double precision, parameter :: wt28_11 = 0.0442729347590042d0 
double precision, parameter :: wt28_12 = 0.0329014277823040d0 
double precision, parameter :: wt28_13 = 0.0211321125927713d0 
double precision, parameter :: wt28_14 = 0.0091242825930947d0 
! Gauss-Legendre abscissae, order =   28
double precision, parameter :: xn28_14 = -0.9964424975739546d0 
double precision, parameter :: xn28_13 = -0.9813031653708730d0 
double precision, parameter :: xn28_12 = -0.9542592806289382d0 
double precision, parameter :: xn28_11 = -0.9156330263921322d0 
double precision, parameter :: xn28_10 = -0.8658925225743948d0 
double precision, parameter :: xn28_09 = -0.8056413709171794d0 
double precision, parameter :: xn28_08 = -0.7356108780136319d0 
double precision, parameter :: xn28_07 = -0.6566510940388650d0 
double precision, parameter :: xn28_06 = -0.5697204718114020d0 
double precision, parameter :: xn28_05 = -0.4758742249551186d0 
double precision, parameter :: xn28_04 = -0.3762515160890788d0 
double precision, parameter :: xn28_03 = -0.2720616276351782d0 
double precision, parameter :: xn28_02 = -0.1645692821333809d0 
double precision, parameter :: xn28_01 = -0.0550792898840346d0 
double precision, parameter :: xp28_01 = +0.0550792898840341d0 
double precision, parameter :: xp28_02 = +0.1645692821333812d0 
double precision, parameter :: xp28_03 = +0.2720616276351783d0 
double precision, parameter :: xp28_04 = +0.3762515160890788d0 
double precision, parameter :: xp28_05 = +0.4758742249551187d0 
double precision, parameter :: xp28_06 = +0.5697204718114014d0 
double precision, parameter :: xp28_07 = +0.6566510940388648d0 
double precision, parameter :: xp28_08 = +0.7356108780136316d0 
double precision, parameter :: xp28_09 = +0.8056413709171794d0 
double precision, parameter :: xp28_10 = +0.8658925225743952d0 
double precision, parameter :: xp28_11 = +0.9156330263921324d0 
double precision, parameter :: xp28_12 = +0.9542592806289385d0 
double precision, parameter :: xp28_13 = +0.9813031653708730d0 
double precision, parameter :: xp28_14 = +0.9964424975739546d0 

! Gauss-Legendre weights, order =   29
double precision, parameter :: wt29_00 = 0.1064793817183140d0 
double precision, parameter :: wt29_01 = 0.1058761550973216d0 
double precision, parameter :: wt29_02 = 0.1040733100777302d0 
double precision, parameter :: wt29_03 = 0.1010912737599142d0 
double precision, parameter :: wt29_04 = 0.0969638340944084d0 
double precision, parameter :: wt29_05 = 0.0917377571392583d0 
double precision, parameter :: wt29_06 = 0.0854722573661728d0 
double precision, parameter :: wt29_07 = 0.0782383271357634d0 
double precision, parameter :: wt29_08 = 0.0701179332550522d0 
double precision, parameter :: wt29_09 = 0.0612030906570801d0 
double precision, parameter :: wt29_10 = 0.0515948269024971d0 
double precision, parameter :: wt29_11 = 0.0414020625186841d0 
double precision, parameter :: wt29_12 = 0.0307404922020931d0 
double precision, parameter :: wt29_13 = 0.0197320850561221d0 
double precision, parameter :: wt29_14 = 0.0085169038787464d0 
! Gauss-Legendre abscissae, order =   29
double precision, parameter :: xn29_14 = -0.9966794422605960d0 
double precision, parameter :: xn29_13 = -0.9825455052614130d0 
double precision, parameter :: xn29_12 = -0.9572855957780874d0 
double precision, parameter :: xn29_11 = -0.9211802329530585d0 
double precision, parameter :: xn29_10 = -0.8746378049201029d0 
double precision, parameter :: xn29_09 = -0.8181854876152521d0 
double precision, parameter :: xn29_08 = -0.7524628517344772d0 
double precision, parameter :: xn29_07 = -0.6782145376026868d0 
double precision, parameter :: xn29_06 = -0.5962817971382279d0 
double precision, parameter :: xn29_05 = -0.5075929551242279d0 
double precision, parameter :: xn29_04 = -0.4131528881740088d0 
double precision, parameter :: xn29_03 = -0.3140316378676397d0 
double precision, parameter :: xn29_02 = -0.2113522861660011d0 
double precision, parameter :: xn29_01 = -0.1062782301326793d0 
double precision, parameter :: xp29_01 = +0.1062782301326790d0 
double precision, parameter :: xp29_02 = +0.2113522861660007d0 
double precision, parameter :: xp29_03 = +0.3140316378676398d0 
double precision, parameter :: xp29_04 = +0.4131528881740084d0 
double precision, parameter :: xp29_05 = +0.5075929551242276d0 
double precision, parameter :: xp29_06 = +0.5962817971382283d0 
double precision, parameter :: xp29_07 = +0.6782145376026869d0 
double precision, parameter :: xp29_08 = +0.7524628517344771d0 
double precision, parameter :: xp29_09 = +0.8181854876152523d0 
double precision, parameter :: xp29_10 = +0.8746378049201031d0 
double precision, parameter :: xp29_11 = +0.9211802329530587d0 
double precision, parameter :: xp29_12 = +0.9572855957780879d0 
double precision, parameter :: xp29_13 = +0.9825455052614133d0 
double precision, parameter :: xp29_14 = +0.9966794422605963d0 

! Gauss-Legendre weights, order =   30
double precision, parameter :: wt30_01 = 0.1028526528935583d0 
double precision, parameter :: wt30_02 = 0.1017623897484056d0 
double precision, parameter :: wt30_03 = 0.0995934205867946d0 
double precision, parameter :: wt30_04 = 0.0963687371746448d0 
double precision, parameter :: wt30_05 = 0.0921225222377850d0 
double precision, parameter :: wt30_06 = 0.0868997872010841d0 
double precision, parameter :: wt30_07 = 0.0807558952294208d0 
double precision, parameter :: wt30_08 = 0.0737559747377049d0 
double precision, parameter :: wt30_09 = 0.0659742298821806d0 
double precision, parameter :: wt30_10 = 0.0574931562176189d0 
double precision, parameter :: wt30_11 = 0.0484026728305955d0 
double precision, parameter :: wt30_12 = 0.0387991925696263d0 
double precision, parameter :: wt30_13 = 0.0287847078833232d0 
double precision, parameter :: wt30_14 = 0.0184664683110913d0 
double precision, parameter :: wt30_15 = 0.0079681924961665d0 
! Gauss-Legendre abscissae, order =   30
double precision, parameter :: xn30_15 = -0.9968934840746496d0 
double precision, parameter :: xn30_14 = -0.9836681232797473d0 
double precision, parameter :: xn30_13 = -0.9600218649683073d0 
double precision, parameter :: xn30_12 = -0.9262000474292745d0 
double precision, parameter :: xn30_11 = -0.8825605357920528d0 
double precision, parameter :: xn30_10 = -0.8295657623827685d0 
double precision, parameter :: xn30_09 = -0.7677774321048264d0 
double precision, parameter :: xn30_08 = -0.6978504947933157d0 
double precision, parameter :: xn30_07 = -0.6205261829892432d0 
double precision, parameter :: xn30_06 = -0.5366241481420201d0 
double precision, parameter :: xn30_05 = -0.4470337695380894d0 
double precision, parameter :: xn30_04 = -0.3527047255308782d0 
double precision, parameter :: xn30_03 = -0.2546369261678900d0 
double precision, parameter :: xn30_02 = -0.1538699136085838d0 
double precision, parameter :: xn30_01 = -0.0514718425553180d0 
double precision, parameter :: xp30_01 = +0.0514718425553181d0 
double precision, parameter :: xp30_02 = +0.1538699136085840d0 
double precision, parameter :: xp30_03 = +0.2546369261678900d0 
double precision, parameter :: xp30_04 = +0.3527047255308782d0 
double precision, parameter :: xp30_05 = +0.4470337695380892d0 
double precision, parameter :: xp30_06 = +0.5366241481420201d0 
double precision, parameter :: xp30_07 = +0.6205261829892429d0 
double precision, parameter :: xp30_08 = +0.6978504947933157d0 
double precision, parameter :: xp30_09 = +0.7677774321048264d0 
double precision, parameter :: xp30_10 = +0.8295657623827686d0 
double precision, parameter :: xp30_11 = +0.8825605357920527d0 
double precision, parameter :: xp30_12 = +0.9262000474292740d0 
double precision, parameter :: xp30_13 = +0.9600218649683077d0 
double precision, parameter :: xp30_14 = +0.9836681232797473d0 
double precision, parameter :: xp30_15 = +0.9968934840746494d0 

! Gauss-Legendre weights, order =   31
double precision, parameter :: wt31_00 = 0.0997205447934266d0 
double precision, parameter :: wt31_01 = 0.0992250112266709d0 
double precision, parameter :: wt31_02 = 0.0977433353863280d0 
double precision, parameter :: wt31_03 = 0.0952902429123195d0 
double precision, parameter :: wt31_04 = 0.0918901138936416d0 
double precision, parameter :: wt31_05 = 0.0875767406084791d0 
double precision, parameter :: wt31_06 = 0.0823929917615894d0 
double precision, parameter :: wt31_07 = 0.0763903865987768d0 
double precision, parameter :: wt31_08 = 0.0696285832354099d0 
double precision, parameter :: wt31_09 = 0.0621747865610276d0 
double precision, parameter :: wt31_10 = 0.0541030824249167d0 
double precision, parameter :: wt31_11 = 0.0454937075272009d0 
double precision, parameter :: wt31_12 = 0.0364322739123866d0 
double precision, parameter :: wt31_13 = 0.0270090191849787d0 
double precision, parameter :: wt31_14 = 0.0173186207903110d0 
double precision, parameter :: wt31_15 = 0.0074708315792484d0 
! Gauss-Legendre abscissae, order =   31
double precision, parameter :: xn31_15 = -0.9970874818194769d0 
double precision, parameter :: xn31_14 = -0.9846859096651520d0 
double precision, parameter :: xn31_13 = -0.9625039250929499d0 
double precision, parameter :: xn31_12 = -0.9307569978966479d0 
double precision, parameter :: xn31_11 = -0.8897600299482711d0 
double precision, parameter :: xn31_10 = -0.8399203201462674d0 
double precision, parameter :: xn31_09 = -0.7817331484166247d0 
double precision, parameter :: xn31_08 = -0.7157767845868533d0 
double precision, parameter :: xn31_07 = -0.6427067229242603d0 
double precision, parameter :: xn31_06 = -0.5632491614071492d0 
double precision, parameter :: xn31_05 = -0.4781937820449024d0 
double precision, parameter :: xn31_04 = -0.3883859016082330d0 
double precision, parameter :: xn31_03 = -0.2947180699817016d0 
double precision, parameter :: xn31_02 = -0.1981211993355711d0 
double precision, parameter :: xn31_01 = -0.0995553121523416d0 
double precision, parameter :: xp31_01 = +0.0995553121523415d0 
double precision, parameter :: xp31_02 = +0.1981211993355706d0 
double precision, parameter :: xp31_03 = +0.2947180699817015d0 
double precision, parameter :: xp31_04 = +0.3883859016082329d0 
double precision, parameter :: xp31_05 = +0.4781937820449020d0 
double precision, parameter :: xp31_06 = +0.5632491614071493d0 
double precision, parameter :: xp31_07 = +0.6427067229242601d0 
double precision, parameter :: xp31_08 = +0.7157767845868530d0 
double precision, parameter :: xp31_09 = +0.7817331484166246d0 
double precision, parameter :: xp31_10 = +0.8399203201462675d0 
double precision, parameter :: xp31_11 = +0.8897600299482712d0 
double precision, parameter :: xp31_12 = +0.9307569978966479d0 
double precision, parameter :: xp31_13 = +0.9625039250929497d0 
double precision, parameter :: xp31_14 = +0.9846859096651527d0 
double precision, parameter :: xp31_15 = +0.9970874818194768d0 

! Gauss-Legendre weights, order =   32
double precision, parameter :: wt32_01 = 0.0965400885147275d0 
double precision, parameter :: wt32_02 = 0.0956387200792749d0 
double precision, parameter :: wt32_03 = 0.0938443990808046d0 
double precision, parameter :: wt32_04 = 0.0911738786957628d0 
double precision, parameter :: wt32_05 = 0.0876520930044037d0 
double precision, parameter :: wt32_06 = 0.0833119242269474d0 
double precision, parameter :: wt32_07 = 0.0781938957870695d0 
double precision, parameter :: wt32_08 = 0.0723457941088490d0 
double precision, parameter :: wt32_09 = 0.0658222227763622d0 
double precision, parameter :: wt32_10 = 0.0586840934785361d0 
double precision, parameter :: wt32_11 = 0.0509980592623757d0 
double precision, parameter :: wt32_12 = 0.0428358980222272d0 
double precision, parameter :: wt32_13 = 0.0342738629130216d0 
double precision, parameter :: wt32_14 = 0.0253920653092625d0 
double precision, parameter :: wt32_15 = 0.0162743947309049d0 
double precision, parameter :: wt32_16 = 0.0070186100094700d0 
! Gauss-Legendre abscissae, order =   32
double precision, parameter :: xn32_16 = -0.9972638618494812d0 
double precision, parameter :: xn32_15 = -0.9856115115452683d0 
double precision, parameter :: xn32_14 = -0.9647622555875058d0 
double precision, parameter :: xn32_13 = -0.9349060759377396d0 
double precision, parameter :: xn32_12 = -0.8963211557660526d0 
double precision, parameter :: xn32_11 = -0.8493676137325703d0 
double precision, parameter :: xn32_10 = -0.7944837959679425d0 
double precision, parameter :: xn32_09 = -0.7321821187402898d0 
double precision, parameter :: xn32_08 = -0.6630442669302152d0 
double precision, parameter :: xn32_07 = -0.5877157572407617d0 
double precision, parameter :: xn32_06 = -0.5068999089322294d0 
double precision, parameter :: xn32_05 = -0.4213512761306356d0 
double precision, parameter :: xn32_04 = -0.3318686022821279d0 
double precision, parameter :: xn32_03 = -0.2392873622521370d0 
double precision, parameter :: xn32_02 = -0.1444719615827965d0 
double precision, parameter :: xn32_01 = -0.0483076656877384d0 
double precision, parameter :: xp32_01 = +0.0483076656877379d0 
double precision, parameter :: xp32_02 = +0.1444719615827965d0 
double precision, parameter :: xp32_03 = +0.2392873622521368d0 
double precision, parameter :: xp32_04 = +0.3318686022821276d0 
double precision, parameter :: xp32_05 = +0.4213512761306354d0 
double precision, parameter :: xp32_06 = +0.5068999089322289d0 
double precision, parameter :: xp32_07 = +0.5877157572407623d0 
double precision, parameter :: xp32_08 = +0.6630442669302151d0 
double precision, parameter :: xp32_09 = +0.7321821187402897d0 
double precision, parameter :: xp32_10 = +0.7944837959679426d0 
double precision, parameter :: xp32_11 = +0.8493676137325702d0 
double precision, parameter :: xp32_12 = +0.8963211557660522d0 
double precision, parameter :: xp32_13 = +0.9349060759377400d0 
double precision, parameter :: xp32_14 = +0.9647622555875065d0 
double precision, parameter :: xp32_15 = +0.9856115115452683d0 
double precision, parameter :: xp32_16 = +0.9972638618494817d0 


contains

double precision function ellgauss(a,b,nx,func,npar,par,verbose)
!
! Gaussian quadrature of a user specified function defined over an elliptical
! region x^2/a^2 + y^2/b^2 = 1.
!
! For invalid input the function returns the value bad_dble
!
! User supplied function FUNC is called as FUNC(X, Y, NPAR, PAR, VERBOSE-1).
!
! NX specifies the number of integration points on the x-axis. 
! Valid values of NX are 4, 8, 16 or 32
! Integration scheme assumes a and b are approximately equal.
!
implicit none
integer, intent(in)  :: nx, npar, verbose
double precision, intent(in) :: a, b, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

if (verbose >=  v_debug) print *,'ellgauss: a,b,nx,npar =',a,b,nx,npar

select case(nx)

case(4)
 ellgauss = b*(wt04_01*(ellgauss04(a,b,b*xn04_01,func,npar,par,verbose-1)  &
                       +ellgauss04(a,b,b*xp04_01,func,npar,par,verbose-1)) &
              +wt04_02*(ellgauss02(a,b,b*xn04_02,func,npar,par,verbose-1)  &
                       +ellgauss02(a,b,b*xp04_02,func,npar,par,verbose-1)) )
case(8)
 ellgauss = b*(wt08_01*(ellgauss08(a,b,b*xn08_01,func,npar,par,verbose-1)  &
                       +ellgauss08(a,b,b*xp08_01,func,npar,par,verbose-1)) &
              +wt08_02*(ellgauss07(a,b,b*xn08_02,func,npar,par,verbose-1)  &
                       +ellgauss07(a,b,b*xp08_02,func,npar,par,verbose-1)) &
              +wt08_03*(ellgauss05(a,b,b*xn08_03,func,npar,par,verbose-1)  &
                       +ellgauss05(a,b,b*xp08_03,func,npar,par,verbose-1)) &
              +wt08_04*(ellgauss02(a,b,b*xn08_04,func,npar,par,verbose-1)  &
                       +ellgauss02(a,b,b*xp08_04,func,npar,par,verbose-1)) )
case(16)
 ellgauss = b*(wt16_01*(ellgauss16(a,b,b*xn16_01,func,npar,par,verbose-1)  &
                       +ellgauss16(a,b,b*xp16_01,func,npar,par,verbose-1)) &
              +wt16_02*(ellgauss15(a,b,b*xn16_02,func,npar,par,verbose-1)  &
                       +ellgauss15(a,b,b*xp16_02,func,npar,par,verbose-1)) &
              +wt16_03*(ellgauss14(a,b,b*xn16_03,func,npar,par,verbose-1)  &
                       +ellgauss14(a,b,b*xp16_03,func,npar,par,verbose-1)) &
              +wt16_04*(ellgauss13(a,b,b*xn16_04,func,npar,par,verbose-1)  &
                       +ellgauss13(a,b,b*xp16_04,func,npar,par,verbose-1)) &
              +wt16_05*(ellgauss10(a,b,b*xn16_05,func,npar,par,verbose-1)  &
                       +ellgauss10(a,b,b*xp16_05,func,npar,par,verbose-1)) &
              +wt16_06*(ellgauss08(a,b,b*xn16_06,func,npar,par,verbose-1)  &
                       +ellgauss08(a,b,b*xp16_06,func,npar,par,verbose-1)) &
              +wt16_07*(ellgauss05(a,b,b*xn16_07,func,npar,par,verbose-1)  &
                       +ellgauss05(a,b,b*xp16_07,func,npar,par,verbose-1)) &
              +wt16_08*(ellgauss02(a,b,b*xn16_08,func,npar,par,verbose-1)  &
                       +ellgauss02(a,b,b*xp16_08,func,npar,par,verbose-1)) )

case(24)
 ellgauss = b*(wt24_01*(ellgauss24(a,b,b*xn24_01,func,npar,par,verbose-1)  &
                       +ellgauss24(a,b,b*xp24_01,func,npar,par,verbose-1)) &
              +wt24_02*(ellgauss24(a,b,b*xn24_02,func,npar,par,verbose-1)  &
                       +ellgauss24(a,b,b*xp24_02,func,npar,par,verbose-1)) &
              +wt24_03*(ellgauss23(a,b,b*xn24_03,func,npar,par,verbose-1)  &
                       +ellgauss23(a,b,b*xp24_03,func,npar,par,verbose-1)) &
              +wt24_04*(ellgauss22(a,b,b*xn24_04,func,npar,par,verbose-1)  &
                       +ellgauss22(a,b,b*xp24_04,func,npar,par,verbose-1)) &
              +wt24_05*(ellgauss20(a,b,b*xn24_05,func,npar,par,verbose-1)  &
                       +ellgauss20(a,b,b*xp24_05,func,npar,par,verbose-1)) &
              +wt24_06*(ellgauss18(a,b,b*xn24_06,func,npar,par,verbose-1)  &
                       +ellgauss18(a,b,b*xp24_06,func,npar,par,verbose-1)) &
              +wt24_07*(ellgauss16(a,b,b*xn24_07,func,npar,par,verbose-1)  &
                       +ellgauss16(a,b,b*xp24_07,func,npar,par,verbose-1)) &
              +wt24_08*(ellgauss14(a,b,b*xn24_08,func,npar,par,verbose-1)  &
                       +ellgauss14(a,b,b*xp24_08,func,npar,par,verbose-1)) &
              +wt24_09*(ellgauss11(a,b,b*xn24_09,func,npar,par,verbose-1)  &
                       +ellgauss11(a,b,b*xp24_09,func,npar,par,verbose-1)) &
              +wt24_10*(ellgauss08(a,b,b*xn24_10,func,npar,par,verbose-1)  &
                       +ellgauss08(a,b,b*xp24_10,func,npar,par,verbose-1)) &
              +wt24_11*(ellgauss05(a,b,b*xn24_11,func,npar,par,verbose-1)  &
                       +ellgauss05(a,b,b*xp24_11,func,npar,par,verbose-1)) &
              +wt24_12*(ellgauss02(a,b,b*xn24_12,func,npar,par,verbose-1)  &
                       +ellgauss02(a,b,b*xp24_12,func,npar,par,verbose-1)) )

case(32)
 ellgauss = b*(wt32_01*(ellgauss32(a,b,b*xn32_01,func,npar,par,verbose-1)  &
                       +ellgauss32(a,b,b*xp32_01,func,npar,par,verbose-1)) &
              +wt32_02*(ellgauss32(a,b,b*xn32_02,func,npar,par,verbose-1)  &
                       +ellgauss32(a,b,b*xp32_02,func,npar,par,verbose-1)) &
              +wt32_03*(ellgauss31(a,b,b*xn32_03,func,npar,par,verbose-1)  &
                       +ellgauss31(a,b,b*xp32_03,func,npar,par,verbose-1)) &
              +wt32_04*(ellgauss30(a,b,b*xn32_04,func,npar,par,verbose-1)  &
                       +ellgauss30(a,b,b*xp32_04,func,npar,par,verbose-1)) &
              +wt32_05*(ellgauss29(a,b,b*xn32_05,func,npar,par,verbose-1)  &
                       +ellgauss29(a,b,b*xp32_05,func,npar,par,verbose-1)) &
              +wt32_06*(ellgauss28(a,b,b*xn32_06,func,npar,par,verbose-1)  &
                       +ellgauss28(a,b,b*xp32_06,func,npar,par,verbose-1)) &
              +wt32_07*(ellgauss26(a,b,b*xn32_07,func,npar,par,verbose-1)  &
                       +ellgauss26(a,b,b*xp32_07,func,npar,par,verbose-1)) &
              +wt32_08*(ellgauss24(a,b,b*xn32_08,func,npar,par,verbose-1)  &
                       +ellgauss24(a,b,b*xp32_08,func,npar,par,verbose-1)) &
              +wt32_09*(ellgauss22(a,b,b*xn32_09,func,npar,par,verbose-1)  &
                       +ellgauss22(a,b,b*xp32_09,func,npar,par,verbose-1)) &
              +wt32_10*(ellgauss19(a,b,b*xn32_10,func,npar,par,verbose-1)  &
                       +ellgauss19(a,b,b*xp32_10,func,npar,par,verbose-1)) &
              +wt32_11*(ellgauss17(a,b,b*xn32_11,func,npar,par,verbose-1)  &
                       +ellgauss17(a,b,b*xp32_11,func,npar,par,verbose-1)) &
              +wt32_12*(ellgauss14(a,b,b*xn32_12,func,npar,par,verbose-1)  &
                       +ellgauss14(a,b,b*xp32_12,func,npar,par,verbose-1)) &
              +wt32_13*(ellgauss11(a,b,b*xn32_13,func,npar,par,verbose-1)  &
                       +ellgauss11(a,b,b*xp32_13,func,npar,par,verbose-1)) &
              +wt32_14*(ellgauss08(a,b,b*xn32_14,func,npar,par,verbose-1)  &
                       +ellgauss08(a,b,b*xp32_14,func,npar,par,verbose-1)) &
              +wt32_15*(ellgauss05(a,b,b*xn32_15,func,npar,par,verbose-1)  &
                       +ellgauss05(a,b,b*xp32_15,func,npar,par,verbose-1)) &
              +wt32_16*(ellgauss02(a,b,b*xn32_16,func,npar,par,verbose-1)  &
                       +ellgauss02(a,b,b*xp32_16,func,npar,par,verbose-1)) )
                                                                          
case default
 if (verbose.gt.0) then
  print *,'ellgauss called with unimplemented value of nx ',nx
 endif
 ellgauss = bad_dble
 stop
end select

end function ellgauss

!-------------------------------------------------------------------------------

double precision function gauss2d(nx,func,ax,bx,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
!
! Gauss-Legendre integration over of 2-dimensional region over the 
! user-supplied function func(x, y, np, p, verbose-1). The limits of the 
! integration region are x = [ax,bx] and y = [fay(x,nyp,yp), fby(x,nyp,yp)]
! 
! The number of integration points in x in nx
! The number of integration points in y is set by the nx times ratio of the x
! and y integration limits, but is at least nymin and no more than 
! min(nymax, 32).
!
implicit none
integer, intent(in)  :: nx, nyp, np, nymin, nymax, verbose
double precision, intent(in) :: ax, bx, yp(nyp), p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
    implicit none
    double precision             :: func
    double precision, intent(in) :: fx
    double precision, intent(in) :: fy
    integer, intent(in)  :: fnpar
    double precision, intent(in) :: fpar(fnpar)
    integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
double precision :: x0, xs

x0 = 0.5d0 *(ax+bx)
xs = 0.5d0 *(bx-ax)
if (verbose >= v_debug) print *,'gauss2d:ax,bx,nx,np=',ax,bx,nx,np
select case(nx)
case(1)
 gauss2d = gaussx01(func,x0,xs,fay,fby,nyp,yp,np,p,verbose)
case(2)
  gauss2d = gaussx02(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(3)
  gauss2d = gaussx03(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(4)
  gauss2d = gaussx04(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(5)
  gauss2d = gaussx05(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(6)
  gauss2d = gaussx06(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(7)
  gauss2d = gaussx07(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(8)
  gauss2d = gaussx08(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(9)
  gauss2d = gaussx09(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(10)
  gauss2d = gaussx10(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(11)
  gauss2d = gaussx11(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(12)
  gauss2d = gaussx12(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(13)
  gauss2d = gaussx13(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(14)
  gauss2d = gaussx14(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(15)
  gauss2d = gaussx15(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(16)
  gauss2d = gaussx16(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(17)
  gauss2d = gaussx17(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(18)
  gauss2d = gaussx18(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(19)
  gauss2d = gaussx19(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(20)
  gauss2d = gaussx20(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(21)
  gauss2d = gaussx21(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(22)
  gauss2d = gaussx22(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(23)
  gauss2d = gaussx23(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(24)
  gauss2d = gaussx24(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(25)
  gauss2d = gaussx25(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(26)
  gauss2d = gaussx26(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(27)
  gauss2d = gaussx27(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(28)
  gauss2d = gaussx28(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(29)
  gauss2d = gaussx29(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(30)
  gauss2d = gaussx30(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(31)
  gauss2d = gaussx31(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case(32)
  gauss2d = gaussx32(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
case default
 print *,'invalid value of nx in gauss2d',nx
 stop
end select
return
end function gauss2d

!-------------------------------------------------------------------------------

double precision function g2help(xx,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nn,nyp,np,nymin,nymax,verbose
double precision, intent(in) :: xx,x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
    implicit none
    double precision             :: func
    double precision, intent(in) :: fx
    double precision, intent(in) :: fy
    integer, intent(in)  :: fnpar
    double precision, intent(in) :: fpar(fnpar)
    integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
double precision :: x, ay,by
integer  :: ny

x = x0+xx*xs
ay = fay(x, nyp, yp)
by = fby(x, nyp, yp)
if ((ay == bad_dble).or.(by == bad_dble)) then
  g2help = bad_dble
  return
endif
ny = min(max(nymin, nint(0.5d0 *dble(nn)*abs((by-ay)/xs))), &
         min(nymax,n_order_max))
if (verbose >= v_debug) print *,'g2help: x, ay, by, ny',x, ay, by, ny
g2help = gaussyn(ny,x,func,ay,by,np,p,verbose)
return

end function g2help

!-------------------------------------------------------------------------------

double precision function gaussyn(n,x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: n, np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
    implicit none
    double precision             :: func
    double precision, intent(in) :: fx
    double precision, intent(in) :: fy
    integer, intent(in)  :: fnpar
    double precision, intent(in) :: fpar(fnpar)
    integer, intent(in)  :: fverbose
  end function func
end interface

select case (n)
case(1)
 gaussyn = func(x,0.5d0 *(a+b),np,p,verbose-1)*(b-a)
case(2)
  gaussyn = gaussy02(x,func,a,b,np,p,verbose)
case(3)
  gaussyn = gaussy03(x,func,a,b,np,p,verbose)
case(4)
  gaussyn = gaussy04(x,func,a,b,np,p,verbose)
case(5)
  gaussyn = gaussy05(x,func,a,b,np,p,verbose)
case(6)
  gaussyn = gaussy06(x,func,a,b,np,p,verbose)
case(7)
  gaussyn = gaussy07(x,func,a,b,np,p,verbose)
case(8)
  gaussyn = gaussy08(x,func,a,b,np,p,verbose)
case(9)
  gaussyn = gaussy09(x,func,a,b,np,p,verbose)
case(10)
  gaussyn = gaussy10(x,func,a,b,np,p,verbose)
case(11)
  gaussyn = gaussy11(x,func,a,b,np,p,verbose)
case(12)
  gaussyn = gaussy12(x,func,a,b,np,p,verbose)
case(13)
  gaussyn = gaussy13(x,func,a,b,np,p,verbose)
case(14)
  gaussyn = gaussy14(x,func,a,b,np,p,verbose)
case(15)
  gaussyn = gaussy15(x,func,a,b,np,p,verbose)
case(16)
  gaussyn = gaussy16(x,func,a,b,np,p,verbose)
case(17)
  gaussyn = gaussy17(x,func,a,b,np,p,verbose)
case(18)
  gaussyn = gaussy18(x,func,a,b,np,p,verbose)
case(19)
  gaussyn = gaussy19(x,func,a,b,np,p,verbose)
case(20)
  gaussyn = gaussy20(x,func,a,b,np,p,verbose)
case(21)
  gaussyn = gaussy21(x,func,a,b,np,p,verbose)
case(22)
  gaussyn = gaussy22(x,func,a,b,np,p,verbose)
case(23)
  gaussyn = gaussy23(x,func,a,b,np,p,verbose)
case(24)
  gaussyn = gaussy24(x,func,a,b,np,p,verbose)
case(25)
  gaussyn = gaussy25(x,func,a,b,np,p,verbose)
case(26)
  gaussyn = gaussy26(x,func,a,b,np,p,verbose)
case(27)
  gaussyn = gaussy27(x,func,a,b,np,p,verbose)
case(28)
  gaussyn = gaussy28(x,func,a,b,np,p,verbose)
case(29)
  gaussyn = gaussy29(x,func,a,b,np,p,verbose)
case(30)
  gaussyn = gaussy30(x,func,a,b,np,p,verbose)
case(31)
  gaussyn = gaussy31(x,func,a,b,np,p,verbose)
case(32)
  gaussyn = gaussy32(x,func,a,b,np,p,verbose)
case default
 print *,'Invalid value of N in gaussyn',N
 stop
end select
return
end function gaussyn

!----------------------------------------------------------------------------
!------------------------------------------------------------------------------

double precision function ellgauss01(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss01 = wt01_00*func(0.0d0 ,yc,npar,par,verbose-1)*xr

end function ellgauss01

!------------------------------------------------------------------------------

double precision function ellgauss02(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss02 = ( &
 wt02_01*(func(xr*xn02_01,yc,npar,par,verbose-1) + &
          func(xr*xp02_01,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss02

!------------------------------------------------------------------------------

double precision function ellgauss03(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss03 = (wt03_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt03_01*(func(xr*xn03_01,yc,npar,par,verbose-1) + &
          func(xr*xp03_01,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss03

!------------------------------------------------------------------------------

double precision function ellgauss04(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss04 = ( &
 wt04_01*(func(xr*xn04_01,yc,npar,par,verbose-1) + &
          func(xr*xp04_01,yc,npar,par,verbose-1) ) + &
 wt04_02*(func(xr*xn04_02,yc,npar,par,verbose-1) + &
          func(xr*xp04_02,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss04

!------------------------------------------------------------------------------

double precision function ellgauss05(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss05 = (wt05_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt05_01*(func(xr*xn05_01,yc,npar,par,verbose-1) + &
          func(xr*xp05_01,yc,npar,par,verbose-1) ) + &
 wt05_02*(func(xr*xn05_02,yc,npar,par,verbose-1) + &
          func(xr*xp05_02,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss05

!------------------------------------------------------------------------------

double precision function ellgauss06(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss06 = ( &
 wt06_01*(func(xr*xn06_01,yc,npar,par,verbose-1) + &
          func(xr*xp06_01,yc,npar,par,verbose-1) ) + &
 wt06_02*(func(xr*xn06_02,yc,npar,par,verbose-1) + &
          func(xr*xp06_02,yc,npar,par,verbose-1) ) + &
 wt06_03*(func(xr*xn06_03,yc,npar,par,verbose-1) + &
          func(xr*xp06_03,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss06

!------------------------------------------------------------------------------

double precision function ellgauss07(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss07 = (wt07_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt07_01*(func(xr*xn07_01,yc,npar,par,verbose-1) + &
          func(xr*xp07_01,yc,npar,par,verbose-1) ) + &
 wt07_02*(func(xr*xn07_02,yc,npar,par,verbose-1) + &
          func(xr*xp07_02,yc,npar,par,verbose-1) ) + &
 wt07_03*(func(xr*xn07_03,yc,npar,par,verbose-1) + &
          func(xr*xp07_03,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss07

!------------------------------------------------------------------------------

double precision function ellgauss08(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss08 = ( &
 wt08_01*(func(xr*xn08_01,yc,npar,par,verbose-1) + &
          func(xr*xp08_01,yc,npar,par,verbose-1) ) + &
 wt08_02*(func(xr*xn08_02,yc,npar,par,verbose-1) + &
          func(xr*xp08_02,yc,npar,par,verbose-1) ) + &
 wt08_03*(func(xr*xn08_03,yc,npar,par,verbose-1) + &
          func(xr*xp08_03,yc,npar,par,verbose-1) ) + &
 wt08_04*(func(xr*xn08_04,yc,npar,par,verbose-1) + &
          func(xr*xp08_04,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss08

!------------------------------------------------------------------------------

double precision function ellgauss09(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss09 = (wt09_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt09_01*(func(xr*xn09_01,yc,npar,par,verbose-1) + &
          func(xr*xp09_01,yc,npar,par,verbose-1) ) + &
 wt09_02*(func(xr*xn09_02,yc,npar,par,verbose-1) + &
          func(xr*xp09_02,yc,npar,par,verbose-1) ) + &
 wt09_03*(func(xr*xn09_03,yc,npar,par,verbose-1) + &
          func(xr*xp09_03,yc,npar,par,verbose-1) ) + &
 wt09_04*(func(xr*xn09_04,yc,npar,par,verbose-1) + &
          func(xr*xp09_04,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss09

!------------------------------------------------------------------------------

double precision function ellgauss10(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss10 = ( &
 wt10_01*(func(xr*xn10_01,yc,npar,par,verbose-1) + &
          func(xr*xp10_01,yc,npar,par,verbose-1) ) + &
 wt10_02*(func(xr*xn10_02,yc,npar,par,verbose-1) + &
          func(xr*xp10_02,yc,npar,par,verbose-1) ) + &
 wt10_03*(func(xr*xn10_03,yc,npar,par,verbose-1) + &
          func(xr*xp10_03,yc,npar,par,verbose-1) ) + &
 wt10_04*(func(xr*xn10_04,yc,npar,par,verbose-1) + &
          func(xr*xp10_04,yc,npar,par,verbose-1) ) + &
 wt10_05*(func(xr*xn10_05,yc,npar,par,verbose-1) + &
          func(xr*xp10_05,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss10

!------------------------------------------------------------------------------

double precision function ellgauss11(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss11 = (wt11_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt11_01*(func(xr*xn11_01,yc,npar,par,verbose-1) + &
          func(xr*xp11_01,yc,npar,par,verbose-1) ) + &
 wt11_02*(func(xr*xn11_02,yc,npar,par,verbose-1) + &
          func(xr*xp11_02,yc,npar,par,verbose-1) ) + &
 wt11_03*(func(xr*xn11_03,yc,npar,par,verbose-1) + &
          func(xr*xp11_03,yc,npar,par,verbose-1) ) + &
 wt11_04*(func(xr*xn11_04,yc,npar,par,verbose-1) + &
          func(xr*xp11_04,yc,npar,par,verbose-1) ) + &
 wt11_05*(func(xr*xn11_05,yc,npar,par,verbose-1) + &
          func(xr*xp11_05,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss11

!------------------------------------------------------------------------------

double precision function ellgauss12(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss12 = ( &
 wt12_01*(func(xr*xn12_01,yc,npar,par,verbose-1) + &
          func(xr*xp12_01,yc,npar,par,verbose-1) ) + &
 wt12_02*(func(xr*xn12_02,yc,npar,par,verbose-1) + &
          func(xr*xp12_02,yc,npar,par,verbose-1) ) + &
 wt12_03*(func(xr*xn12_03,yc,npar,par,verbose-1) + &
          func(xr*xp12_03,yc,npar,par,verbose-1) ) + &
 wt12_04*(func(xr*xn12_04,yc,npar,par,verbose-1) + &
          func(xr*xp12_04,yc,npar,par,verbose-1) ) + &
 wt12_05*(func(xr*xn12_05,yc,npar,par,verbose-1) + &
          func(xr*xp12_05,yc,npar,par,verbose-1) ) + &
 wt12_06*(func(xr*xn12_06,yc,npar,par,verbose-1) + &
          func(xr*xp12_06,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss12

!------------------------------------------------------------------------------

double precision function ellgauss13(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss13 = (wt13_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt13_01*(func(xr*xn13_01,yc,npar,par,verbose-1) + &
          func(xr*xp13_01,yc,npar,par,verbose-1) ) + &
 wt13_02*(func(xr*xn13_02,yc,npar,par,verbose-1) + &
          func(xr*xp13_02,yc,npar,par,verbose-1) ) + &
 wt13_03*(func(xr*xn13_03,yc,npar,par,verbose-1) + &
          func(xr*xp13_03,yc,npar,par,verbose-1) ) + &
 wt13_04*(func(xr*xn13_04,yc,npar,par,verbose-1) + &
          func(xr*xp13_04,yc,npar,par,verbose-1) ) + &
 wt13_05*(func(xr*xn13_05,yc,npar,par,verbose-1) + &
          func(xr*xp13_05,yc,npar,par,verbose-1) ) + &
 wt13_06*(func(xr*xn13_06,yc,npar,par,verbose-1) + &
          func(xr*xp13_06,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss13

!------------------------------------------------------------------------------

double precision function ellgauss14(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss14 = ( &
 wt14_01*(func(xr*xn14_01,yc,npar,par,verbose-1) + &
          func(xr*xp14_01,yc,npar,par,verbose-1) ) + &
 wt14_02*(func(xr*xn14_02,yc,npar,par,verbose-1) + &
          func(xr*xp14_02,yc,npar,par,verbose-1) ) + &
 wt14_03*(func(xr*xn14_03,yc,npar,par,verbose-1) + &
          func(xr*xp14_03,yc,npar,par,verbose-1) ) + &
 wt14_04*(func(xr*xn14_04,yc,npar,par,verbose-1) + &
          func(xr*xp14_04,yc,npar,par,verbose-1) ) + &
 wt14_05*(func(xr*xn14_05,yc,npar,par,verbose-1) + &
          func(xr*xp14_05,yc,npar,par,verbose-1) ) + &
 wt14_06*(func(xr*xn14_06,yc,npar,par,verbose-1) + &
          func(xr*xp14_06,yc,npar,par,verbose-1) ) + &
 wt14_07*(func(xr*xn14_07,yc,npar,par,verbose-1) + &
          func(xr*xp14_07,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss14

!------------------------------------------------------------------------------

double precision function ellgauss15(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss15 = (wt15_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt15_01*(func(xr*xn15_01,yc,npar,par,verbose-1) + &
          func(xr*xp15_01,yc,npar,par,verbose-1) ) + &
 wt15_02*(func(xr*xn15_02,yc,npar,par,verbose-1) + &
          func(xr*xp15_02,yc,npar,par,verbose-1) ) + &
 wt15_03*(func(xr*xn15_03,yc,npar,par,verbose-1) + &
          func(xr*xp15_03,yc,npar,par,verbose-1) ) + &
 wt15_04*(func(xr*xn15_04,yc,npar,par,verbose-1) + &
          func(xr*xp15_04,yc,npar,par,verbose-1) ) + &
 wt15_05*(func(xr*xn15_05,yc,npar,par,verbose-1) + &
          func(xr*xp15_05,yc,npar,par,verbose-1) ) + &
 wt15_06*(func(xr*xn15_06,yc,npar,par,verbose-1) + &
          func(xr*xp15_06,yc,npar,par,verbose-1) ) + &
 wt15_07*(func(xr*xn15_07,yc,npar,par,verbose-1) + &
          func(xr*xp15_07,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss15

!------------------------------------------------------------------------------

double precision function ellgauss16(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss16 = ( &
 wt16_01*(func(xr*xn16_01,yc,npar,par,verbose-1) + &
          func(xr*xp16_01,yc,npar,par,verbose-1) ) + &
 wt16_02*(func(xr*xn16_02,yc,npar,par,verbose-1) + &
          func(xr*xp16_02,yc,npar,par,verbose-1) ) + &
 wt16_03*(func(xr*xn16_03,yc,npar,par,verbose-1) + &
          func(xr*xp16_03,yc,npar,par,verbose-1) ) + &
 wt16_04*(func(xr*xn16_04,yc,npar,par,verbose-1) + &
          func(xr*xp16_04,yc,npar,par,verbose-1) ) + &
 wt16_05*(func(xr*xn16_05,yc,npar,par,verbose-1) + &
          func(xr*xp16_05,yc,npar,par,verbose-1) ) + &
 wt16_06*(func(xr*xn16_06,yc,npar,par,verbose-1) + &
          func(xr*xp16_06,yc,npar,par,verbose-1) ) + &
 wt16_07*(func(xr*xn16_07,yc,npar,par,verbose-1) + &
          func(xr*xp16_07,yc,npar,par,verbose-1) ) + &
 wt16_08*(func(xr*xn16_08,yc,npar,par,verbose-1) + &
          func(xr*xp16_08,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss16

!------------------------------------------------------------------------------

double precision function ellgauss17(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss17 = (wt17_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt17_01*(func(xr*xn17_01,yc,npar,par,verbose-1) + &
          func(xr*xp17_01,yc,npar,par,verbose-1) ) + &
 wt17_02*(func(xr*xn17_02,yc,npar,par,verbose-1) + &
          func(xr*xp17_02,yc,npar,par,verbose-1) ) + &
 wt17_03*(func(xr*xn17_03,yc,npar,par,verbose-1) + &
          func(xr*xp17_03,yc,npar,par,verbose-1) ) + &
 wt17_04*(func(xr*xn17_04,yc,npar,par,verbose-1) + &
          func(xr*xp17_04,yc,npar,par,verbose-1) ) + &
 wt17_05*(func(xr*xn17_05,yc,npar,par,verbose-1) + &
          func(xr*xp17_05,yc,npar,par,verbose-1) ) + &
 wt17_06*(func(xr*xn17_06,yc,npar,par,verbose-1) + &
          func(xr*xp17_06,yc,npar,par,verbose-1) ) + &
 wt17_07*(func(xr*xn17_07,yc,npar,par,verbose-1) + &
          func(xr*xp17_07,yc,npar,par,verbose-1) ) + &
 wt17_08*(func(xr*xn17_08,yc,npar,par,verbose-1) + &
          func(xr*xp17_08,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss17

!------------------------------------------------------------------------------

double precision function ellgauss18(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss18 = ( &
 wt18_01*(func(xr*xn18_01,yc,npar,par,verbose-1) + &
          func(xr*xp18_01,yc,npar,par,verbose-1) ) + &
 wt18_02*(func(xr*xn18_02,yc,npar,par,verbose-1) + &
          func(xr*xp18_02,yc,npar,par,verbose-1) ) + &
 wt18_03*(func(xr*xn18_03,yc,npar,par,verbose-1) + &
          func(xr*xp18_03,yc,npar,par,verbose-1) ) + &
 wt18_04*(func(xr*xn18_04,yc,npar,par,verbose-1) + &
          func(xr*xp18_04,yc,npar,par,verbose-1) ) + &
 wt18_05*(func(xr*xn18_05,yc,npar,par,verbose-1) + &
          func(xr*xp18_05,yc,npar,par,verbose-1) ) + &
 wt18_06*(func(xr*xn18_06,yc,npar,par,verbose-1) + &
          func(xr*xp18_06,yc,npar,par,verbose-1) ) + &
 wt18_07*(func(xr*xn18_07,yc,npar,par,verbose-1) + &
          func(xr*xp18_07,yc,npar,par,verbose-1) ) + &
 wt18_08*(func(xr*xn18_08,yc,npar,par,verbose-1) + &
          func(xr*xp18_08,yc,npar,par,verbose-1) ) + &
 wt18_09*(func(xr*xn18_09,yc,npar,par,verbose-1) + &
          func(xr*xp18_09,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss18

!------------------------------------------------------------------------------

double precision function ellgauss19(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss19 = (wt19_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt19_01*(func(xr*xn19_01,yc,npar,par,verbose-1) + &
          func(xr*xp19_01,yc,npar,par,verbose-1) ) + &
 wt19_02*(func(xr*xn19_02,yc,npar,par,verbose-1) + &
          func(xr*xp19_02,yc,npar,par,verbose-1) ) + &
 wt19_03*(func(xr*xn19_03,yc,npar,par,verbose-1) + &
          func(xr*xp19_03,yc,npar,par,verbose-1) ) + &
 wt19_04*(func(xr*xn19_04,yc,npar,par,verbose-1) + &
          func(xr*xp19_04,yc,npar,par,verbose-1) ) + &
 wt19_05*(func(xr*xn19_05,yc,npar,par,verbose-1) + &
          func(xr*xp19_05,yc,npar,par,verbose-1) ) + &
 wt19_06*(func(xr*xn19_06,yc,npar,par,verbose-1) + &
          func(xr*xp19_06,yc,npar,par,verbose-1) ) + &
 wt19_07*(func(xr*xn19_07,yc,npar,par,verbose-1) + &
          func(xr*xp19_07,yc,npar,par,verbose-1) ) + &
 wt19_08*(func(xr*xn19_08,yc,npar,par,verbose-1) + &
          func(xr*xp19_08,yc,npar,par,verbose-1) ) + &
 wt19_09*(func(xr*xn19_09,yc,npar,par,verbose-1) + &
          func(xr*xp19_09,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss19

!------------------------------------------------------------------------------

double precision function ellgauss20(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss20 = ( &
 wt20_01*(func(xr*xn20_01,yc,npar,par,verbose-1) + &
          func(xr*xp20_01,yc,npar,par,verbose-1) ) + &
 wt20_02*(func(xr*xn20_02,yc,npar,par,verbose-1) + &
          func(xr*xp20_02,yc,npar,par,verbose-1) ) + &
 wt20_03*(func(xr*xn20_03,yc,npar,par,verbose-1) + &
          func(xr*xp20_03,yc,npar,par,verbose-1) ) + &
 wt20_04*(func(xr*xn20_04,yc,npar,par,verbose-1) + &
          func(xr*xp20_04,yc,npar,par,verbose-1) ) + &
 wt20_05*(func(xr*xn20_05,yc,npar,par,verbose-1) + &
          func(xr*xp20_05,yc,npar,par,verbose-1) ) + &
 wt20_06*(func(xr*xn20_06,yc,npar,par,verbose-1) + &
          func(xr*xp20_06,yc,npar,par,verbose-1) ) + &
 wt20_07*(func(xr*xn20_07,yc,npar,par,verbose-1) + &
          func(xr*xp20_07,yc,npar,par,verbose-1) ) + &
 wt20_08*(func(xr*xn20_08,yc,npar,par,verbose-1) + &
          func(xr*xp20_08,yc,npar,par,verbose-1) ) + &
 wt20_09*(func(xr*xn20_09,yc,npar,par,verbose-1) + &
          func(xr*xp20_09,yc,npar,par,verbose-1) ) + &
 wt20_10*(func(xr*xn20_10,yc,npar,par,verbose-1) + &
          func(xr*xp20_10,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss20

!------------------------------------------------------------------------------

double precision function ellgauss21(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss21 = (wt21_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt21_01*(func(xr*xn21_01,yc,npar,par,verbose-1) + &
          func(xr*xp21_01,yc,npar,par,verbose-1) ) + &
 wt21_02*(func(xr*xn21_02,yc,npar,par,verbose-1) + &
          func(xr*xp21_02,yc,npar,par,verbose-1) ) + &
 wt21_03*(func(xr*xn21_03,yc,npar,par,verbose-1) + &
          func(xr*xp21_03,yc,npar,par,verbose-1) ) + &
 wt21_04*(func(xr*xn21_04,yc,npar,par,verbose-1) + &
          func(xr*xp21_04,yc,npar,par,verbose-1) ) + &
 wt21_05*(func(xr*xn21_05,yc,npar,par,verbose-1) + &
          func(xr*xp21_05,yc,npar,par,verbose-1) ) + &
 wt21_06*(func(xr*xn21_06,yc,npar,par,verbose-1) + &
          func(xr*xp21_06,yc,npar,par,verbose-1) ) + &
 wt21_07*(func(xr*xn21_07,yc,npar,par,verbose-1) + &
          func(xr*xp21_07,yc,npar,par,verbose-1) ) + &
 wt21_08*(func(xr*xn21_08,yc,npar,par,verbose-1) + &
          func(xr*xp21_08,yc,npar,par,verbose-1) ) + &
 wt21_09*(func(xr*xn21_09,yc,npar,par,verbose-1) + &
          func(xr*xp21_09,yc,npar,par,verbose-1) ) + &
 wt21_10*(func(xr*xn21_10,yc,npar,par,verbose-1) + &
          func(xr*xp21_10,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss21

!------------------------------------------------------------------------------

double precision function ellgauss22(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss22 = ( &
 wt22_01*(func(xr*xn22_01,yc,npar,par,verbose-1) + &
          func(xr*xp22_01,yc,npar,par,verbose-1) ) + &
 wt22_02*(func(xr*xn22_02,yc,npar,par,verbose-1) + &
          func(xr*xp22_02,yc,npar,par,verbose-1) ) + &
 wt22_03*(func(xr*xn22_03,yc,npar,par,verbose-1) + &
          func(xr*xp22_03,yc,npar,par,verbose-1) ) + &
 wt22_04*(func(xr*xn22_04,yc,npar,par,verbose-1) + &
          func(xr*xp22_04,yc,npar,par,verbose-1) ) + &
 wt22_05*(func(xr*xn22_05,yc,npar,par,verbose-1) + &
          func(xr*xp22_05,yc,npar,par,verbose-1) ) + &
 wt22_06*(func(xr*xn22_06,yc,npar,par,verbose-1) + &
          func(xr*xp22_06,yc,npar,par,verbose-1) ) + &
 wt22_07*(func(xr*xn22_07,yc,npar,par,verbose-1) + &
          func(xr*xp22_07,yc,npar,par,verbose-1) ) + &
 wt22_08*(func(xr*xn22_08,yc,npar,par,verbose-1) + &
          func(xr*xp22_08,yc,npar,par,verbose-1) ) + &
 wt22_09*(func(xr*xn22_09,yc,npar,par,verbose-1) + &
          func(xr*xp22_09,yc,npar,par,verbose-1) ) + &
 wt22_10*(func(xr*xn22_10,yc,npar,par,verbose-1) + &
          func(xr*xp22_10,yc,npar,par,verbose-1) ) + &
 wt22_11*(func(xr*xn22_11,yc,npar,par,verbose-1) + &
          func(xr*xp22_11,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss22

!------------------------------------------------------------------------------

double precision function ellgauss23(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss23 = (wt23_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt23_01*(func(xr*xn23_01,yc,npar,par,verbose-1) + &
          func(xr*xp23_01,yc,npar,par,verbose-1) ) + &
 wt23_02*(func(xr*xn23_02,yc,npar,par,verbose-1) + &
          func(xr*xp23_02,yc,npar,par,verbose-1) ) + &
 wt23_03*(func(xr*xn23_03,yc,npar,par,verbose-1) + &
          func(xr*xp23_03,yc,npar,par,verbose-1) ) + &
 wt23_04*(func(xr*xn23_04,yc,npar,par,verbose-1) + &
          func(xr*xp23_04,yc,npar,par,verbose-1) ) + &
 wt23_05*(func(xr*xn23_05,yc,npar,par,verbose-1) + &
          func(xr*xp23_05,yc,npar,par,verbose-1) ) + &
 wt23_06*(func(xr*xn23_06,yc,npar,par,verbose-1) + &
          func(xr*xp23_06,yc,npar,par,verbose-1) ) + &
 wt23_07*(func(xr*xn23_07,yc,npar,par,verbose-1) + &
          func(xr*xp23_07,yc,npar,par,verbose-1) ) + &
 wt23_08*(func(xr*xn23_08,yc,npar,par,verbose-1) + &
          func(xr*xp23_08,yc,npar,par,verbose-1) ) + &
 wt23_09*(func(xr*xn23_09,yc,npar,par,verbose-1) + &
          func(xr*xp23_09,yc,npar,par,verbose-1) ) + &
 wt23_10*(func(xr*xn23_10,yc,npar,par,verbose-1) + &
          func(xr*xp23_10,yc,npar,par,verbose-1) ) + &
 wt23_11*(func(xr*xn23_11,yc,npar,par,verbose-1) + &
          func(xr*xp23_11,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss23

!------------------------------------------------------------------------------

double precision function ellgauss24(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss24 = ( &
 wt24_01*(func(xr*xn24_01,yc,npar,par,verbose-1) + &
          func(xr*xp24_01,yc,npar,par,verbose-1) ) + &
 wt24_02*(func(xr*xn24_02,yc,npar,par,verbose-1) + &
          func(xr*xp24_02,yc,npar,par,verbose-1) ) + &
 wt24_03*(func(xr*xn24_03,yc,npar,par,verbose-1) + &
          func(xr*xp24_03,yc,npar,par,verbose-1) ) + &
 wt24_04*(func(xr*xn24_04,yc,npar,par,verbose-1) + &
          func(xr*xp24_04,yc,npar,par,verbose-1) ) + &
 wt24_05*(func(xr*xn24_05,yc,npar,par,verbose-1) + &
          func(xr*xp24_05,yc,npar,par,verbose-1) ) + &
 wt24_06*(func(xr*xn24_06,yc,npar,par,verbose-1) + &
          func(xr*xp24_06,yc,npar,par,verbose-1) ) + &
 wt24_07*(func(xr*xn24_07,yc,npar,par,verbose-1) + &
          func(xr*xp24_07,yc,npar,par,verbose-1) ) + &
 wt24_08*(func(xr*xn24_08,yc,npar,par,verbose-1) + &
          func(xr*xp24_08,yc,npar,par,verbose-1) ) + &
 wt24_09*(func(xr*xn24_09,yc,npar,par,verbose-1) + &
          func(xr*xp24_09,yc,npar,par,verbose-1) ) + &
 wt24_10*(func(xr*xn24_10,yc,npar,par,verbose-1) + &
          func(xr*xp24_10,yc,npar,par,verbose-1) ) + &
 wt24_11*(func(xr*xn24_11,yc,npar,par,verbose-1) + &
          func(xr*xp24_11,yc,npar,par,verbose-1) ) + &
 wt24_12*(func(xr*xn24_12,yc,npar,par,verbose-1) + &
          func(xr*xp24_12,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss24

!------------------------------------------------------------------------------

double precision function ellgauss25(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss25 = (wt25_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt25_01*(func(xr*xn25_01,yc,npar,par,verbose-1) + &
          func(xr*xp25_01,yc,npar,par,verbose-1) ) + &
 wt25_02*(func(xr*xn25_02,yc,npar,par,verbose-1) + &
          func(xr*xp25_02,yc,npar,par,verbose-1) ) + &
 wt25_03*(func(xr*xn25_03,yc,npar,par,verbose-1) + &
          func(xr*xp25_03,yc,npar,par,verbose-1) ) + &
 wt25_04*(func(xr*xn25_04,yc,npar,par,verbose-1) + &
          func(xr*xp25_04,yc,npar,par,verbose-1) ) + &
 wt25_05*(func(xr*xn25_05,yc,npar,par,verbose-1) + &
          func(xr*xp25_05,yc,npar,par,verbose-1) ) + &
 wt25_06*(func(xr*xn25_06,yc,npar,par,verbose-1) + &
          func(xr*xp25_06,yc,npar,par,verbose-1) ) + &
 wt25_07*(func(xr*xn25_07,yc,npar,par,verbose-1) + &
          func(xr*xp25_07,yc,npar,par,verbose-1) ) + &
 wt25_08*(func(xr*xn25_08,yc,npar,par,verbose-1) + &
          func(xr*xp25_08,yc,npar,par,verbose-1) ) + &
 wt25_09*(func(xr*xn25_09,yc,npar,par,verbose-1) + &
          func(xr*xp25_09,yc,npar,par,verbose-1) ) + &
 wt25_10*(func(xr*xn25_10,yc,npar,par,verbose-1) + &
          func(xr*xp25_10,yc,npar,par,verbose-1) ) + &
 wt25_11*(func(xr*xn25_11,yc,npar,par,verbose-1) + &
          func(xr*xp25_11,yc,npar,par,verbose-1) ) + &
 wt25_12*(func(xr*xn25_12,yc,npar,par,verbose-1) + &
          func(xr*xp25_12,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss25

!------------------------------------------------------------------------------

double precision function ellgauss26(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss26 = ( &
 wt26_01*(func(xr*xn26_01,yc,npar,par,verbose-1) + &
          func(xr*xp26_01,yc,npar,par,verbose-1) ) + &
 wt26_02*(func(xr*xn26_02,yc,npar,par,verbose-1) + &
          func(xr*xp26_02,yc,npar,par,verbose-1) ) + &
 wt26_03*(func(xr*xn26_03,yc,npar,par,verbose-1) + &
          func(xr*xp26_03,yc,npar,par,verbose-1) ) + &
 wt26_04*(func(xr*xn26_04,yc,npar,par,verbose-1) + &
          func(xr*xp26_04,yc,npar,par,verbose-1) ) + &
 wt26_05*(func(xr*xn26_05,yc,npar,par,verbose-1) + &
          func(xr*xp26_05,yc,npar,par,verbose-1) ) + &
 wt26_06*(func(xr*xn26_06,yc,npar,par,verbose-1) + &
          func(xr*xp26_06,yc,npar,par,verbose-1) ) + &
 wt26_07*(func(xr*xn26_07,yc,npar,par,verbose-1) + &
          func(xr*xp26_07,yc,npar,par,verbose-1) ) + &
 wt26_08*(func(xr*xn26_08,yc,npar,par,verbose-1) + &
          func(xr*xp26_08,yc,npar,par,verbose-1) ) + &
 wt26_09*(func(xr*xn26_09,yc,npar,par,verbose-1) + &
          func(xr*xp26_09,yc,npar,par,verbose-1) ) + &
 wt26_10*(func(xr*xn26_10,yc,npar,par,verbose-1) + &
          func(xr*xp26_10,yc,npar,par,verbose-1) ) + &
 wt26_11*(func(xr*xn26_11,yc,npar,par,verbose-1) + &
          func(xr*xp26_11,yc,npar,par,verbose-1) ) + &
 wt26_12*(func(xr*xn26_12,yc,npar,par,verbose-1) + &
          func(xr*xp26_12,yc,npar,par,verbose-1) ) + &
 wt26_13*(func(xr*xn26_13,yc,npar,par,verbose-1) + &
          func(xr*xp26_13,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss26

!------------------------------------------------------------------------------

double precision function ellgauss27(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss27 = (wt27_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt27_01*(func(xr*xn27_01,yc,npar,par,verbose-1) + &
          func(xr*xp27_01,yc,npar,par,verbose-1) ) + &
 wt27_02*(func(xr*xn27_02,yc,npar,par,verbose-1) + &
          func(xr*xp27_02,yc,npar,par,verbose-1) ) + &
 wt27_03*(func(xr*xn27_03,yc,npar,par,verbose-1) + &
          func(xr*xp27_03,yc,npar,par,verbose-1) ) + &
 wt27_04*(func(xr*xn27_04,yc,npar,par,verbose-1) + &
          func(xr*xp27_04,yc,npar,par,verbose-1) ) + &
 wt27_05*(func(xr*xn27_05,yc,npar,par,verbose-1) + &
          func(xr*xp27_05,yc,npar,par,verbose-1) ) + &
 wt27_06*(func(xr*xn27_06,yc,npar,par,verbose-1) + &
          func(xr*xp27_06,yc,npar,par,verbose-1) ) + &
 wt27_07*(func(xr*xn27_07,yc,npar,par,verbose-1) + &
          func(xr*xp27_07,yc,npar,par,verbose-1) ) + &
 wt27_08*(func(xr*xn27_08,yc,npar,par,verbose-1) + &
          func(xr*xp27_08,yc,npar,par,verbose-1) ) + &
 wt27_09*(func(xr*xn27_09,yc,npar,par,verbose-1) + &
          func(xr*xp27_09,yc,npar,par,verbose-1) ) + &
 wt27_10*(func(xr*xn27_10,yc,npar,par,verbose-1) + &
          func(xr*xp27_10,yc,npar,par,verbose-1) ) + &
 wt27_11*(func(xr*xn27_11,yc,npar,par,verbose-1) + &
          func(xr*xp27_11,yc,npar,par,verbose-1) ) + &
 wt27_12*(func(xr*xn27_12,yc,npar,par,verbose-1) + &
          func(xr*xp27_12,yc,npar,par,verbose-1) ) + &
 wt27_13*(func(xr*xn27_13,yc,npar,par,verbose-1) + &
          func(xr*xp27_13,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss27

!------------------------------------------------------------------------------

double precision function ellgauss28(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss28 = ( &
 wt28_01*(func(xr*xn28_01,yc,npar,par,verbose-1) + &
          func(xr*xp28_01,yc,npar,par,verbose-1) ) + &
 wt28_02*(func(xr*xn28_02,yc,npar,par,verbose-1) + &
          func(xr*xp28_02,yc,npar,par,verbose-1) ) + &
 wt28_03*(func(xr*xn28_03,yc,npar,par,verbose-1) + &
          func(xr*xp28_03,yc,npar,par,verbose-1) ) + &
 wt28_04*(func(xr*xn28_04,yc,npar,par,verbose-1) + &
          func(xr*xp28_04,yc,npar,par,verbose-1) ) + &
 wt28_05*(func(xr*xn28_05,yc,npar,par,verbose-1) + &
          func(xr*xp28_05,yc,npar,par,verbose-1) ) + &
 wt28_06*(func(xr*xn28_06,yc,npar,par,verbose-1) + &
          func(xr*xp28_06,yc,npar,par,verbose-1) ) + &
 wt28_07*(func(xr*xn28_07,yc,npar,par,verbose-1) + &
          func(xr*xp28_07,yc,npar,par,verbose-1) ) + &
 wt28_08*(func(xr*xn28_08,yc,npar,par,verbose-1) + &
          func(xr*xp28_08,yc,npar,par,verbose-1) ) + &
 wt28_09*(func(xr*xn28_09,yc,npar,par,verbose-1) + &
          func(xr*xp28_09,yc,npar,par,verbose-1) ) + &
 wt28_10*(func(xr*xn28_10,yc,npar,par,verbose-1) + &
          func(xr*xp28_10,yc,npar,par,verbose-1) ) + &
 wt28_11*(func(xr*xn28_11,yc,npar,par,verbose-1) + &
          func(xr*xp28_11,yc,npar,par,verbose-1) ) + &
 wt28_12*(func(xr*xn28_12,yc,npar,par,verbose-1) + &
          func(xr*xp28_12,yc,npar,par,verbose-1) ) + &
 wt28_13*(func(xr*xn28_13,yc,npar,par,verbose-1) + &
          func(xr*xp28_13,yc,npar,par,verbose-1) ) + &
 wt28_14*(func(xr*xn28_14,yc,npar,par,verbose-1) + &
          func(xr*xp28_14,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss28

!------------------------------------------------------------------------------

double precision function ellgauss29(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss29 = (wt29_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt29_01*(func(xr*xn29_01,yc,npar,par,verbose-1) + &
          func(xr*xp29_01,yc,npar,par,verbose-1) ) + &
 wt29_02*(func(xr*xn29_02,yc,npar,par,verbose-1) + &
          func(xr*xp29_02,yc,npar,par,verbose-1) ) + &
 wt29_03*(func(xr*xn29_03,yc,npar,par,verbose-1) + &
          func(xr*xp29_03,yc,npar,par,verbose-1) ) + &
 wt29_04*(func(xr*xn29_04,yc,npar,par,verbose-1) + &
          func(xr*xp29_04,yc,npar,par,verbose-1) ) + &
 wt29_05*(func(xr*xn29_05,yc,npar,par,verbose-1) + &
          func(xr*xp29_05,yc,npar,par,verbose-1) ) + &
 wt29_06*(func(xr*xn29_06,yc,npar,par,verbose-1) + &
          func(xr*xp29_06,yc,npar,par,verbose-1) ) + &
 wt29_07*(func(xr*xn29_07,yc,npar,par,verbose-1) + &
          func(xr*xp29_07,yc,npar,par,verbose-1) ) + &
 wt29_08*(func(xr*xn29_08,yc,npar,par,verbose-1) + &
          func(xr*xp29_08,yc,npar,par,verbose-1) ) + &
 wt29_09*(func(xr*xn29_09,yc,npar,par,verbose-1) + &
          func(xr*xp29_09,yc,npar,par,verbose-1) ) + &
 wt29_10*(func(xr*xn29_10,yc,npar,par,verbose-1) + &
          func(xr*xp29_10,yc,npar,par,verbose-1) ) + &
 wt29_11*(func(xr*xn29_11,yc,npar,par,verbose-1) + &
          func(xr*xp29_11,yc,npar,par,verbose-1) ) + &
 wt29_12*(func(xr*xn29_12,yc,npar,par,verbose-1) + &
          func(xr*xp29_12,yc,npar,par,verbose-1) ) + &
 wt29_13*(func(xr*xn29_13,yc,npar,par,verbose-1) + &
          func(xr*xp29_13,yc,npar,par,verbose-1) ) + &
 wt29_14*(func(xr*xn29_14,yc,npar,par,verbose-1) + &
          func(xr*xp29_14,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss29

!------------------------------------------------------------------------------

double precision function ellgauss30(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss30 = ( &
 wt30_01*(func(xr*xn30_01,yc,npar,par,verbose-1) + &
          func(xr*xp30_01,yc,npar,par,verbose-1) ) + &
 wt30_02*(func(xr*xn30_02,yc,npar,par,verbose-1) + &
          func(xr*xp30_02,yc,npar,par,verbose-1) ) + &
 wt30_03*(func(xr*xn30_03,yc,npar,par,verbose-1) + &
          func(xr*xp30_03,yc,npar,par,verbose-1) ) + &
 wt30_04*(func(xr*xn30_04,yc,npar,par,verbose-1) + &
          func(xr*xp30_04,yc,npar,par,verbose-1) ) + &
 wt30_05*(func(xr*xn30_05,yc,npar,par,verbose-1) + &
          func(xr*xp30_05,yc,npar,par,verbose-1) ) + &
 wt30_06*(func(xr*xn30_06,yc,npar,par,verbose-1) + &
          func(xr*xp30_06,yc,npar,par,verbose-1) ) + &
 wt30_07*(func(xr*xn30_07,yc,npar,par,verbose-1) + &
          func(xr*xp30_07,yc,npar,par,verbose-1) ) + &
 wt30_08*(func(xr*xn30_08,yc,npar,par,verbose-1) + &
          func(xr*xp30_08,yc,npar,par,verbose-1) ) + &
 wt30_09*(func(xr*xn30_09,yc,npar,par,verbose-1) + &
          func(xr*xp30_09,yc,npar,par,verbose-1) ) + &
 wt30_10*(func(xr*xn30_10,yc,npar,par,verbose-1) + &
          func(xr*xp30_10,yc,npar,par,verbose-1) ) + &
 wt30_11*(func(xr*xn30_11,yc,npar,par,verbose-1) + &
          func(xr*xp30_11,yc,npar,par,verbose-1) ) + &
 wt30_12*(func(xr*xn30_12,yc,npar,par,verbose-1) + &
          func(xr*xp30_12,yc,npar,par,verbose-1) ) + &
 wt30_13*(func(xr*xn30_13,yc,npar,par,verbose-1) + &
          func(xr*xp30_13,yc,npar,par,verbose-1) ) + &
 wt30_14*(func(xr*xn30_14,yc,npar,par,verbose-1) + &
          func(xr*xp30_14,yc,npar,par,verbose-1) ) + &
 wt30_15*(func(xr*xn30_15,yc,npar,par,verbose-1) + &
          func(xr*xp30_15,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss30

!------------------------------------------------------------------------------

double precision function ellgauss31(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss31 = (wt31_00*func(0.0d0 ,yc,npar,par,verbose-1) + &
 wt31_01*(func(xr*xn31_01,yc,npar,par,verbose-1) + &
          func(xr*xp31_01,yc,npar,par,verbose-1) ) + &
 wt31_02*(func(xr*xn31_02,yc,npar,par,verbose-1) + &
          func(xr*xp31_02,yc,npar,par,verbose-1) ) + &
 wt31_03*(func(xr*xn31_03,yc,npar,par,verbose-1) + &
          func(xr*xp31_03,yc,npar,par,verbose-1) ) + &
 wt31_04*(func(xr*xn31_04,yc,npar,par,verbose-1) + &
          func(xr*xp31_04,yc,npar,par,verbose-1) ) + &
 wt31_05*(func(xr*xn31_05,yc,npar,par,verbose-1) + &
          func(xr*xp31_05,yc,npar,par,verbose-1) ) + &
 wt31_06*(func(xr*xn31_06,yc,npar,par,verbose-1) + &
          func(xr*xp31_06,yc,npar,par,verbose-1) ) + &
 wt31_07*(func(xr*xn31_07,yc,npar,par,verbose-1) + &
          func(xr*xp31_07,yc,npar,par,verbose-1) ) + &
 wt31_08*(func(xr*xn31_08,yc,npar,par,verbose-1) + &
          func(xr*xp31_08,yc,npar,par,verbose-1) ) + &
 wt31_09*(func(xr*xn31_09,yc,npar,par,verbose-1) + &
          func(xr*xp31_09,yc,npar,par,verbose-1) ) + &
 wt31_10*(func(xr*xn31_10,yc,npar,par,verbose-1) + &
          func(xr*xp31_10,yc,npar,par,verbose-1) ) + &
 wt31_11*(func(xr*xn31_11,yc,npar,par,verbose-1) + &
          func(xr*xp31_11,yc,npar,par,verbose-1) ) + &
 wt31_12*(func(xr*xn31_12,yc,npar,par,verbose-1) + &
          func(xr*xp31_12,yc,npar,par,verbose-1) ) + &
 wt31_13*(func(xr*xn31_13,yc,npar,par,verbose-1) + &
          func(xr*xp31_13,yc,npar,par,verbose-1) ) + &
 wt31_14*(func(xr*xn31_14,yc,npar,par,verbose-1) + &
          func(xr*xp31_14,yc,npar,par,verbose-1) ) + &
 wt31_15*(func(xr*xn31_15,yc,npar,par,verbose-1) + &
          func(xr*xp31_15,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss31

!------------------------------------------------------------------------------

double precision function ellgauss32(a,b,yc,func,npar,par,verbose)
implicit none
integer, intent(in)  :: npar, verbose
double precision, intent(in) :: a, b, yc, par(npar)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: xr

xr = a*sqrt(1.0d0  - (yc/b)**2)

ellgauss32 = ( &
 wt32_01*(func(xr*xn32_01,yc,npar,par,verbose-1) + &
          func(xr*xp32_01,yc,npar,par,verbose-1) ) + &
 wt32_02*(func(xr*xn32_02,yc,npar,par,verbose-1) + &
          func(xr*xp32_02,yc,npar,par,verbose-1) ) + &
 wt32_03*(func(xr*xn32_03,yc,npar,par,verbose-1) + &
          func(xr*xp32_03,yc,npar,par,verbose-1) ) + &
 wt32_04*(func(xr*xn32_04,yc,npar,par,verbose-1) + &
          func(xr*xp32_04,yc,npar,par,verbose-1) ) + &
 wt32_05*(func(xr*xn32_05,yc,npar,par,verbose-1) + &
          func(xr*xp32_05,yc,npar,par,verbose-1) ) + &
 wt32_06*(func(xr*xn32_06,yc,npar,par,verbose-1) + &
          func(xr*xp32_06,yc,npar,par,verbose-1) ) + &
 wt32_07*(func(xr*xn32_07,yc,npar,par,verbose-1) + &
          func(xr*xp32_07,yc,npar,par,verbose-1) ) + &
 wt32_08*(func(xr*xn32_08,yc,npar,par,verbose-1) + &
          func(xr*xp32_08,yc,npar,par,verbose-1) ) + &
 wt32_09*(func(xr*xn32_09,yc,npar,par,verbose-1) + &
          func(xr*xp32_09,yc,npar,par,verbose-1) ) + &
 wt32_10*(func(xr*xn32_10,yc,npar,par,verbose-1) + &
          func(xr*xp32_10,yc,npar,par,verbose-1) ) + &
 wt32_11*(func(xr*xn32_11,yc,npar,par,verbose-1) + &
          func(xr*xp32_11,yc,npar,par,verbose-1) ) + &
 wt32_12*(func(xr*xn32_12,yc,npar,par,verbose-1) + &
          func(xr*xp32_12,yc,npar,par,verbose-1) ) + &
 wt32_13*(func(xr*xn32_13,yc,npar,par,verbose-1) + &
          func(xr*xp32_13,yc,npar,par,verbose-1) ) + &
 wt32_14*(func(xr*xn32_14,yc,npar,par,verbose-1) + &
          func(xr*xp32_14,yc,npar,par,verbose-1) ) + &
 wt32_15*(func(xr*xn32_15,yc,npar,par,verbose-1) + &
          func(xr*xp32_15,yc,npar,par,verbose-1) ) + &
 wt32_16*(func(xr*xn32_16,yc,npar,par,verbose-1) + &
          func(xr*xp32_16,yc,npar,par,verbose-1) ) ) *xr

end function ellgauss32

!------------------------------------------------------------------------------
!------------------------------------------------------------------------------

double precision function gaussy02(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy02 = ( &
 wt02_01*(func(x,y0+ys*xn02_01,np,p,verbose-1) + &
          func(x,y0+ys*xp02_01,np,p,verbose-1) ) ) *ys

end function gaussy02

!------------------------------------------------------------------------------

double precision function gaussy03(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy03 = (wt03_00*func(x,y0,np,p,verbose-1) + &
 wt03_01*(func(x,y0+ys*xn03_01,np,p,verbose-1) + &
          func(x,y0+ys*xp03_01,np,p,verbose-1) ) ) *ys

end function gaussy03

!------------------------------------------------------------------------------

double precision function gaussy04(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy04 = ( &
 wt04_01*(func(x,y0+ys*xn04_01,np,p,verbose-1) + &
          func(x,y0+ys*xp04_01,np,p,verbose-1) ) + &
 wt04_02*(func(x,y0+ys*xn04_02,np,p,verbose-1) + &
          func(x,y0+ys*xp04_02,np,p,verbose-1) ) ) *ys

end function gaussy04

!------------------------------------------------------------------------------

double precision function gaussy05(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy05 = (wt05_00*func(x,y0,np,p,verbose-1) + &
 wt05_01*(func(x,y0+ys*xn05_01,np,p,verbose-1) + &
          func(x,y0+ys*xp05_01,np,p,verbose-1) ) + &
 wt05_02*(func(x,y0+ys*xn05_02,np,p,verbose-1) + &
          func(x,y0+ys*xp05_02,np,p,verbose-1) ) ) *ys

end function gaussy05

!------------------------------------------------------------------------------

double precision function gaussy06(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy06 = ( &
 wt06_01*(func(x,y0+ys*xn06_01,np,p,verbose-1) + &
          func(x,y0+ys*xp06_01,np,p,verbose-1) ) + &
 wt06_02*(func(x,y0+ys*xn06_02,np,p,verbose-1) + &
          func(x,y0+ys*xp06_02,np,p,verbose-1) ) + &
 wt06_03*(func(x,y0+ys*xn06_03,np,p,verbose-1) + &
          func(x,y0+ys*xp06_03,np,p,verbose-1) ) ) *ys

end function gaussy06

!------------------------------------------------------------------------------

double precision function gaussy07(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy07 = (wt07_00*func(x,y0,np,p,verbose-1) + &
 wt07_01*(func(x,y0+ys*xn07_01,np,p,verbose-1) + &
          func(x,y0+ys*xp07_01,np,p,verbose-1) ) + &
 wt07_02*(func(x,y0+ys*xn07_02,np,p,verbose-1) + &
          func(x,y0+ys*xp07_02,np,p,verbose-1) ) + &
 wt07_03*(func(x,y0+ys*xn07_03,np,p,verbose-1) + &
          func(x,y0+ys*xp07_03,np,p,verbose-1) ) ) *ys

end function gaussy07

!------------------------------------------------------------------------------

double precision function gaussy08(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy08 = ( &
 wt08_01*(func(x,y0+ys*xn08_01,np,p,verbose-1) + &
          func(x,y0+ys*xp08_01,np,p,verbose-1) ) + &
 wt08_02*(func(x,y0+ys*xn08_02,np,p,verbose-1) + &
          func(x,y0+ys*xp08_02,np,p,verbose-1) ) + &
 wt08_03*(func(x,y0+ys*xn08_03,np,p,verbose-1) + &
          func(x,y0+ys*xp08_03,np,p,verbose-1) ) + &
 wt08_04*(func(x,y0+ys*xn08_04,np,p,verbose-1) + &
          func(x,y0+ys*xp08_04,np,p,verbose-1) ) ) *ys

end function gaussy08

!------------------------------------------------------------------------------

double precision function gaussy09(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy09 = (wt09_00*func(x,y0,np,p,verbose-1) + &
 wt09_01*(func(x,y0+ys*xn09_01,np,p,verbose-1) + &
          func(x,y0+ys*xp09_01,np,p,verbose-1) ) + &
 wt09_02*(func(x,y0+ys*xn09_02,np,p,verbose-1) + &
          func(x,y0+ys*xp09_02,np,p,verbose-1) ) + &
 wt09_03*(func(x,y0+ys*xn09_03,np,p,verbose-1) + &
          func(x,y0+ys*xp09_03,np,p,verbose-1) ) + &
 wt09_04*(func(x,y0+ys*xn09_04,np,p,verbose-1) + &
          func(x,y0+ys*xp09_04,np,p,verbose-1) ) ) *ys

end function gaussy09

!------------------------------------------------------------------------------

double precision function gaussy10(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy10 = ( &
 wt10_01*(func(x,y0+ys*xn10_01,np,p,verbose-1) + &
          func(x,y0+ys*xp10_01,np,p,verbose-1) ) + &
 wt10_02*(func(x,y0+ys*xn10_02,np,p,verbose-1) + &
          func(x,y0+ys*xp10_02,np,p,verbose-1) ) + &
 wt10_03*(func(x,y0+ys*xn10_03,np,p,verbose-1) + &
          func(x,y0+ys*xp10_03,np,p,verbose-1) ) + &
 wt10_04*(func(x,y0+ys*xn10_04,np,p,verbose-1) + &
          func(x,y0+ys*xp10_04,np,p,verbose-1) ) + &
 wt10_05*(func(x,y0+ys*xn10_05,np,p,verbose-1) + &
          func(x,y0+ys*xp10_05,np,p,verbose-1) ) ) *ys

end function gaussy10

!------------------------------------------------------------------------------

double precision function gaussy11(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy11 = (wt11_00*func(x,y0,np,p,verbose-1) + &
 wt11_01*(func(x,y0+ys*xn11_01,np,p,verbose-1) + &
          func(x,y0+ys*xp11_01,np,p,verbose-1) ) + &
 wt11_02*(func(x,y0+ys*xn11_02,np,p,verbose-1) + &
          func(x,y0+ys*xp11_02,np,p,verbose-1) ) + &
 wt11_03*(func(x,y0+ys*xn11_03,np,p,verbose-1) + &
          func(x,y0+ys*xp11_03,np,p,verbose-1) ) + &
 wt11_04*(func(x,y0+ys*xn11_04,np,p,verbose-1) + &
          func(x,y0+ys*xp11_04,np,p,verbose-1) ) + &
 wt11_05*(func(x,y0+ys*xn11_05,np,p,verbose-1) + &
          func(x,y0+ys*xp11_05,np,p,verbose-1) ) ) *ys

end function gaussy11

!------------------------------------------------------------------------------

double precision function gaussy12(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy12 = ( &
 wt12_01*(func(x,y0+ys*xn12_01,np,p,verbose-1) + &
          func(x,y0+ys*xp12_01,np,p,verbose-1) ) + &
 wt12_02*(func(x,y0+ys*xn12_02,np,p,verbose-1) + &
          func(x,y0+ys*xp12_02,np,p,verbose-1) ) + &
 wt12_03*(func(x,y0+ys*xn12_03,np,p,verbose-1) + &
          func(x,y0+ys*xp12_03,np,p,verbose-1) ) + &
 wt12_04*(func(x,y0+ys*xn12_04,np,p,verbose-1) + &
          func(x,y0+ys*xp12_04,np,p,verbose-1) ) + &
 wt12_05*(func(x,y0+ys*xn12_05,np,p,verbose-1) + &
          func(x,y0+ys*xp12_05,np,p,verbose-1) ) + &
 wt12_06*(func(x,y0+ys*xn12_06,np,p,verbose-1) + &
          func(x,y0+ys*xp12_06,np,p,verbose-1) ) ) *ys

end function gaussy12

!------------------------------------------------------------------------------

double precision function gaussy13(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy13 = (wt13_00*func(x,y0,np,p,verbose-1) + &
 wt13_01*(func(x,y0+ys*xn13_01,np,p,verbose-1) + &
          func(x,y0+ys*xp13_01,np,p,verbose-1) ) + &
 wt13_02*(func(x,y0+ys*xn13_02,np,p,verbose-1) + &
          func(x,y0+ys*xp13_02,np,p,verbose-1) ) + &
 wt13_03*(func(x,y0+ys*xn13_03,np,p,verbose-1) + &
          func(x,y0+ys*xp13_03,np,p,verbose-1) ) + &
 wt13_04*(func(x,y0+ys*xn13_04,np,p,verbose-1) + &
          func(x,y0+ys*xp13_04,np,p,verbose-1) ) + &
 wt13_05*(func(x,y0+ys*xn13_05,np,p,verbose-1) + &
          func(x,y0+ys*xp13_05,np,p,verbose-1) ) + &
 wt13_06*(func(x,y0+ys*xn13_06,np,p,verbose-1) + &
          func(x,y0+ys*xp13_06,np,p,verbose-1) ) ) *ys

end function gaussy13

!------------------------------------------------------------------------------

double precision function gaussy14(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy14 = ( &
 wt14_01*(func(x,y0+ys*xn14_01,np,p,verbose-1) + &
          func(x,y0+ys*xp14_01,np,p,verbose-1) ) + &
 wt14_02*(func(x,y0+ys*xn14_02,np,p,verbose-1) + &
          func(x,y0+ys*xp14_02,np,p,verbose-1) ) + &
 wt14_03*(func(x,y0+ys*xn14_03,np,p,verbose-1) + &
          func(x,y0+ys*xp14_03,np,p,verbose-1) ) + &
 wt14_04*(func(x,y0+ys*xn14_04,np,p,verbose-1) + &
          func(x,y0+ys*xp14_04,np,p,verbose-1) ) + &
 wt14_05*(func(x,y0+ys*xn14_05,np,p,verbose-1) + &
          func(x,y0+ys*xp14_05,np,p,verbose-1) ) + &
 wt14_06*(func(x,y0+ys*xn14_06,np,p,verbose-1) + &
          func(x,y0+ys*xp14_06,np,p,verbose-1) ) + &
 wt14_07*(func(x,y0+ys*xn14_07,np,p,verbose-1) + &
          func(x,y0+ys*xp14_07,np,p,verbose-1) ) ) *ys

end function gaussy14

!------------------------------------------------------------------------------

double precision function gaussy15(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy15 = (wt15_00*func(x,y0,np,p,verbose-1) + &
 wt15_01*(func(x,y0+ys*xn15_01,np,p,verbose-1) + &
          func(x,y0+ys*xp15_01,np,p,verbose-1) ) + &
 wt15_02*(func(x,y0+ys*xn15_02,np,p,verbose-1) + &
          func(x,y0+ys*xp15_02,np,p,verbose-1) ) + &
 wt15_03*(func(x,y0+ys*xn15_03,np,p,verbose-1) + &
          func(x,y0+ys*xp15_03,np,p,verbose-1) ) + &
 wt15_04*(func(x,y0+ys*xn15_04,np,p,verbose-1) + &
          func(x,y0+ys*xp15_04,np,p,verbose-1) ) + &
 wt15_05*(func(x,y0+ys*xn15_05,np,p,verbose-1) + &
          func(x,y0+ys*xp15_05,np,p,verbose-1) ) + &
 wt15_06*(func(x,y0+ys*xn15_06,np,p,verbose-1) + &
          func(x,y0+ys*xp15_06,np,p,verbose-1) ) + &
 wt15_07*(func(x,y0+ys*xn15_07,np,p,verbose-1) + &
          func(x,y0+ys*xp15_07,np,p,verbose-1) ) ) *ys

end function gaussy15

!------------------------------------------------------------------------------

double precision function gaussy16(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy16 = ( &
 wt16_01*(func(x,y0+ys*xn16_01,np,p,verbose-1) + &
          func(x,y0+ys*xp16_01,np,p,verbose-1) ) + &
 wt16_02*(func(x,y0+ys*xn16_02,np,p,verbose-1) + &
          func(x,y0+ys*xp16_02,np,p,verbose-1) ) + &
 wt16_03*(func(x,y0+ys*xn16_03,np,p,verbose-1) + &
          func(x,y0+ys*xp16_03,np,p,verbose-1) ) + &
 wt16_04*(func(x,y0+ys*xn16_04,np,p,verbose-1) + &
          func(x,y0+ys*xp16_04,np,p,verbose-1) ) + &
 wt16_05*(func(x,y0+ys*xn16_05,np,p,verbose-1) + &
          func(x,y0+ys*xp16_05,np,p,verbose-1) ) + &
 wt16_06*(func(x,y0+ys*xn16_06,np,p,verbose-1) + &
          func(x,y0+ys*xp16_06,np,p,verbose-1) ) + &
 wt16_07*(func(x,y0+ys*xn16_07,np,p,verbose-1) + &
          func(x,y0+ys*xp16_07,np,p,verbose-1) ) + &
 wt16_08*(func(x,y0+ys*xn16_08,np,p,verbose-1) + &
          func(x,y0+ys*xp16_08,np,p,verbose-1) ) ) *ys

end function gaussy16

!------------------------------------------------------------------------------

double precision function gaussy17(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy17 = (wt17_00*func(x,y0,np,p,verbose-1) + &
 wt17_01*(func(x,y0+ys*xn17_01,np,p,verbose-1) + &
          func(x,y0+ys*xp17_01,np,p,verbose-1) ) + &
 wt17_02*(func(x,y0+ys*xn17_02,np,p,verbose-1) + &
          func(x,y0+ys*xp17_02,np,p,verbose-1) ) + &
 wt17_03*(func(x,y0+ys*xn17_03,np,p,verbose-1) + &
          func(x,y0+ys*xp17_03,np,p,verbose-1) ) + &
 wt17_04*(func(x,y0+ys*xn17_04,np,p,verbose-1) + &
          func(x,y0+ys*xp17_04,np,p,verbose-1) ) + &
 wt17_05*(func(x,y0+ys*xn17_05,np,p,verbose-1) + &
          func(x,y0+ys*xp17_05,np,p,verbose-1) ) + &
 wt17_06*(func(x,y0+ys*xn17_06,np,p,verbose-1) + &
          func(x,y0+ys*xp17_06,np,p,verbose-1) ) + &
 wt17_07*(func(x,y0+ys*xn17_07,np,p,verbose-1) + &
          func(x,y0+ys*xp17_07,np,p,verbose-1) ) + &
 wt17_08*(func(x,y0+ys*xn17_08,np,p,verbose-1) + &
          func(x,y0+ys*xp17_08,np,p,verbose-1) ) ) *ys

end function gaussy17

!------------------------------------------------------------------------------

double precision function gaussy18(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy18 = ( &
 wt18_01*(func(x,y0+ys*xn18_01,np,p,verbose-1) + &
          func(x,y0+ys*xp18_01,np,p,verbose-1) ) + &
 wt18_02*(func(x,y0+ys*xn18_02,np,p,verbose-1) + &
          func(x,y0+ys*xp18_02,np,p,verbose-1) ) + &
 wt18_03*(func(x,y0+ys*xn18_03,np,p,verbose-1) + &
          func(x,y0+ys*xp18_03,np,p,verbose-1) ) + &
 wt18_04*(func(x,y0+ys*xn18_04,np,p,verbose-1) + &
          func(x,y0+ys*xp18_04,np,p,verbose-1) ) + &
 wt18_05*(func(x,y0+ys*xn18_05,np,p,verbose-1) + &
          func(x,y0+ys*xp18_05,np,p,verbose-1) ) + &
 wt18_06*(func(x,y0+ys*xn18_06,np,p,verbose-1) + &
          func(x,y0+ys*xp18_06,np,p,verbose-1) ) + &
 wt18_07*(func(x,y0+ys*xn18_07,np,p,verbose-1) + &
          func(x,y0+ys*xp18_07,np,p,verbose-1) ) + &
 wt18_08*(func(x,y0+ys*xn18_08,np,p,verbose-1) + &
          func(x,y0+ys*xp18_08,np,p,verbose-1) ) + &
 wt18_09*(func(x,y0+ys*xn18_09,np,p,verbose-1) + &
          func(x,y0+ys*xp18_09,np,p,verbose-1) ) ) *ys

end function gaussy18

!------------------------------------------------------------------------------

double precision function gaussy19(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy19 = (wt19_00*func(x,y0,np,p,verbose-1) + &
 wt19_01*(func(x,y0+ys*xn19_01,np,p,verbose-1) + &
          func(x,y0+ys*xp19_01,np,p,verbose-1) ) + &
 wt19_02*(func(x,y0+ys*xn19_02,np,p,verbose-1) + &
          func(x,y0+ys*xp19_02,np,p,verbose-1) ) + &
 wt19_03*(func(x,y0+ys*xn19_03,np,p,verbose-1) + &
          func(x,y0+ys*xp19_03,np,p,verbose-1) ) + &
 wt19_04*(func(x,y0+ys*xn19_04,np,p,verbose-1) + &
          func(x,y0+ys*xp19_04,np,p,verbose-1) ) + &
 wt19_05*(func(x,y0+ys*xn19_05,np,p,verbose-1) + &
          func(x,y0+ys*xp19_05,np,p,verbose-1) ) + &
 wt19_06*(func(x,y0+ys*xn19_06,np,p,verbose-1) + &
          func(x,y0+ys*xp19_06,np,p,verbose-1) ) + &
 wt19_07*(func(x,y0+ys*xn19_07,np,p,verbose-1) + &
          func(x,y0+ys*xp19_07,np,p,verbose-1) ) + &
 wt19_08*(func(x,y0+ys*xn19_08,np,p,verbose-1) + &
          func(x,y0+ys*xp19_08,np,p,verbose-1) ) + &
 wt19_09*(func(x,y0+ys*xn19_09,np,p,verbose-1) + &
          func(x,y0+ys*xp19_09,np,p,verbose-1) ) ) *ys

end function gaussy19

!------------------------------------------------------------------------------

double precision function gaussy20(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy20 = ( &
 wt20_01*(func(x,y0+ys*xn20_01,np,p,verbose-1) + &
          func(x,y0+ys*xp20_01,np,p,verbose-1) ) + &
 wt20_02*(func(x,y0+ys*xn20_02,np,p,verbose-1) + &
          func(x,y0+ys*xp20_02,np,p,verbose-1) ) + &
 wt20_03*(func(x,y0+ys*xn20_03,np,p,verbose-1) + &
          func(x,y0+ys*xp20_03,np,p,verbose-1) ) + &
 wt20_04*(func(x,y0+ys*xn20_04,np,p,verbose-1) + &
          func(x,y0+ys*xp20_04,np,p,verbose-1) ) + &
 wt20_05*(func(x,y0+ys*xn20_05,np,p,verbose-1) + &
          func(x,y0+ys*xp20_05,np,p,verbose-1) ) + &
 wt20_06*(func(x,y0+ys*xn20_06,np,p,verbose-1) + &
          func(x,y0+ys*xp20_06,np,p,verbose-1) ) + &
 wt20_07*(func(x,y0+ys*xn20_07,np,p,verbose-1) + &
          func(x,y0+ys*xp20_07,np,p,verbose-1) ) + &
 wt20_08*(func(x,y0+ys*xn20_08,np,p,verbose-1) + &
          func(x,y0+ys*xp20_08,np,p,verbose-1) ) + &
 wt20_09*(func(x,y0+ys*xn20_09,np,p,verbose-1) + &
          func(x,y0+ys*xp20_09,np,p,verbose-1) ) + &
 wt20_10*(func(x,y0+ys*xn20_10,np,p,verbose-1) + &
          func(x,y0+ys*xp20_10,np,p,verbose-1) ) ) *ys

end function gaussy20

!------------------------------------------------------------------------------

double precision function gaussy21(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy21 = (wt21_00*func(x,y0,np,p,verbose-1) + &
 wt21_01*(func(x,y0+ys*xn21_01,np,p,verbose-1) + &
          func(x,y0+ys*xp21_01,np,p,verbose-1) ) + &
 wt21_02*(func(x,y0+ys*xn21_02,np,p,verbose-1) + &
          func(x,y0+ys*xp21_02,np,p,verbose-1) ) + &
 wt21_03*(func(x,y0+ys*xn21_03,np,p,verbose-1) + &
          func(x,y0+ys*xp21_03,np,p,verbose-1) ) + &
 wt21_04*(func(x,y0+ys*xn21_04,np,p,verbose-1) + &
          func(x,y0+ys*xp21_04,np,p,verbose-1) ) + &
 wt21_05*(func(x,y0+ys*xn21_05,np,p,verbose-1) + &
          func(x,y0+ys*xp21_05,np,p,verbose-1) ) + &
 wt21_06*(func(x,y0+ys*xn21_06,np,p,verbose-1) + &
          func(x,y0+ys*xp21_06,np,p,verbose-1) ) + &
 wt21_07*(func(x,y0+ys*xn21_07,np,p,verbose-1) + &
          func(x,y0+ys*xp21_07,np,p,verbose-1) ) + &
 wt21_08*(func(x,y0+ys*xn21_08,np,p,verbose-1) + &
          func(x,y0+ys*xp21_08,np,p,verbose-1) ) + &
 wt21_09*(func(x,y0+ys*xn21_09,np,p,verbose-1) + &
          func(x,y0+ys*xp21_09,np,p,verbose-1) ) + &
 wt21_10*(func(x,y0+ys*xn21_10,np,p,verbose-1) + &
          func(x,y0+ys*xp21_10,np,p,verbose-1) ) ) *ys

end function gaussy21

!------------------------------------------------------------------------------

double precision function gaussy22(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy22 = ( &
 wt22_01*(func(x,y0+ys*xn22_01,np,p,verbose-1) + &
          func(x,y0+ys*xp22_01,np,p,verbose-1) ) + &
 wt22_02*(func(x,y0+ys*xn22_02,np,p,verbose-1) + &
          func(x,y0+ys*xp22_02,np,p,verbose-1) ) + &
 wt22_03*(func(x,y0+ys*xn22_03,np,p,verbose-1) + &
          func(x,y0+ys*xp22_03,np,p,verbose-1) ) + &
 wt22_04*(func(x,y0+ys*xn22_04,np,p,verbose-1) + &
          func(x,y0+ys*xp22_04,np,p,verbose-1) ) + &
 wt22_05*(func(x,y0+ys*xn22_05,np,p,verbose-1) + &
          func(x,y0+ys*xp22_05,np,p,verbose-1) ) + &
 wt22_06*(func(x,y0+ys*xn22_06,np,p,verbose-1) + &
          func(x,y0+ys*xp22_06,np,p,verbose-1) ) + &
 wt22_07*(func(x,y0+ys*xn22_07,np,p,verbose-1) + &
          func(x,y0+ys*xp22_07,np,p,verbose-1) ) + &
 wt22_08*(func(x,y0+ys*xn22_08,np,p,verbose-1) + &
          func(x,y0+ys*xp22_08,np,p,verbose-1) ) + &
 wt22_09*(func(x,y0+ys*xn22_09,np,p,verbose-1) + &
          func(x,y0+ys*xp22_09,np,p,verbose-1) ) + &
 wt22_10*(func(x,y0+ys*xn22_10,np,p,verbose-1) + &
          func(x,y0+ys*xp22_10,np,p,verbose-1) ) + &
 wt22_11*(func(x,y0+ys*xn22_11,np,p,verbose-1) + &
          func(x,y0+ys*xp22_11,np,p,verbose-1) ) ) *ys

end function gaussy22

!------------------------------------------------------------------------------

double precision function gaussy23(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy23 = (wt23_00*func(x,y0,np,p,verbose-1) + &
 wt23_01*(func(x,y0+ys*xn23_01,np,p,verbose-1) + &
          func(x,y0+ys*xp23_01,np,p,verbose-1) ) + &
 wt23_02*(func(x,y0+ys*xn23_02,np,p,verbose-1) + &
          func(x,y0+ys*xp23_02,np,p,verbose-1) ) + &
 wt23_03*(func(x,y0+ys*xn23_03,np,p,verbose-1) + &
          func(x,y0+ys*xp23_03,np,p,verbose-1) ) + &
 wt23_04*(func(x,y0+ys*xn23_04,np,p,verbose-1) + &
          func(x,y0+ys*xp23_04,np,p,verbose-1) ) + &
 wt23_05*(func(x,y0+ys*xn23_05,np,p,verbose-1) + &
          func(x,y0+ys*xp23_05,np,p,verbose-1) ) + &
 wt23_06*(func(x,y0+ys*xn23_06,np,p,verbose-1) + &
          func(x,y0+ys*xp23_06,np,p,verbose-1) ) + &
 wt23_07*(func(x,y0+ys*xn23_07,np,p,verbose-1) + &
          func(x,y0+ys*xp23_07,np,p,verbose-1) ) + &
 wt23_08*(func(x,y0+ys*xn23_08,np,p,verbose-1) + &
          func(x,y0+ys*xp23_08,np,p,verbose-1) ) + &
 wt23_09*(func(x,y0+ys*xn23_09,np,p,verbose-1) + &
          func(x,y0+ys*xp23_09,np,p,verbose-1) ) + &
 wt23_10*(func(x,y0+ys*xn23_10,np,p,verbose-1) + &
          func(x,y0+ys*xp23_10,np,p,verbose-1) ) + &
 wt23_11*(func(x,y0+ys*xn23_11,np,p,verbose-1) + &
          func(x,y0+ys*xp23_11,np,p,verbose-1) ) ) *ys

end function gaussy23

!------------------------------------------------------------------------------

double precision function gaussy24(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy24 = ( &
 wt24_01*(func(x,y0+ys*xn24_01,np,p,verbose-1) + &
          func(x,y0+ys*xp24_01,np,p,verbose-1) ) + &
 wt24_02*(func(x,y0+ys*xn24_02,np,p,verbose-1) + &
          func(x,y0+ys*xp24_02,np,p,verbose-1) ) + &
 wt24_03*(func(x,y0+ys*xn24_03,np,p,verbose-1) + &
          func(x,y0+ys*xp24_03,np,p,verbose-1) ) + &
 wt24_04*(func(x,y0+ys*xn24_04,np,p,verbose-1) + &
          func(x,y0+ys*xp24_04,np,p,verbose-1) ) + &
 wt24_05*(func(x,y0+ys*xn24_05,np,p,verbose-1) + &
          func(x,y0+ys*xp24_05,np,p,verbose-1) ) + &
 wt24_06*(func(x,y0+ys*xn24_06,np,p,verbose-1) + &
          func(x,y0+ys*xp24_06,np,p,verbose-1) ) + &
 wt24_07*(func(x,y0+ys*xn24_07,np,p,verbose-1) + &
          func(x,y0+ys*xp24_07,np,p,verbose-1) ) + &
 wt24_08*(func(x,y0+ys*xn24_08,np,p,verbose-1) + &
          func(x,y0+ys*xp24_08,np,p,verbose-1) ) + &
 wt24_09*(func(x,y0+ys*xn24_09,np,p,verbose-1) + &
          func(x,y0+ys*xp24_09,np,p,verbose-1) ) + &
 wt24_10*(func(x,y0+ys*xn24_10,np,p,verbose-1) + &
          func(x,y0+ys*xp24_10,np,p,verbose-1) ) + &
 wt24_11*(func(x,y0+ys*xn24_11,np,p,verbose-1) + &
          func(x,y0+ys*xp24_11,np,p,verbose-1) ) + &
 wt24_12*(func(x,y0+ys*xn24_12,np,p,verbose-1) + &
          func(x,y0+ys*xp24_12,np,p,verbose-1) ) ) *ys

end function gaussy24

!------------------------------------------------------------------------------

double precision function gaussy25(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy25 = (wt25_00*func(x,y0,np,p,verbose-1) + &
 wt25_01*(func(x,y0+ys*xn25_01,np,p,verbose-1) + &
          func(x,y0+ys*xp25_01,np,p,verbose-1) ) + &
 wt25_02*(func(x,y0+ys*xn25_02,np,p,verbose-1) + &
          func(x,y0+ys*xp25_02,np,p,verbose-1) ) + &
 wt25_03*(func(x,y0+ys*xn25_03,np,p,verbose-1) + &
          func(x,y0+ys*xp25_03,np,p,verbose-1) ) + &
 wt25_04*(func(x,y0+ys*xn25_04,np,p,verbose-1) + &
          func(x,y0+ys*xp25_04,np,p,verbose-1) ) + &
 wt25_05*(func(x,y0+ys*xn25_05,np,p,verbose-1) + &
          func(x,y0+ys*xp25_05,np,p,verbose-1) ) + &
 wt25_06*(func(x,y0+ys*xn25_06,np,p,verbose-1) + &
          func(x,y0+ys*xp25_06,np,p,verbose-1) ) + &
 wt25_07*(func(x,y0+ys*xn25_07,np,p,verbose-1) + &
          func(x,y0+ys*xp25_07,np,p,verbose-1) ) + &
 wt25_08*(func(x,y0+ys*xn25_08,np,p,verbose-1) + &
          func(x,y0+ys*xp25_08,np,p,verbose-1) ) + &
 wt25_09*(func(x,y0+ys*xn25_09,np,p,verbose-1) + &
          func(x,y0+ys*xp25_09,np,p,verbose-1) ) + &
 wt25_10*(func(x,y0+ys*xn25_10,np,p,verbose-1) + &
          func(x,y0+ys*xp25_10,np,p,verbose-1) ) + &
 wt25_11*(func(x,y0+ys*xn25_11,np,p,verbose-1) + &
          func(x,y0+ys*xp25_11,np,p,verbose-1) ) + &
 wt25_12*(func(x,y0+ys*xn25_12,np,p,verbose-1) + &
          func(x,y0+ys*xp25_12,np,p,verbose-1) ) ) *ys

end function gaussy25

!------------------------------------------------------------------------------

double precision function gaussy26(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy26 = ( &
 wt26_01*(func(x,y0+ys*xn26_01,np,p,verbose-1) + &
          func(x,y0+ys*xp26_01,np,p,verbose-1) ) + &
 wt26_02*(func(x,y0+ys*xn26_02,np,p,verbose-1) + &
          func(x,y0+ys*xp26_02,np,p,verbose-1) ) + &
 wt26_03*(func(x,y0+ys*xn26_03,np,p,verbose-1) + &
          func(x,y0+ys*xp26_03,np,p,verbose-1) ) + &
 wt26_04*(func(x,y0+ys*xn26_04,np,p,verbose-1) + &
          func(x,y0+ys*xp26_04,np,p,verbose-1) ) + &
 wt26_05*(func(x,y0+ys*xn26_05,np,p,verbose-1) + &
          func(x,y0+ys*xp26_05,np,p,verbose-1) ) + &
 wt26_06*(func(x,y0+ys*xn26_06,np,p,verbose-1) + &
          func(x,y0+ys*xp26_06,np,p,verbose-1) ) + &
 wt26_07*(func(x,y0+ys*xn26_07,np,p,verbose-1) + &
          func(x,y0+ys*xp26_07,np,p,verbose-1) ) + &
 wt26_08*(func(x,y0+ys*xn26_08,np,p,verbose-1) + &
          func(x,y0+ys*xp26_08,np,p,verbose-1) ) + &
 wt26_09*(func(x,y0+ys*xn26_09,np,p,verbose-1) + &
          func(x,y0+ys*xp26_09,np,p,verbose-1) ) + &
 wt26_10*(func(x,y0+ys*xn26_10,np,p,verbose-1) + &
          func(x,y0+ys*xp26_10,np,p,verbose-1) ) + &
 wt26_11*(func(x,y0+ys*xn26_11,np,p,verbose-1) + &
          func(x,y0+ys*xp26_11,np,p,verbose-1) ) + &
 wt26_12*(func(x,y0+ys*xn26_12,np,p,verbose-1) + &
          func(x,y0+ys*xp26_12,np,p,verbose-1) ) + &
 wt26_13*(func(x,y0+ys*xn26_13,np,p,verbose-1) + &
          func(x,y0+ys*xp26_13,np,p,verbose-1) ) ) *ys

end function gaussy26

!------------------------------------------------------------------------------

double precision function gaussy27(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy27 = (wt27_00*func(x,y0,np,p,verbose-1) + &
 wt27_01*(func(x,y0+ys*xn27_01,np,p,verbose-1) + &
          func(x,y0+ys*xp27_01,np,p,verbose-1) ) + &
 wt27_02*(func(x,y0+ys*xn27_02,np,p,verbose-1) + &
          func(x,y0+ys*xp27_02,np,p,verbose-1) ) + &
 wt27_03*(func(x,y0+ys*xn27_03,np,p,verbose-1) + &
          func(x,y0+ys*xp27_03,np,p,verbose-1) ) + &
 wt27_04*(func(x,y0+ys*xn27_04,np,p,verbose-1) + &
          func(x,y0+ys*xp27_04,np,p,verbose-1) ) + &
 wt27_05*(func(x,y0+ys*xn27_05,np,p,verbose-1) + &
          func(x,y0+ys*xp27_05,np,p,verbose-1) ) + &
 wt27_06*(func(x,y0+ys*xn27_06,np,p,verbose-1) + &
          func(x,y0+ys*xp27_06,np,p,verbose-1) ) + &
 wt27_07*(func(x,y0+ys*xn27_07,np,p,verbose-1) + &
          func(x,y0+ys*xp27_07,np,p,verbose-1) ) + &
 wt27_08*(func(x,y0+ys*xn27_08,np,p,verbose-1) + &
          func(x,y0+ys*xp27_08,np,p,verbose-1) ) + &
 wt27_09*(func(x,y0+ys*xn27_09,np,p,verbose-1) + &
          func(x,y0+ys*xp27_09,np,p,verbose-1) ) + &
 wt27_10*(func(x,y0+ys*xn27_10,np,p,verbose-1) + &
          func(x,y0+ys*xp27_10,np,p,verbose-1) ) + &
 wt27_11*(func(x,y0+ys*xn27_11,np,p,verbose-1) + &
          func(x,y0+ys*xp27_11,np,p,verbose-1) ) + &
 wt27_12*(func(x,y0+ys*xn27_12,np,p,verbose-1) + &
          func(x,y0+ys*xp27_12,np,p,verbose-1) ) + &
 wt27_13*(func(x,y0+ys*xn27_13,np,p,verbose-1) + &
          func(x,y0+ys*xp27_13,np,p,verbose-1) ) ) *ys

end function gaussy27

!------------------------------------------------------------------------------

double precision function gaussy28(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy28 = ( &
 wt28_01*(func(x,y0+ys*xn28_01,np,p,verbose-1) + &
          func(x,y0+ys*xp28_01,np,p,verbose-1) ) + &
 wt28_02*(func(x,y0+ys*xn28_02,np,p,verbose-1) + &
          func(x,y0+ys*xp28_02,np,p,verbose-1) ) + &
 wt28_03*(func(x,y0+ys*xn28_03,np,p,verbose-1) + &
          func(x,y0+ys*xp28_03,np,p,verbose-1) ) + &
 wt28_04*(func(x,y0+ys*xn28_04,np,p,verbose-1) + &
          func(x,y0+ys*xp28_04,np,p,verbose-1) ) + &
 wt28_05*(func(x,y0+ys*xn28_05,np,p,verbose-1) + &
          func(x,y0+ys*xp28_05,np,p,verbose-1) ) + &
 wt28_06*(func(x,y0+ys*xn28_06,np,p,verbose-1) + &
          func(x,y0+ys*xp28_06,np,p,verbose-1) ) + &
 wt28_07*(func(x,y0+ys*xn28_07,np,p,verbose-1) + &
          func(x,y0+ys*xp28_07,np,p,verbose-1) ) + &
 wt28_08*(func(x,y0+ys*xn28_08,np,p,verbose-1) + &
          func(x,y0+ys*xp28_08,np,p,verbose-1) ) + &
 wt28_09*(func(x,y0+ys*xn28_09,np,p,verbose-1) + &
          func(x,y0+ys*xp28_09,np,p,verbose-1) ) + &
 wt28_10*(func(x,y0+ys*xn28_10,np,p,verbose-1) + &
          func(x,y0+ys*xp28_10,np,p,verbose-1) ) + &
 wt28_11*(func(x,y0+ys*xn28_11,np,p,verbose-1) + &
          func(x,y0+ys*xp28_11,np,p,verbose-1) ) + &
 wt28_12*(func(x,y0+ys*xn28_12,np,p,verbose-1) + &
          func(x,y0+ys*xp28_12,np,p,verbose-1) ) + &
 wt28_13*(func(x,y0+ys*xn28_13,np,p,verbose-1) + &
          func(x,y0+ys*xp28_13,np,p,verbose-1) ) + &
 wt28_14*(func(x,y0+ys*xn28_14,np,p,verbose-1) + &
          func(x,y0+ys*xp28_14,np,p,verbose-1) ) ) *ys

end function gaussy28

!------------------------------------------------------------------------------

double precision function gaussy29(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy29 = (wt29_00*func(x,y0,np,p,verbose-1) + &
 wt29_01*(func(x,y0+ys*xn29_01,np,p,verbose-1) + &
          func(x,y0+ys*xp29_01,np,p,verbose-1) ) + &
 wt29_02*(func(x,y0+ys*xn29_02,np,p,verbose-1) + &
          func(x,y0+ys*xp29_02,np,p,verbose-1) ) + &
 wt29_03*(func(x,y0+ys*xn29_03,np,p,verbose-1) + &
          func(x,y0+ys*xp29_03,np,p,verbose-1) ) + &
 wt29_04*(func(x,y0+ys*xn29_04,np,p,verbose-1) + &
          func(x,y0+ys*xp29_04,np,p,verbose-1) ) + &
 wt29_05*(func(x,y0+ys*xn29_05,np,p,verbose-1) + &
          func(x,y0+ys*xp29_05,np,p,verbose-1) ) + &
 wt29_06*(func(x,y0+ys*xn29_06,np,p,verbose-1) + &
          func(x,y0+ys*xp29_06,np,p,verbose-1) ) + &
 wt29_07*(func(x,y0+ys*xn29_07,np,p,verbose-1) + &
          func(x,y0+ys*xp29_07,np,p,verbose-1) ) + &
 wt29_08*(func(x,y0+ys*xn29_08,np,p,verbose-1) + &
          func(x,y0+ys*xp29_08,np,p,verbose-1) ) + &
 wt29_09*(func(x,y0+ys*xn29_09,np,p,verbose-1) + &
          func(x,y0+ys*xp29_09,np,p,verbose-1) ) + &
 wt29_10*(func(x,y0+ys*xn29_10,np,p,verbose-1) + &
          func(x,y0+ys*xp29_10,np,p,verbose-1) ) + &
 wt29_11*(func(x,y0+ys*xn29_11,np,p,verbose-1) + &
          func(x,y0+ys*xp29_11,np,p,verbose-1) ) + &
 wt29_12*(func(x,y0+ys*xn29_12,np,p,verbose-1) + &
          func(x,y0+ys*xp29_12,np,p,verbose-1) ) + &
 wt29_13*(func(x,y0+ys*xn29_13,np,p,verbose-1) + &
          func(x,y0+ys*xp29_13,np,p,verbose-1) ) + &
 wt29_14*(func(x,y0+ys*xn29_14,np,p,verbose-1) + &
          func(x,y0+ys*xp29_14,np,p,verbose-1) ) ) *ys

end function gaussy29

!------------------------------------------------------------------------------

double precision function gaussy30(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy30 = ( &
 wt30_01*(func(x,y0+ys*xn30_01,np,p,verbose-1) + &
          func(x,y0+ys*xp30_01,np,p,verbose-1) ) + &
 wt30_02*(func(x,y0+ys*xn30_02,np,p,verbose-1) + &
          func(x,y0+ys*xp30_02,np,p,verbose-1) ) + &
 wt30_03*(func(x,y0+ys*xn30_03,np,p,verbose-1) + &
          func(x,y0+ys*xp30_03,np,p,verbose-1) ) + &
 wt30_04*(func(x,y0+ys*xn30_04,np,p,verbose-1) + &
          func(x,y0+ys*xp30_04,np,p,verbose-1) ) + &
 wt30_05*(func(x,y0+ys*xn30_05,np,p,verbose-1) + &
          func(x,y0+ys*xp30_05,np,p,verbose-1) ) + &
 wt30_06*(func(x,y0+ys*xn30_06,np,p,verbose-1) + &
          func(x,y0+ys*xp30_06,np,p,verbose-1) ) + &
 wt30_07*(func(x,y0+ys*xn30_07,np,p,verbose-1) + &
          func(x,y0+ys*xp30_07,np,p,verbose-1) ) + &
 wt30_08*(func(x,y0+ys*xn30_08,np,p,verbose-1) + &
          func(x,y0+ys*xp30_08,np,p,verbose-1) ) + &
 wt30_09*(func(x,y0+ys*xn30_09,np,p,verbose-1) + &
          func(x,y0+ys*xp30_09,np,p,verbose-1) ) + &
 wt30_10*(func(x,y0+ys*xn30_10,np,p,verbose-1) + &
          func(x,y0+ys*xp30_10,np,p,verbose-1) ) + &
 wt30_11*(func(x,y0+ys*xn30_11,np,p,verbose-1) + &
          func(x,y0+ys*xp30_11,np,p,verbose-1) ) + &
 wt30_12*(func(x,y0+ys*xn30_12,np,p,verbose-1) + &
          func(x,y0+ys*xp30_12,np,p,verbose-1) ) + &
 wt30_13*(func(x,y0+ys*xn30_13,np,p,verbose-1) + &
          func(x,y0+ys*xp30_13,np,p,verbose-1) ) + &
 wt30_14*(func(x,y0+ys*xn30_14,np,p,verbose-1) + &
          func(x,y0+ys*xp30_14,np,p,verbose-1) ) + &
 wt30_15*(func(x,y0+ys*xn30_15,np,p,verbose-1) + &
          func(x,y0+ys*xp30_15,np,p,verbose-1) ) ) *ys

end function gaussy30

!------------------------------------------------------------------------------

double precision function gaussy31(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy31 = (wt31_00*func(x,y0,np,p,verbose-1) + &
 wt31_01*(func(x,y0+ys*xn31_01,np,p,verbose-1) + &
          func(x,y0+ys*xp31_01,np,p,verbose-1) ) + &
 wt31_02*(func(x,y0+ys*xn31_02,np,p,verbose-1) + &
          func(x,y0+ys*xp31_02,np,p,verbose-1) ) + &
 wt31_03*(func(x,y0+ys*xn31_03,np,p,verbose-1) + &
          func(x,y0+ys*xp31_03,np,p,verbose-1) ) + &
 wt31_04*(func(x,y0+ys*xn31_04,np,p,verbose-1) + &
          func(x,y0+ys*xp31_04,np,p,verbose-1) ) + &
 wt31_05*(func(x,y0+ys*xn31_05,np,p,verbose-1) + &
          func(x,y0+ys*xp31_05,np,p,verbose-1) ) + &
 wt31_06*(func(x,y0+ys*xn31_06,np,p,verbose-1) + &
          func(x,y0+ys*xp31_06,np,p,verbose-1) ) + &
 wt31_07*(func(x,y0+ys*xn31_07,np,p,verbose-1) + &
          func(x,y0+ys*xp31_07,np,p,verbose-1) ) + &
 wt31_08*(func(x,y0+ys*xn31_08,np,p,verbose-1) + &
          func(x,y0+ys*xp31_08,np,p,verbose-1) ) + &
 wt31_09*(func(x,y0+ys*xn31_09,np,p,verbose-1) + &
          func(x,y0+ys*xp31_09,np,p,verbose-1) ) + &
 wt31_10*(func(x,y0+ys*xn31_10,np,p,verbose-1) + &
          func(x,y0+ys*xp31_10,np,p,verbose-1) ) + &
 wt31_11*(func(x,y0+ys*xn31_11,np,p,verbose-1) + &
          func(x,y0+ys*xp31_11,np,p,verbose-1) ) + &
 wt31_12*(func(x,y0+ys*xn31_12,np,p,verbose-1) + &
          func(x,y0+ys*xp31_12,np,p,verbose-1) ) + &
 wt31_13*(func(x,y0+ys*xn31_13,np,p,verbose-1) + &
          func(x,y0+ys*xp31_13,np,p,verbose-1) ) + &
 wt31_14*(func(x,y0+ys*xn31_14,np,p,verbose-1) + &
          func(x,y0+ys*xp31_14,np,p,verbose-1) ) + &
 wt31_15*(func(x,y0+ys*xn31_15,np,p,verbose-1) + &
          func(x,y0+ys*xp31_15,np,p,verbose-1) ) ) *ys

end function gaussy31

!------------------------------------------------------------------------------

double precision function gaussy32(x,func,a,b,np,p,verbose)
implicit none
integer, intent(in)  :: np, verbose
double precision, intent(in) :: x, a, b, p(np)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
end interface

! Local variables
double precision :: y0,ys

y0 = 0.5d0 *(a+b)
ys = 0.5d0 *(b-a)

gaussy32 = ( &
 wt32_01*(func(x,y0+ys*xn32_01,np,p,verbose-1) + &
          func(x,y0+ys*xp32_01,np,p,verbose-1) ) + &
 wt32_02*(func(x,y0+ys*xn32_02,np,p,verbose-1) + &
          func(x,y0+ys*xp32_02,np,p,verbose-1) ) + &
 wt32_03*(func(x,y0+ys*xn32_03,np,p,verbose-1) + &
          func(x,y0+ys*xp32_03,np,p,verbose-1) ) + &
 wt32_04*(func(x,y0+ys*xn32_04,np,p,verbose-1) + &
          func(x,y0+ys*xp32_04,np,p,verbose-1) ) + &
 wt32_05*(func(x,y0+ys*xn32_05,np,p,verbose-1) + &
          func(x,y0+ys*xp32_05,np,p,verbose-1) ) + &
 wt32_06*(func(x,y0+ys*xn32_06,np,p,verbose-1) + &
          func(x,y0+ys*xp32_06,np,p,verbose-1) ) + &
 wt32_07*(func(x,y0+ys*xn32_07,np,p,verbose-1) + &
          func(x,y0+ys*xp32_07,np,p,verbose-1) ) + &
 wt32_08*(func(x,y0+ys*xn32_08,np,p,verbose-1) + &
          func(x,y0+ys*xp32_08,np,p,verbose-1) ) + &
 wt32_09*(func(x,y0+ys*xn32_09,np,p,verbose-1) + &
          func(x,y0+ys*xp32_09,np,p,verbose-1) ) + &
 wt32_10*(func(x,y0+ys*xn32_10,np,p,verbose-1) + &
          func(x,y0+ys*xp32_10,np,p,verbose-1) ) + &
 wt32_11*(func(x,y0+ys*xn32_11,np,p,verbose-1) + &
          func(x,y0+ys*xp32_11,np,p,verbose-1) ) + &
 wt32_12*(func(x,y0+ys*xn32_12,np,p,verbose-1) + &
          func(x,y0+ys*xp32_12,np,p,verbose-1) ) + &
 wt32_13*(func(x,y0+ys*xn32_13,np,p,verbose-1) + &
          func(x,y0+ys*xp32_13,np,p,verbose-1) ) + &
 wt32_14*(func(x,y0+ys*xn32_14,np,p,verbose-1) + &
          func(x,y0+ys*xp32_14,np,p,verbose-1) ) + &
 wt32_15*(func(x,y0+ys*xn32_15,np,p,verbose-1) + &
          func(x,y0+ys*xp32_15,np,p,verbose-1) ) + &
 wt32_16*(func(x,y0+ys*xn32_16,np,p,verbose-1) + &
          func(x,y0+ys*xp32_16,np,p,verbose-1) ) ) *ys

end function gaussy32

!------------------------------------------------------------------------------
!------------------------------------------------------------------------------

double precision function gaussx01(func,x0,xs,fay,fby,nyp,yp,np,p,verbose)
implicit none
integer, intent(in)  :: nyp,np,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
double precision :: y
y = 0.5d0 *(fay(x0,nyp,yp)+fby(x0,nyp,yp))
gaussx01 = wt01_00*func(x0,y,np,p,verbose-1)*xs

end function gaussx01

!------------------------------------------------------------------------------

double precision function gaussx02(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 2
gaussx02 = ( &
 wt02_01*(g2help(xn02_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp02_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx02

!------------------------------------------------------------------------------

double precision function gaussx03(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 3
gaussx03 = (wt03_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt03_01*(g2help(xn03_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp03_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx03

!------------------------------------------------------------------------------

double precision function gaussx04(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 4
gaussx04 = ( &
 wt04_01*(g2help(xn04_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp04_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt04_02*(g2help(xn04_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp04_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx04

!------------------------------------------------------------------------------

double precision function gaussx05(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 5
gaussx05 = (wt05_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt05_01*(g2help(xn05_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp05_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt05_02*(g2help(xn05_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp05_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx05

!------------------------------------------------------------------------------

double precision function gaussx06(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 6
gaussx06 = ( &
 wt06_01*(g2help(xn06_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp06_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt06_02*(g2help(xn06_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp06_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt06_03*(g2help(xn06_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp06_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx06

!------------------------------------------------------------------------------

double precision function gaussx07(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 7
gaussx07 = (wt07_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt07_01*(g2help(xn07_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp07_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt07_02*(g2help(xn07_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp07_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt07_03*(g2help(xn07_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp07_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx07

!------------------------------------------------------------------------------

double precision function gaussx08(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 8
gaussx08 = ( &
 wt08_01*(g2help(xn08_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp08_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt08_02*(g2help(xn08_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp08_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt08_03*(g2help(xn08_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp08_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt08_04*(g2help(xn08_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp08_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx08

!------------------------------------------------------------------------------

double precision function gaussx09(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 9
gaussx09 = (wt09_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt09_01*(g2help(xn09_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp09_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt09_02*(g2help(xn09_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp09_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt09_03*(g2help(xn09_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp09_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt09_04*(g2help(xn09_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp09_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx09

!------------------------------------------------------------------------------

double precision function gaussx10(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 10
gaussx10 = ( &
 wt10_01*(g2help(xn10_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp10_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt10_02*(g2help(xn10_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp10_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt10_03*(g2help(xn10_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp10_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt10_04*(g2help(xn10_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp10_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt10_05*(g2help(xn10_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp10_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx10

!------------------------------------------------------------------------------

double precision function gaussx11(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 11
gaussx11 = (wt11_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt11_01*(g2help(xn11_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp11_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt11_02*(g2help(xn11_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp11_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt11_03*(g2help(xn11_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp11_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt11_04*(g2help(xn11_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp11_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt11_05*(g2help(xn11_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp11_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx11

!------------------------------------------------------------------------------

double precision function gaussx12(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 12
gaussx12 = ( &
 wt12_01*(g2help(xn12_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp12_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt12_02*(g2help(xn12_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp12_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt12_03*(g2help(xn12_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp12_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt12_04*(g2help(xn12_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp12_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt12_05*(g2help(xn12_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp12_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt12_06*(g2help(xn12_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp12_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx12

!------------------------------------------------------------------------------

double precision function gaussx13(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 13
gaussx13 = (wt13_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt13_01*(g2help(xn13_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp13_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt13_02*(g2help(xn13_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp13_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt13_03*(g2help(xn13_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp13_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt13_04*(g2help(xn13_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp13_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt13_05*(g2help(xn13_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp13_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt13_06*(g2help(xn13_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp13_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx13

!------------------------------------------------------------------------------

double precision function gaussx14(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 14
gaussx14 = ( &
 wt14_01*(g2help(xn14_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp14_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt14_02*(g2help(xn14_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp14_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt14_03*(g2help(xn14_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp14_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt14_04*(g2help(xn14_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp14_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt14_05*(g2help(xn14_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp14_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt14_06*(g2help(xn14_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp14_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt14_07*(g2help(xn14_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp14_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx14

!------------------------------------------------------------------------------

double precision function gaussx15(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 15
gaussx15 = (wt15_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt15_01*(g2help(xn15_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp15_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt15_02*(g2help(xn15_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp15_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt15_03*(g2help(xn15_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp15_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt15_04*(g2help(xn15_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp15_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt15_05*(g2help(xn15_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp15_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt15_06*(g2help(xn15_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp15_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt15_07*(g2help(xn15_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp15_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx15

!------------------------------------------------------------------------------

double precision function gaussx16(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 16
gaussx16 = ( &
 wt16_01*(g2help(xn16_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp16_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt16_02*(g2help(xn16_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp16_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt16_03*(g2help(xn16_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp16_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt16_04*(g2help(xn16_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp16_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt16_05*(g2help(xn16_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp16_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt16_06*(g2help(xn16_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp16_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt16_07*(g2help(xn16_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp16_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt16_08*(g2help(xn16_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp16_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx16

!------------------------------------------------------------------------------

double precision function gaussx17(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 17
gaussx17 = (wt17_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt17_01*(g2help(xn17_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp17_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt17_02*(g2help(xn17_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp17_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt17_03*(g2help(xn17_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp17_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt17_04*(g2help(xn17_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp17_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt17_05*(g2help(xn17_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp17_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt17_06*(g2help(xn17_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp17_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt17_07*(g2help(xn17_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp17_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt17_08*(g2help(xn17_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp17_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx17

!------------------------------------------------------------------------------

double precision function gaussx18(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 18
gaussx18 = ( &
 wt18_01*(g2help(xn18_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp18_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt18_02*(g2help(xn18_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp18_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt18_03*(g2help(xn18_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp18_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt18_04*(g2help(xn18_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp18_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt18_05*(g2help(xn18_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp18_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt18_06*(g2help(xn18_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp18_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt18_07*(g2help(xn18_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp18_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt18_08*(g2help(xn18_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp18_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt18_09*(g2help(xn18_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp18_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx18

!------------------------------------------------------------------------------

double precision function gaussx19(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 19
gaussx19 = (wt19_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt19_01*(g2help(xn19_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp19_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt19_02*(g2help(xn19_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp19_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt19_03*(g2help(xn19_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp19_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt19_04*(g2help(xn19_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp19_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt19_05*(g2help(xn19_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp19_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt19_06*(g2help(xn19_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp19_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt19_07*(g2help(xn19_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp19_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt19_08*(g2help(xn19_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp19_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt19_09*(g2help(xn19_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp19_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx19

!------------------------------------------------------------------------------

double precision function gaussx20(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 20
gaussx20 = ( &
 wt20_01*(g2help(xn20_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp20_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt20_02*(g2help(xn20_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp20_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt20_03*(g2help(xn20_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp20_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt20_04*(g2help(xn20_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp20_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt20_05*(g2help(xn20_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp20_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt20_06*(g2help(xn20_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp20_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt20_07*(g2help(xn20_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp20_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt20_08*(g2help(xn20_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp20_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt20_09*(g2help(xn20_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp20_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt20_10*(g2help(xn20_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp20_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx20

!------------------------------------------------------------------------------

double precision function gaussx21(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 21
gaussx21 = (wt21_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt21_01*(g2help(xn21_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp21_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt21_02*(g2help(xn21_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp21_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt21_03*(g2help(xn21_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp21_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt21_04*(g2help(xn21_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp21_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt21_05*(g2help(xn21_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp21_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt21_06*(g2help(xn21_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp21_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt21_07*(g2help(xn21_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp21_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt21_08*(g2help(xn21_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp21_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt21_09*(g2help(xn21_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp21_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt21_10*(g2help(xn21_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp21_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx21

!------------------------------------------------------------------------------

double precision function gaussx22(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 22
gaussx22 = ( &
 wt22_01*(g2help(xn22_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp22_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt22_02*(g2help(xn22_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp22_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt22_03*(g2help(xn22_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp22_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt22_04*(g2help(xn22_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp22_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt22_05*(g2help(xn22_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp22_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt22_06*(g2help(xn22_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp22_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt22_07*(g2help(xn22_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp22_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt22_08*(g2help(xn22_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp22_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt22_09*(g2help(xn22_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp22_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt22_10*(g2help(xn22_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp22_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt22_11*(g2help(xn22_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp22_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx22

!------------------------------------------------------------------------------

double precision function gaussx23(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 23
gaussx23 = (wt23_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt23_01*(g2help(xn23_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp23_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt23_02*(g2help(xn23_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp23_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt23_03*(g2help(xn23_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp23_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt23_04*(g2help(xn23_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp23_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt23_05*(g2help(xn23_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp23_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt23_06*(g2help(xn23_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp23_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt23_07*(g2help(xn23_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp23_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt23_08*(g2help(xn23_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp23_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt23_09*(g2help(xn23_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp23_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt23_10*(g2help(xn23_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp23_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt23_11*(g2help(xn23_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp23_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx23

!------------------------------------------------------------------------------

double precision function gaussx24(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 24
gaussx24 = ( &
 wt24_01*(g2help(xn24_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp24_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt24_02*(g2help(xn24_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp24_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt24_03*(g2help(xn24_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp24_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt24_04*(g2help(xn24_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp24_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt24_05*(g2help(xn24_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp24_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt24_06*(g2help(xn24_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp24_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt24_07*(g2help(xn24_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp24_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt24_08*(g2help(xn24_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp24_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt24_09*(g2help(xn24_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp24_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt24_10*(g2help(xn24_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp24_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt24_11*(g2help(xn24_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp24_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt24_12*(g2help(xn24_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp24_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx24

!------------------------------------------------------------------------------

double precision function gaussx25(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 25
gaussx25 = (wt25_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt25_01*(g2help(xn25_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp25_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt25_02*(g2help(xn25_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp25_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt25_03*(g2help(xn25_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp25_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt25_04*(g2help(xn25_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp25_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt25_05*(g2help(xn25_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp25_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt25_06*(g2help(xn25_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp25_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt25_07*(g2help(xn25_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp25_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt25_08*(g2help(xn25_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp25_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt25_09*(g2help(xn25_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp25_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt25_10*(g2help(xn25_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp25_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt25_11*(g2help(xn25_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp25_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt25_12*(g2help(xn25_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp25_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx25

!------------------------------------------------------------------------------

double precision function gaussx26(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 26
gaussx26 = ( &
 wt26_01*(g2help(xn26_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp26_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt26_02*(g2help(xn26_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp26_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt26_03*(g2help(xn26_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp26_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt26_04*(g2help(xn26_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp26_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt26_05*(g2help(xn26_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp26_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt26_06*(g2help(xn26_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp26_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt26_07*(g2help(xn26_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp26_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt26_08*(g2help(xn26_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp26_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt26_09*(g2help(xn26_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp26_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt26_10*(g2help(xn26_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp26_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt26_11*(g2help(xn26_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp26_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt26_12*(g2help(xn26_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp26_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt26_13*(g2help(xn26_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp26_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx26

!------------------------------------------------------------------------------

double precision function gaussx27(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 27
gaussx27 = (wt27_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt27_01*(g2help(xn27_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp27_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt27_02*(g2help(xn27_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp27_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt27_03*(g2help(xn27_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp27_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt27_04*(g2help(xn27_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp27_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt27_05*(g2help(xn27_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp27_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt27_06*(g2help(xn27_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp27_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt27_07*(g2help(xn27_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp27_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt27_08*(g2help(xn27_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp27_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt27_09*(g2help(xn27_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp27_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt27_10*(g2help(xn27_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp27_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt27_11*(g2help(xn27_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp27_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt27_12*(g2help(xn27_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp27_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt27_13*(g2help(xn27_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp27_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx27

!------------------------------------------------------------------------------

double precision function gaussx28(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 28
gaussx28 = ( &
 wt28_01*(g2help(xn28_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt28_02*(g2help(xn28_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt28_03*(g2help(xn28_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt28_04*(g2help(xn28_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt28_05*(g2help(xn28_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt28_06*(g2help(xn28_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt28_07*(g2help(xn28_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt28_08*(g2help(xn28_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt28_09*(g2help(xn28_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt28_10*(g2help(xn28_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt28_11*(g2help(xn28_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt28_12*(g2help(xn28_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt28_13*(g2help(xn28_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt28_14*(g2help(xn28_14,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp28_14,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx28

!------------------------------------------------------------------------------

double precision function gaussx29(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 29
gaussx29 = (wt29_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt29_01*(g2help(xn29_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt29_02*(g2help(xn29_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt29_03*(g2help(xn29_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt29_04*(g2help(xn29_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt29_05*(g2help(xn29_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt29_06*(g2help(xn29_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt29_07*(g2help(xn29_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt29_08*(g2help(xn29_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt29_09*(g2help(xn29_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt29_10*(g2help(xn29_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt29_11*(g2help(xn29_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt29_12*(g2help(xn29_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt29_13*(g2help(xn29_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt29_14*(g2help(xn29_14,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp29_14,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx29

!------------------------------------------------------------------------------

double precision function gaussx30(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 30
gaussx30 = ( &
 wt30_01*(g2help(xn30_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_02*(g2help(xn30_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_03*(g2help(xn30_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_04*(g2help(xn30_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_05*(g2help(xn30_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_06*(g2help(xn30_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_07*(g2help(xn30_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_08*(g2help(xn30_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_09*(g2help(xn30_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_10*(g2help(xn30_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_11*(g2help(xn30_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_12*(g2help(xn30_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_13*(g2help(xn30_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_14*(g2help(xn30_14,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_14,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt30_15*(g2help(xn30_15,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp30_15,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx30

!------------------------------------------------------------------------------

double precision function gaussx31(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 31
gaussx31 = (wt31_00*g2help(0.0d0 ,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
 wt31_01*(g2help(xn31_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_02*(g2help(xn31_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_03*(g2help(xn31_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_04*(g2help(xn31_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_05*(g2help(xn31_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_06*(g2help(xn31_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_07*(g2help(xn31_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_08*(g2help(xn31_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_09*(g2help(xn31_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_10*(g2help(xn31_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_11*(g2help(xn31_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_12*(g2help(xn31_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_13*(g2help(xn31_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_14*(g2help(xn31_14,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_14,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt31_15*(g2help(xn31_15,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp31_15,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx31

!------------------------------------------------------------------------------

double precision function gaussx32(func,x0,xs,fay,fby,nyp,yp,np,p,nymin,nymax,verbose)
implicit none
integer, intent(in)  :: nyp,np,nymin,nymax,verbose
double precision, intent(in) :: x0,xs,p(np),yp(nyp)
interface
  function func(fx, fy, fnpar, fpar, fverbose)
  implicit none
  double precision             :: func
  double precision, intent(in) :: fx
  double precision, intent(in) :: fy
  integer, intent(in)  :: fnpar
  double precision, intent(in) :: fpar(fnpar)
  integer, intent(in)  :: fverbose
  end function func
  function fay(fx, fnyp, fyp)
    implicit none
    double precision             :: fay
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fay
  function fby(fx, fnyp, fyp)
    implicit none
    double precision             :: fby
    double precision, intent(in) :: fx
    integer, intent(in)  :: fnyp
    double precision, intent(in) :: fyp(fnyp)
  end function fby
end interface

! Local variables
integer, parameter :: nn = 32
gaussx32 = ( &
 wt32_01*(g2help(xn32_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_01,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_02*(g2help(xn32_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_02,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_03*(g2help(xn32_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_03,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_04*(g2help(xn32_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_04,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_05*(g2help(xn32_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_05,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_06*(g2help(xn32_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_06,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_07*(g2help(xn32_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_07,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_08*(g2help(xn32_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_08,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_09*(g2help(xn32_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_09,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_10*(g2help(xn32_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_10,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_11*(g2help(xn32_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_11,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_12*(g2help(xn32_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_12,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_13*(g2help(xn32_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_13,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_14*(g2help(xn32_14,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_14,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_15*(g2help(xn32_15,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_15,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) + &
 wt32_16*(g2help(xn32_16,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) + &
          g2help(xp32_16,x0,xs,nn,func,fay,fby,nyp,yp,np,p,nymin,nymax,verbose) ) ) *xs

end function gaussx32

!------------------------------------------------------------------------------
end module gauss_legendre
