Ha! I can never remember which sorts of best approximation are guaranteed to be actual c.f. convergents and which might be “intermediate” ones that come from iterating the mediant construction. So I used PARI’s “bestappr” function. My bug was in code that had nothing to do with the actual mathematics.
Ha! I can never remember which sorts of best approximation are guaranteed to be actual c.f. convergents and which might be “intermediate” ones that come from iterating the mediant construction. So I used PARI’s “bestappr” function. My bug was in code that had nothing to do with the actual mathematics.
Congratulations to you, too!