summaryrefslogtreecommitdiffstats
path: root/lib/msun/src/math.h
Commit message (Collapse)AuthorAgeFilesLines
* MFC r301761:trasz2016-12-031-1/+1
| | | | Fix frexpl() declaration to not include the field name.
* MFC r271651, r271719, r272138, r272457, r272845, r275476, r275518, r275614,tijl2015-06-251-1/+5
| | | | | | | | r275819, r276176, r278154, r278160, r278339, r279127, r279240, r279491, r279493, r279856, r283032, r284423, r284426, r284427, r284428 Merge changes to libm from the past 9 months. This includes improvements to the Bessel functions and adds the C99 function lgammal.
* MFC r257770 r257818 r257823 r260066 r260067 r260089 r260145 r268587 r268588tijl2014-09-181-27/+8
| | | | | | | | | | | r268589 r268590 r268593 r268597 r269758 r270845 r270847 r270893 r270932 r270947 r271147 Merge libm work by kargl, bde and das from the past few months. Besides optimisations and small bug fixes this includes new implementations for C99 functions expl, coshl, sinhl, tanhl, erfl and erfcl. Approved by: re (kib)
* Restore the longer form of the _Generic. The short form does not work in C++.theraven2013-07-291-2/+11
|
* Reenable the isnan(double) / isinf(double) declarations when targeting C89 + ↵theraven2013-07-291-0/+15
| | | | SUSv2 mode.
* Cleaner support for type qualifiers.theraven2013-07-131-11/+2
| | | | Submitted by: Pasi Parviainen
* Ensure that the _Generic() macro in math.h works with qualified types.theraven2013-07-131-17/+26
| | | | tgmath.h contains the same bugs and so should be fixed in the same way.
* Fix the build with C++ where __builtin_types_compatible_p is not allowed.theraven2013-07-121-2/+3
|
* Fix some typoes in math.h cleanup.theraven2013-07-111-3/+3
|
* Cleanups to math.h that prevent namespace conflicts with C++.theraven2013-07-111-28/+49
| | | | | Reviewed by: bde MFC after: 3 days
* Add implementations of acoshl(), asinhl(), and atanhl(). This is adas2013-06-101-3/+3
| | | | merge of the work done by bde and myself.
* ld80 and ld128 implementations of expm1l(). This code started lifekargl2013-06-031-1/+1
| | | | | | | | | | | | | | as a fairly faithful implementation of the algorithm found in PTP Tang, "Table-driven implementation of the Expm1 function in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 18, 211-222 (1992). Over the last 18-24 months, the code has under gone significant optimization and testing. Reviewed by: bde Obtained from: bde (most of the optimizations)
* Add logl, log2l, log10l, and log1pl.das2013-06-031-4/+4
| | | | Submitted by: bde
* Compute the exponential of x for Intel 80-bit format and IEEE 128-bitkargl2012-07-231-1/+1
| | | | | | | | | | | | | format. These implementations are based on PTP Tang, "Table-driven implementation of the exponential function in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 15, 144-157 (1989). PR: standards/152415 Submitted by: kargl Reviewed by: bde, das Approved by: das (mentor)
* Allow inclusion of libc++ <cmath> to work after including math.htheraven2012-05-271-43/+36
| | | | | | Submitted by: Yamaya Takashi Reviewed by: das MFC after: 1 week
* Expose the unimplemented libm functions in the math.h header. This allows ↵theraven2011-11-121-13/+13
| | | | | | | C++'s <cmath> to work without the compiler complaining that the C++ versions are calling implicitly-declared functions. You will still get a linker error when they are called. OpenBSD 5.0 claims to fully implement the C99 <math.h> stuff, so might be worth investigating... Reviewed by: das Approved by: dim (mentor)
* Don't define FP_FAST_FMA on sparc64; with the recent fixes, fma() isdas2011-10-151-5/+2
| | | | | | no longer "fast" on sparc64. (It really wasn't to begin with, since the old implementation was using long doubles, and long doubles are emulated in software on sparc64.)
* Implement the long double version for the cube root function, cbrtl.kargl2011-03-121-2/+0
| | | | | | | | The algorithm uses Newton's iterations with a crude estimate of the cube root to converge to a result. Reviewed by: bde Approved by: das
* Add log2() and log2f().das2010-12-051-0/+2
|
* Introduce __isnanf() as an alias for isnanf(), and make the isnan()das2010-06-121-1/+2
| | | | | | | | | | | macro expand to __isnanf() instead of isnanf() for float arguments. This change is needed because isnanf() isn't declared in strict POSIX or C99 mode. Compatibility note: Apps using isnan(float) that are compiled after this change won't link against an older libm. Reported by: Florian Forster <octo@verplant.org>
* Namespace: scalb() is withdrawn from POSIX.das2009-03-141-1/+4
|
* C99 TC2 now wants FP_FAST_FMA* to be defined to 1, if the macros aredas2009-02-071-3/+3
| | | | defined at all. See also: defect report #223.
* Fix the types of INFINITY and NAN, which were broken in r131851. Theydas2009-01-081-2/+2
| | | | | | | | should both be floats, not doubles. PR: 127795 Submitted by: Christoph Mallon MFC after: 2 weeks
* Add implementations of acosl(), asinl(), atanl(), atan2l(),das2008-07-311-0/+6
| | | | | | | and cargl(). Reviewed by: bde sparc64 testing resources from: remko
* Implement fmodl.das2008-06-191-2/+0
| | | | Document fmodl and fix some errors in the fmod manpage.
* Hook remquol() and remainderl() up to the build.das2008-03-301-1/+1
|
* Hook hypotl() and cabsl() up to the build.das2008-03-301-2/+0
|
* MI implementation of sqrtl(). This is very slow and shoulddas2008-03-021-1/+1
| | | | be overridden when hardware sqrt is available.
* Add tgammaf() as a simple wrapper around tgamma().das2008-02-181-0/+1
|
* Add implementations of sinl(), cosl(), and tanl().das2008-02-171-0/+6
| | | | Submitted by: Steve Kargl <sgk@apl.washington.edu>
* Implement exp2l(). There is one version for machines with 80-bitdas2008-01-181-0/+2
| | | | | | | | long doubles (i386, amd64, ia64) and one for machines with 128-bit long doubles (sparc64). Other platforms use the double version. I've only done runtime testing on i386. Thanks to bde@ for helpful discussions and bugfixes.
* Implement rintl(), nearbyintl(), lrintl(), and llrintl().das2008-01-141-5/+3
| | | | Thanks to bde@ for feedback and testing of rintl().
* Grumble. DO declare logbl(), DON'T declare logl() just yet.das2007-12-201-0/+2
| | | | | | | bde is going to commit logl() Real Soon Now. I'm just trying to slow him down with merge conflicts. Noticed by: bde
* Remove the declaration of logl(). The relevant bits haven't beendas2007-12-201-2/+0
| | | | | | | committed yet, but the declaration leaked in when I added nan() and friends. Reported by: pav
* Implement and document nan(), nanf(), and nanl(). This commitdas2007-12-161-1/+5
| | | | | | | adds two new directories in msun: ld80 and ld128. These are for long double functions specific to the 80-bit long double format used on x86-derived architectures, and the 128-bit format used on sparc64, respectively.
* Implement modfl().das2007-01-071-1/+1
|
* Implement truncl() based on floorl().das2005-04-161-1/+1
|
* Add roundl(), lroundl(), and llroundl().das2005-04-081-1/+5
|
* Implement exp2() and exp2f().das2005-04-051-0/+2
|
* Implement and document remquo() and remquof().das2005-03-251-0/+2
|
* Add missing prototypes for fma() and fmaf(), and remove an inaccuratedas2005-03-181-1/+2
| | | | comment.
* - Define FP_FAST_FMA for sparc64, since fma() is now implemented usingdas2005-03-071-4/+12
| | | | | | | sparc64's 128-bit long doubles. - Define FP_FAST_FMAL for ia64. - Prototypes for fmal, frexpl, ldexpl, nextafterl, nexttoward{,f,l}, scalblnl, and scalbnl.
* Remove wrappers and other cruft intended to support SVID, mistakes indas2005-02-041-45/+0
| | | | | | | C90, and other arcana. Most of these features were never fully supported or enabled by default. Ok: bde, stefanf
* Add fma() and fmaf(), which implement a fused multiply-add operation.das2005-01-221-0/+5
|
* Most libm routines depend on the rounding mode and/or set exceptiondas2005-01-151-31/+29
| | | | | | | | | | | | | | flags, so they are not pure. Remove the __pure2 annotation from them. I believe that the following routines and their float and long double counterparts are the only ones here that can be __pure2: copysign is* fabs finite fmax fmin fpclassify ilogb nan signbit When gcc supports FENV_ACCESS, perhaps there will be a new annotation that allows the other functions to be considered pure when FENV_ACCESS is off. Discussed with: bde
* Braino. Revert rev 1.50.das2005-01-151-0/+7
| | | | Pointy hat to: das
* Set math_errhandling to MATH_ERREXCEPT. Now that we have fenv.h, wedas2005-01-141-1/+1
| | | | | | basically support this, subject to gcc's lack of FENV_ACCESS support. In any case, the previous setting of math_errhandling to 0 is not allowed by POSIX.
* Remove some #if 0'd code.das2005-01-141-7/+0
|
* Implement and document ceill().stefanf2005-01-131-1/+1
|
* Implement floorl().stefanf2005-01-121-1/+1
|
OpenPOWER on IntegriCloud