e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r159519 = a;
double r159520 = log(r159519);
double r159521 = b;
double r159522 = log(r159521);
double r159523 = r159520 + r159522;
double r159524 = exp(r159523);
return r159524;
}
double f(double a, double b) {
double r159525 = a;
double r159526 = b;
double r159527 = r159525 * r159526;
return r159527;
}




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