e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r129770 = a;
double r129771 = log(r129770);
double r129772 = b;
double r129773 = log(r129772);
double r129774 = r129771 + r129773;
double r129775 = exp(r129774);
return r129775;
}
double f(double a, double b) {
double r129776 = b;
double r129777 = a;
double r129778 = r129776 * r129777;
return r129778;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
Simplified0
Final simplification0
herbie shell --seed 2020043
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))