Your function must accept 2 strings which are correct numbers. It needs to sum them up (without rounding and floating point errors) and return the result (which is also a correct number) without any leading zeros in the integer part, trailing zeros in the decimal part and without minus if the answer is 0 i.e. -0
is not allowed.
A correct number is a string which can start with a leading minus, contains only digits and can contain only one dot which will be between the digits:
'1234567890'
'-1234567890'
'12345.67890'
'-12345.67890'
In other words, it matches the regex -?\d+(\.\d+)?
Your input will always be valid so you don't need to think about empty strings, etc.
The input strings can be as large as possible in your programming language, but it is guaranteed that the length of the resulting string will not be larger than what is available in your programming language.
Some test cases:
'1', '1' --> '2'
'0', '0' --> '0'
'9', '1' --> '10'
'001.002', '3.400' --> '4.402'
'5', '-5.0' --> '0'
'2', '-2.5' --> '-0.5'
'12345', '67890' --> '80235'
'-50.6', '20.53' --> '-30.07'
'-001.00', '00100' --> '99'
'-00.100', '-0.20' --> '-0.3'
'0.1', '0.2' --> '0.3'
'1000000000000', '-0.000000000001' --> '999999999999.999999999999'
The shortest code in each programming language wins!