e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r113619 = a;
double r113620 = log(r113619);
double r113621 = b;
double r113622 = log(r113621);
double r113623 = r113620 + r113622;
double r113624 = exp(r113623);
return r113624;
}
double f(double a, double b) {
double r113625 = b;
double r113626 = a;
double r113627 = r113625 * r113626;
return r113627;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
Simplified0
Final simplification0
herbie shell --seed 2019325
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))