e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r4802254 = a;
double r4802255 = log(r4802254);
double r4802256 = b;
double r4802257 = log(r4802256);
double r4802258 = r4802255 + r4802257;
double r4802259 = exp(r4802258);
return r4802259;
}
double f(double a, double b) {
double r4802260 = a;
double r4802261 = b;
double r4802262 = r4802260 * r4802261;
return r4802262;
}




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