e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r54423 = a;
double r54424 = log(r54423);
double r54425 = b;
double r54426 = log(r54425);
double r54427 = r54424 + r54426;
double r54428 = exp(r54427);
return r54428;
}
double f(double a, double b) {
double r54429 = a;
double r54430 = b;
double r54431 = r54429 * r54430;
return r54431;
}




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