e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r77936 = a;
double r77937 = log(r77936);
double r77938 = b;
double r77939 = log(r77938);
double r77940 = r77937 + r77939;
double r77941 = exp(r77940);
return r77941;
}
double f(double a, double b) {
double r77942 = b;
double r77943 = a;
double r77944 = r77942 * r77943;
return r77944;
}




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