summaryrefslogtreecommitdiff
path: root/lib/msun/src
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease/6.2.0_cvscvs2svn2007-01-11162-162/+162
| | | | | | 'RELENG_6_2_0_RELEASE'. This commit was manufactured to restore the state of the 6.2-RELEASE image.
* Revert the last change, the conversion from long double to double can raiseStefan Farfeleder2005-04-283-12/+12
| | | | | | | | | unwanted underflow exceptions. Pointed out by: das Notes: svn path=/head/; revision=145637
* Use double additions to raise the inexact exception to work around problemsStefan Farfeleder2005-04-223-12/+12
| | | | | | | with long double addition on sparc64. Notes: svn path=/head/; revision=145399
* Fix raising the inexact exception (FE_INEXACT) if the result differs from theStefan Farfeleder2005-04-223-18/+34
| | | | | | | | | argument. Noticed by: das Notes: svn path=/head/; revision=145394
* Implement truncl() based on floorl().David Schultz2005-04-162-1/+63
| | | | Notes: svn path=/head/; revision=145170
* Add roundl(), lroundl(), and llroundl().David Schultz2005-04-084-1/+78
| | | | Notes: svn path=/head/; revision=144772
* These files should include s_lround.c instead of s_lrint.c.David Schultz2005-04-083-3/+3
| | | | | | | This only matters for efficiency, not for correctness. Notes: svn path=/head/; revision=144771
* Fix a (coincidentally harmless) bug.David Schultz2005-04-081-5/+4
| | | | Notes: svn path=/head/; revision=144770
* Fix a long-standing bug in k_rem_pio2(), which led to large errors whenDavid Schultz2005-04-051-1/+1
| | | | | | | | | tanf() was called with big arguments close to multiples of pi/2. Reported by: ucbtest via bde Notes: svn path=/head/; revision=144690
* Implement exp2() and exp2f().David Schultz2005-04-053-0/+532
| | | | Notes: svn path=/head/; revision=144648
* Implement and document remquo() and remquof().David Schultz2005-03-253-0/+275
| | | | Notes: svn path=/head/; revision=144091
* Fix the double rounding problem with subnormals, andDavid Schultz2005-03-182-16/+36
| | | | | | | remove the XXX comments, which no longer apply. Notes: svn path=/head/; revision=143780
* Add missing prototypes for fma() and fmaf(), and remove an inaccurateDavid Schultz2005-03-181-1/+2
| | | | | | | comment. Notes: svn path=/head/; revision=143777
* Replace strong references with weak references. There's noDavid Schultz2005-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. Notes: svn path=/head/; revision=143264
* Remove an obsolete sentence from a comment.Stefan Farfeleder2005-03-071-2/+1
| | | | Notes: svn path=/head/; revision=143260
* - If z is 0, one of x or y is 0, and the other is infinite, raiseDavid Schultz2005-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. Notes: svn path=/head/; revision=143230
* Remove ldexp and ldexpf. The former is in libc, and the latter isDavid Schultz2005-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. Notes: svn path=/head/; revision=143223
* - Define FP_FAST_FMA for sparc64, since fma() is now implemented usingDavid Schultz2005-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. Notes: svn path=/head/; revision=143221
* Alias scalbn as ldexpl and scalbnl on platforms where long double isDavid Schultz2005-03-071-0/+8
| | | | | | | the same as double. Notes: svn path=/head/; revision=143220
* - Implement scalblnl.David Schultz2005-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). Notes: svn path=/head/; revision=143219
* Implement nexttowardf. This is used on both platforms with 11-bitDavid Schultz2005-03-071-0/+60
| | | | | | | exponents and platforms with 15-bit exponents for long doubles. Notes: svn path=/head/; revision=143218
* Implement nexttoward and nextafterl; the latter is also known asDavid Schultz2005-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. Notes: svn path=/head/; revision=143217
* - Try harder to trick gcc into not optimizing away statementsDavid Schultz2005-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. Notes: svn path=/head/; revision=143216
* Implement frexpl.David Schultz2005-03-071-0/+62
| | | | Notes: svn path=/head/; revision=143213
* Alias frexp as frexpl on platforms where a long double is the same asDavid Schultz2005-03-071-0/+7
| | | | | | | a double. Notes: svn path=/head/; revision=143212
* Implement fmal.David Schultz2005-03-071-0/+170
| | | | Notes: svn path=/head/; revision=143211
* Add scalbnl, also known as as ldexpl.David Schultz2005-03-071-0/+71
| | | | Notes: svn path=/head/; revision=143206
* Alias scalbnf as ldexpf. The two are identical in binaryDavid Schultz2005-03-071-0/+4
| | | | | | | floating-point formats. Notes: svn path=/head/; revision=143205
* Revert rev 1.8, which causes small (e.g. 2 ulp) errors for someDavid Schultz2005-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) Notes: svn path=/head/; revision=142369
* Use double arithmetic instead of simulating it with two floats. ThisDavid Schultz2005-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.) Notes: svn path=/head/; revision=142181
* Fix a small scripting snafu in the previous revision.David Schultz2005-02-041-2/+2
| | | | Notes: svn path=/head/; revision=141302
* Reduce diffs against vendor source (Sun fdlibm 5.3).David Schultz2005-02-0428-428/+476
| | | | Notes: svn path=/head/; revision=141296
* Remove wrappers and other cruft intended to support SVID, mistakes inDavid Schultz2005-02-0457-3225/+60
| | | | | | | | | | C90, and other arcana. Most of these features were never fully supported or enabled by default. Ok: bde, stefanf Notes: svn path=/head/; revision=141280
* Update comment to reflect the code change in the previous revision.David Schultz2005-01-232-2/+2
| | | | | | | Noticed by: ceri Notes: svn path=/head/; revision=140685
* If x == y, return y, not x. C99 (though not IEEE 754) requires thatDavid Schultz2005-01-232-2/+2
| | | | | | | nextafter(+0.0, -0.0) returns -0.0 and nextafter(-0.0, +0.0) returns +0.0. Notes: svn path=/head/; revision=140666
* Add fma() and fmaf(), which implement a fused multiply-add operation.David Schultz2005-01-223-0/+230
| | | | Notes: svn path=/head/; revision=140609
* Most libm routines depend on the rounding mode and/or set exceptionDavid Schultz2005-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 Notes: svn path=/head/; revision=140274
* Braino. Revert rev 1.50.David Schultz2005-01-151-0/+7
| | | | | | | Pointy hat to: das Notes: svn path=/head/; revision=140270
* Set math_errhandling to MATH_ERREXCEPT. Now that we have fenv.h, weDavid Schultz2005-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. Notes: svn path=/head/; revision=140265
* Remove some #if 0'd code.David Schultz2005-01-141-7/+0
| | | | Notes: svn path=/head/; revision=140263
* The isnormal() in rev 1.2 should have been isfinite() so subnormalsDavid Schultz2005-01-132-2/+2
| | | | | | | | | round correctly. Noticed by: stefanf Notes: svn path=/head/; revision=140188
* Implement and document ceill().Stefan Farfeleder2005-01-132-1/+98
| | | | Notes: svn path=/head/; revision=140172
* Implement floorl().Stefan Farfeleder2005-01-122-1/+98
| | | | Notes: svn path=/head/; revision=140142
* Whitespace nit.Stefan Farfeleder2005-01-121-1/+1
| | | | Notes: svn path=/head/; revision=140141
* Add MI implementations of [l]lrint[f]() and [l]lround[f]().David Schultz2005-01-119-0/+193
| | | | | | | Discussed with: bde Notes: svn path=/head/; revision=140088
* Add and document ilogbl(), a long double version of ilogb().Stefan Farfeleder2004-10-112-0/+56
| | | | Notes: svn path=/head/; revision=136385
* Use the FP_ILOG macros from <math.h> rather than hardcoded return values.Stefan Farfeleder2004-10-092-6/+13
| | | | | | | | | Also be prepared for FP_ILOGBNAN != INT_MAX. Reviewed by: md5 Notes: svn path=/head/; revision=136332
* Further refine some #ifs:David Schultz2004-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]. Notes: svn path=/head/; revision=135360
* Replace s_isnan.c and s_isnanf.c with the more compact s_isnan.c fromDavid Schultz2004-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(). Notes: svn path=/head/; revision=133147
* Use isnormal() instead of fpclassify() to avoid dependency on libc.so.5.David Schultz2004-08-052-6/+2
| | | | Notes: svn path=/head/; revision=133146