summaryrefslogtreecommitdiff
path: root/libc/test/src/math/generic
AgeCommit message (Collapse)Author
2025-07-29[libc][math][c++23] Add fabsbf16 math function (#148398)Krishna Pandey
This PR implements fabsbf16 math function for BFloat16 type along with the tests. --------- Signed-off-by: krishna2803 <kpandey81930@gmail.com> Signed-off-by: Krishna Pandey <kpandey81930@gmail.com> Co-authored-by: OverMighty <its.overmighty@gmail.com>
2024-04-05[libc] Add proxy header math_macros.h. (#87598)lntue
Context: https://github.com/llvm/llvm-project/pull/87017 - Add proxy header `libc/hdr/math_macros.h` that will: - include `<math.h>` in overlay mode, - include `"include/llvm-libc-macros/math-macros.h"` in full build mode. - Its corresponding CMake target `libc.hdr.math_macros` will only depend on `libc.include.math` and `libc.include.llvm-libc-macros.math_macros` in full build mode. - Replace all `#include "include/llvm-libc-macros/math-macros.h"` with `#include "hdr/math_macros.h"`. - Add dependency to `libc.hdr.math_macros` CMake target when using `add_fp_unittest`. - Update the remaining dependency. - Update bazel overlay: add `libc:hdr_math_macros` target, and replacing all dependency on `libc:llvm_libc_macros_math_macros` with `libc:hdr_math_macros`.
2023-09-19[libc][math] Extract non-MPFR math tests into libc-math-smoke-tests.Tue Ly
Extract non-MPFR math tests into libc-math-smoke-tests. Reviewed By: sivachandra, jhuber6 Differential Revision: https://reviews.llvm.org/D159477
2022-08-31[libc][cmake] split fputil into individual targetsMichael Jones
The libc.src.__support.FPUtil.fputil target encompassed many unrelated files, and provided a lot of hidden dependencies. This patch splits out all of these files into component parts and cleans up the cmake files that used them. It does not touch any source files for simplicity, but there may be changes made to them in future patches. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D132980
2021-08-06[libc][nfc] move ctype_utils and FPUtils to __supportMichael Jones
Some ctype functions are called from other libc functions (e.g. isspace is used in atoi). By moving ctype_utils.h to __support it becomes easier to include just the implementations of these functions. For these reasons the implementation for isspace was moved into ctype_utils as well. FPUtils was moved to simplify the build order, and to clarify which files are a part of the actual libc. Many files were modified to accomodate these changes, mostly changing the #include paths. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D107600
2021-02-02[libc] Add hardware implementations of ceil and ceilf for aarch64.Siva Chandra
This change also introduces a new source layout for adding machine specific and generic implementations. To keep the scope of this change small, this new pattern is only applied for ceil, ceilf and ceill. Follow up changes will switch all math functions in to the new pattern. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D95850