2
$\begingroup$

I want a way to find the smallest whole number multiple of a decimal.

For example:

$1.5 \to 1.5 \times 2 = 3$

$0.5 \to 0.5 \times 2 = 1$

$0.4 \to 2$

$0.15 \to 3$

$0.14 \to 7$

$0.25 \to 1$

$0.17264382 \to ???$

Ideally this would be something that can be done by hand easily, not by a computer recursively.

$\endgroup$
2
  • $\begingroup$ I'm trying to find the smallest whole number, so for example .25 x 100 is 25, but the smallest number is 1 not 25. $\endgroup$
    – johnpyp
    Mar 8, 2018 at 16:46
  • 1
    $\begingroup$ Expressed as a fraction in its lowest terms - with no common factors between numerator and denominator - the answer you want is the numerator. $\endgroup$
    – Joffan
    Mar 8, 2018 at 17:11

1 Answer 1

1
$\begingroup$

Begin with the fraction $$\frac{m}{10^n}$$ which can be easily determined and divide numerator and denominator by $2$ or $5$ as long as this can be done without a residue. Then, the denominator of the final fraction is the solution.

$\endgroup$
1
  • 1
    $\begingroup$ Awesome, works great. Much better than my solution of the least common multiple of m and 10^n, then add a decimal n places in. $\endgroup$
    – johnpyp
    Mar 8, 2018 at 17:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .