e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r115470 = a;
double r115471 = log(r115470);
double r115472 = b;
double r115473 = log(r115472);
double r115474 = r115471 + r115473;
double r115475 = exp(r115474);
return r115475;
}
double f(double a, double b) {
double r115476 = b;
double r115477 = a;
double r115478 = r115476 * r115477;
return r115478;
}




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