Commit 33dd2abc authored by Shreevatsa's avatar Shreevatsa

simple fix in principle

parent 120d932d
......@@ -43,3 +43,5 @@ Test cases:
From trying a few examples, it appears that if you type n digits of a fraction, then the convergents are correct up to about n/2 digits' worth. This may be an interesting theorem to prove (if it is true).
Some day I may fix that (or someone else may kindly take this over and improve it). Until then, the "bug" (a misleading fraction displayed) will remain.
Edit [2020-01-08]: Actually the simplest fix may be to show, given a fraction `x/10^n`, only show approximations that are also approximations for `(x-1/2)/10^n` and for `(x+1)/10^n`. (Asymmetric because last digit may be either rounded up, or truncated down.) Take the three lists of approximations, and find their intersection. This will avoid spurious convergents from being shown. We could show something like "no more convergents can be determined with these many digits; add more zeroes if the number is exact".
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment