Damien George
6b8b56f859
py/modmath: Check for zero division in log with 2 args.
7 years ago
Damien George
fde54350a8
tests/float: Convert "sys.exit()" to "raise SystemExit".
The latter is shorter and simpler because it doesn't require importing the
sys module.
8 years ago
Damien George
b1fa907d56
tests: Allow float tests to run when MATH_SPECIAL_FUNCTIONS is disabled.
9 years ago
Michael Buesch
17298af61e
py/modmath: Add domain error checking to sqrt, log, log2, log10.
These functions will raise 'ValueError: math domain error' on invalid
input.
9 years ago
Damien George
6f49520042
py: Implement second arg for math.log (optional value for base).
10 years ago
Damien George
9dd3640464
tests: Add missing tests for builtins, and many other things.
10 years ago
Damien George
6d1f5070ce
lib/libm: Add frexp and modf functions; use in stmhal; add tests.
Addresses issue #1081 .
10 years ago
Damien George
f04329e93b
lib/libm: Add acosh, asinh, atanh, tan; get working with stmhal.
acoshf, asinhf, atanhf were added from musl. mathsincos.c was
split up into its original, separate files (from newlibe-nano-2).
tan was added.
All of the important missing float functions are now implemented,
and pyboard now passes tests/float/math_fun.py (finally!).
10 years ago
Damien George
539681fffd
tests: Rename test scripts, changing - to _ for consistency.
From now on, all new tests must use underscore.
Addresses issue #727 .
10 years ago
Paul Sokolovsky
f605172d2b
tests/float/: Skip tests if "math" module is not available.
11 years ago
Damien George
5cd0b2227f
tests: Split out those tests requiring float and import.
Tests in basics (which should probably be renamed to core) should not
rely on float, or import any non-built-in files. This way these tests
can be run when those features are not available.
All test in basics now pass on the pyboard using stmhal port, except for
string-repr which has some issues with character hex printing.
11 years ago
Damien George
c322c5f07f
py: Fix regress for printing of floats and #if.
Also change formating modifier in test script (it still passes with
original format though).
11 years ago
Damien George
084ef373fb
py: Fix math.{ceil,floor,trunc} to return int.
11 years ago
Rachel Dowdall
249b9c761d
Fixed broken math functions that return bool and added some more.
11 years ago
Damien George
1609f85582
Rename test so that it doesn't clash with Python math module.
11 years ago
Rachel Dowdall
5a14a1d690
Added various simple functions to math module.
11 years ago