This commit is contained in:
2025-04-29 22:50:45 +08:00
parent 6ce53f4403
commit 2bf2c0bb85
2 changed files with 35 additions and 9 deletions

View File

@@ -5,17 +5,9 @@ def fx(x):
x = 1e-10 # Avoid division by zero
return math.sin(x)/x
def Romberg(a, b, err):
t00 = (b-a)*(fx(a)+fx(b))/2
t01 = 0
t10 = 0
t11 = 0
t20 = 0
t21 = 0
t30 = 0
t31 = 0
t01 = t10 = t11 = t20 = t21 = t30 = t31 = 0
k = 1
while True:
tmp = 0