e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r111691 = a;
double r111692 = log(r111691);
double r111693 = b;
double r111694 = log(r111693);
double r111695 = r111692 + r111694;
double r111696 = exp(r111695);
return r111696;
}
double f(double a, double b) {
double r111697 = b;
double r111698 = a;
double r111699 = r111697 * r111698;
return r111699;
}




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