Compute log∑iexi for a vector x without overflow, even when entries are as large as 1000.
Implement solve(x).
Returns. Return a Python float.
Example 1
Input:
solve([1000.0, 1001.0])
Output:
1001.313262
Example 2
Input:
solve([0.0, 0.0])
Output:
0.693147
Example 3
Input:
solve([-1000.0, -1000.0])
Output:
-999.306853
No results yet
Run your code to check it against the examples, or submit to run every test.