New algorithm and better tests for 9.8/9.9