• Api Documentation
Show / Hide Table of Contents
  • System.Numerics
    • BigRational
      • Abs
      • Acos
      • Acosh
      • AcosPi
      • Addition
      • Asin
      • Asinh
      • AsinPi
      • Atan
      • Atan2
      • Atan2Pi
      • Atanh
      • AtanPi
      • BigRational
      • BitwiseOr
      • Cbrt
      • Ceiling
      • Clamp
      • CompareTo
      • CopySign
      • Cos
      • Cosh
      • CosPi
      • CreateChecked
      • CreateSaturating
      • CreateTruncating
      • Decrement
      • Division
      • Equality
      • Equals
      • Exp
      • Exp10
      • Exp10M1
      • Exp2
      • Exp2M1
      • Explicit
      • ExpM1
      • Factorial
      • Floor
      • GetHashCode
      • GreaterThan
      • GreaterThanOrEqual
      • Hypot
      • ILog10
      • ILog2
      • ILogB
      • Implicit
      • Increment
      • Inequality
      • IsInteger
      • IsNaN
      • LessThan
      • LessThanOrEqual
      • Log
      • Log10
      • Log10P1
      • Log2
      • Log2P1
      • LogP1
      • Max
      • MaxDigits
      • MaxMagnitude
      • MaxMagnitudeNumber
      • Min
      • MinMagnitude
      • MinMagnitudeNumber
      • Modulus
      • Multiply
      • NumDen
      • op_CheckedExplicit
      • Parse
      • Pi
      • Pow
      • Pow2
      • ReadFromBytes
      • RootN
      • Round
      • Sign
      • Sin
      • SinCos
      • SinCosPi
      • Sinh
      • SinPi
      • Sqrt
      • Subtraction
      • Tan
      • Tanh
      • TanPi
      • task_cpu
      • Tau
      • ToString
      • Truncate
      • TryFormat
      • TryParse
      • UnaryNegation
      • UnaryPlus
      • WriteToBytes
    • BigRational.CPU
      • abs
      • add
      • and
      • atan
      • bdi
      • cmp
      • cmpa
      • cmpi
      • CPU
      • dec
      • div
      • dup
      • equ
      • exp
      • fac
      • free
      • gcd
      • getd
      • getf
      • getr
      • gets
      • hash
      • idiv
      • imod
      • inc
      • inv
      • ipt
      • isi
      • lim
      • log
      • log2
      • lsb
      • mark
      • mod
      • msb
      • mul
      • neg
      • norm
      • or
      • pi
      • pop
      • popd
      • popi
      • popr
      • pow
      • push
      • rnd
      • shl
      • shr
      • sign
      • sin
      • sqr
      • sqrt
      • sub
      • swp
      • tor
      • tos
      • xor
    • BigRational.Integer
      • Abs
      • Add
      • Addition
      • BitwiseAnd
      • BitwiseOr
      • CompareTo
      • CreateChecked
      • CreateSaturating
      • CreateTruncating
      • Decrement
      • Divide
      • Division
      • DivRem
      • Equality
      • Equals
      • ExclusiveOr
      • Explicit
      • GetByteCount
      • GetHashCode
      • GreaterThan
      • GreaterThanOrEqual
      • GreatestCommonDivisor
      • Implicit
      • Increment
      • Inequality
      • Integer
      • IsEven
      • IsEvenInteger
      • IsNegative
      • IsOddInteger
      • IsOne
      • IsPositive
      • IsPow2
      • IsPowerOfTwo
      • IsZero
      • LeastCommonMultiple
      • LeftShift
      • LessThan
      • LessThanOrEqual
      • Log
      • Log10
      • Log2
      • Lsb
      • Max
      • MaxMagnitude
      • Min
      • MinMagnitude
      • MinusOne
      • ModPow
      • Modulus
      • Msb
      • Multiply
      • Multiply
      • Negate
      • One
      • OnesComplement
      • op_UnsignedRightShift
      • Parse
      • PopCount
      • Pow
      • Remainder
      • RightShift
      • RotateLeft
      • RotateRight
      • Shl
      • Shr
      • Sign
      • Subtract
      • Subtraction
      • ToByteArray
      • ToString
      • TrailingZeroCount
      • TryFormat
      • TryParse
      • TryWriteBytes
      • UnaryNegation
      • UnaryPlus
      • Zero
    • BigRational.SafeCPU
      • abs
      • add
      • and
      • atan
      • bdi
      • cmp
      • cmpa
      • cmpi
      • dec
      • div
      • dup
      • equ
      • exp
      • fac
      • free
      • gcd
      • getd
      • getf
      • getr
      • gets
      • hash
      • idiv
      • imod
      • inc
      • inv
      • ipt
      • isi
      • lim
      • log
      • log2
      • lsb
      • mark
      • mod
      • msb
      • mul
      • neg
      • norm
      • or
      • pi
      • pop
      • popd
      • popi
      • popr
      • pow
      • push
      • rnd
      • shl
      • shr
      • sign
      • sin
      • sqr
      • sqrt
      • sub
      • swp
      • tor
      • tos
      • xor
  • System.Numerics.Generic
    • Float<T>
      • Abs
      • Acos
      • Acosh
      • AcosPi
      • Addition
      • Asin
      • Asinh
      • AsinPi
      • Atan
      • Atan2
      • Atan2Pi
      • Atanh
      • AtanPi
      • BitCount
      • BitDecrement
      • BitIncrement
      • Cbrt
      • Ceiling
      • CompareTo
      • Cos
      • Cosh
      • CosPi
      • CreateChecked
      • CreateSaturating
      • CreateTruncating
      • Decrement
      • Division
      • E
      • Epsilon
      • Equality
      • Equals
      • Exp
      • Exp10
      • Exp2
      • Explicit
      • Float
      • Floor
      • FusedMultiplyAdd
      • GetHashCode
      • GreaterThan
      • GreaterThanOrEqual
      • Hypot
      • Ieee754Remainder
      • ILogB
      • Implicit
      • Increment
      • Inequality
      • IsEvenInteger
      • IsFinite
      • IsInfinity
      • IsInteger
      • IsNaN
      • IsNegative
      • IsNegativeInfinity
      • IsNormal
      • IsOddInteger
      • IsPositive
      • IsPositiveInfinity
      • IsPow2
      • IsRealNumber
      • IsSubnormal
      • LessThan
      • LessThanOrEqual
      • Log
      • Log10
      • Log2
      • Max
      • MaxDigits
      • MaxMagnitude
      • MaxMagnitudeNumber
      • MaxNumber
      • MaxValue
      • Min
      • MinMagnitude
      • MinMagnitudeNumber
      • MinNumber
      • MinValue
      • Modulus
      • Multiply
      • NaN
      • NegativeInfinity
      • NegativeZero
      • Parse
      • Pi
      • PositiveInfinity
      • Pow
      • Pow10
      • RootN
      • Round
      • ScaleB
      • Sign
      • Sin
      • SinCos
      • SinCosPi
      • Sinh
      • SinPi
      • Sqrt
      • Subtraction
      • Tan
      • Tanh
      • TanPi
      • Tau
      • ToString
      • Truncate
      • TryFormat
      • TryParse
      • UnaryNegation
      • UnaryPlus
    • Int<T>
      • Abs
      • Addition
      • BitwiseAnd
      • BitwiseOr
      • Clamp
      • CompareTo
      • CopySign
      • CreateChecked
      • CreateSaturating
      • CreateTruncating
      • Decrement
      • Division
      • DivRem
      • Equality
      • Equals
      • ExclusiveOr
      • Explicit
      • GetHashCode
      • GreaterThan
      • GreaterThanOrEqual
      • Implicit
      • Increment
      • Inequality
      • IsEvenInteger
      • IsNegative
      • IsOddInteger
      • IsPositive
      • IsPow2
      • LeadingZeroCount
      • LeftShift
      • LessThan
      • LessThanOrEqual
      • Log2
      • Max
      • MaxMagnitude
      • MaxValue
      • Min
      • MinMagnitude
      • MinValue
      • Modulus
      • Multiply
      • NegativeOne
      • One
      • OnesComplement
      • op_UnsignedRightShift
      • Parse
      • PopCount
      • RightShift
      • RotateLeft
      • RotateRight
      • Sign
      • Subtraction
      • ToString
      • TrailingZeroCount
      • TryFormat
      • TryParse
      • UnaryNegation
      • UnaryPlus
      • Zero
    • UInt<T>
      • Addition
      • BitwiseAnd
      • BitwiseOr
      • Clamp
      • CompareTo
      • CreateChecked
      • CreateSaturating
      • CreateTruncating
      • Decrement
      • Division
      • DivRem
      • Equality
      • Equals
      • ExclusiveOr
      • Explicit
      • GetHashCode
      • GreaterThan
      • GreaterThanOrEqual
      • Implicit
      • Increment
      • Inequality
      • IsEvenInteger
      • IsOddInteger
      • IsPow2
      • LeadingZeroCount
      • LeftShift
      • LessThan
      • LessThanOrEqual
      • Log2
      • Max
      • MaxValue
      • Min
      • MinValue
      • Modulus
      • Multiply
      • One
      • OnesComplement
      • op_UnsignedRightShift
      • Parse
      • PopCount
      • RightShift
      • RotateLeft
      • RotateRight
      • Sign
      • Subtraction
      • ToString
      • TrailingZeroCount
      • TryFormat
      • TryParse
      • UnaryPlus
      • Zero

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.
If the number has fewer fractional digits than decimals, the number is returned unchanged.

In This Article
Back to top Generated by DocFX