diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-22 20:25:55 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-22 20:25:55 +0000 |
commit | 365274da13cc701e3e8f6c72a24dd4eb4083a88d (patch) | |
tree | 110170545eae9de4a584f08dd34d259cef0b70a0 /tests/basics/math-fun.py | |
parent | 0119fc7532c573bd596fb6173b4d36ef5260027a (diff) | |
parent | a6d53188b7db85af9dc93186e4f36b7009084ea6 (diff) |
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'tests/basics/math-fun.py')
-rw-r--r-- | tests/basics/math-fun.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/basics/math-fun.py b/tests/basics/math-fun.py index f5ffbf40d..1301dc2a5 100644 --- a/tests/basics/math-fun.py +++ b/tests/basics/math-fun.py @@ -5,8 +5,6 @@ from math import * test_values = [-100., -1.23456, -1, -0.5, 0.0, 0.5, 1.23456, 100.] p_test_values = [0.1, 0.5, 1.23456] unit_range_test_values = [-1., -0.75, -0.5, -0.25, 0., 0.25, 0.5, 0.75, 1.] -#IEEE_test_values = [1, 0, float('NaN'), float('Inf'), -float('NaN'), -float('Inf')] -#TODO: float('NaN') functions = [(sqrt, p_test_values), (exp, test_values), @@ -30,7 +28,6 @@ functions = [(sqrt, p_test_values), (fabs, test_values), (floor, test_values), #(frexp, test_values), - #(isfinite, [1, 0, float('NaN'), float('Inf')]) (trunc, test_values) ] @@ -42,8 +39,8 @@ binary_functions = [(copysign, [(23., 42.), (-23., 42.), (23., -42.), (-23., -42.), (1., 0.0), (1., -0.0)]) ] -#for function, test_vals in binary_functions: -# for value1, value2 in test_vals: -# print("{:8.7f}".format(function(value1, value2))) +for function, test_vals in binary_functions: + for value1, value2 in test_vals: + print("{:8.7f}".format(function(value1, value2))) |