e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r125294 = a;
double r125295 = log(r125294);
double r125296 = b;
double r125297 = log(r125296);
double r125298 = r125295 + r125297;
double r125299 = exp(r125298);
return r125299;
}
double f(double a, double b) {
double r125300 = b;
double r125301 = a;
double r125302 = r125300 * r125301;
return r125302;
}




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