#
0dd5a560 |
|
28-Jan-2024 |
Steve Kargl <kargl@FreeBSD.org> |
lib/msun: Cleanup after $FreeBSD$ removal Remove no longer needed explicit inclusion of sys/cdefs.h. PR: 276669 MFC after: 1 week
|
#
1d386b48 |
|
16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
99843eb8 |
|
03-Aug-2023 |
Steve Kargl <kargl@FreeBSD.org> |
Clean up libm use of the __ieee754_ prefix This removes the __ieee754_ prefix from a number of the math functions. msun/src/math_private.h contains the statement that /* * ieee style elementary functions * * We rename functions here to improve other sources' diffability * against fdlibm. */ #define __ieee754_sqrt sqrt ... Here, fdlibm refers to https://netlib.org/fdlibm. It is seen from https://netlib.org/fdlibm/readme that this prefix was used to differentiate between different standards: Wrapper functions will twist the result of the ieee754 function to comply to the standard specified by the value of _LIB_VERSION if _LIB_VERSION = _IEEE_, return the ieee754 result; if _LIB_VERSION = _SVID_, return SVID result; if _LIB_VERSION = _XOPEN_, return XOPEN result; if _LIB_VERSION = _POSIX_, return POSIX/ANSI result. (These are macros, see fdlibm.h for their definition.) AFAICT, FreeBSD has never supported these wrappers. In addition, as C99, principally the long double, functions were added to libm, this convention was not maintained. Given that only 148 of 324 files under lib/msun contain a "Copyright (C) 1993 by Sun Microsystems" statement, the removal of the __ieee754_ prefix provides consistency across all source files. The last time someone compared lib/msun to fdlibm appears to be commit 3f70824172feb82ea3dcdb3866b54fe0eb7cd890 Author: David Schultz <das@FreeBSD.org> Date: Fri Feb 4 18:26:06 2005 +0000 Reduce diffs against vendor source (Sun fdlibm 5.3). The most recent fdlibm RCS string that appears in a Sun Microsystem copyrighted file is date "95/01/18". With Oracle Corporation's acquisition of Sun Microsystems in 2009, it is unlikely that fdlibm will ever be updated. A search for fdlibm at https://opensource.oracle.com/ yields no hits. Finally, OpenBSD removed the use of this prefix over 21 years ago. pSee revision 1.6 of OpenBSD's math_private.h. Note: this does not drop the __ieee754_ prefix from the trigonometric argument reduction functions, e.g., __ieee754_rem_pio2. These functions are internal to the libm and exported through Symbol.map; and thus, reserved for the implementation. PR: 272783 MFC after: 1 week
|
#
7dbbb6dd |
|
27-May-2013 |
David Schultz <das@FreeBSD.org> |
Fix some regressions caused by the switch from gcc to clang. The fixes are workarounds for various symptoms of the problem described in clang bugs 3929, 8100, 8241, 10409, and 12958. The regression tests did their job: they failed, someone brought it up on the mailing lists, and then the issue got ignored for 6 months. Oops. There may still be some regressions for functions we don't have test coverage for yet.
|
#
b052ec90 |
|
14-Oct-2011 |
David Schultz <das@FreeBSD.org> |
Various changes to improve the accuracy and speed of log{2,10}{,f}. - Rename __kernel_log() to k_log1p(). - Move some of the work that was previously done in the kernel log into the callers. This enables further refactoring to improve accuracy or speed, although I don't recall the details. - Use extra precision when adding the final scaling term, which improves accuracy. - Describe and work around compiler problems that break some of the multiprecision calculations. A fix for a small bug is also included: - Add a special case for log*(1). This is needed to ensure that log*(1) == +0 instead of -0, even when the rounding mode is FE_DOWNWARD. Submitted by: bde
|
#
5ebf26f6a |
|
14-Oct-2011 |
David Schultz <das@FreeBSD.org> |
Style fixes and updates to comments. Submitted by: bde
|
#
f353f248 |
|
06-Dec-2010 |
David Schultz <das@FreeBSD.org> |
Another minor nit: Make sure the constant here is a float so the compiler doesn't promote the entire expression to double.
|
#
63687c8b |
|
06-Dec-2010 |
David Schultz <das@FreeBSD.org> |
Fix various nits in style and comments that were pointed out by bde. Code changes verified with md5.
|
#
177668d1 |
|
05-Dec-2010 |
David Schultz <das@FreeBSD.org> |
Add log2() and log2f().
|