Rounding

Many programmers' headaches have been caused by unpredictable rounding of numeric values during program execution. An application such as an amortization schedule can be off by a few pennies depending on the effects of rounding. Because PRO/5 uses real decimal arithmetic, many rounding problems do not occur. Still, the programmer should be aware of where PRO/5 will perform rounding. The verbs PRECISION and FLOATINGPOINT are used to set a desired precision. PRO/5 always performs calculations with full floating-point precision. Rounding to the current precision will occur in the following cases: