Inaccurate/inconsistent output from mpf_out_str
Yihang Ho
hoyihang5 at gmail.com
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: http://git.io/vZKCz
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 (http://git.io/vZKCg) 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
anywhere.
I am able to replicate this problem on OS X and Ubuntu.
Details about my systems:
- OS X: http://git.io/vZKCr
- Ubuntu: http://git.io/vZKCo
Do let me know if any additional info are needed.
Best,
Yihang
More information about the gmp-bugs
mailing list