/* A demonstration program for the class "Scientific Computing" taught at the Courant Institute of Mathematical Sciences of NYU. It is supposed to demonstrate ideas about good programming practice for numerical computing. If you want to debate what's here, send email to Jonathan Goodman at goodman@cims.nyu.edu. This program was downloaded from the web page ------------------------------------------------------------------------*/ /* This header file has definitions of my procedures. */ // This routine solves the recurrence relation x(k+1) = a*x(k) + x(k-1) // with initial conditions x(0) = x(1) = 1 and returns x(n). // The error flag will be non zero on return only if n is negative. double RecurrenceRelationComputation( double a, int n, int* errorFlag);