e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r4958780 = a;
double r4958781 = log(r4958780);
double r4958782 = b;
double r4958783 = log(r4958782);
double r4958784 = r4958781 + r4958783;
double r4958785 = exp(r4958784);
return r4958785;
}
double f(double a, double b) {
double r4958786 = a;
double r4958787 = b;
double r4958788 = r4958786 * r4958787;
return r4958788;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
Simplified0
Final simplification0
herbie shell --seed 2019144
(FPCore (a b)
:name "Exp of sum of logs"
:herbie-target
(* a b)
(exp (+ (log a) (log b))))