about summary refs log tree commit diff
path: root/src/internal/libm.h
Commit message (Collapse)AuthorAgeFilesLines
* math: add dummy implementations of 128 bit long double functionsSzabolcs Nagy2015-03-111-0/+14
| | | | | | | | This is in preparation for the aarch64 port only to have the long double math symbols available on ld128 platforms. The implementations should be fixed up later once we have proper tests for these functions. Added bigendian handling for ld128 bit manipulations too.
* provide CMPLX macros in implementation-internal libm.hRich Felker2014-12-171-0/+12
| | | | | | this avoids assuming the presence of C11 macro definitions in the public complex.h, which need changes potentially incompatible with the way these macros are being used internally.
* math: remove STRICT_ASSIGN macroSzabolcs Nagy2013-09-061-11/+0
| | | | | | | | | | | | | gcc did not always drop excess precision according to c99 at assignments before version 4.5 even if -std=c99 was requested which caused badly broken mathematical functions on i386 when FLT_EVAL_METHOD!=0 but STRICT_ASSIGN was not used consistently and it is worked around for old compilers with -ffloat-store so it is no longer needed the new convention is to get the compiler respect c99 semantics and when excess precision is not harmful use float_t or double_t or to specialize code using FLT_EVAL_METHOD
* math: remove libc.h include from libm.hSzabolcs Nagy2013-09-051-2/+0
| | | | libc.h is only for weak_alias so include it directly where it is used
* math: cosmetic cleanup (use explicit union instead of fshape and dshape)Szabolcs Nagy2013-09-051-66/+56
|
* math: remove *_WORD64 macros from libm.hSzabolcs Nagy2013-09-051-16/+0
| | | | only fma used these macros and the explicit union is clearer
* math: remove old longdbl.hSzabolcs Nagy2013-09-051-2/+0
|
* long double cleanup, initial commitSzabolcs Nagy2013-09-051-0/+28
| | | | | | | | new ldshape union, ld128 support is kept, code that used the old ldshape union was rewritten (IEEEl2bits union of freebsd libm is not touched yet) ld80 __fpclassifyl no longer tries to handle invalid representation
* make CMPLX macros available in complex.h in non-c11 mode as wellSzabolcs Nagy2012-12-111-8/+0
|
* math: turn off the STRICT_ASSIGN workaround by defaultSzabolcs Nagy2012-11-131-5/+3
| | | | | | | | | the volatile hack in STRICT_ASSIGN is only needed if assignment is not respected and excess precision is kept. gcc -fexcess-precision=standard and -ffloat-store both respect assignment and musl use these flags by default. i kept the macro for now so the workaround may be used for bad compilers in the future.
* complex: add C11 CMPLX macros and replace cpack with themSzabolcs Nagy2012-11-131-18/+5
|
* add FORCE_EVAL macro to evaluate float expr for their side effectnsz2012-05-061-0/+13
| | | | | updated nextafter* to use FORCE_EVAL, it can be used in many other places in the math code to improve readability.
* add creal/cimag macros in complex.h (and use them in the functions defs)Rich Felker2012-03-221-8/+0
|
* don't inline __rem_pio2l so the code size is smallernsz2012-03-191-0/+1
|
* fix loads of missing const in new libm, and some global vars (?!) in powlRich Felker2012-03-181-2/+2
|
* fix namespace issues for lgamma, etc.Rich Felker2012-03-161-0/+2
| | | | standard functions cannot depend on nonstandard symbols
* first commit of the new libm!Rich Felker2012-03-131-0/+186
thanks to the hard work of Szabolcs Nagy (nsz), identifying the best (from correctness and license standpoint) implementations from freebsd and openbsd and cleaning them up! musl should now fully support c99 float and long double math functions, and has near-complete complex math support. tgmath should also work (fully on gcc-compatible compilers, and mostly on any c99 compiler). based largely on commit 0376d44a890fea261506f1fc63833e7a686dca19 from nsz's libm git repo, with some additions (dummy versions of a few missing long double complex functions, etc.) by me. various cleanups still need to be made, including re-adding (if they're correct) some asm functions that were dropped.