| Age | Commit message (Collapse) | Author |
|
src/__support/math folder. (#161297)
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
|
|
The semantics for casting can range from "bitcast" (same representation)
to "different representation", to "type promotion". Here we remove the
cast operator and force usage of `get_val` as the only function to get
the floating point value, making the intent clearer and more consistent.
|
|
- 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`.
|
|
Another patch is needed to cover `DyadicFloat` and `NormalFloat`
constructors.
|
|
This patch reduces the scope of `FPBits` exported variables and
functions.
It also moves storage up into `FPRep` and tries to make the default and
specialized versions of `FPBits` more uniform.
The next step is to move the specialization from `FPBits` to `FPRep` so
we can manipulate floating point representations through `FPType`
alone - that is - independently from the host architecture.
|
|
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.
|
|
According to [wikipedia](https://en.wikipedia.org/wiki/Exponent_bias)
the "biased exponent" is the encoded form that is always positive
whereas the unbiased form is the actual "real" exponent that can be
positive or negative.
`FPBits` seems to be using `unbiased_exponent` to describe the encoded
form (unsigned). This patch simply use `biased` instead of `unbiased`.
|
|
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
|
|
Simplify the range reduction steps by choosing the reduction constants
carefully so that the reduced arguments v = r*m_x - 1 and v^2 are exact in double
precision, even without FMA instructions, and -2^-8 <= v < 2^-7. This allows the
polynomial evaluations to be parallelized more efficiently.
Reviewed By: santoshn, zimmermann6
Differential Revision: https://reviews.llvm.org/D147755
|
|
floating point exceptions.
Switch math functions to use libc_errno and fix some errno and
floating point exceptions
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D145349
|
|
Update macros/optimization.h build dependency for CMake and Bazel.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D143805
|
|
Properly set floating point exceptions and add more exceptional
values for non-FMA x86-64 targets.
Reviewed By: michaelrj
Differential Revision: https://reviews.llvm.org/D143699
|
|
Detect if the architecture supports FMA instructions and if
the targets depend on fma.
Reviewed By: gchatelet
Differential Revision: https://reviews.llvm.org/D123615
|
|
Make FMA flag checks more accurate for x86-64 targets, and refactor
polyeval to use multiply and add instead when FMA instructions are not
available.
Reviewed By: michaelrj, sivachandra
Differential Revision: https://reviews.llvm.org/D123335
|
|
Although type punning is defined for union in C, it is UB in C++.
This patch introduces a bit_cast function to convert between types in a safe way.
This is necessary to get llvm-libc compile with GCC.
This patch is extracted from D119002.
Differential Revision: https://reviews.llvm.org/D119145
|
|
Implement log1pf correctly rounded to all rounding modes relying on logf implementation for exponent > 2^(-8).
Reviewed By: sivachandra, zimmermann6
Differential Revision: https://reviews.llvm.org/D118962
|
|
standard if needed.
CMAKE_CXX_STANDARD 14 is set in the llvm-project/llvm folder overriding all COMPILE_OPTIONS -std=c++17. We need to override the CXX_STANDARD property of the target in order to set the correct C++ standard flags.
Reviewed By: gchatelet
Differential Revision: https://reviews.llvm.org/D118871
|
|
Make logf function correctly rounded for all rounding modes.
Reviewed By: sivachandra, zimmermann6, santoshn, jpl169
Differential Revision: https://reviews.llvm.org/D118149
|
|
Implement log2f based on RLIBM library correctly rounded for all rounding modes.
Reviewed By: sivachandra, michaelrj, santoshn, jpl169, zimmermann6
Differential Revision: https://reviews.llvm.org/D115828
|
|
A variable was named in a way that doesn't match the format. This patch
renames it to match the format.
Differential Revision: https://reviews.llvm.org/D116228
|
|
Implement correctly rounded logf based on RLIBM library: https://people.cs.rutgers.edu/~sn349/rlibm/.
Reviewed By: sivachandra, santoshn, jpl169, zimmermann6
Differential Revision: https://reviews.llvm.org/D115408
|