e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r100559 = a;
double r100560 = log(r100559);
double r100561 = b;
double r100562 = log(r100561);
double r100563 = r100560 + r100562;
double r100564 = exp(r100563);
return r100564;
}
double f(double a, double b) {
double r100565 = a;
double r100566 = b;
double r100567 = r100565 * r100566;
return r100567;
}




Bits error versus a




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