[libc-commits] [libc] [libc] Implement roundeven C23 math functions (PR #87678)

Vinayak Dev via libc-commits libc-commits at lists.llvm.org
Thu Apr 4 21:36:52 PDT 2024


================
@@ -351,6 +351,12 @@ class MPFRNumber {
     return result;
   }
 
+  MPFRNumber roundeven() const {
+    MPFRNumber result(*this);
+    mpfr_roundeven(result.value, value);
----------------
vinayakdsci wrote:

I implemented the replacement, but I am not sure if I should simply write `MPFR_VERSION_MAJOR >= 4`, or also specify the minor version. I went with the latter, but will change if required.

https://github.com/llvm/llvm-project/pull/87678


More information about the libc-commits mailing list