Advertisement
Guest User

Untitled

a guest
Dec 1st, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     function f(x) result(resultado)
  2.         implicit none
  3.         real(8) :: resultado
  4.         real(8), intent(in) :: x
  5.         real(8), parameter :: e = 2.71828, pi = acos(dble(-1))
  6.  
  7.         if(x < 0) then
  8.             resultado = ((3*(x**2))*e**(-1*x))
  9.         else if (x >= 0.5*pi) then
  10.             resultado = (e**(-1*(x**(0.5))))
  11.         else
  12.             resultado = (e**(2*x/pi)*sin(x))
  13.         end if
  14.     end function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement