Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Okay, that title is awkward, but hopefully the question won't be. See my earlier question for some context, if interested.

So if if I'm trying to get 1/3 of a number (let's say 99) with only the option of multiplying the target number by .(3), is there an equation or function to know how many repetitions is enough such that "tying off" the number with the next highest number (in this case, .34 or .334, etc), will equal 1/3 of the target number if rounding down eg

< 1/3 target number + .44

.44 to account for any ceiling-happy rounders out there.

I know it's not a set number for repetitions, but with following test:

9   *  .4 =   3.6   |   9 *   .34 =   3.06
99  * .34 =  33.66  |  99 *  .334 =  33.066
999 *.334 = 333.666 | 999 * .3334 = 333.0666

there is a clear correlation between the size of the target number and the number of repetitions. But I know that this isn't the most definitive test, obviously.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

A first best guess would be that if your number contains $n$ decimal digits before the decimal point, your multiplication factor should have $n$ 3s followed by a 4.
Imagine performing the long multiplication of your number and a string of 3s.
For example:
$$\begin{align} & 12345 \times\\ & .33333\\ & 333330000\\ & \space\space 66666000\\ & \space\space\space\space9999900\\ & \space\space\space\space1333320\\ & \space\space\space\space\space\space166665\\ & 4114.95885\\ \end{align} $$ is not quite enough to produce your intended result of 4115. Replacing the 33333 with 333334 gives a product of 4115.008230 which does give the desired result.
Just adding more 3s will never make a product greater than the desired result and having too few 3s (and so the 4 too soon) will make a product too big.
As to a formula for the number of 3s, $$\lfloor{log(n)+1}\rfloor$$ should do (where log is of the base 10 variety).

share|improve this answer
    
Will this also work, do you know, for repeating decimals of more than one digit? For instance, 5/11 = .(45). Would I need to increase the number of 45's by the total number of digits in the target number, or just increase the number of decimal places? I doubt I'll have a real world need for 5/11, but it's worth knowing for the full scope of the question. –  Anthony Mar 7 '12 at 22:22
    
It is the number of digits in your first number that determines how many digits you need in your multiplying factor. Say that you want to divide 123 by 7 (and hence multiply by .(142857)). There are 3 digits in 123 so you need to take the first 3 digits of 142857 and round up the fourth, to get $\lfloor 123 * .1429 \rfloor = 17.$ –  Peter Phipps Mar 8 '12 at 0:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.