e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r4812630 = a;
double r4812631 = log(r4812630);
double r4812632 = b;
double r4812633 = log(r4812632);
double r4812634 = r4812631 + r4812633;
double r4812635 = exp(r4812634);
return r4812635;
}
double f(double a, double b) {
double r4812636 = b;
double r4812637 = a;
double r4812638 = r4812636 * r4812637;
return r4812638;
}




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