e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r186215 = a;
double r186216 = log(r186215);
double r186217 = b;
double r186218 = log(r186217);
double r186219 = r186216 + r186218;
double r186220 = exp(r186219);
return r186220;
}
double f(double a, double b) {
double r186221 = a;
double r186222 = b;
double r186223 = r186221 * r186222;
return r186223;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
rmApplied exp-sum5.5
Simplified4.7
Simplified0
Final simplification0
herbie shell --seed 2020049
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))