| Age | Commit message (Collapse) | Author |
|
src/__support/math folder. (#152069)
Part of #147386
in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
|
|
Add tests for signaling NaNs, and fix function behavior for handling
signaling NaN input.
Fixes https://github.com/llvm/llvm-project/issues/124812
|
|
LIBC_MATH_SKIP_ACCURATE_PASS is set. (#130811)
|
|
(#130700)
|
|
|
|
This is a part of #97655.
|
|
declaration" (#98593)
Reverts llvm/llvm-project#98075
bots are broken
|
|
This is a part of #97655.
|
|
- [libc][NFC] Rename FPBits nan functions
- rename build_signaling_nan in signaling_nan
- rename build_quiet_nan to quiet_nan
|
|
|
|
- reland #79113
- Fix aarch64 RISC-V build
|
|
Reverts llvm/llvm-project#79113
It broke aarch64 build bot machines.
|
|
This patch reduces the surface of `FPBits`.
|
|
This one might be a bit controversial since the terminology has been
introduced from the start but I think `FRACTION_LEN` is a better name
here. AFAICT it really is "the number of bits after the decimal dot when
the number is in normal form."
`MANTISSA_WIDTH` is less precise as it's unclear whether we take the
leading bit into account.
This patch also renames most of the properties to use the `_LEN` suffix
and fixes useless casts or variables.
|
|
Same as #75362, the traits does not bring a lot of value over
`FloatProperties::MANTISSA_WIDTH` (or `FPBits::MANTISSA_WIDTH`).
|
|
This is step 4 of
https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
|
|
Many math functions need to check for floating point rounding modes to
return correct values. Currently most of them use the internal implementation
of `fegetround`, which is platform-dependent and blocking math functions to be
enabled on platforms with unimplemented `fegetround`. In this change, we add
platform independent rounding mode checks and switching math functions to use
them instead. https://github.com/llvm/llvm-project/issues/63016
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D152280
|
|
Differential Revision: https://reviews.llvm.org/D146738
|
|
Set FE_OVERFLOW and FE_UNDERFLOW for expf, exp2f, exp10f, expm1f, sinhf
and coshf.
Reviewed By: sivachandra, renyichen
Differential Revision: https://reviews.llvm.org/D144340
|
|
|
|
|
|
|
|
|
|
|
|
This implements the same behavior as D141997 but makes sure that the same detection mechanism is used between CMake and source code.
Reviewed By: sivachandra, lntue
Differential Revision: https://reviews.llvm.org/D142108
|
|
try_compile instead of try_run."
The build bots are failing.
This reverts commit c84d74f5bfe810744de1268eb0516a6622e4aa73.
|
|
try_run.
This implements the same behavior as D141997 but makes sure that the same detection mechanism is used between CMake and source code.
Differential Revision: https://reviews.llvm.org/D142108
|
|
instead of try_run."
Build bots are failing.
https://lab.llvm.org/buildbot/#/builders/90/builds/44634
This reverts commit 9acc2f37bdfce08ca0c2faec03392db10d1bb7a9.
|
|
This implements the same behavior as D141997 but makes sure that the same detection mechanism is used between CMake and source code.
Differential Revision: https://reviews.llvm.org/D142108
|
|
Change sinf/cosf range reduction to mod pi/32 to be shared with tanf,
since polynomial approximations for tanf on subintervals of length pi/16 do not
provide enough accuracy.
Reviewed By: orex
Differential Revision: https://reviews.llvm.org/D131652
|
|
Refactor common range reductions and evaluations for sinf, cosf, and
sincosf. Added exhaustive tests for sincosf.
Performance before the patch:
```
System LIBC reciprocal throughput : 30.205
LIBC reciprocal throughput : 30.533
System LIBC latency : 67.961
LIBC latency : 61.564
```
Performance after the patch:
```
System LIBC reciprocal throughput : 30.409
LIBC reciprocal throughput : 20.273
System LIBC latency : 67.527
LIBC latency : 61.959
```
Reviewed By: orex
Differential Revision: https://reviews.llvm.org/D130901
|
|
Reviewed By: michaelrj
Differential Revision: https://reviews.llvm.org/D117645
|
|
This patch applies the lint rules described in the previous patch. There
was also a significant amount of effort put into manually fixing things,
since all of the templated functions, or structs defined in /spec, were
not updated and had to be handled manually.
Reviewed By: sivachandra, lntue
Differential Revision: https://reviews.llvm.org/D114302
|
|
This expands the pattern suggest in https://reviews.llvm.org/D95850 to all
math functions.
|