e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r5038108 = a;
double r5038109 = log(r5038108);
double r5038110 = b;
double r5038111 = log(r5038110);
double r5038112 = r5038109 + r5038111;
double r5038113 = exp(r5038112);
return r5038113;
}
double f(double a, double b) {
double r5038114 = a;
double r5038115 = b;
double r5038116 = r5038114 * r5038115;
return r5038116;
}




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