e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r161760 = a;
double r161761 = log(r161760);
double r161762 = b;
double r161763 = log(r161762);
double r161764 = r161761 + r161763;
double r161765 = exp(r161764);
return r161765;
}
double f(double a, double b) {
double r161766 = a;
double r161767 = b;
double r161768 = r161766 * r161767;
return r161768;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.6 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.6
rmApplied exp-sum5.4
Simplified4.7
Simplified0
Final simplification0
herbie shell --seed 2020056 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))