e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r113478 = a;
double r113479 = log(r113478);
double r113480 = b;
double r113481 = log(r113480);
double r113482 = r113479 + r113481;
double r113483 = exp(r113482);
return r113483;
}
double f(double a, double b) {
double r113484 = b;
double r113485 = a;
double r113486 = r113484 * r113485;
return r113486;
}




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