User Tools

Site Tools


syntax:functions:mround

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syntax:functions:mround [2021/09/07 11:49] – [Remarks] craigtsyntax:functions:mround [2022/11/06 17:10] (current) – [Remarks] dmitry
Line 16: Line 16:
 \\  \\ 
 =====Remarks===== =====Remarks=====
-MRound uses "bankers rounding" which rounds to the nearest //even// value.+MRound uses "bankers rounding" which rounds a value ending in 5 to the nearest //even// value. This behavior is slightly different from that of the mround() function in Excel which always rounds away from zero.
  
  
Line 24: Line 24:
   mround(5.3, 0.5) //Returns 5.5   mround(5.3, 0.5) //Returns 5.5
  
-  mround(10.05, 0.1) //Returns 10.0 (.05 rounds down)+  mround(10.05, 0.1) //Returns 10.0 (bankers rounding rounds to the closest even value)
  
-  mround(10.06, 0.1) //Returns 10.(greater than .05 rounds up)+  mround(10.15, 0.1) //Returns 10.(bankers rounding rounds to the closest even value)
  
   mround(20.78, 1) //Returns 21   mround(20.78, 1) //Returns 21
syntax/functions/mround.txt · Last modified: 2022/11/06 17:10 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki