freebsd-dev/lib/msun
Steve Kargl 99843eb899 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 3f70824172
  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
2023-08-03 21:51:53 +02:00
..
aarch64 arm64 lib32: prepare arm64 headers to redirect to arm 2023-07-25 18:59:26 -05:00
amd64 spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
arm spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
bsdsrc * lib/msun/Makefile: 2021-12-15 18:36:19 +00:00
i387 spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
ld80 Fixes for bugs in sinpi/cospi/tanpi 2023-08-03 07:27:58 +03:00
ld128 Fixes for bugs in sinpi/cospi/tanpi 2023-08-03 07:27:58 +03:00
man msun: Correct FreeBSD version in sincos() man page 2023-06-09 22:04:43 +02:00
powerpc spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
riscv RISC-V: Fix feenableexcept return value 2021-03-25 11:16:20 +00:00
src Clean up libm use of the __ieee754_ prefix 2023-08-03 21:51:53 +02:00
tests msun: Remove a double word in a source code comment 2022-09-04 13:57:38 +02:00
x86 spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
Makefile msun/Makefile: Fix conditional and unbreak the build. 2022-09-09 11:07:33 +03:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Symbol.map Implementations of cexpl() 2021-11-05 13:51:42 +02:00