e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r132214 = a;
double r132215 = log(r132214);
double r132216 = b;
double r132217 = log(r132216);
double r132218 = r132215 + r132217;
double r132219 = exp(r132218);
return r132219;
}
double f(double a, double b) {
double r132220 = a;
double r132221 = b;
double r132222 = r132220 * r132221;
return r132222;
}




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