marcandrysco / Errol

Binary floating-point to decimal string conversion algorithm.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Select middle-most optimal value

marcandrysco opened this issue · comments

The current code selects any shortest number in the output range. I'm finishing up changes that will always select the middle-most optimal value (rounding ties to even). This issue tracks that work in progress.

All versions of Errol are updated to select the "best" or middle-most optimal value. Currently, there is no guarantee that the best value is selected, but the selection process is extremely accurate. When tested against 1 billion inputs, Errol3 and Errol4 correctly produced the best value, giving a very high likelihood of best output. There is ongoing work to adapt the enumeration algorithm to find best failures.