e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r6174985 = a;
double r6174986 = log(r6174985);
double r6174987 = b;
double r6174988 = log(r6174987);
double r6174989 = r6174986 + r6174988;
double r6174990 = exp(r6174989);
return r6174990;
}
double f(double a, double b) {
double r6174991 = a;
double r6174992 = b;
double r6174993 = r6174991 * r6174992;
return r6174993;
}




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