Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Paul's workaround from #22799
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpase committed May 18, 2017
1 parent df03447 commit 66973af
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build/pkgs/mpfr/patches/clang_workaround.patch
@@ -0,0 +1,13 @@
diff --git a/src/set_d.c b/src/set_d.c
index c076ccf..0b71cff 100644
--- a/src/set_d.c
+++ b/src/set_d.c
@@ -118,7 +118,7 @@ __gmpfr_extract_double (mpfr_limb_ptr rp, double d)

d *= MP_BASE_AS_DOUBLE;
#if GMP_NUMB_BITS >= 64
- manl = d;
+ manl = 0x8000000000000000 + (mp_limb_t) (d - 9223372036854775808.0);
#else
manh = (mp_limb_t) d;
manl = (mp_limb_t) ((d - manh) * MP_BASE_AS_DOUBLE);

0 comments on commit 66973af

Please sign in to comment.