Improve path scouring
Created by: Ede123
Paths are now optimized while using the full numerical precision. The number of digits is reduced at the very end of the process.
This significantly increases accuracy for some problematic samples like #80 (closed).