Improved math functions

Hi,

I improved the mathematical functions hypot(), expm1(), tanh() and log1p(). The original implementation was sometimes too unperformant or in the case of hypot() not correct at all. The purpose of hypot isn't to have a shortcut but to avoid overflows, see http://www.johndcook.com/blog/2010/06/02/whats-so-hard-about-finding-a-hypotenuse/ 

I hope that helps.

Robert