############################################################# # Building 'integral' and sample output on the SGIs ############################################################# sgi1% pwd; ls /usr/people/phys410/ode/ex2/integral Makefile fcn.f integral.f sgi1% make f77 -g -64 -c integral.f f77 -g -64 -c fcn.f f77 -g -64 -L/usr/local/lib integral.o fcn.o -lp410f -lodepack \ -llinpack -lblas -o integral ############################################################# # Usage ############################################################# sgi1% integral usage: integral [] ############################################################# # We can check the results using the following Maple # code (or similar) # # > Digits := 25; # > evalf(int(exp(-x^2),x=0.0..5.0)); # # .8862269254513954753824605 ############################################################# sgi1% integral 0.0 5.0 0.8862269254350943 ^ ############################################################# # > evalf(int(exp(-x^2),x=0.0..10.0)); # # .8862269254527580136490835 ############################################################# sgi1% integral 0.0 10.0 0.8862269254428063 ^ ############################################################# # > evalf(int(exp(-x^2),x=0.0..100.0)); # # .8862269254527580136490835 ############################################################# sgi1% integral 0.0 100.0 0.8862269254522580 ^ ############################################################# # Repeat previous computation with less stringent tolerance, # note that answer is (roughly) correspondingly less # accurate. ############################################################# sgi1% integral 0.0 100.0 1.0d-6 0.8862289729280245 ^ ############################################################# # Beware of strange results which can occur if integrand # 'underflows' ############################################################# sgi1% integral -100.0 -100.0 0.0000000000000000E+00