e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r189242 = a;
double r189243 = log(r189242);
double r189244 = b;
double r189245 = log(r189244);
double r189246 = r189243 + r189245;
double r189247 = exp(r189246);
return r189247;
}
double f(double a, double b) {
double r189248 = b;
double r189249 = a;
double r189250 = r189248 * r189249;
return r189250;
}




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