e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r162254 = a;
double r162255 = log(r162254);
double r162256 = b;
double r162257 = log(r162256);
double r162258 = r162255 + r162257;
double r162259 = exp(r162258);
return r162259;
}
double f(double a, double b) {
double r162260 = a;
double r162261 = b;
double r162262 = r162260 * r162261;
return r162262;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
rmApplied exp-sum5.5
Simplified4.7
Simplified0
Final simplification0
herbie shell --seed 2020018
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))