Confirmed output in C matches Mathematica
In progress: handling parameters