home *** CD-ROM | disk | FTP | other *** search
-
- !! PROGRAM ROOTSDEMO
- REAL a, b
- INTEGER i
-
-
- b = BisectionRoots(.1, 4.0, .00001, 100, a, i)
- write (*,10) 'Bisection Root = ', b
- write (*,10) 'Value = ', a
- write (*,20) 'Error = ', i
-
-
- b = BrentRoots(2.5, 10.0, 1.0E-05, 150, a, i)
- write (*,10) 'Brent Root = ', b
- write (*,10) 'Value = ', a
- write (*,20) 'Error = ', i
-
- b = BrentRoots(0.1, 4.0, 0.000001, 150, a, i)
- write (*,10) 'Brent Root = ', b
- write (*,10) 'Value = ', a
- write (*,20) 'Error = ', i
-
- b = NewtonRoots(4.3, 1E-08, 150, a, i)
- write (*,10) 'Newton Root= ', b
- write (*,10) 'Value = ', a
- write (*,20) 'Error = ', i
- 10 FORMAT (1X, A15, F7.3)
- 20 FORMAT (1X, A15,I2)
- end