Closed farah-salama closed 3 months ago
math.sumprod(x, y)
math.frexp(x)
math.isclose(a, b, *, rel_tol = 1e-09, abs_tol = 0.0)
Tests are added in test_math.py to ensure the correctness of each function.
test_math.py
Hello @farah-salama! Welcome to LPython! Thanks for this PR.
Please update the test references by running
./run_tests.py -u
Added functions
math.sumprod(x, y)
: Calculates the sum of products of values from the lists x and y.math.frexp(x)
: Returns the mantissa and exponent of x as the pair (m, e), where m is a float and e is an integer such that x == m * 2**e exactly.math.isclose(a, b, *, rel_tol = 1e-09, abs_tol = 0.0)
: Checks if the values a and b are close to each other.Testing
Tests are added in
test_math.py
to ensure the correctness of each function.