e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r157273 = a;
double r157274 = log(r157273);
double r157275 = b;
double r157276 = log(r157275);
double r157277 = r157274 + r157276;
double r157278 = exp(r157277);
return r157278;
}
double f(double a, double b) {
double r157279 = b;
double r157280 = a;
double r157281 = r157279 * r157280;
return r157281;
}




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