e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r198548 = a;
double r198549 = log(r198548);
double r198550 = b;
double r198551 = log(r198550);
double r198552 = r198549 + r198551;
double r198553 = exp(r198552);
return r198553;
}
double f(double a, double b) {
double r198554 = b;
double r198555 = a;
double r198556 = r198554 * r198555;
return r198556;
}




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