David Lechner
0eead94181
lib/libm: Use __asm__ instead of asm.
`asm` is not part of the C standard and causes a complier error when
`-std=c99` is used. `__asm__` is the recommended alternative.
https://gcc.gnu.org/onlinedocs/gcc/extensions-to-the-c-language-family/alternate-keywords.html
Signed-off-by: David Lechner <david@pybricks.com>
2 years ago
Zoltán Vörös
27767aafa2
lib/libm_dbl: Add round.c source code.
This code is imported from musl, to match existing code in libm_dbl.
The file is also added to the build in stm32/Makefile. It's not needed by
the core code but, similar to c5cc64175b
,
allows round() to be used by user C modules or board extensions.
5 years ago
stijn
d6243568a0
all: Remove commented-out include statements.
5 years ago
Jim Mussared
580a2656d1
stm32: Use hardware double sqrt on F7/H7 MCUs.
Identical to cd527bb324
but for doubles.
This gives a -2.754% improvement on bm_float.py, and -35% improvement on
calling sqrt in a loop.
5 years ago
Andrew Leech
57a73973ad
lib/libm_dbl: Add implementation of copysign() for DEBUG builds.
This provides a double variant of the float copysignf from libm/math.c
which is required for DEBUG=1 builds when MICROPY_FLOAT_IMPL=double
6 years ago
Damien George
0b239d458c
lib/libm_dbl/tanh: Make tanh more efficient and handle large numbers.
Prior to this patch tanh(large number) would return nan due to inf/inf.
6 years ago
Damien George
045116551e
lib: Add libm_dbl, a double-precision math library, from musl-1.1.16.
7 years ago