MPFR: Use 64-bit exponents on Windows? #40661
Labels
bignums
BigInt and BigFloat
external dependencies
Involves LLVM, OpenBLAS, or other linked libraries
windows
Affects only Windows
By default, the exponent used by MPFR is a
Clong
, which is only anInt32
on Windows. This occasionally causes subtle differences, e.g. JuliaMath/SpecialFunctions.jl#309Looking into the code, it appears that there is an
_MPFR_EXP_FORMAT
macro: setting this to 4 would build it with an exponent ofCintmax_t
, which is anInt64
on Windows. There is also a similar_MPFR_PREC_FORMAT
macro for the precision size as well, but this is currently limited toClong
Obviously this would break the ABI, and there doesn't seem to be a way to easily detect the value from the library, so I'm not sure exactly what the implications are here (I guess we could just rename the library to
libmpfr64
or something like that).The text was updated successfully, but these errors were encountered: