Math: added sign() function.
Merge branch 'master' into compatibility