summaryrefslogtreecommitdiffstats
path: root/lib/msun
Commit message (Collapse)AuthorAgeFilesLines
* Prevent these functions from using stack outside of their frame.deischen2005-05-063-15/+15
| | | | | Reported by: Marc Olzheim <marcolz at stack dot nl> OK'd by: das
* 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
* Fix truncl.3 MLINKSache2005-04-171-1/+1
|
* More optimized math functions.das2005-04-1616-5/+399
|
* Implement truncl() based on floorl().das2005-04-164-12/+80
|
* Add roundl(), lroundl(), and llroundl().das2005-04-087-18/+120
|
* 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
* Build exp2(), exp2f(), and related documentation.das2005-04-051-2/+3
|
* Document exp2() and exp2f(), and make other minor tweaks and updates.das2005-04-052-88/+37
|
* Implement exp2() and exp2f().das2005-04-053-0/+532
|
* Implement and document remquo() and remquof().das2005-03-2512-20/+583
|
* 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.
* Make the fenv.h routines work for programs that use SSE fordas2005-03-172-85/+262
| | | | | | | | | | | | | | | | | | | | | | | | | floating-point arithmetic on i386. Now I'm going to make excuses for why this code is kinda scary: - To avoid breaking the ABI with 5.3-RELEASE, we can't change sizeof(fenv_t). I stuck the saved mxcsr in some discontiguous reserved bits in the existing structure. - Attempting to access the mxcsr on older processors results in an illegal instruction exception, so support for SSE must be detected at runtime. (The extra baggage is optimized away if either the application or libm is compiled with -msse{,2}.) I didn't run tests to ensure that this doesn't SIGILL on older 486's lacking the cpuid instruction or on other processors lacking SSE. Results from running the fenv regression test on these processors would be appreciated. (You'll need to compile the test with -DNO_STRICT_DFL_ENV.) If you have an 80386, or if your processor supports SSE but the kernel didn't enable it, then you're probably out of luck. Also, I un-inlined some of the functions that grew larger as a result of this change, moving them from fenv.h to fenv.c.
* Spell 'fedisableexcept' correctly.das2005-03-161-1/+1
|
* Document feenableexcept(), fedisableexcept(), and fegetexcept().das2005-03-162-1/+101
|
* Replace fegetmask() and fesetmask() with feenableexcept(),das2005-03-1610-57/+166
| | | | | | | | | | fedisableexcept(), and fegetexcept(). These two sets of routines provide the same functionality. I implemented the former as an undocumented internal interface to make the regression test easier to write. However, fe(enable|disable|get)except() is already part of glibc, and I would like to avoid gratuitous differences. The only major flaw in the glibc API is that there's no good way to report errors on processors that don't support all the unmasked exceptions.
* 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.
* Document scalbnl and scalblnl.das2005-03-071-9/+16
|
* Document nextafterl and nexttoward{,f,l}.das2005-03-071-7/+21
|
* Add nexttoward to the list of implemented functions, and explicitlydas2005-03-071-4/+8
| | | | list the four that are still missing.
* Document fmal.das2005-03-071-16/+27
|
* 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.
* - Remove s_ldexpf.c (now aliased to scalbn.)das2005-03-071-7/+12
| | | | | | | | | | | | | | | | | | | | | | - Add nexttoward{,f,l} and nextafterl. On all platforms, nexttowardl is an alias for nextafterl. - Add fmal. - Add man pages for new routines: fmal, nextafterl, nexttoward{,f,l}, scalb{,l}nl. Note that on platforms where long double is the same as double, we generally just alias the double versions of the routines, since doing so avoids extra work on the source code level and redundant code in the binary. In particular: ldbl53 ldbl64/113 fmal s_fma.c s_fmal.c ldexpl s_scalbn.c s_scalbnl.c nextafterl s_nextafter.c s_nextafterl.c nexttoward s_nextafter.c s_nexttoward.c nexttowardf s_nexttowardf.c s_nexttowardf.c nexttowardl s_nextafter.c s_nextafterl.c scalbnl s_scalbn.c s_scalbnl.c
* - 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
|
* - Define the LDBL_PREC to be the number of significant bits in a longdas2005-03-071-1/+2
| | | | | double's mantissa. - Add an assembly version of fmal.
* - Define the LDBL_PREC to be the number of significant bits in a longdas2005-03-071-0/+5
| | | | | double's mantissa. - Add an assembly version of scalbnl.
* Define the LDBL_PREC to be the number of significant bits in a longdas2005-03-075-0/+9
| | | | double's mantissa.
* Add an assembly version of fmal.das2005-03-071-0/+34
|
* Add scalbnl, also known as as ldexpl.das2005-03-072-0/+90
|
* Alias scalbnf as ldexpf. The two are identical in binarydas2005-03-072-0/+7
| | | | floating-point formats.
* Fix a mistake in the exponent range.das2005-03-061-1/+1
|
* Work around a gcc bug. This fixes feholdexcept() et al. at -O1.das2005-03-051-1/+1
| | | | | | | | | | | | | | Symptoms of the problem included assembler warnings and nondeterministic runtime behavior when a fe*() call that affects the fpsr is closely followed by a float point op. The bug (at least, I think it's a bug) is that gcc does not insert a break between a volatile asm and a dependent instruction if the volatile asm came from an inlined function. Volatile asms seem to be fine in other circumstances, even without -mvolatile-asm-stop, so perhaps the compiler adds the stop bits before inlining takes place. The problem does not occur at -O0 because inlining is disabled, and it doesn't happen at -O2 because -fschedule-insns2 knows better.
* Un-document the non-extant exp10() and exp10f() functions.das2005-02-262-3/+1
| | | | exp10() was a casualty of the transition away from the VAX.
* 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 hardware instructions for sqrt() and sqrtf().das2005-02-213-0/+69
|
OpenPOWER on IntegriCloud