e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r130440 = a;
double r130441 = log(r130440);
double r130442 = b;
double r130443 = log(r130442);
double r130444 = r130441 + r130443;
double r130445 = exp(r130444);
return r130445;
}
double f(double a, double b) {
double r130446 = b;
double r130447 = a;
double r130448 = r130446 * r130447;
return r130448;
}




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))))