e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r133472 = a;
double r133473 = log(r133472);
double r133474 = b;
double r133475 = log(r133474);
double r133476 = r133473 + r133475;
double r133477 = exp(r133476);
return r133477;
}
double f(double a, double b) {
double r133478 = a;
double r133479 = b;
double r133480 = r133478 * r133479;
return r133480;
}




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