This looks like a great library. I want to be able to round EFloats according to the rounding modes prescribed by the IEEE 754 standard, and described in https://en.wikipedia.org/wiki/IEEE_754#Rounding_rules .
You've got a variety of modes listed in https://github.com/peteroupc/Numbers/blob/master/docs/PeterO.Numbers.ERounding.md . As far as I can see from that Wikipedia link, they correspond as below. Am I right?
-
Round to nearest, ties to even — rounds to the nearest value; if the number falls midway, it is rounded to the nearest value with an even least significant digit: PeterO.Numbers.ERounding.HalfEven.
-
Round to nearest, ties away from zero: PeterO.Numbers.ERounding.HalfUp.
-
Round toward 0 — directed rounding towards zero (also known as truncation): PeterO.Numbers.ERounding.Down.
-
Round toward +∞ — directed rounding towards positive infinity (also known as rounding up or ceiling): PeterO.Numbers.ERounding.Ceiling .
-
Round toward −∞ — directed rounding towards negative infinity (also known as rounding down or floor): PeterO.Numbers.ERounding.Floor .
This looks like a great library. I want to be able to round EFloats according to the rounding modes prescribed by the IEEE 754 standard, and described in https://en.wikipedia.org/wiki/IEEE_754#Rounding_rules .
You've got a variety of modes listed in https://github.com/peteroupc/Numbers/blob/master/docs/PeterO.Numbers.ERounding.md . As far as I can see from that Wikipedia link, they correspond as below. Am I right?
Round to nearest, ties to even — rounds to the nearest value; if the number falls midway, it is rounded to the nearest value with an even least significant digit:
PeterO.Numbers.ERounding.HalfEven.Round to nearest, ties away from zero:
PeterO.Numbers.ERounding.HalfUp.Round toward 0 — directed rounding towards zero (also known as truncation):
PeterO.Numbers.ERounding.Down.Round toward +∞ — directed rounding towards positive infinity (also known as rounding up or ceiling):
PeterO.Numbers.ERounding.Ceiling.Round toward −∞ — directed rounding towards negative infinity (also known as rounding down or floor):
PeterO.Numbers.ERounding.Floor.