Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Rounding
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====Rounding half away from zero==== One may also '''round half away from zero''' (or '''round half toward infinity'''), a tie-breaking rule that is commonly taught and used, namely: If the fractional part of {{mvar|x}} is exactly 0.5, then {{math|1=''y'' = ''x'' + 0.5}} if {{mvar|x}} is positive, and {{math|1=''y'' = ''x'' β 0.5}} if {{mvar|x}} is negative. : <math> y = \sgn(x) \left\lfloor \left| x \right| + \tfrac12 \right\rfloor = -\sgn(x) \left\lceil -\left| x \right| - \tfrac12 \right\rceil = \begin{cases} \left\lfloor x + \tfrac12 \right\rfloor = \left\lceil \tfrac12 \lfloor 2x \rfloor \right\rceil & x \ge 0 \\[5mu] \left\lceil x - \tfrac12 \right\rceil = \left\lfloor \tfrac12 \lceil 2x \rceil \right\rfloor & x < 0 \end{cases} </math> For example, 23.5 gets rounded to 24, and β23.5 gets rounded to β24. This can be more efficient on computers that use [[sign-magnitude]] representation for the values to be rounded, because only the first omitted digit needs to be considered to determine if it rounds up or down. This is one method used when rounding to [[significant figures]] due to its simplicity. This method, also known as '''commercial rounding''',{{citation needed|date=November 2020}} treats positive and negative values symmetrically, and therefore is free of overall positive/negative bias if the original numbers are positive or negative with equal probability. It does, however, still have bias away from zero. It is often used for currency conversions and price roundings (when the amount is first converted into the smallest significant subdivision of the currency, such as cents of a euro) as it is easy to explain by just considering the first fractional digit, independently of supplementary precision digits or sign of the amount (for strict equivalence between the paying and recipient of the amount).
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Rounding
(section)
Add topic