choose_i64_int32 Function

private pure recursive function choose_i64_int32(n, r, signal_overflow) result(res)

Return the binomail coefficient nCr(n, r)

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: n
integer(kind=int32), intent(in) :: r
logical, intent(in), optional :: signal_overflow

If true then the function returns -1 instead of aborting when overflow is encountered.

Return Value integer(kind=int64)


Contents