diff options
author | stijn <stijn@ignitron.net> | 2019-11-20 13:38:33 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-01-23 09:28:33 +1100 |
commit | dd6967202a734fce569127c07da7ed1e07ce8bc4 (patch) | |
tree | c6519e4f19dbf70efc0c99fd4f4f0e3a3c3f13b7 /tests/float/math_constants.py | |
parent | e0b8d6982713c78169ec882770e746f2c5f4bc30 (diff) | |
download | micropython-dd6967202a734fce569127c07da7ed1e07ce8bc4.tar.gz micropython-dd6967202a734fce569127c07da7ed1e07ce8bc4.zip |
py/modmath: Add math.tau, math.nan and math.inf constants.
Configurable by the new MICROPY_PY_MATH_CONSTANTS option.
Diffstat (limited to 'tests/float/math_constants.py')
-rw-r--r-- | tests/float/math_constants.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/float/math_constants.py b/tests/float/math_constants.py new file mode 100644 index 0000000000..2e4c321052 --- /dev/null +++ b/tests/float/math_constants.py @@ -0,0 +1,11 @@ +# Tests various constants of the math module. +try: + import math + from math import exp, cos +except ImportError: + print("SKIP") + raise SystemExit + +print(math.e == exp(1.0)) + +print(cos(math.pi)) |