Skip to content

Commit

Permalink
Do not define our own mpfr_sinpi/mpfr_cospi for mpfr 4.2.0 and later (#…
Browse files Browse the repository at this point in the history
…471)

These two functions were added to the MPFR API.
Fixes #458.
  • Loading branch information
musicinmybrain authored Nov 21, 2023
1 parent cea4434 commit 7d0b37d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libm-tester/testerutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/libm-tester/testerutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7d0b37d

Please sign in to comment.