e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r196691 = a;
double r196692 = log(r196691);
double r196693 = b;
double r196694 = log(r196693);
double r196695 = r196692 + r196694;
double r196696 = exp(r196695);
return r196696;
}
double f(double a, double b) {
double r196697 = a;
double r196698 = b;
double r196699 = r196697 * r196698;
return r196699;
}




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.6
Simplified0
Final simplification0
herbie shell --seed 2019362
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))