\log \left(e^{a} + e^{b}\right)
\begin{array}{l}
t_0 := 1 + e^{a}\\
\log t_0 + \frac{b}{t_0} \cdot \left(1 + b \cdot \left(0.5 - \frac{0.5}{t_0}\right)\right)
\end{array}
(FPCore (a b) :precision binary64 (log (+ (exp a) (exp b))))
(FPCore (a b) :precision binary64 (let* ((t_0 (+ 1.0 (exp a)))) (+ (log t_0) (* (/ b t_0) (+ 1.0 (* b (- 0.5 (/ 0.5 t_0))))))))
double code(double a, double b) {
return log(exp(a) + exp(b));
}
double code(double a, double b) {
double t_0 = 1.0 + exp(a);
return log(t_0) + ((b / t_0) * (1.0 + (b * (0.5 - (0.5 / t_0)))));
}



Bits error versus a



Bits error versus b
Results
Initial program 29.5
Taylor expanded around 0 1.1
Simplified1.0
Taylor expanded around inf 1.1
Simplified1.0
Final simplification1.0
herbie shell --seed 2021202
(FPCore (a b)
:name "symmetry log of sum of exp"
:precision binary64
(log (+ (exp a) (exp b))))