1 double precision function mygauss(x)
3 c Bell-like function with shorter tail than Gussian, C2 class
4 double precision a /0.12479628030882975000d0/,
5 & b /-0.02020459191080933333d0/,
6 & c /0.00193897131461287500d0/,
7 & a1 /0.10424745713810881250d0/,
8 & b1 /-0.02369260389502472656d0/,
9 & c1 /0.00177694529212685400d0/
10 if (x.lt.-1.0d0 .and. x.gt.-3.0d0) then
12 mygauss=xx*xx*(a1+xx*(b1+c1*xx))
13 else if (x.ge.-1.0d0 .and. x.le.1.0d0) then
15 mygauss=1.0d0+xx*(-0.5d0+xx*(a+xx*(b+xx*c)))
16 else if (x.gt.1.0d0 .and. x.lt.3.0d0) then
18 mygauss=xx*xx*(a1+xx*(b1+c1*xx))
24 c------------------------------------------------------------
25 double precision function mygaussder(x)
27 c Bell-like function with shorter tail than Gussian, C2 class
28 c double precision a /0.12479628030882975000d0/,
29 c & b /-0.02020459191080933333d0/,
30 c & c /0.00193897131461287500d0/,
31 c & a1 /0.10424745713810881250d0/,
32 c & b1 /-0.02369260389502472656d0/,
33 c & c1 /0.00177694529212685400d0/
34 double precision a /0.49918512123531900000d0/,
35 & b /-0.12122755146485599998d0/,
36 & c /0.01551177051690300000d0/,
37 & a1 /0.41698982855243525000d0/,
38 & b1 /-0.14215562337014835936d0/,
39 & c1 /0.01421556233701483200d0/
40 if (x.lt.-1.0d0 .and. x.gt.-3.0d0) then
42 c mygaussder=(x+3.0d0)*xx*(4.0d0*a1+xx*(6.0d0*b1+8.0d0*c1*xx))
43 mygaussder=(x+3.0d0)*xx*(a1+xx*(b1+c1*xx))
44 else if (x.ge.-1.0d0 .and. x.le.1.0d0) then
46 c mygaussder=x*(-1.0d0+xx*(4.0d0*a+xx*(6.0d0*b+xx*8.0d0*c)))
47 mygaussder=x*(-1.0d0+xx*(a+xx*(b+xx*c)))
48 else if (x.gt.1.0d0 .and. x.lt.3.0d0) then
50 c mygaussder=(x-3.0d0)*xx*(4.0d0*a1+xx*(6.0d0*b1+8.0d0*c1*xx))
51 mygaussder=(x-3.0d0)*xx*(a1+xx*(b1+c1*xx))