e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r162667 = a;
double r162668 = log(r162667);
double r162669 = b;
double r162670 = log(r162669);
double r162671 = r162668 + r162670;
double r162672 = exp(r162671);
return r162672;
}
double f(double a, double b) {
double r162673 = a;
double r162674 = b;
double r162675 = r162673 * r162674;
return r162675;
}




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