Enum RoundingMode
Specifies how mathematical rounding should process a number.
Namespace: Singulink.Numerics
Assembly: Singulink.Numerics.BigIntegerExtensions.dll
Syntax
public enum RoundingMode
Fields
Name | Description |
---|---|
AwayFromZero | Directed mode: the number is rounded toward the nearest number that is away from zero. |
MidpointAwayFromZero | Round to nearest mode: when a number is halfway between two others, it is rounded toward the nearest number that is away from zero. |
MidpointToEven | Round to nearest mode: when a number is halfway between two others, it is rounded toward the nearest even number. |
MidpointToNegativeInfinity | Round to nearest mode: when a number is halfway between two others, it is rounded down, with the result closest to and no greater than the infinitely precise result. |
MidpointToPositiveInfinity | Round to nearest mode: when a number is halfway between two others, the number is rounded up, with the result closest to and no less than the infinitely precise result. |
MidpointToZero | Round to nearest mode: when a number is halfway between two others, it is rounded toward zero, with the result closest to and no greater in magnitude than the infinitely precise result. |
ToNegativeInfinity | Directed mode: the number is rounded down, with the result closest to and no greater than the infinitely precise result. |
ToPositiveInfinity | Directed mode: the number is rounded up, with the result closest to and no less than the infinitely precise result. |
ToZero | Directed mode: the number is rounded toward zero, with the result closest to and no greater in magnitude than the infinitely precise result. |