Fixes #1990 (OOS caused by Math.pow). Adds tests and documentation for Math functions. This was SVN commit r13515.