e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r99591 = a;
double r99592 = log(r99591);
double r99593 = b;
double r99594 = log(r99593);
double r99595 = r99592 + r99594;
double r99596 = exp(r99595);
return r99596;
}
double f(double a, double b) {
double r99597 = b;
double r99598 = a;
double r99599 = r99597 * r99598;
return r99599;
}




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