summaryrefslogtreecommitdiff
path: root/libc/src/math/generic/atan2f.cpp
AgeCommit message (Collapse)Author
2025-08-01[libc][math] Refactor atan2f implementation to header-only in ↵Muhammad Bassiouni
src/__support/math folder. (#150993) 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
2025-07-21[libc][math] add smoke tests to shared/math.h (#149741)Muhammad Bassiouni
Adding smoke tests for shared math header. part of #147386
2025-07-20[libc][math] Refactor acosf implementation to header-only in ↵Muhammad Bassiouni
src/__support/math folder. (#148411) 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
2025-04-08[libc][math] Fix signaling NaN handling for math functions. (#133347)wldfngrs
Add tests for signaling NaNs, and fix function behavior for handling signaling NaN input. Fixes https://github.com/llvm/llvm-project/issues/124812
2025-03-11[libc] Provide more fine-grained control of FMA instruction for ARM targets. ↵lntue
(#130700)
2025-02-11[libc][math] Add float-only option for atan2f. (#122979)lntue
For targets that have single precision FPU but not double precision FPU such as Cortex M4, only using float-float in the intermediate computations might reduce the code size compared to using double. In this case, when the exact pass is skipped, the float-only option for atan2f implemented in this PR reduces the code size of this function by ~1 KB compared to the double precision version.
2024-12-04[libc][math] Add small code size options for atan2f. (#118532)lntue
2024-10-18[libc][math] Add test and fix atan2f crashing when flush-denorm-to-zero ↵lntue
(FTZ) and denorm-as-zero (DAZ) modes are set. (#112828)
2024-07-12[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)Petr Hosek
This is a part of #97655.
2024-07-12Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace ↵Mehdi Amini
declaration" (#98593) Reverts llvm/llvm-project#98075 bots are broken
2024-07-11[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)Petr Hosek
This is a part of #97655.
2024-04-01[libc][math] Implement atan2f correctly rounded to all rounding modes. (#86716)lntue
We compute atan2f(y, x) in 2 stages: - Fast step: perform computations in double precision , with relative errors < 2^-50 - Accurate step: if the result from the Fast step fails Ziv's rounding test, then we perform computations in double-double precision, with relative errors < 2^-100. On Ryzen 5900X, worst-case latency is ~ 200 clocks, compared to average latency ~ 60 clocks, and average reciprocal throughput ~ 20 clocks.