e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r4318849 = a;
double r4318850 = log(r4318849);
double r4318851 = b;
double r4318852 = log(r4318851);
double r4318853 = r4318850 + r4318852;
double r4318854 = exp(r4318853);
return r4318854;
}
double f(double a, double b) {
double r4318855 = a;
double r4318856 = b;
double r4318857 = r4318855 * r4318856;
return r4318857;
}




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