e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r233770 = a;
double r233771 = log(r233770);
double r233772 = b;
double r233773 = log(r233772);
double r233774 = r233771 + r233773;
double r233775 = exp(r233774);
return r233775;
}
double f(double a, double b) {
double r233776 = b;
double r233777 = a;
double r233778 = r233776 * r233777;
return r233778;
}




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