e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r3717988 = a;
double r3717989 = log(r3717988);
double r3717990 = b;
double r3717991 = log(r3717990);
double r3717992 = r3717989 + r3717991;
double r3717993 = exp(r3717992);
return r3717993;
}
double f(double a, double b) {
double r3717994 = b;
double r3717995 = a;
double r3717996 = r3717994 * r3717995;
return r3717996;
}




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