Returns the value of number after rounded.
ajBigNumRound(number, decimal_places, round_mode)
|Argument Name||Argument Type||Description|
|String||A number in number or string format. For example, -1 or "-1".|
|Integer||It is a number value which is to define the no. of places to be rounded. If a decimal number is inputted, it will be rounded down.|
|Integer||Rounding mode to be used. Here are the supported rounding modes: |
0 - Round up (away from zero)
1 - Round down (towards zero)
2 - Round ceiling (towards infinity)
3 - Round floor (towards -infinity)
4 - Round half up (towards nearest neighbour. If equidistant, rounds away from zero)
5 - Round half down (towards nearest neighbour. If equidistant, rounds towards zero)
6 - Round half even(towards nearest neighbour. If equidistant, rounds towards even neighbour)
7 - Round half ceiling (towards nearest neighbour. If equidistant, rounds towards infinity)
8 - Round half floor (towards nearest neighbour. If equidistant, rounds towards -infinity)
The default value is 4 - Round half up.
The function will return:
1) Return Value: BigNumber String
2) Return Type: Single Value
The function returns "12345.1235" using round_half_up as default rounding mode.
It will return #VALUE! when missing any required parameter or mismatch parameter type. Besides, system will raise error for below scenario(s).
|Number is neither a number or a string that can be converted to a number.|
|Decimal places should be greater than or equal to zero.|
|Invalid round mode, it should be between 0 and 8.|