calcStartProb Function

public function calcStartProb(prob1, prob2) result(ret)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: prob1
real(kind=dp), intent(in) :: prob2

Return Value real(kind=dp)


Contents

Source Code


Source Code

    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