e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r4043546 = a;
double r4043547 = log(r4043546);
double r4043548 = b;
double r4043549 = log(r4043548);
double r4043550 = r4043547 + r4043549;
double r4043551 = exp(r4043550);
return r4043551;
}
double f(double a, double b) {
double r4043552 = a;
double r4043553 = b;
double r4043554 = r4043552 * r4043553;
return r4043554;
}




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