e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r39369 = a;
double r39370 = log(r39369);
double r39371 = b;
double r39372 = log(r39371);
double r39373 = r39370 + r39372;
double r39374 = exp(r39373);
return r39374;
}
double f(double a, double b) {
double r39375 = b;
double r39376 = a;
double r39377 = r39375 * r39376;
return r39377;
}




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