e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r5301241 = a;
double r5301242 = log(r5301241);
double r5301243 = b;
double r5301244 = log(r5301243);
double r5301245 = r5301242 + r5301244;
double r5301246 = exp(r5301245);
return r5301246;
}
double f(double a, double b) {
double r5301247 = a;
double r5301248 = b;
double r5301249 = r5301247 * r5301248;
return r5301249;
}




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