e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r135828 = a;
double r135829 = log(r135828);
double r135830 = b;
double r135831 = log(r135830);
double r135832 = r135829 + r135831;
double r135833 = exp(r135832);
return r135833;
}
double f(double a, double b) {
double r135834 = b;
double r135835 = a;
double r135836 = r135834 * r135835;
return r135836;
}




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))))