Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Lets say I have number in decimal form to the ten-thousands place $$p=0.abcd$$ and another number $$$$ to the hundredth place. $$a.b,c,d,x,y,z$$ are all integers from 0 to 9, inclusive, except for z & d which can only range from 1 to 9, inclusive. If I want to know exactly where the decimal will lie in the multiplication of $$p*q$$ is there a formula I can employ?

Right now every time I multiply two decimals, I multiply $$abcd$$ and $$xyz$$ and then move the decimal point by the sum of number places d&z are away(so 7 moves to the eft). But this is all conditioned on the size of the number abcd*xyz yields. Is there a formula that can standardize this?

share|cite|improve this question

$p = 0.abcd = abcd \times 10^{-4}$
$q = = xyz \times 10^{-3}$

$pq = abcd \times xyz \times 10^{-7}$

So you'd always want to move it by 7 placed, regardless of how many digits $abcd\times xyz$ has.

You can see how to 'standardize this', but using the $10^{-n}$ to understand the decimal, as compared to integers.

share|cite|improve this answer

You can write

$$ p=\frac{abcd}{10000},\qquad q=\frac{xyz}{1000} $$


$$ pq=\frac{abcd\cdot xyz}{10000000} $$

and the only cases where this eventually has less than seven decimal digits (after discarding trailing zeros) is when the product at the numerator ends with $0$, which is the case when either $d$ is $5$ and $z$ is even (or the other way around).

In fact a product of numbers not divisible by $10$ is divisible by $10$ if and only if one of them is divisible by $5$ and the other one by $2$. So take the maximum exponent $m$ by which one is divisible by $5$, the maximum exponent $n$ by which the other is divisible by $2$; set $k=\min\{m,n\}$; then exactly $k$ trailing zeros will appear in the product.

This phenomenon can never appear when the number base is prime, for example in binary arithmetic.

share|cite|improve this answer

Your Answer


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.