e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r5182561 = a;
double r5182562 = log(r5182561);
double r5182563 = b;
double r5182564 = log(r5182563);
double r5182565 = r5182562 + r5182564;
double r5182566 = exp(r5182565);
return r5182566;
}
double f(double a, double b) {
double r5182567 = a;
double r5182568 = b;
double r5182569 = r5182567 * r5182568;
return r5182569;
}




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