e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r2327669 = a;
double r2327670 = log(r2327669);
double r2327671 = b;
double r2327672 = log(r2327671);
double r2327673 = r2327670 + r2327672;
double r2327674 = exp(r2327673);
return r2327674;
}
double f(double a, double b) {
double r2327675 = b;
double r2327676 = a;
double r2327677 = r2327675 * r2327676;
return r2327677;
}




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