e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r178129 = a;
double r178130 = log(r178129);
double r178131 = b;
double r178132 = log(r178131);
double r178133 = r178130 + r178132;
double r178134 = exp(r178133);
return r178134;
}
double f(double a, double b) {
double r178135 = a;
double r178136 = b;
double r178137 = r178135 * r178136;
return r178137;
}




Bits error versus a




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