e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r141244 = a;
double r141245 = log(r141244);
double r141246 = b;
double r141247 = log(r141246);
double r141248 = r141245 + r141247;
double r141249 = exp(r141248);
return r141249;
}
double f(double a, double b) {
double r141250 = a;
double r141251 = b;
double r141252 = r141250 * r141251;
return r141252;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.8 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.8
rmApplied exp-sum5.5
Simplified4.7
Simplified0
Final simplification0
herbie shell --seed 2019354 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))