e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r2537643 = a;
double r2537644 = log(r2537643);
double r2537645 = b;
double r2537646 = log(r2537645);
double r2537647 = r2537644 + r2537646;
double r2537648 = exp(r2537647);
return r2537648;
}
double f(double a, double b) {
double r2537649 = b;
double r2537650 = a;
double r2537651 = r2537649 * r2537650;
return r2537651;
}




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