Minor javadoc comment reformatting.
Simplified code from long array to long.
Minor reformatting of comments
Added test code for MathFunction.java methods.
Simplified code from long array to long and minor reformatting.