You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RoundUp() and RoundDown() functions treat negative numbers the opposite of what I would expect. For example, if you're rounding "up," I would expect the number -1.45 could become -1.4, but not -1.5.
Also, I saw no tests for negative numbers in TestDecimal_RoundAndStringFixed(), so I tried adding some, but got some strange results. You might want to try it.
The text was updated successfully, but these errors were encountered:
The RoundUp() and RoundDown() functions treat negative numbers the opposite of what I would expect. For example, if you're rounding "up," I would expect the number -1.45 could become -1.4, but not -1.5.
The "Math is Fun" and Wikipedia websites seems to have a good description of the variations (https://www.mathsisfun.com/numbers/rounding-methods.html and https://en.wikipedia.org/wiki/Rounding).
Also, I saw no tests for negative numbers in TestDecimal_RoundAndStringFixed(), so I tried adding some, but got some strange results. You might want to try it.
The text was updated successfully, but these errors were encountered: