mpir
mpir copied to clipboard
Why is there a mpf_set_z function but not mpf_get_z function?
I would like to be able to convert from mpz_t to mpf_t and back. How do I do that?
MPZ_T to MPF_T : mpf_set_z (WORKS) MPF_T to MPZ_T : ?mpz_set_f? (DOESN'T WORK)
Why is there a mpf_set_z function but not mpz_get_f function?
Alternatively, why are there no mpf_get_z and mpz_get_f functions?
I guess I could convert the int/float to a string and then convert it to float/int, but that just seems ridiculously bad for performance.
The development of the mpf interface was discontinued due to the development of the MPFR package:
https://www.mpfr.org/
We recommend you use that instead. There is no value in duplicating their effort in the MPIR project.
I use MPIR from Brian Gladman because it works on Windows. MPFR doesn't seem to work on Windows (out of the box)?
Are there bugs in mpf_t? Should I be worried?
I'm not aware of bugs, but it is very slow compared to MPFR.
Brian Gladman also supports MPFR on Windows.
Aha, ok. Quite unfortunate that it's yet another thing that requires effort compiling/integrating and such. I think for now I'll have to stick with MPIR because of time constraints.
Thanks for the info.