e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r93353 = a;
double r93354 = log(r93353);
double r93355 = b;
double r93356 = log(r93355);
double r93357 = r93354 + r93356;
double r93358 = exp(r93357);
return r93358;
}
double f(double a, double b) {
double r93359 = b;
double r93360 = a;
double r93361 = r93359 * r93360;
return r93361;
}




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