summaryrefslogtreecommitdiff
path: root/libc/test/src/math/logf_test.cpp
AgeCommit message (Collapse)Author
2025-10-21[libc][math] Add tolerance to math tests so that they still work when ↵lntue
accurate path is skipped. (#164522)
2025-07-23[libc][NFC] Add stdint.h proxy header to fix dependency issue with ↵lntue
<stdint.h> includes. (#150303) https://github.com/llvm/llvm-project/issues/149993
2024-07-28[libc] Create a separate proxy header for math-function-macros.h (#98430)Nhat Nguyen
Fix #98393
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`.
2024-03-18[libc] Remove direct math.h includes (#85324)Michael Jones
Reland of #84991 A downstream overlay mode user ran into issues with the isnan macro not working in our sources with a specific libc configuration. This patch replaces the last direct includes of math.h with our internal math_macros.h, along with the necessary build system changes.
2024-01-23[libc][NFC] Remove `FPBits` cast operator (#79142)Guillaume Chatelet
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.
2023-10-19[libc][math][NFC] Remove global scope constants declaration in math tests ↵lntue
(#69558) Clean up usage of `DECLARE_SPECIAL_CONSTANTS` in global scope.
2023-09-26[libc] Mass replace enclosing namespace (#67032)Guillaume Chatelet
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
2023-06-01[libc] Reduce math tests runtimeGuillaume Chatelet
Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D151798
2023-04-10[libc][math] Update range reduction step for logf and reduce its latency.Tue Ly
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
2023-03-13[libc][NFC] Switch all uses of errno in math and math tests to libc_errno.Siva Chandra Reddy
2023-02-10[libc][math] Update exceptional cases for logf, log10f, log2f, log1pf.Tue Ly
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
2023-02-07[libc][NFC] Move UnitTest and IntegrationTest to the 'test' directory.Siva Chandra Reddy
This part of the effort to make all test related pieces into the `test` directory. This helps is excluding test related pieces in a straight forward manner if LLVM_INCLUDE_TESTS is OFF. Future patches will also move the MPFR wrapper and testutils into the 'test' directory.
2022-01-25[libc] Make logf function correctly rounded for all rounding modes.Tue Ly
Make logf function correctly rounded for all rounding modes. Reviewed By: sivachandra, zimmermann6, santoshn, jpl169 Differential Revision: https://reviews.llvm.org/D118149
2021-12-22[libc] apply formatting to testsMichael Jones
Apply the formatting rules that were applied to the libc/src directory to the libc/test directory, as well as the files in libc/utils that are included by the tests. This does not include automated enforcement. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D116127
2021-12-16[libc] Fix problem with using isnan in test/src/math/logf_test.cpp.Tue Ly
The default isnan returns an int, and hence failing the EXPECT_TRUE tests. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D115892
2021-12-16[libc] Implement correctly rounded logf based on RLIBM library.Tue Ly
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