e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r5933241 = a;
double r5933242 = log(r5933241);
double r5933243 = b;
double r5933244 = log(r5933243);
double r5933245 = r5933242 + r5933244;
double r5933246 = exp(r5933245);
return r5933246;
}
double f(double a, double b) {
double r5933247 = b;
double r5933248 = a;
double r5933249 = r5933247 * r5933248;
return r5933249;
}




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