To find the next to last digit, we need everything that influences this digit: The temporary result, the last digit of formula_2 times the next-to-last digit of formula_3, as well as the next-to-last digit of formula_2 times the last digit of formula_3.