e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r81566 = a;
double r81567 = log(r81566);
double r81568 = b;
double r81569 = log(r81568);
double r81570 = r81567 + r81569;
double r81571 = exp(r81570);
return r81571;
}
double f(double a, double b) {
double r81572 = b;
double r81573 = a;
double r81574 = r81572 * r81573;
return r81574;
}




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