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!
===Logarithmic rounding=== ====Rounding to a specified power==== Rounding to a specified ''power'' is very different from rounding to a specified ''multiple''; for example, it is common in computing to need to round a number to a whole power of 2. The steps, in general, to round a positive number {{mvar|x}} to a power of some positive number {{mvar|b}} other than 1, are: :<math>\mathrm{roundToPower}(x, b) = b^{\mathrm{round}(\log_b x)}, x>0, b>0, b \ne 1</math> Many of the caveats applicable to rounding to a multiple are applicable to rounding to a power. ====Scaled rounding==== This type of rounding, which is also named '''rounding to a logarithmic scale''', is a variant of [[#Rounding to a specified power|rounding to a specified power]]. Rounding on a logarithmic scale is accomplished by taking the log of the amount and doing normal rounding to the nearest value on the log scale. For example, resistors are supplied with [[preferred number]]s on a logarithmic scale. In particular, for resistors with a 10% accuracy, they are supplied with nominal values 100, 120, 150, 180, 220, etc. rounded to multiples of 10 ([[E12 series]]). If a calculation indicates a resistor of 165 ohms is required then {{math|1=log(150) = 2.176}}, {{math|1=log(165) = 2.217}} and {{math|1=log(180) = 2.255}}. The logarithm of 165 is closer to the logarithm of 180 therefore a 180 ohm resistor would be the first choice if there are no other considerations. Whether a value {{math|''x'' β (''a'', ''b'')}} rounds to {{mvar|a}} or {{mvar|b}} depends upon whether the squared value {{math|''x''{{sup|2}}}} is greater than or less than the product {{math|''ab''}}. The value 165 rounds to 180 in the resistors example because {{math|1=165{{sup|2}} = 27225}} is greater than {{math|1=150 Γ 180 = 27000}}.
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