e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r2566812 = a;
double r2566813 = log(r2566812);
double r2566814 = b;
double r2566815 = log(r2566814);
double r2566816 = r2566813 + r2566815;
double r2566817 = exp(r2566816);
return r2566817;
}
double f(double a, double b) {
double r2566818 = a;
double r2566819 = b;
double r2566820 = r2566818 * r2566819;
return r2566820;
}




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