e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r3888180 = a;
double r3888181 = log(r3888180);
double r3888182 = b;
double r3888183 = log(r3888182);
double r3888184 = r3888181 + r3888183;
double r3888185 = exp(r3888184);
return r3888185;
}
double f(double a, double b) {
double r3888186 = a;
double r3888187 = b;
double r3888188 = r3888186 * r3888187;
return r3888188;
}




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