improve numerical stability and robustness on math functions
extend testing suite to match robust math functions
add more contracts to correlation and related tests