Rounding Numbers: Difference between revisions

m
Clarified definition of "rounding" and merged fixed-font boxes - Hi Michael! ;-)
m (moving zip file discussion to discussion)
m (Clarified definition of "rounding" and merged fixed-font boxes - Hi Michael! ;-))
Line 25: Line 25:
ie. ± 99,999,999,999,999.99999999.
ie. ± 99,999,999,999,999.99999999.


(b) Rounding should occur when the digit to the right of the rounding
(b) Rounding '''up''' should occur when the digit to the right of the rounding
position is 5 or above.  I take this to be a reasonably 'international'
position is 5 or above, otherwise rounding '''down''' should occur.  I take this to be a reasonably 'international'
convention.
convention.


Line 104: Line 104:
  //
  //
  // ===========================================================================
  // ===========================================================================
 
 
   Function Round_Number GLOBAL number nVal integer iRnd returns Number
   Function Round_Number GLOBAL number nVal integer iRnd returns Number
     // If the rounding precision falls in the range -5 to +8, then return:-
     // If the rounding precision falls in the range -5 to +8, then return:-