\log \left(e^{a} + e^{b}\right)
\mathsf{log1p}\left({e}^{a}\right) + \frac{b}{1 + e^{a}}
(FPCore (a b) :precision binary64 (log (+ (exp a) (exp b))))
(FPCore (a b) :precision binary64 (+ (log1p (pow E a)) (/ b (+ 1.0 (exp a)))))
double code(double a, double b) {
return log(exp(a) + exp(b));
}
double code(double a, double b) {
return log1p(pow(((double) M_E), a)) + (b / (1.0 + exp(a)));
}



Bits error versus a



Bits error versus b
Results
Initial program 29.9
Taylor expanded in b around 0 1.3
Simplified1.2
Applied *-un-lft-identity_binary641.2
Applied exp-prod_binary641.2
Simplified1.2
Final simplification1.2
herbie shell --seed 2021275
(FPCore (a b)
:name "symmetry log of sum of exp"
:precision binary64
(log (+ (exp a) (exp b))))