Make std.math compile on Linux/PPC64.

Adds some constants and moves some code to allow `std.math` to be compiled on Linux/PPC64.