e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r106673 = a;
double r106674 = log(r106673);
double r106675 = b;
double r106676 = log(r106675);
double r106677 = r106674 + r106676;
double r106678 = exp(r106677);
return r106678;
}
double f(double a, double b) {
double r106679 = b;
double r106680 = a;
double r106681 = r106679 * r106680;
return r106681;
}




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