BigInteger.CompareFractionToBigInteger Method

Solver Foundation 3.0

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Compares a fraction with a big integer.

Namespace:  Microsoft.SolverFoundation.Common
Assembly:  Microsoft.Solver.Foundation (in Microsoft.Solver.Foundation.dll)

public static int CompareFractionToBigInteger(
	BigInteger bnNum,
	BigInteger bnDen,
	BigInteger bn
)

Parameters

bnNum
Type: Microsoft.SolverFoundation.Common.BigInteger
The numerator of a fraction.
bnDen
Type: Microsoft.SolverFoundation.Common.BigInteger
The denominator of a fraction.
bn
Type: Microsoft.SolverFoundation.Common.BigInteger
The BigInteger type that is used in the comparison.

Return Value

Type: System.Int32
A number that indicates how the fraction compares to the big integer.

Number

Description

-1

The fraction is smaller than the big integer.

0

The fraction is equal to the big integer.

1

The fraction is larger than the big integer.

This method does not assume that the Gcd method returns one.

Show: