e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r2485927 = a;
double r2485928 = log(r2485927);
double r2485929 = b;
double r2485930 = log(r2485929);
double r2485931 = r2485928 + r2485930;
double r2485932 = exp(r2485931);
return r2485932;
}
double f(double a, double b) {
double r2485933 = b;
double r2485934 = a;
double r2485935 = r2485933 * r2485934;
return r2485935;
}




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