Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function f(x) result(resultado)
- implicit none
- real(8) :: resultado
- real(8), intent(in) :: x
- real(8), parameter :: e = 2.71828, pi = acos(dble(-1))
- if(x < 0) then
- resultado = ((3*(x**2))*e**(-1*x))
- else if (x >= 0.5*pi) then
- resultado = (e**(-1*(x**(0.5))))
- else
- resultado = (e**(2*x/pi)*sin(x))
- end if
- end function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement