e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r4097030 = a;
double r4097031 = log(r4097030);
double r4097032 = b;
double r4097033 = log(r4097032);
double r4097034 = r4097031 + r4097033;
double r4097035 = exp(r4097034);
return r4097035;
}
double f(double a, double b) {
double r4097036 = b;
double r4097037 = a;
double r4097038 = r4097036 * r4097037;
return r4097038;
}




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