CS 36 FORTRAN Programming
Week 7
Homework
Read chapter 7 - Programming with Subroutines
Assg. # 5
1) p379n13
-
Program name: powerSeries
-
Input: a = -2.0, b = 2.0, incr = 0.1
-
Print a table of values for x in [a, b] in increments
of incr.
-
Your table should have three columns:
-
x
-
approximation of sinh(x)
-
library sinh(x)
-
Be sure to refer to p379n12 for more information about this problem.
-
Be sure to use a function subprogram for computing factorials. See
p. 325.
2) p381n19
-
Program name: bisection
-
Input: a = 0, b = 1.5708, epsilon = 0.0001
-
Find a zero in the interval [a, b]; terminate process when interval
length < epsilon.
-
Use the following statement function: f(x) = x - cos x
Due: In three weeks on April 27th, but probably best if you do it this
week while it's still fresh in your mind.
Test 3 Info
-
Changed to April 27
-
Covers: chapters 6 & 7
Have a great spring break and take a vacation from FORTRAN.