e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r125747 = a;
double r125748 = log(r125747);
double r125749 = b;
double r125750 = log(r125749);
double r125751 = r125748 + r125750;
double r125752 = exp(r125751);
return r125752;
}
double f(double a, double b) {
double r125753 = b;
double r125754 = a;
double r125755 = r125753 * r125754;
return r125755;
}




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