| #
d04e03c1
|
| 27-Jan-2024 |
Dimitry Andric <dim@FreeBSD.org> |
msun: remove fabs from Symbol.map, and adjust comment
We have s_fabs.c, but fabs(3) is already provided by libc due to historical reasons, so it is not compiled into libm. When the linker does not u
msun: remove fabs from Symbol.map, and adjust comment
We have s_fabs.c, but fabs(3) is already provided by libc due to historical reasons, so it is not compiled into libm. When the linker does not use --undefined-version, this leads to a complaint about the symbol being nonexistent, so remove it from Symbol.map.
While here, adjust the comment about some functions being supplied by libc: while it is true that all these are indeed in libc, libm still includes its own versions of frexp(3), isnan(3), isnanf(3), and isnanl(3).
Reported by: Steve Kargl <sgk@troutmask.apl.washington.edu> MFC after: 3 days
show more ...
|
| #
42b38843
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
|
| #
046e2d5d
|
| 05-Nov-2021 |
Steve Kargl <kargl@FreeBSD.org> |
Implementations of cexpl()
The change implements cexpl() for both ld80 and ld128 architectures. Testing was done on x86_64 and aarch64 systems.
Along the way sincos[fl]() use an optimization that r
Implementations of cexpl()
The change implements cexpl() for both ld80 and ld128 architectures. Testing was done on x86_64 and aarch64 systems.
Along the way sincos[fl]() use an optimization that reduces the argument to being done one rather than twice. This optimization actually pointed to a bug in the ld128 version of sincosl(), which is now fixed. In addition, the minmax polynomial coefficients for sincosl() have been updated.
A concise log of the file-by-file changes follows.
* include/complex.h: . Add a prototype for cexpl().
* lib/msun/Makefile: . Add s_cexpl.c to the build. . Setup a link for cexpl.3 to cexp.3.
* lib/msun/Symbol.map: . Expose cexpl symbol in libm shared library.
* lib/msun/ld128/s_cexpl.c: * Implementation of cexpl() for 128-bit long double architectures. Tested on an aarch64 system.
* lib/msun/ld80/s_cexpl.c: * Implementation of cexpl() for Intel 80-bit long double.
* lib/msun/man/cexp.3: . Document cexpl().
* lib/msun/man/complex.3: . Add a BUGS section about cpow[fl].
* lib/msun/src/s_cexp.c: . Include float.h for weak references on 53-bit long double targets. . Use sincos() to reduce argument reduction cost.
* lib/msun/src/s_cexpf.c: . Use sincosf() to reduce argument reduction cost.
* lib/msun/src/k_sincosl.h: . Catch up with the new minmax polynomial coefficients for the kernel for the 128-bit cosl() implementation. . BUG FIX: *cs was used where *sn should have been. This means that sinl() was no computed correctly when iy != 0.
* lib/msun/src/s_cosl.c: . Include fpmath.h to get access to IEEEl2bits. . Replace M_PI_4 with pio4, a 64-bit or 113-bit approximation for pi / 4.
PR: 216862 MFC after: 1 week
show more ...
|
| #
dce5f3ab
|
| 25-Oct-2021 |
Steve Kargl <kargl@FreeBSD.org> |
[LIBM] implementations of sinpi[fl], cospi[fl], and tanpi[fl]
Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle trignometric functions cospi, sinpi, and tanpi. The attached patch impl
[LIBM] implementations of sinpi[fl], cospi[fl], and tanpi[fl]
Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle trignometric functions cospi, sinpi, and tanpi. The attached patch implements cospi[fl], sinpi[fl], and tanpi[fl]. Limited testing on the cospi and sinpi reveal a max ULP less than 0.89; while tanpi is more problematic with a max ULP less than 2.01 in the interval [0,0.5]. The algorithms used in these functions are documented in {ks}_cospi.c, {ks}_sinpi.c, and s_tanpi.c.
Note. I no longer have access to a system with ld128 and adequate support to compile and test the ld128 implementations of these functions. Given the almost complete lack of input from others on improvements to libm, I doubt that anyone cares. If someone does care, the ld128 files contain a number of FIXME comments, and in particular, while the polynomial coefficients are given I did not update the polynomial algorithms to properly use the coefficients.
PR: 218514 MFC after: 2 weeks
show more ...
|
| #
d04e03c1
|
| 27-Jan-2024 |
Dimitry Andric <dim@FreeBSD.org> |
msun: remove fabs from Symbol.map, and adjust comment
We have s_fabs.c, but fabs(3) is already provided by libc due to historical reasons, so it is not compiled into libm. When the linker does not u
msun: remove fabs from Symbol.map, and adjust comment
We have s_fabs.c, but fabs(3) is already provided by libc due to historical reasons, so it is not compiled into libm. When the linker does not use --undefined-version, this leads to a complaint about the symbol being nonexistent, so remove it from Symbol.map.
While here, adjust the comment about some functions being supplied by libc: while it is true that all these are indeed in libc, libm still includes its own versions of frexp(3), isnan(3), isnanf(3), and isnanl(3).
Reported by: Steve Kargl <sgk@troutmask.apl.washington.edu> MFC after: 3 days
show more ...
|
| #
42b38843
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
|
| #
046e2d5d
|
| 05-Nov-2021 |
Steve Kargl <kargl@FreeBSD.org> |
Implementations of cexpl()
The change implements cexpl() for both ld80 and ld128 architectures. Testing was done on x86_64 and aarch64 systems.
Along the way sincos[fl]() use an optimization that r
Implementations of cexpl()
The change implements cexpl() for both ld80 and ld128 architectures. Testing was done on x86_64 and aarch64 systems.
Along the way sincos[fl]() use an optimization that reduces the argument to being done one rather than twice. This optimization actually pointed to a bug in the ld128 version of sincosl(), which is now fixed. In addition, the minmax polynomial coefficients for sincosl() have been updated.
A concise log of the file-by-file changes follows.
* include/complex.h: . Add a prototype for cexpl().
* lib/msun/Makefile: . Add s_cexpl.c to the build. . Setup a link for cexpl.3 to cexp.3.
* lib/msun/Symbol.map: . Expose cexpl symbol in libm shared library.
* lib/msun/ld128/s_cexpl.c: * Implementation of cexpl() for 128-bit long double architectures. Tested on an aarch64 system.
* lib/msun/ld80/s_cexpl.c: * Implementation of cexpl() for Intel 80-bit long double.
* lib/msun/man/cexp.3: . Document cexpl().
* lib/msun/man/complex.3: . Add a BUGS section about cpow[fl].
* lib/msun/src/s_cexp.c: . Include float.h for weak references on 53-bit long double targets. . Use sincos() to reduce argument reduction cost.
* lib/msun/src/s_cexpf.c: . Use sincosf() to reduce argument reduction cost.
* lib/msun/src/k_sincosl.h: . Catch up with the new minmax polynomial coefficients for the kernel for the 128-bit cosl() implementation. . BUG FIX: *cs was used where *sn should have been. This means that sinl() was no computed correctly when iy != 0.
* lib/msun/src/s_cosl.c: . Include fpmath.h to get access to IEEEl2bits. . Replace M_PI_4 with pio4, a 64-bit or 113-bit approximation for pi / 4.
PR: 216862 MFC after: 1 week
show more ...
|
| #
dce5f3ab
|
| 25-Oct-2021 |
Steve Kargl <kargl@FreeBSD.org> |
[LIBM] implementations of sinpi[fl], cospi[fl], and tanpi[fl]
Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle trignometric functions cospi, sinpi, and tanpi. The attached patch impl
[LIBM] implementations of sinpi[fl], cospi[fl], and tanpi[fl]
Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle trignometric functions cospi, sinpi, and tanpi. The attached patch implements cospi[fl], sinpi[fl], and tanpi[fl]. Limited testing on the cospi and sinpi reveal a max ULP less than 0.89; while tanpi is more problematic with a max ULP less than 2.01 in the interval [0,0.5]. The algorithms used in these functions are documented in {ks}_cospi.c, {ks}_sinpi.c, and s_tanpi.c.
Note. I no longer have access to a system with ld128 and adequate support to compile and test the ld128 implementations of these functions. Given the almost complete lack of input from others on improvements to libm, I doubt that anyone cares. If someone does care, the ld128 files contain a number of FIXME comments, and in particular, while the polynomial coefficients are given I did not update the polynomial algorithms to properly use the coefficients.
PR: 218514 MFC after: 2 weeks
show more ...
|
| #
6813d08f
|
| 15-Jul-2018 |
Matt Macy <mmacy@FreeBSD.org> |
msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd
This corresponds to the latest status (hasn't changed in 9+ years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, cpowl (the comp
msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd
This corresponds to the latest status (hasn't changed in 9+ years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, cpowl (the complex power functions for float complex, double complex, and long double complex) which are required for C99 compliance and were missing from FreeBSD. Also required for some numerical codes using complex numbered Hamiltonians.
Thanks to jhb for tracking down the issue with making weak_reference compile on powerpc.
When asked to review, bde said "I don't like it" - but provided no actionable feedback or superior implementations.
Discussed with: jhb Submitted by: jmd Differential Revision: https://reviews.freebsd.org/D15919
show more ...
|
| #
0c0288a2
|
| 13-May-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Add implementations for clog(3), clogf(3), and clog(3).
PR: 216863 Submitted by: bde, Steven G. Kargl <sgk@troutmask.apl.washington.edu> MFC after: 2 weeks
|
| #
a773cead
|
| 29-May-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r318964 through r319164.
|
| #
e1b98d07
|
| 28-May-2017 |
Michal Meloun <mmel@FreeBSD.org> |
Implement sincos, sincosf, and sincosl. The primary benefit of these functions is that argument reduction is done once instead of twice in independent calls to sin() and cos().
* lib/msun/Makefile:
Implement sincos, sincosf, and sincosl. The primary benefit of these functions is that argument reduction is done once instead of twice in independent calls to sin() and cos().
* lib/msun/Makefile: . Add s_sincos[fl].c to the build. . Add sincos.3 documentation. . Add appropriate MLINKS.
* lib/msun/Symbol.map: . Expose sincos[fl] symbols in dynamic libm.so.
* lib/msun/man/sincos.3: . Documentation for sincos[fl].
* lib/msun/src/k_sincos.h: . Kernel for sincos() function. This merges the individual kernels for sin() and cos(). The merger offered an opportunity to re-arrange the individual kernels for better performance.
* lib/msun/src/k_sincosf.h: . Kernel for sincosf() function. This merges the individual kernels for sinf() and cosf(). The merger offered an opportunity to re-arrange the individual kernels for better performance.
* lib/msun/src/k_sincosl.h: . Kernel for sincosl() function. This merges the individual kernels for sinl() and cosl(). The merger offered an opportunity to re-arrange the individual kernels for better performance.
* lib/msun/src/math.h: . Add prototytpes for sincos[fl]().
* lib/msun/src/math_private.h: . Add RETURNV macros. This is needed to reset fpsetprec on I386 hardware for a function with type void.
* lib/msun/src/s_sincos.c: . Implementation of sincos() where sin() and cos() were merged into one routine and possibly re-arranged for better performance.
* lib/msun/src/s_sincosf.c: . Implementation of sincosf() where sinf() and cosf() were merged into one routine and possibly re-arranged for better performance.
* lib/msun/src/s_sincosl.c: . Implementation of sincosl() where sinl() and cosl() were merged into one routine and possibly re-arranged for better performance.
PR: 215977, 218300 Submitted by: Steven G. Kargl <sgk@troutmask.apl.washington.edu> MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D10765
show more ...
|
| #
a3906ca5
|
| 17-Feb-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r313644 through r313895.
|
| #
a11c5077
|
| 15-Feb-2017 |
Mahdi Mokhtari <mmokhi@FreeBSD.org> |
Add casinl() cacosl() catanl() casinhl() cacoshl() catanhl() APIs to msun to improve C11 conformance.
PR: 216850 216851 216852 216856 216857 216858 Submitted by: mmokhi Reported by: sgk@troutmask.a
Add casinl() cacosl() catanl() casinhl() cacoshl() catanhl() APIs to msun to improve C11 conformance.
PR: 216850 216851 216852 216856 216857 216858 Submitted by: mmokhi Reported by: sgk@troutmask.apl.washington.edu Reviewed by: bde, mat, theraven Approved by: bde (src committer), mat (mentor) Differential Revision: https://reviews.freebsd.org/D9491
show more ...
|
| #
9268022b
|
| 19-Nov-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge from head@274682
|
| #
1ce4b357
|
| 04-Oct-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r272516.
|
| #
4e27d36d
|
| 17-Sep-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r271694
|
| #
f7efd14d
|
| 15-Sep-2014 |
Steve Kargl <kargl@FreeBSD.org> |
* Makefile: . Hook e_lgammal[_r].c to the build. . Create man page links for lgammal[-r].3.
* Symbol.map: . Sort lgammal to its rightful place. . Add FBSD_1.4 section for the new lgamal_r sy
* Makefile: . Hook e_lgammal[_r].c to the build. . Create man page links for lgammal[-r].3.
* Symbol.map: . Sort lgammal to its rightful place. . Add FBSD_1.4 section for the new lgamal_r symbol.
* ld128/e_lgammal_r.c: . 128-bit implementataion of lgammal_r().
* ld80/e_lgammal_r.c: . Intel 80-bit format implementation of lgammal_r().
* src/e_lgamma.c: . Expose lgammal as a weak reference to lgamma for platforms where long double is mapped to double.
* src/e_lgamma_r.c: . Use integer literal constants instead of real literal constants. Let compiler(s) do the job of conversion to the appropriate type. . Expose lgammal_r as a weak reference to lgamma_r for platforms where long double is mapped to double.
* src/e_lgammaf_r.c: . Fixed the Cygnus Support conversion of e_lgamma_r.c to float. This includes the generation of new polynomial and rational approximations with fewer terms. For each approximation, include a comment on an estimate of the accuracy over the relevant domain. . Use integer literal constants instead of real literal constants. Let compiler(s) do the job of conversion to the appropriate type. This allows the removal of several explicit casts of double values to float.
* src/e_lgammal.c: . Wrapper for lgammal() about lgammal_r().
* src/imprecise.c: . Remove the lgamma.
* src/math.h: . Add a prototype for lgammal_r().
* man/lgamma.3: . Document the new functions.
Reviewed by: bde
show more ...
|
| #
246e7a2b
|
| 02-Sep-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r269962
Submitted by: Anish Gupta (akgupt3@gmail.com)
|
| #
ee7b0571
|
| 19-Aug-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge head from 7/28
|
| #
1b833d53
|
| 13-Aug-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r269943.
|
| #
3b5e0d0f
|
| 13-Jul-2014 |
Steve Kargl <kargl@FreeBSD.org> |
* Makefile: . Add s_erfl.c to building libm. . Add MLINKS for erfl.3 and erfcl.3.
* Symbol.map: . Move erfl and erfcl to their proper location.
* ld128/s_erfl.c: . Implementations of erfl a
* Makefile: . Add s_erfl.c to building libm. . Add MLINKS for erfl.3 and erfcl.3.
* Symbol.map: . Move erfl and erfcl to their proper location.
* ld128/s_erfl.c: . Implementations of erfl and erfcl in the IEEE 754 128-bit format.
* ld80/s_erfl.c: . Implementations of erfl and erfcl in the Intel 80-bit format.
* man/erf.3: . Document the new functions. . While here, remove an incomplete sentence.
* src/imprecise.c: . Remove the stupidity of mapping erfl and erfcl to erf and erfc.
* src/math.h: . Move the declarations of erfl and erfcl to their proper place.
* src/s_erf.c: . For architectures where double and long double are the same floating point format, use weak references to map erfl to erf and ercl to erfc.
Reviewed by: bde (many earlier versions)
show more ...
|
| #
6cec9cad
|
| 03-Jun-2014 |
Peter Grehan <grehan@FreeBSD.org> |
MFC @ r266724
An SVM update will follow this.
|
| #
9d2ab4a6
|
| 27-Apr-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge head
|
| #
84e51a1b
|
| 23-Apr-2014 |
Alan Somers <asomers@FreeBSD.org> |
IFC @264767
|