Captain Obvious is asked to implement a simple function that given two decimal numbers A and B returns their sum.
"Easy one!" he thinks, but soon he discovers that his function fails over fifty percent of the given test cases! He suspects the test cases are wrong, but his calculator is saying they're correct! What's happening?
Can you help Captain Obvious to debug his function and solve the exercise?
float_sum(0.3, 0.7) ➞ 1
float_sum(0.35, 0.75) ➞ 1.1
float_sum(1.234, 5.6789) ➞ 6.9129