e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r144915 = a;
double r144916 = log(r144915);
double r144917 = b;
double r144918 = log(r144917);
double r144919 = r144916 + r144918;
double r144920 = exp(r144919);
return r144920;
}
double f(double a, double b) {
double r144921 = a;
double r144922 = b;
double r144923 = r144921 * r144922;
return r144923;
}




Bits error versus a




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