#
272461 |
|
02-Oct-2014 |
gjb |
Copy stable/10@r272459 to releng/10.1 as part of the 10.1-RELEASE process.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
176449 |
|
22-Feb-2008 |
das |
Eliminate some warnings.
|
#
169212 |
|
02-May-2007 |
bde |
Fix tgamma() on some special args: (1) tgamma(-Inf) returned +Inf and failed to raise any exception, but should always have raised an exception, and should behave like tgamma(negative integer). (2) tgamma(negative integer) returned +Inf and raised divide-by-zero, but should return NaN and raise "invalid" on any IEEEish system. (3) About half of the 2**52 negative intgers between -2**53 and -2**52 were misclassified as non-integers by using floor(x + 0.5) to round to nearest, so tgamma(x) was wrong (+-0 instead of +Inf and now NaN) on these args. The floor() expression is hard to use since rounding of (x + 0.5) may give x or x + 1, depending on |x| and the current rounding mode. The fixed version uses ceil(x) to classify x before operating on x and ends up being more efficient since ceil(x) is needed anyway. (4) On at least the problematic args in (3), tgamma() raised a spurious inexact. (5) tgamma(large positive) raised divide-by-zero but should raise overflow. (6) tgamma(+Inf) raised divide-by-zero but should not raise any exception. (7) Raise inexact for tiny |x| in a way that has some chance of not being optimized away.
The fix for (5) and (6), and probably for (2), also prevents -O optimizing away the exception.
PR: 112180 (2) Standards: Annex F in C99 (IEC 60559 binding) requires (1), (2) and (6).
|
#
169209 |
|
02-May-2007 |
bde |
Document (in a comment) the current (slightly broken) handling of special values in more detail, and change the style of this comment to be closer to fdlibm and C99: - tgamma(-Inf) was undocumented and is wrong (+Inf, should be NaN) - tgamma(negative integer) is as intended (+Inf) but not best for IEEE-754 (NaN) - tgamma(-0) was documented as being wrong (+Inf) but was correct (-Inf) - documentation of setting of exceptions (overflow, etc.) was more complete here than in most of libm, but was further from matching the actual setting than in most of libm, due to various bugs here (primarily, always evaluating +Inf one/zero and getting unwanted divide-by-zero exceptions from this). Now the actual behaviour with gcc -O0 is documented. Optimization still breaks setting of exceptions all over libm, so nothing can depend on this working. - tgamma(NaN)'s exception was documented as being wrong (invalid) but was correct (no exception with IEEEish NaNs).
Finish (?) rev.1.5. gamma was not renamed to tgamma in one place.
Finish (?) rev.1.6. errno.h was not completely removed.
|
#
150318 |
|
19-Sep-2005 |
bde |
Fixed aliasing bugs in TRUNC() by using the fdlibm macros for access to doubles as bits. fdlibm-1.1 had similar aliasing bugs, but these were fixed by NetBSD or Cygnus before a modified version of fdlibm was imported in 1994. TRUNC() is only used by tgamma() and some implementation-detail functions. The aliasing bugs were detected by compiling with gcc -O2 but don't seem to have broken tgamma() on i386's or amd64's. They broke my modified version of tgamma().
Moved the definition of TRUNC() to mathimpl.h so that it can be fixed in one place, although the general version is even slower than necessary because it has to operate on pointers to volatiles to handle its arg sometimes being volatile. Inefficiency of the fdlibm macros slows down libm generally, and tgamma() is a relatively unimportant part of libm. The macros act as if on 32-bit words in memory, so they are hard to optimize to direct actions on 64-bit double registers for (non-i386) machines where this is possible. The optimization is too hard for gcc on amd64's, and declaring variables as volatile makes it impossible.
|
#
138924 |
|
16-Dec-2004 |
das |
Cosmetic changes only: - style - remove unused variables - de-support VAX
Inspired by: bin/42388
|
#
93211 |
|
26-Mar-2002 |
bde |
Resurrect Lite1's gamma() as C99's tgamma(). Minimal changes.
|
#
92917 |
|
21-Mar-2002 |
obrien |
Remove __P() usage.
|
#
92887 |
|
21-Mar-2002 |
obrien |
Fix SCM ID's.
|
#
84210 |
|
30-Sep-2001 |
dillon |
Add __FBSDID()s to libm
|
#
1573 |
|
27-May-1994 |
rgrimes |
BSD 4.4 Lite Lib Sources
|