e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r219345 = a;
double r219346 = log(r219345);
double r219347 = b;
double r219348 = log(r219347);
double r219349 = r219346 + r219348;
double r219350 = exp(r219349);
return r219350;
}
double f(double a, double b) {
double r219351 = a;
double r219352 = b;
double r219353 = r219351 * r219352;
return r219353;
}




Bits error versus a




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