I have tried to improve auto-ranging many times - it’s not easy. This auto-ranging is an algorithm suggested by a user. He sent me a spreadsheets with an equation and a bunch of ranges it was tested on. Even with this algorithm, you can be 0.5C over over the max value and you end up with 5C gap at the top.
Personally I’m happy with the algorithm but feel free to suggest a better algorithm.