e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r73419 = a;
double r73420 = log(r73419);
double r73421 = b;
double r73422 = log(r73421);
double r73423 = r73420 + r73422;
double r73424 = exp(r73423);
return r73424;
}
double f(double a, double b) {
double r73425 = b;
double r73426 = a;
double r73427 = r73425 * r73426;
return r73427;
}




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