Converting mpfr_t (or any other arbitrary precision library type) to __float128

339 views Asked by At

I guess I have two questions really.

1) I was wondering if anyone knows a way to convert mpfr_t types into __float128 types in GCC. I've looked around and found a thread on the mpfr bugfixes site where someone discusses their attempt to write a converter from __float128 to mpfr_t, but it seems to have dropped off sometime last year.

2) If no one knows a way to convert mpfr_t's to __float128's, does anyone know of another arbitrary precision C/C++ library that can?

Thanks

1

There are 1 answers

1
Seth On BEST ANSWER

You might want to look at gfortran's implementation for translating to intrinsics (the code is C). It makes a couple steps through an intermediary tree structure but the end result is the same.