e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r79342 = a;
double r79343 = log(r79342);
double r79344 = b;
double r79345 = log(r79344);
double r79346 = r79343 + r79345;
double r79347 = exp(r79346);
return r79347;
}
double f(double a, double b) {
double r79348 = b;
double r79349 = a;
double r79350 = r79348 * r79349;
return r79350;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.6 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.6
Simplified0
Final simplification0
herbie shell --seed 2019303
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))