Function fact(ByVal Number As Byte) As Decimal Dim i As Integer = 1 Dim Calculated As Decimal = 0 Calculated = Number Do While i < Number Calculated *= (Number - i) i += 1 Loop Return Calculated End Function Function C(ByVal n As Byte, ByVal p As Byte) As Decimal Return ((fact(n)) / (fact(p) * fact(n - p))) End Function
C(256, 128) = 5768658823449206338089748357862286887740211701975162032608436567264518750790
BigInteger
System.Numerics
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)