e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r4914761 = a;
double r4914762 = log(r4914761);
double r4914763 = b;
double r4914764 = log(r4914763);
double r4914765 = r4914762 + r4914764;
double r4914766 = exp(r4914765);
return r4914766;
}
double f(double a, double b) {
double r4914767 = a;
double r4914768 = b;
double r4914769 = r4914767 * r4914768;
return r4914769;
}




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