Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2016 October 22

From Wikipedia, the free encyclopedia
Mathematics desk
< October 21 << Sep | October | Nov >> October 23 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


October 22

[edit]

0.01825 as fraction and percentage

[edit]

How do I convert 0.01825 into either a fraction or percentage? Uncle dan is home (talk) 00:37, 22 October 2016 (UTC)[reply]

0.01825 = 001825/100000 = 1825/100000 110.22.20.252 (talk) 01:41, 22 October 2016 (UTC)[reply]
and
0.01825 = 1.825/100 = 1.825% Rojomoke (talk) 04:18, 22 October 2016 (UTC)[reply]
Many folks would assume (perhaps wrongly!) that the first question is a request specifically for a reduced fraction. In this case this starts off easy because you see a "5" at the end and know you can divide by 5 to get 365, and divide that by 5 to get 73. When you get to 73 though, what do you divide by? That's tougher - a problem called factorization really that is key to a lot of advanced math. At a basic level it might be easiest to look up 73 (number), which says it is a prime number, which means you can't divide it by anything else. Otherwise you probably do not just have to try dividing by 2, 3, 5, 7, 11 (i.e. prime numbers) until they see 11*11 is more than 73. This is not that hard for a small number but with a big one it gets to be really tough.
On the bottom, you can easily divide 100000 / 25 = 4000 for a reduced fraction of 73/4000. Wnt (talk) 13:08, 22 October 2016 (UTC)[reply]
@Tamfang: Obviously I don't know enough mathematics. Even the Euclidean algorithm, if I knew it, I forgot it. Just take the difference between the numbers, or the remainder. Genius! From 300 B.C. yet. So to go back to elementary school for a minute (though I doubt my teacher ever read this book) that means take 100000 modulo 1825, hmmm, try 100000 - 91250 (took half, multipled by 1000) = 8750, now take 8750 mod 1825 = 8750 - 9125 = -375, take 1825 mod -375 = 1825 - 1500 = 325, take 375-325 = 50, take 325 mod 50 = 25, take 50 mod 25 = 25. Seems pretty robust even for head-calculation. Scary thing is that it seems like no matter how basic the math question there's always something to be learned if you look at it. Now I'll have to look at the extended version... Wnt (talk) 13:59, 26 October 2016 (UTC)[reply]
Hmmm, to apply the extended algorithm I need the genuine qi sequence, so no fumbling around with wrong divisors:
subscript r q s t ~ -s/t
0 100000 ? 1 0 infinite
1 1825 54 0 1 0
2 1450 1 1 -54 0.01851852
3 375 3 -1 55 0.01818182
4 325 1 4 -219 0.01826484
5 50 6 -5 274 0.01824818
6 25 2 34 -1863 0.01825013
7 0 0 -73 4000 0.01825
Wnt (talk) 14:42, 26 October 2016 (UTC)[reply]
  • Converting decimal numbers to fractions isn't as straight-forward as most people would hope. The reason for this is actually quite simple: the decimal representation of numbers is really just a clumsy and imprecise human contrivance! Which is why an algorithm is needed to decompose them back into fractions. Now supposing you have a non-repeating fraction, the only thing to do is multiply the numerator (initially set to the decimal value in question) and denominator (initially set to one) by some factor (doesn't have to be ten, of course) until you have whole numbers, find the GCD, then divide the numerator and denominator by that. For repeating fractions, as others have already pointed out here, you could use the extended euclidean method. Another way to do it might be something like this (in pseudocode):
numerator := 0
denominator := 1
loop
{    
   denominator := denominator * 10
   target := value * denominator
   numerator := target - (value / denominator)
   if numerator = target
      break loop
}
numerator := floor(numerator)
output numerator 
output denominator 
Of course, the above doesn't remove common factors, so you'd still need to find the GCD and divide through. If the number is irrational then either approach will obviously only give you an approximate result. Moreover, depending on the specifications of the machine that you perform the calculations on, even a rational number may only result in an approximation as well. Earl of Arundel (talk) 05:57, 28 October 2016 (UTC)[reply]