Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55aeeed commit fd095eaCopy full SHA for fd095ea
integration_tests/test_complex.py
@@ -40,8 +40,21 @@ def test_complex():
40
print(x.real)
41
print(x.imag)
42
43
+
44
+def test_complex_abs():
45
+ x: c32
46
+ x = complex(3, 4)
47
+ eps: f64
48
+ eps = 1e-12
49
+ assert abs(abs(x) - 5.0) < eps
50
+ y: c64
51
+ y = complex(6, 8)
52
+ assert abs(abs(y) - 10.0) < eps
53
54
55
def check():
56
test_real_imag()
57
test_complex()
58
+ test_complex_abs()
59
60
check()
0 commit comments