e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r130795 = a;
double r130796 = log(r130795);
double r130797 = b;
double r130798 = log(r130797);
double r130799 = r130796 + r130798;
double r130800 = exp(r130799);
return r130800;
}
double f(double a, double b) {
double r130801 = a;
double r130802 = b;
double r130803 = r130801 * r130802;
return r130803;
}




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