Problems 12
  1. Theory.
    1. What is the GNU-make built-in recipe to compile and link a single '.c' file into an executable code?
      Hint:
      make -p | fgrep -A2 '%: %.c'
      
      or, more precisely,
      make -p 2> /dev/null | grep -A2 '%: %\.c$'
      
      and then
      make -p | fgrep 'LINK.c ='
      
      (In the make language a pattern rule in the form, say, '%.o: %.c' says how to make any file stem.o from another file stem.c).
    2. What is the GNU make built-in recipe to compile a '.c' source file into a '.o' object code file?
    3. What is the GNU make built-in recipe to link '.o' object code files into an executable file?
    4. How can you find out the meaning of the GNU make automatic variables '$@', '$^', '$<' etc.?
      Hint:
      Google the emphasized phrase ;).
  2. Practice.
    1. Do like in a previous exercise, but
      • rewrite the defenition of the error function as a differential equation with initial boundary condition; implement a function which calculates the error function by solving numerically this differential equation;

        • Hint:
          dy/dx = 2/√π e-x², y(0)=0.
      • Split your code into two files: one containing the myerf function and another one containing the main function; do the necessary modifications in the makefile;
      • in your figure environment. remember to use caption and label;
      • Include citations using the embedded thebibliography environment.
      • compare the number of calls --- correspondingly to the integrand and to the right-hand-side function, done by the numerical integration routine from the previous exercise, and by your favourite ordinary differential equation routine (rkf45, for instance) from this exercise --- needed to calculate the error function with the same accuracy goal.