e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r4826175 = a;
double r4826176 = log(r4826175);
double r4826177 = b;
double r4826178 = log(r4826177);
double r4826179 = r4826176 + r4826178;
double r4826180 = exp(r4826179);
return r4826180;
}
double f(double a, double b) {
double r4826181 = b;
double r4826182 = a;
double r4826183 = r4826181 * r4826182;
return r4826183;
}




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