Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | prob1 | |||
real(kind=dp), | intent(in) | :: | prob2 |
function calcStartProb(prob1, prob2) result(ret)
! calculate the probability of a starting branch, given two possibilities
real(dp), intent(in) :: prob1, prob2
real(dp) :: ret
character(*), parameter :: this_routine = "calcStartProb"
ASSERT(prob1 >= 0.0_dp)
ASSERT(prob2 >= 0.0_dp)
ret = prob1 / (prob1 + prob2)
end function calcStartProb