Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Lab3
- use functions
- implicit none
- integer :: N, i
- real(8) :: a, b, eps, h, err
- 10 format(f10.6, a, f10.6, a, f10.6, a, f10.6)
- a = -0.7d0
- b = 2.2d0
- err = 0
- h = 0
- N = 1
- write(1,*) "eps", ";", "Err", ";", "N", ";", "h"
- eps = 0.1d0
- do i = 1, 12
- call inttrap(a, b, eps, err, h, N)
- write(*, 10) dlog10(eps), ";", dlog10(Err), ";", dlog(N + 0d0) / dlog(2d0), ";", dlog10(h)
- eps = eps * 0.1d0
- end do
- close(1)
- close(2)
- end program Lab3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement