■Specification Description
The 8 "Rounding process" that can be selected here are the same truncate operations implemented in java.
The finite example is given below.
- Rounding near to 0
The digit preceding the discarded decimal part is not incremented.
Example)
5.5 → 5
2.5 → 2
-1.1 → -1
-1.6 → -1
-2.5 → -2
- Rounding away from 0
Always increase the digit preceding the decimal part other than the discarded 0.
Example)
5.5 → 6
2.5 → 3
-1.1 → -2
-1.6 → -2
-2.5 → -3
- Rounding near to +∞
It should be operated similar to "Rounding away from 0".
It should be operated similar to "Rounding near to 0".
Example)
5.5 → 6
2.5 → 3
-1.1 → -1
-1.6 → -1
-2.5 → -2
- Rounding near to -∞
It should be operated similar to "Rounding near to 0".
It should be operated similar to "Rounding away from 0".
Example)
5.5 → 5
2.5 → 2
-1.1 → -2
-1.6 → -2
-2.5 → -3
- Rounding to the nearest number (truncate for equidistant cases)
When the fraction is exactly 0.5, it is rounded.
Example)
5.5 → 6
2.5 → 3
-1.1 → -1
-1.6 → -2
-2.5 → -3
- Rounding to the nearest number (truncate)
When the fraction is exactly 0.5, it is truncated.
Example)
5.5 → 5
2.5 → 2
-1.1 → -1
-1.6 → -2
-2.5 → -2
- Rounding to nearest number (Even number side)
When the fraction is exactly 0.5, the rounding method will be the one for which the result among the truncating and rounding up is even.
Example)
5.5 → 6
2.5 → 2
-1.1 → -1
-1.6 → -2
-2.5 → -2
- No need to round
It is the mode that denotes that the rounding is not needed. Error is returned when specified in the operation where the result is not accurate.
Example)
5.5 → Error
2.5 →Error
1.0 → 1
-1.0 → -1
-2.5 →Error