e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r183577 = a;
double r183578 = log(r183577);
double r183579 = b;
double r183580 = log(r183579);
double r183581 = r183578 + r183580;
double r183582 = exp(r183581);
return r183582;
}
double f(double a, double b) {
double r183583 = b;
double r183584 = a;
double r183585 = r183583 * r183584;
return r183585;
}




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