e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r24583271 = a;
double r24583272 = log(r24583271);
double r24583273 = b;
double r24583274 = log(r24583273);
double r24583275 = r24583272 + r24583274;
double r24583276 = exp(r24583275);
return r24583276;
}
double f(double a, double b) {
double r24583277 = a;
double r24583278 = b;
double r24583279 = r24583277 * r24583278;
return r24583279;
}




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