e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r69831 = a;
double r69832 = log(r69831);
double r69833 = b;
double r69834 = log(r69833);
double r69835 = r69832 + r69834;
double r69836 = exp(r69835);
return r69836;
}
double f(double a, double b) {
double r69837 = b;
double r69838 = a;
double r69839 = r69837 * r69838;
return r69839;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.6 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.6
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))))