Math spec conformance

While I had the spec open, I figured I'd update the Math functions.