e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r83370 = a;
double r83371 = log(r83370);
double r83372 = b;
double r83373 = log(r83372);
double r83374 = r83371 + r83373;
double r83375 = exp(r83374);
return r83375;
}
double f(double a, double b) {
double r83376 = b;
double r83377 = a;
double r83378 = r83376 * r83377;
return r83378;
}




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))))