Skip to content

Commit 1212229

Browse files
fix: test pre-commit
1 parent 608cafc commit 1212229

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

math/rieman_integral.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
import math
33

44

5-
def rieman_integral(fungsiHitung: Callable[[float], float],
6-
a: float,
7-
b: float,
8-
n: int,
9-
approx: str) -> float:
5+
def rieman_integral(
6+
fungsiHitung: Callable[[float], float], a: float, b: float, n: int, approx: str
7+
) -> float:
108
"""
119
>>> rieman_integral(math.sin,0,math.pi/2,100,"tengah")
1210
1.0000102809119051
@@ -47,13 +45,14 @@ def main(args=None):
4745
# persamaan x
4846
def f(x):
4947
return x
48+
5049
print(rieman_integral(f, 0, 1, 1, "tengah")) # 0.5
5150

5251
# persamaan 4/(1+x^2)
5352
def g(x):
5453
return (4) / (1 + x**2)
55-
print(rieman_integral(g, 0, 1, 1000, "tengah")) # 3.1415927369231227
5654

55+
print(rieman_integral(g, 0, 1, 1000, "tengah")) # 3.1415927369231227
5756

5857
print(rieman_integral(math.sin, 0, math.pi / 2, 100, "kiri")) # 0.9921254566056331
5958

0 commit comments

Comments
 (0)