e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r72135 = a;
double r72136 = log(r72135);
double r72137 = b;
double r72138 = log(r72137);
double r72139 = r72136 + r72138;
double r72140 = exp(r72139);
return r72140;
}
double f(double a, double b) {
double r72141 = b;
double r72142 = a;
double r72143 = r72141 * r72142;
return r72143;
}




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