e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r6244995 = a;
double r6244996 = log(r6244995);
double r6244997 = b;
double r6244998 = log(r6244997);
double r6244999 = r6244996 + r6244998;
double r6245000 = exp(r6244999);
return r6245000;
}
double f(double a, double b) {
double r6245001 = b;
double r6245002 = a;
double r6245003 = r6245001 * r6245002;
return r6245003;
}




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