e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r201046 = a;
double r201047 = log(r201046);
double r201048 = b;
double r201049 = log(r201048);
double r201050 = r201047 + r201049;
double r201051 = exp(r201050);
return r201051;
}
double f(double a, double b) {
double r201052 = b;
double r201053 = a;
double r201054 = r201052 * r201053;
return r201054;
}




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