Initial commit

This commit is contained in:
2016-02-03 18:52:05 +00:00
commit d40505e161
507 changed files with 91383 additions and 0 deletions
@@ -0,0 +1,22 @@
SUBROUTINE trapzd(func,a,b,s,n)
INTEGER n
REAL a,b,s,func
EXTERNAL func
INTEGER it,j
REAL del,sum,tnm,x
if (n.eq.1) then
s=0.5*(b-a)*(func(a)+func(b))
else
it=2**(n-2)
tnm=it
del=(b-a)/tnm
x=a+0.5*del
sum=0.
do 11 j=1,it
sum=sum+func(x)
x=x+del
11 continue
s=0.5*(s+(b-a)*sum/tnm)
endif
return
END