e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r107463 = a;
double r107464 = log(r107463);
double r107465 = b;
double r107466 = log(r107465);
double r107467 = r107464 + r107466;
double r107468 = exp(r107467);
return r107468;
}
double f(double a, double b) {
double r107469 = b;
double r107470 = a;
double r107471 = r107469 * r107470;
return r107471;
}




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