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

For example:

. is my append operator

f(x,y)    = |x| . |y|
f(1,45)   = 145
f(233,10) = 23310
f(8,2)    = 82
f(0,1)    = 1

This is a trivially easy problem to solve in programming using string concatenation. However, I can't seem to think of a good way to do this using purely arithmetic operations.

share|cite|improve this question


share|cite|improve this answer
  1. Take $log_{10}(b)$ and round down to find the number of digits $n$.
  2. multiply $a$ by $10^n$
  3. add $b$
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.