e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r99024 = a;
double r99025 = log(r99024);
double r99026 = b;
double r99027 = log(r99026);
double r99028 = r99025 + r99027;
double r99029 = exp(r99028);
return r99029;
}
double f(double a, double b) {
double r99030 = b;
double r99031 = a;
double r99032 = r99030 * r99031;
return r99032;
}




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