e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r4528410 = a;
double r4528411 = log(r4528410);
double r4528412 = b;
double r4528413 = log(r4528412);
double r4528414 = r4528411 + r4528413;
double r4528415 = exp(r4528414);
return r4528415;
}
double f(double a, double b) {
double r4528416 = a;
double r4528417 = b;
double r4528418 = r4528416 * r4528417;
return r4528418;
}




Bits error versus a




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