diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-20 23:41:04 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-20 23:41:04 +0000 |
commit | 1609f855828d2b932542b3a46158619a7c574555 (patch) | |
tree | 94a4e258c764ebf16c3c4a761871d97264fc7d9f /tests/basics/math.py | |
parent | 56f02eacfe7cf30dd628311aea49ef2b7f18874e (diff) | |
download | micropython-1609f855828d2b932542b3a46158619a7c574555.tar.gz micropython-1609f855828d2b932542b3a46158619a7c574555.zip |
Rename test so that it doesn't clash with Python math module.
Diffstat (limited to 'tests/basics/math.py')
-rw-r--r-- | tests/basics/math.py | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/tests/basics/math.py b/tests/basics/math.py deleted file mode 100644 index f5ffbf40d5..0000000000 --- a/tests/basics/math.py +++ /dev/null @@ -1,49 +0,0 @@ -# Tests the functions imported from math - -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), - (expm1, test_values), - (log, p_test_values), - (log2, p_test_values), - (log10, p_test_values), - (cosh, test_values), - (sinh, test_values), - (tanh, test_values), - (acosh, [1.0, 5.0, 1.0]), - (asinh, test_values), - (atanh, [-0.99, -0.5, 0.0, 0.5, 0.99]), - (cos, test_values), - (sin, test_values), - (tan, test_values), - (acos, unit_range_test_values), - (asin, unit_range_test_values), - (atan, test_values), - (ceil, test_values), - (fabs, test_values), - (floor, test_values), - #(frexp, test_values), - #(isfinite, [1, 0, float('NaN'), float('Inf')]) - (trunc, test_values) - ] - -for function, test_vals in functions: - for value in test_vals: - print("{:8.7f}".format(function(value))) - -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))) - - |