e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r5733931 = a;
double r5733932 = log(r5733931);
double r5733933 = b;
double r5733934 = log(r5733933);
double r5733935 = r5733932 + r5733934;
double r5733936 = exp(r5733935);
return r5733936;
}
double f(double a, double b) {
double r5733937 = b;
double r5733938 = a;
double r5733939 = r5733937 * r5733938;
return r5733939;
}




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