e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r7747033 = a;
double r7747034 = log(r7747033);
double r7747035 = b;
double r7747036 = log(r7747035);
double r7747037 = r7747034 + r7747036;
double r7747038 = exp(r7747037);
return r7747038;
}
double f(double a, double b) {
double r7747039 = b;
double r7747040 = a;
double r7747041 = r7747039 * r7747040;
return r7747041;
}




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