stan-dev/stan — pull request #118 by PeterLi2016 (2013-06-13 16:10:31+00:00)
Title: Feature/clean up fvar

This pull request tests all of the fvar functions (matrix functions included) for fvar and fvar > to make sure that the functions work with higher order auto-diff. Digamma and trigamma were both added to the math lib to allow the higher order auto-diff to work.

Other small clean-ups include (but not limited to--might've missed some): fixing spaces between ) {, replacing x * x with square in some cases, rewriting some matrix fvar functions to directly compute derivatives.

Whoever reviews this code should compare the trigamma implementation to http://lib.stat.cmu.edu/apstat/121 and http://people.sc.fsu.edu/~jburkardt/cpp_src/asa121/asa121.cpp.