[libc-commits] [libc] [libc][math][c23] Add atanhf16 C23 math function. (PR #132612)
Harrison Hao via libc-commits
libc-commits at lists.llvm.org
Tue Apr 15 08:58:01 PDT 2025
================
@@ -297,6 +297,40 @@ LIBC_INLINE static double log2_eval(double x) {
return result;
}
+// x should be positive, normal finite value
+LIBC_INLINE static float log_eval_f(float x) {
+ // For x = 2^ex * (1 + mx), logf(x) = ex * logf(2) + logf(1 + mx).
+ using FPB = fputil::FPBits<float>;
+ FPB bs(x);
----------------
harrisonGPU wrote:
Done.
https://github.com/llvm/llvm-project/pull/132612
More information about the libc-commits
mailing list