e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r120491 = a;
double r120492 = log(r120491);
double r120493 = b;
double r120494 = log(r120493);
double r120495 = r120492 + r120494;
double r120496 = exp(r120495);
return r120496;
}
double f(double a, double b) {
double r120497 = a;
double r120498 = b;
double r120499 = r120497 * r120498;
return r120499;
}




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