[libc-commits] [libc] [libc] Add sinpif16 function (PR #110994)
via libc-commits
libc-commits at lists.llvm.org
Sat Oct 12 02:38:17 PDT 2024
================
@@ -488,14 +488,28 @@ class MPFRNumber {
(MPFR_VERSION_MAJOR == 4 && MPFR_VERSION_MINOR >= 2)
mpfr_sinpi(result.value, value, mpfr_rounding);
+ return result;
#else
+ if (mpfr_integer_p(value)) {
+ mpfr_set_si(result.value, 0, mpfr_rounding);
+ return result;
+ }
+
+ MPFRNumber value_mul_two(*this);
+ mpfr_mul_si(value_mul_two.value, value, 2, MPFR_RNDN);
+
+ if (mpfr_integer_p(value_mul_two.value) != 0) {
----------------
overmighty wrote:
Nit: `mpfr_integer_p` returns a boolean pretty much.
```suggestion
if (mpfr_integer_p(value_mul_two.value)) {
```
https://github.com/llvm/llvm-project/pull/110994
More information about the libc-commits
mailing list