e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r26747 = a;
double r26748 = log(r26747);
double r26749 = b;
double r26750 = log(r26749);
double r26751 = r26748 + r26750;
double r26752 = exp(r26751);
return r26752;
}
double f(double a, double b) {
double r26753 = b;
double r26754 = a;
double r26755 = r26753 * r26754;
return r26755;
}




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