e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r147899 = a;
double r147900 = log(r147899);
double r147901 = b;
double r147902 = log(r147901);
double r147903 = r147900 + r147902;
double r147904 = exp(r147903);
return r147904;
}
double f(double a, double b) {
double r147905 = a;
double r147906 = b;
double r147907 = r147905 * r147906;
return r147907;
}




Bits error versus a




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