e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r130290 = a;
double r130291 = log(r130290);
double r130292 = b;
double r130293 = log(r130292);
double r130294 = r130291 + r130293;
double r130295 = exp(r130294);
return r130295;
}
double f(double a, double b) {
double r130296 = a;
double r130297 = b;
double r130298 = r130296 * r130297;
return r130298;
}




Bits error versus a




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