BigInteger.CompareFractionToLong Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Compares a fraction to a long.
Namespace: Microsoft.SolverFoundation.Common
Assembly: Microsoft.Solver.Foundation (in Microsoft.Solver.Foundation.dll)
Syntax
'Declaration
Public Shared Function CompareFractionToLong ( _
bnNum As BigInteger, _
bnDen As BigInteger, _
nn As Long _
) As Integer
public static int CompareFractionToLong(
BigInteger bnNum,
BigInteger bnDen,
long nn
)
public:
static int CompareFractionToLong(
BigInteger bnNum,
BigInteger bnDen,
long long nn
)
static member CompareFractionToLong :
bnNum:BigInteger *
bnDen:BigInteger *
nn:int64 -> int
public static function CompareFractionToLong(
bnNum : BigInteger,
bnDen : BigInteger,
nn : long
) : int
Parameters
- bnNum
Type: Microsoft.SolverFoundation.Common.BigInteger
The numerator of a fraction.
- bnDen
Type: Microsoft.SolverFoundation.Common.BigInteger
The denominator of a fraction.
- nn
Type: System.Int64
A Int64 integer that is used in the comparison.
Return Value
Type: System.Int32
A number that indicates how the fraction compares to the long.
Number |
Description |
---|---|
-1 |
The fraction is smaller than the long. |
0 |
The fraction is equal to the long. |
1 |
The fraction is larger than the long. |
Remarks
This does not assume that the Gcd method returns one.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.