e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r263903 = a;
double r263904 = log(r263903);
double r263905 = b;
double r263906 = log(r263905);
double r263907 = r263904 + r263906;
double r263908 = exp(r263907);
return r263908;
}
double f(double a, double b) {
double r263909 = b;
double r263910 = a;
double r263911 = r263909 * r263910;
return r263911;
}




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 2020045
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))