e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r5997462 = a;
double r5997463 = log(r5997462);
double r5997464 = b;
double r5997465 = log(r5997464);
double r5997466 = r5997463 + r5997465;
double r5997467 = exp(r5997466);
return r5997467;
}
double f(double a, double b) {
double r5997468 = a;
double r5997469 = b;
double r5997470 = r5997468 * r5997469;
return r5997470;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.6 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.6
Simplified0
Final simplification0
herbie shell --seed 2019132 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:herbie-target
(* a b)
(exp (+ (log a) (log b))))