• Font Size
  • S
  • M
  • L

Search via FAQ No.


  • No : 24443
  • Open Date : 2016/06/13 14:15
  • Print

[DataSpider Servista] About the number in the logic icon of Mapper => "Rounding process" of operation

In the logic icon of Mapper there are "Rounding process" fields in the process icon of numbers => operation (addition, subtraction, multiplication, division calculation and remainder) among which 8 processes can be selected. What would be the respective processing result? Explain with finite process examples.
 
Category : 

Answer

■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.
  1. 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
  1. 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
  1. Rounding near to +
  • For +ve numbers
It should be operated similar to "Rounding away from 0".
  • For –ve numbers
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
  1. Rounding near to -
  • For +ve numbers
It should be operated similar to "Rounding near to 0".
  • For –ve numbers
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
  1. 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
  1. 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
  1. 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
  1. 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