summaryrefslogtreecommitdiffstats
path: root/lib/msun/src
Commit message (Collapse)AuthorAgeFilesLines
* Revert the last change, the conversion from long double to double can raisestefanf2005-04-283-12/+12
| | | | | | unwanted underflow exceptions. Pointed out by: das
* Use double additions to raise the inexact exception to work around problemsstefanf2005-04-223-12/+12
| | | | with long double addition on sparc64.
* Fix raising the inexact exception (FE_INEXACT) if the result differs from thestefanf2005-04-223-18/+34
| | | | | | argument. Noticed by: das
* Implement truncl() based on floorl().das2005-04-162-1/+63
|
* Add roundl(), lroundl(), and llroundl().das2005-04-084-1/+78
|
* These files should include s_lround.c instead of s_lrint.c.das2005-04-083-3/+3
| | | | This only matters for efficiency, not for correctness.
* Fix a (coincidentally harmless) bug.das2005-04-081-5/+4
|
* Fix a long-standing bug in k_rem_pio2(), which led to large errors whendas2005-04-051-1/+1
| | | | | | tanf() was called with big arguments close to multiples of pi/2. Reported by: ucbtest via bde
* Implement exp2() and exp2f().das2005-04-053-0/+532
|
* Implement and document remquo() and remquof().das2005-03-253-0/+275
|
* Fix the double rounding problem with subnormals, anddas2005-03-182-16/+36
| | | | remove the XXX comments, which no longer apply.
* Add missing prototypes for fma() and fmaf(), and remove an inaccuratedas2005-03-181-1/+2
| | | | comment.
* Replace strong references with weak references. There's nodas2005-03-074-7/+7
| | | | | | | | particularly good reason to do this, except that __strong_reference does type checking, whereas __weak_reference does not. On Alpha, the compiler won't accept a 'long double' parameter in place of a 'double' parameter even thought the two types are identical.
* Remove an obsolete sentence from a comment.stefanf2005-03-071-2/+1
|
* - If z is 0, one of x or y is 0, and the other is infinite, raisedas2005-03-071-2/+18
| | | | | | | an invalid exception and return an NaN. - If a long double has 113 bits of precision, implement fma in terms of simple long double arithmetic instead of complicated double arithmetic. - If a long double is the same as a double, alias fma as fmal.
* Remove ldexp and ldexpf. The former is in libc, and the latter isdas2005-03-072-59/+0
| | | | | | identical to scalbnf, which is now aliased as ldexpf. Note that the old implementations made the mistake of setting errno and were the only libm routines to do so.
* - 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.
* Alias scalbn as ldexpl and scalbnl on platforms where long double isdas2005-03-071-0/+8
| | | | the same as double.
* - Implement scalblnl.das2005-03-071-2/+34
| | | | | | - In scalbln and scalblnf, check the bounds of the second argument. This is probably unnecessary, but strictly speaking, we should report an error if someone tries to compute scalbln(x, INT_MAX + 1ll).
* Implement nexttowardf. This is used on both platforms with 11-bitdas2005-03-071-0/+60
| | | | exponents and platforms with 15-bit exponents for long doubles.
* Implement nexttoward and nextafterl; the latter is also known asdas2005-03-072-0/+155
| | | | | | | | | | | nexttowardl. These are not needed on machines where long doubles look like IEEE-754 doubles, so the implementation only supports the usual long double formats with 15-bit exponents. Anything bizarre, such as machines where floating-point and integer data have different endianness, will cause problems. This is the case with big endian ia64 according to libc/ia64/_fpmath.h. Please contact me if you managed to get a machine running this way.
* - Try harder to trick gcc into not optimizing away statementsdas2005-03-072-8/+19
| | | | | | that are intended to raise underflow and inexact exceptions. - On systems where long double is the same as double, nextafter should be aliased as nexttoward, nexttowardl, and nextafterl.
* Implement frexpl.das2005-03-071-0/+62
|
* Alias frexp as frexpl on platforms where a long double is the same asdas2005-03-071-0/+7
| | | | a double.
* Implement fmal.das2005-03-071-0/+170
|
* Add scalbnl, also known as as ldexpl.das2005-03-071-0/+71
|
* Alias scalbnf as ldexpf. The two are identical in binarydas2005-03-071-0/+4
| | | | floating-point formats.
* Revert rev 1.8, which causes small (e.g. 2 ulp) errors for somedas2005-02-241-8/+13
| | | | | | | | | inputs. The trouble with replacing two floats with a double is that the latter has 6 extra bits of precision, which actually hurts accuracy in many cases. All of the constants are optimal when float arithmetic is used, and would need to be recomputed to do this right. Noticed by: bde (ucbtest)
* Use double arithmetic instead of simulating it with two floats. Thisdas2005-02-211-13/+8
| | | | | | | results in a performance gain on the order of 10% for amd64 (sledge), ia64 (pluto1), i386+SSE (Pentium 4), and sparc64 (panther), and a negligible improvement for i386 without SSE. (The i386 port still uses the hardware instruction, though.)
* Fix a small scripting snafu in the previous revision.das2005-02-041-2/+2
|
* Reduce diffs against vendor source (Sun fdlibm 5.3).das2005-02-0428-428/+476
|
* Remove wrappers and other cruft intended to support SVID, mistakes indas2005-02-0457-3225/+60
| | | | | | | C90, and other arcana. Most of these features were never fully supported or enabled by default. Ok: bde, stefanf
* Update comment to reflect the code change in the previous revision.das2005-01-232-2/+2
| | | | Noticed by: ceri
* If x == y, return y, not x. C99 (though not IEEE 754) requires thatdas2005-01-232-2/+2
| | | | nextafter(+0.0, -0.0) returns -0.0 and nextafter(-0.0, +0.0) returns +0.0.
* Add fma() and fmaf(), which implement a fused multiply-add operation.das2005-01-223-0/+230
|
* 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
|
* The isnormal() in rev 1.2 should have been isfinite() so subnormalsdas2005-01-132-2/+2
| | | | | | round correctly. Noticed by: stefanf
* Implement and document ceill().stefanf2005-01-132-1/+98
|
* Implement floorl().stefanf2005-01-122-1/+98
|
* Whitespace nit.stefanf2005-01-121-1/+1
|
* Add MI implementations of [l]lrint[f]() and [l]lround[f]().das2005-01-119-0/+193
| | | | Discussed with: bde
* Add and document ilogbl(), a long double version of ilogb().stefanf2004-10-112-0/+56
|
* Use the FP_ILOG macros from <math.h> rather than hardcoded return values.stefanf2004-10-092-6/+13
| | | | | | Also be prepared for FP_ILOGBNAN != INT_MAX. Reviewed by: md5
* Further refine some #ifs:das2004-09-171-2/+2
| | | | | | | - Simplify the logic by using __GNUC_PREREQ__. Suggested by stefanf. - Make math.h compile with old (pre-8.0) versions of icc. Submitted by sf [sic].
* Replace s_isnan.c and s_isnanf.c with the more compact s_isnan.c fromdas2004-08-052-66/+52
| | | | | | | libc. The externally-visible effect of this is to add __isnanl() to libm, which means that libm.so.2 can once again link against libc.so.4 when LD_BIND_NOW is set. This was broken by the addition of fdiml(), which calls __isnanl().
* Use isnormal() instead of fpclassify() to avoid dependency on libc.so.5.das2004-08-052-6/+2
|
* Work around known GCC 3.4.x problem and use ANSI prototype for dremf().kan2004-07-281-2/+2
|
OpenPOWER on IntegriCloud