How to determine lowest integer multiple for any given decimal fraction

2.1k Views Asked by At

In the equation a * b = c, given a, how can I find the lowest integer c provided that:

  • a is a terminating decimal
  • b is an integer

Here is an example:

  • a = 0.2525, b = 400, c = 101

I realize that I can multiply the decimal by 10^(decimal length) for primes, but how do I find the answer for non-primes? Am I overthinking this?

1

There are 1 best solutions below

4
On BEST ANSWER

Simply write $a=\dfrac{c}{b}$ as an irreductible fraction, and this will give you the lowest integer $c$ and $b$.

Example: $a=0.2525=\dfrac{2525}{10000}=\dfrac{101}{400}$ yields $b=400$ and $c=101$. $c$ is minimal because $b,c$ are coprime integers.