e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r167250 = a;
double r167251 = log(r167250);
double r167252 = b;
double r167253 = log(r167252);
double r167254 = r167251 + r167253;
double r167255 = exp(r167254);
return r167255;
}
double f(double a, double b) {
double r167256 = a;
double r167257 = b;
double r167258 = r167256 * r167257;
return r167258;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
rmApplied exp-sum5.5
Simplified4.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))))