TITLE: How do I append an integer to the left of another integer?
QUESTION [5 upvotes]: 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.

REPLY [4 votes]: $f(x,y)=x\cdot10^{\lfloor\log_{10}y\rfloor+1}+y$

REPLY [2 votes]: Take $log_{10}(b)$ and round down to find the number of digits $n$.
multiply $a$ by $10^n$
add $b$