Revert "Reverting Math to known-good 2b8534793fad9db18fcdb9621dc8d79ff36fdeb1"

This reverts commit 91c0e63af15a43f48c43a831fa04e5c9e99e1420.

Change-Id: Ida2af3912666d78f68a2f18f956b5875c90cd1b7