choose_i128 Interface

public interface choose_i128

Contents


Module Procedures

private pure recursive function choose_i128_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=int128)

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

Return the binomail coefficient nCr(n, r)

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(in) :: n
integer(kind=int64), 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=int128)