e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r21211 = a;
double r21212 = log(r21211);
double r21213 = b;
double r21214 = log(r21213);
double r21215 = r21212 + r21214;
double r21216 = exp(r21215);
return r21216;
}
double f(double a, double b) {
double r21217 = b;
double r21218 = a;
double r21219 = r21217 * r21218;
return r21219;
}




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