Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 deletions

View file

@ -19,8 +19,8 @@ END FUNCTION
FUNCTION midRect(a, b, n)
h = (b - a) / n
sum = 0
FOR x = a TO b - h STEP h
sum = sum + (h / 2) * (f(x) + f(x + h))
FOR x = a + h / 2 TO b - h / 2 STEP h
sum = sum + h * (f(x))
NEXT x
midRect = sum
END FUNCTION
@ -40,7 +40,7 @@ FUNCTION simpson(a, b, n)
sum2 = 0
FOR i = 0 TO n-1
sum1 = sum + f(a + h * i + h / 2)
sum1 = sum1 + f(a + h * i + h / 2)
NEXT i
FOR i = 1 TO n - 1