e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r105095 = a;
double r105096 = log(r105095);
double r105097 = b;
double r105098 = log(r105097);
double r105099 = r105096 + r105098;
double r105100 = exp(r105099);
return r105100;
}
double f(double a, double b) {
double r105101 = b;
double r105102 = a;
double r105103 = r105101 * r105102;
return r105103;
}




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