Method Round
Round(BigRational)
Rounds a BigRational number to the nearest integral value and rounds midpoint values to the nearest even number.
Declaration
public static BigRational Round(BigRational a)
Parameters
Type | Name | Description |
---|---|---|
BigRational | a | A BigRational number to be rounded. |
Returns
Type | Description |
---|---|
BigRational |
Round(BigRational, Int32)
Rounds a BigRational number to a specified number of fractional digits, and rounds midpoint values to the nearest even number.
Declaration
public static BigRational Round(BigRational a, int digits)
Parameters
Type | Name | Description |
---|---|---|
BigRational | a | A BigRational number to be rounded. |
System.Int32 | digits | The number of fractional digits in the return value. |
Returns
Type | Description |
---|---|
BigRational | The BigRational number nearest to value that contains a number of fractional digits equal to digits. |
Round(BigRational, Int32, MidpointRounding)
Rounds a BigRational number to a specified number of fractional digits using the specified rounding convention.
Declaration
public static BigRational Round(BigRational a, int digits, MidpointRounding mode)
Parameters
Type | Name | Description |
---|---|---|
BigRational | a | A BigRational number to be rounded. |
System.Int32 | digits | The number of decimal places in the return value. |
System.MidpointRounding | mode | One of the enumeration values that specifies which rounding strategy to use. |
Returns
Type | Description |
---|---|
BigRational | The BigRational number with decimals fractional digits that the value is rounded to. |