Made math functions a bit faster by ignoring errno in linux and OSX.