e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r7136282 = a;
double r7136283 = log(r7136282);
double r7136284 = b;
double r7136285 = log(r7136284);
double r7136286 = r7136283 + r7136285;
double r7136287 = exp(r7136286);
return r7136287;
}
double f(double a, double b) {
double r7136288 = b;
double r7136289 = a;
double r7136290 = r7136288 * r7136289;
return r7136290;
}




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