Inaccurate/inconsistent output from mpf_out_str

Yihang Ho hoyihang5 at
Sun Sep 13 03:23:00 UTC 2015

Dear all,

In one of my programs, the output of mpf_out_str is not as accurate as it
should be.

Consider this piece of code:

This code computes the n-th Fibonacci number using Binet's formula. The
last few lines merely print the results to 10, 50, and 100 digits. However,
the outputs ( are not consistent with one another. As
you can see, only the first 5 digits from the first line are the same as
the second line while only the first 44 digits from the second line are the
same the third line. I believe this is a bug as it is not documented

I am able to replicate this problem on OS X and Ubuntu.

Details about my systems:

- OS X:
- Ubuntu:

Do let me know if any additional info are needed.


More information about the gmp-bugs mailing list