From 8e84d249ce797da0bff3ba33273b7e30a8e1d772 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 4 Oct 2023 16:28:49 -0400 Subject: [PATCH] Do not define our own mpfr_sinpi/mpfr_cospi for mpfr 4.2.0 and later These two functions were added to the MPFR API. Fixes #458. --- src/libm-tester/testerutil.c | 2 ++ src/libm-tester/testerutil.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/libm-tester/testerutil.c b/src/libm-tester/testerutil.c index 8e8b8936..688642ca 100644 --- a/src/libm-tester/testerutil.c +++ b/src/libm-tester/testerutil.c @@ -289,6 +289,7 @@ double countULP2sp(float d, mpfr_t c0) { // +#if MPFR_VERSION < MPFR_VERSION_NUM(4, 2, 0) void mpfr_sinpi(mpfr_t ret, mpfr_t arg, mpfr_rnd_t rnd) { mpfr_t frpi, frd; mpfr_inits(frpi, frd, NULL); @@ -314,6 +315,7 @@ void mpfr_cospi(mpfr_t ret, mpfr_t arg, mpfr_rnd_t rnd) { mpfr_clears(frpi, frd, NULL); } +#endif void mpfr_lgamma_nosign(mpfr_t ret, mpfr_t arg, mpfr_rnd_t rnd) { int s; diff --git a/src/libm-tester/testerutil.h b/src/libm-tester/testerutil.h index 7f371414..313bf7b2 100644 --- a/src/libm-tester/testerutil.h +++ b/src/libm-tester/testerutil.h @@ -90,7 +90,9 @@ int cmpDenormsp(float x, mpfr_t fry); double countULPsp(float d, mpfr_t c); double countULP2sp(float d, mpfr_t c); +#if MPFR_VERSION < MPFR_VERSION_NUM(4, 2, 0) void mpfr_sinpi(mpfr_t ret, mpfr_t arg, mpfr_rnd_t rnd); void mpfr_cospi(mpfr_t ret, mpfr_t arg, mpfr_rnd_t rnd); +#endif void mpfr_lgamma_nosign(mpfr_t ret, mpfr_t arg, mpfr_rnd_t rnd); #endif