e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r104434 = a;
double r104435 = log(r104434);
double r104436 = b;
double r104437 = log(r104436);
double r104438 = r104435 + r104437;
double r104439 = exp(r104438);
return r104439;
}
double f(double a, double b) {
double r104440 = b;
double r104441 = a;
double r104442 = r104440 * r104441;
return r104442;
}




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 2020046
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))