I try to write a function in Mathematica to concat ("join") to numbers. Input (2 & 4) --> 24 Input (-1 & 75) --> -175
At the Moment i work with the following function in Mathematica:
f(a_, b_) := a*10^Floor(1+Log(10, Abs(b)))+Abs(b)
This works fine for:
In:= f(1,13)
Out:=113
In:= f(1,-13)
Out:=113
Doesn't work with:
In:= f(-1,13)
Out:=-87
What I want would be
Out:=-113
A function wich switches the Operator at the end "+b" to "-b" if (a) is negative would help, but i don't know how to achieve this.