mpf_set_str() seems buggy
Albin Ahlbäck
albin.ahlback at gmail.com
Wed Jul 24 18:07:33 CEST 2024
Hello Fred,
I believe your assumptions of mpf_get_str is wrong. Please read GMP's
documentation. Specifically read the following sentence:
> The generated string is a fraction, with an implicit radix point
> immediately to the left of the first digit.
A correct interpretation of the first three lines you print can be the
following:
INPUT: 0.00000123456789
REAL_X: 0.123456789 EXP: -5
ASSIGNED REAL_X: 0.123456789e-5
Hence, I believe you have not read the quoted sentence in the documentation.
Best,
Albin
More information about the gmp-bugs
mailing list