e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r141300 = a;
double r141301 = log(r141300);
double r141302 = b;
double r141303 = log(r141302);
double r141304 = r141301 + r141303;
double r141305 = exp(r141304);
return r141305;
}
double f(double a, double b) {
double r141306 = a;
double r141307 = b;
double r141308 = r141306 * r141307;
return r141308;
}




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