Revert "Reverting Math to known-good 2b8534793fad9db18fcdb9621dc8d79ff36fdeb1"

This reverts commit c3902278fec49ac6efce4f95d1508d88f3a167a5.

Change-Id: I8cf98da348c2515f469578096aee7ac1afe81916