![]() PRECISION |
![]() DEVELOPER |
![]() |
Trail: PROIV Documentation > Developer > PROIV Developer > Developing Functions > Events and Logic > PRECISION
|
|
Purpose |
PRECISION specifies the rounding factor for the result of an arithmetic operation. |
Syntax |
PRECISION (rounding-factor) |
Operator |
rounding-factor is any valid numeric expression with an integer value between –n and n inclusive where n is the maximum number of digits depending on the data type as follows: |
Remarks |
The rounding factor for calculations is set to a default of six places to the right of the decimal. |
Example |
Assume #A = 1.25 and #B = 2.75
#E = #A * #B #E is set to 3.438 (rounded to the nearest 10-3) #F = #D - #C #F is set to 0.003 (PRECISION (3) is still in effect) PRECISION (0) #G = #A * #B #G is set to 3 (rounded to the nearest 100 decimal places) #H = #C - #G #H is set to 0 (PRECISION (0) is still in effect) |
Topic ID: 520101