e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r20323764 = a;
double r20323765 = log(r20323764);
double r20323766 = b;
double r20323767 = log(r20323766);
double r20323768 = r20323765 + r20323767;
double r20323769 = exp(r20323768);
return r20323769;
}
double f(double a, double b) {
double r20323770 = a;
double r20323771 = b;
double r20323772 = r20323770 * r20323771;
return r20323772;
}




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