e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r6234868 = a;
double r6234869 = log(r6234868);
double r6234870 = b;
double r6234871 = log(r6234870);
double r6234872 = r6234869 + r6234871;
double r6234873 = exp(r6234872);
return r6234873;
}
double f(double a, double b) {
double r6234874 = a;
double r6234875 = b;
double r6234876 = r6234874 * r6234875;
return r6234876;
}




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 2019141
(FPCore (a b)
:name "Exp of sum of logs"
:herbie-target
(* a b)
(exp (+ (log a) (log b))))