e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r97151 = a;
double r97152 = log(r97151);
double r97153 = b;
double r97154 = log(r97153);
double r97155 = r97152 + r97154;
double r97156 = exp(r97155);
return r97156;
}
double f(double a, double b) {
double r97157 = b;
double r97158 = a;
double r97159 = r97157 * r97158;
return r97159;
}




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