e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r98874 = a;
double r98875 = log(r98874);
double r98876 = b;
double r98877 = log(r98876);
double r98878 = r98875 + r98877;
double r98879 = exp(r98878);
return r98879;
}
double f(double a, double b) {
double r98880 = b;
double r98881 = a;
double r98882 = r98880 * r98881;
return r98882;
}




Bits error versus a




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