e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r158797 = a;
double r158798 = log(r158797);
double r158799 = b;
double r158800 = log(r158799);
double r158801 = r158798 + r158800;
double r158802 = exp(r158801);
return r158802;
}
double f(double a, double b) {
double r158803 = a;
double r158804 = b;
double r158805 = r158803 * r158804;
return r158805;
}




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