e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r211368 = a;
double r211369 = log(r211368);
double r211370 = b;
double r211371 = log(r211370);
double r211372 = r211369 + r211371;
double r211373 = exp(r211372);
return r211373;
}
double f(double a, double b) {
double r211374 = a;
double r211375 = b;
double r211376 = r211374 * r211375;
return r211376;
}




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