e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r51075 = a;
double r51076 = log(r51075);
double r51077 = b;
double r51078 = log(r51077);
double r51079 = r51076 + r51078;
double r51080 = exp(r51079);
return r51080;
}
double f(double a, double b) {
double r51081 = b;
double r51082 = a;
double r51083 = r51081 * r51082;
return r51083;
}




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