e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r126285 = a;
double r126286 = log(r126285);
double r126287 = b;
double r126288 = log(r126287);
double r126289 = r126286 + r126288;
double r126290 = exp(r126289);
return r126290;
}
double f(double a, double b) {
double r126291 = a;
double r126292 = b;
double r126293 = r126291 * r126292;
return r126293;
}




Bits error versus a




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