e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r32327759 = a;
double r32327760 = log(r32327759);
double r32327761 = b;
double r32327762 = log(r32327761);
double r32327763 = r32327760 + r32327762;
double r32327764 = exp(r32327763);
return r32327764;
}
double f(double a, double b) {
double r32327765 = a;
double r32327766 = b;
double r32327767 = r32327765 * r32327766;
return r32327767;
}




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