e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r10215 = a;
double r10216 = log(r10215);
double r10217 = b;
double r10218 = log(r10217);
double r10219 = r10216 + r10218;
double r10220 = exp(r10219);
return r10220;
}
double f(double a, double b) {
double r10221 = b;
double r10222 = a;
double r10223 = r10221 * r10222;
return r10223;
}




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