e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r2406713 = a;
double r2406714 = log(r2406713);
double r2406715 = b;
double r2406716 = log(r2406715);
double r2406717 = r2406714 + r2406716;
double r2406718 = exp(r2406717);
return r2406718;
}
double f(double a, double b) {
double r2406719 = b;
double r2406720 = a;
double r2406721 = r2406719 * r2406720;
return r2406721;
}




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