\log \left(e^{a} + e^{b}\right)
\begin{array}{l}
t_0 := \mathsf{log1p}\left(e^{a}\right)\\
t_1 := \sqrt{t_0}\\
t_0 + \frac{b}{{\left(e^{t_1}\right)}^{t_1}}
\end{array}
(FPCore (a b) :precision binary64 (log (+ (exp a) (exp b))))
(FPCore (a b) :precision binary64 (let* ((t_0 (log1p (exp a))) (t_1 (sqrt t_0))) (+ t_0 (/ b (pow (exp t_1) t_1)))))
double code(double a, double b) {
return log((exp(a) + exp(b)));
}
double code(double a, double b) {
double t_0 = log1p(exp(a));
double t_1 = sqrt(t_0);
return t_0 + (b / pow(exp(t_1), t_1));
}



Bits error versus a



Bits error versus b
Results
Initial program 29.5
Taylor expanded in b around 0 1.2
Simplified1.1
Applied egg-rr1.1
Final simplification1.1
herbie shell --seed 2022125
(FPCore (a b)
:name "symmetry log of sum of exp"
:precision binary64
(log (+ (exp a) (exp b))))