[libc-commits] [libc] [llvm] [APFloat] Add exp function for APFloat::IEEESsingle using expf implementation from LLVM libc. (PR #143959)
via libc-commits
libc-commits at lists.llvm.org
Fri Jul 18 13:52:06 PDT 2025
================
@@ -109,6 +109,18 @@ static constexpr float expf(float x) {
return static_cast<float>(exp_hi * exp_mid * exp_lo);
}
+// Directional rounding version of expf.
+LIBC_INLINE static float expf(float x, int rounding_mode) {
+ int current_rounding_mode = fputil::get_round();
----------------
lntue wrote:
At some point I'll implement a version of directed rounding math functions without relying on adjusting the floating point environment.
https://github.com/llvm/llvm-project/pull/143959
More information about the libc-commits
mailing list