Goal: compute
Problem: numerical stability for large positive or negative
Solution:
where
This way:
- all exponents are
- one term will have exponent , where
- → small numbers, but no underflow/overflow
1 min read
Goal: compute log(∑i=1nexi)
Problem: numerical stability for large positive or negative x
Solution:
where c=maxi(xi)
This way: