more comments; added test for (P/F, i, n).
more functions in demo calculator
more functions including constant gradient functions; tests; demo calculator now supports all the implemented functions