Fix: Utilise le bon interval dans Monte-Carlo
This commit is contained in:
4
tp7.py
4
tp7.py
@@ -140,8 +140,8 @@ def exercice2():
|
||||
g = lambda x, y: 1
|
||||
g2 = lambda x, y: np.exp(-x ** 2 - y ** 2)
|
||||
|
||||
ig = monte_carlo_2d(g, a=0, b=1, c=0, d=1, n=10_000)
|
||||
ig2 = monte_carlo_2d(g2, a=0, b=1, c=0, d=1, n=10_000)
|
||||
ig = monte_carlo_2d(g, a=-1, b=1, c=-1, d=1, n=10_000)
|
||||
ig2 = monte_carlo_2d(g2, a=-1, b=1, c=-1, d=1, n=10_000)
|
||||
print(f'I (g) = {ig}, I (g2) = {ig2}')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user