e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r5013556 = a;
double r5013557 = log(r5013556);
double r5013558 = b;
double r5013559 = log(r5013558);
double r5013560 = r5013557 + r5013559;
double r5013561 = exp(r5013560);
return r5013561;
}
double f(double a, double b) {
double r5013562 = b;
double r5013563 = a;
double r5013564 = r5013562 * r5013563;
return r5013564;
}




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