e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r142490 = a;
double r142491 = log(r142490);
double r142492 = b;
double r142493 = log(r142492);
double r142494 = r142491 + r142493;
double r142495 = exp(r142494);
return r142495;
}
double f(double a, double b) {
double r142496 = b;
double r142497 = a;
double r142498 = r142496 * r142497;
return r142498;
}




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