e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r123226 = a;
double r123227 = log(r123226);
double r123228 = b;
double r123229 = log(r123228);
double r123230 = r123227 + r123229;
double r123231 = exp(r123230);
return r123231;
}
double f(double a, double b) {
double r123232 = b;
double r123233 = a;
double r123234 = r123232 * r123233;
return r123234;
}




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