Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- real*16 function myexp(x)
- implicit none
- real*16, intent(in) :: x
- integer :: i
- real*16 :: tmp
- tmp = 0
- if(x == 0) then
- myexp = 1
- return
- end if
- do i=350,1,-1
- tmp = i*x/(i+1+x-tmp)
- end do
- tmp = x/(1+x-tmp)
- tmp = 1/(1-tmp)
- myexp = tmp
- end function myexp
- program gobuhat
- implicit none
- real*16 :: pwr
- interface
- real*16 function myexp(x)
- real*16, intent(in) :: x
- end function myexp
- end interface
- read (*, *) pwr
- print *, myexp(pwr)
- end program
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement