[libc-commits] [libc] [libc][math] Adding LIBC_MATH_ASSUME_ROUND_NEAREST_ONLY option (PR #201154)
Hoàng Minh Thiên via libc-commits
libc-commits at lists.llvm.org
Wed Jun 10 20:53:16 PDT 2026
================
@@ -246,6 +246,10 @@ round_using_specific_rounding_mode(T x, int rnd) {
template <typename T>
LIBC_INLINE constexpr cpp::enable_if_t<cpp::is_floating_point_v<T>, T>
round_using_current_rounding_mode(T x) {
+#ifdef LIBC_MATH_HAS_ASSUME_ROUND_NEAREST_ONLY
+ return round_using_specific_rounding_mode(x, FP_INT_TONEAREST);
+#endif // LIBC_MATH_HAS_ASSUME_ROUND_NEAREST_ONLY
----------------
hmthien050209 wrote:
Done
https://github.com/llvm/llvm-project/pull/201154
More information about the libc-commits
mailing list