e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r87235 = a;
double r87236 = log(r87235);
double r87237 = b;
double r87238 = log(r87237);
double r87239 = r87236 + r87238;
double r87240 = exp(r87239);
return r87240;
}
double f(double a, double b) {
double r87241 = b;
double r87242 = a;
double r87243 = r87241 * r87242;
return r87243;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.8 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.8
Simplified0
Final simplification0
herbie shell --seed 2019322 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))