e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r120372 = a;
double r120373 = log(r120372);
double r120374 = b;
double r120375 = log(r120374);
double r120376 = r120373 + r120375;
double r120377 = exp(r120376);
return r120377;
}
double f(double a, double b) {
double r120378 = a;
double r120379 = b;
double r120380 = r120378 * r120379;
return r120380;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
rmApplied exp-sum5.4
Simplified4.7
Simplified0
Final simplification0
herbie shell --seed 2020034
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))