e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r116217 = a;
double r116218 = log(r116217);
double r116219 = b;
double r116220 = log(r116219);
double r116221 = r116218 + r116220;
double r116222 = exp(r116221);
return r116222;
}
double f(double a, double b) {
double r116223 = a;
double r116224 = b;
double r116225 = r116223 * r116224;
return r116225;
}




Bits error versus a




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