You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

14 lines
304 B

function cln(x,sgn)
implicit none
include 'types.f'
include 'constants.f'
complex(dp) :: cln
real(dp), intent(in) :: x, sgn
cln = log(abs(x))
if (x < 0._dp) then
cln = cln + sign(1._dp,sgn)*im*pi
endif
end function