e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r8978 = a;
double r8979 = log(r8978);
double r8980 = b;
double r8981 = log(r8980);
double r8982 = r8979 + r8981;
double r8983 = exp(r8982);
return r8983;
}
double f(double a, double b) {
double r8984 = b;
double r8985 = a;
double r8986 = r8984 * r8985;
return r8986;
}




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