e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r5613839 = a;
double r5613840 = log(r5613839);
double r5613841 = b;
double r5613842 = log(r5613841);
double r5613843 = r5613840 + r5613842;
double r5613844 = exp(r5613843);
return r5613844;
}
double f(double a, double b) {
double r5613845 = a;
double r5613846 = b;
double r5613847 = r5613845 * r5613846;
return r5613847;
}




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