Lee Newberg <git...@quantconsulting.com> added the comment:

The example of "16e2" would yield the interval [1550, 1650).  The smallest 
denominator possible is 1.  The smallest numerator that works with that 
denominator is 1550, but I don't like 1550/1 as the answer.

To cover these edge cases, I'd modify the optimization to be that we continue 
to seek the smallest denominator, but in the case that multiple numerators 
would give ratios within the computed interval then we choose the numerator 
among these that gives the ratio closest to the input value.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46780>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to