e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r18939440 = a;
double r18939441 = log(r18939440);
double r18939442 = b;
double r18939443 = log(r18939442);
double r18939444 = r18939441 + r18939443;
double r18939445 = exp(r18939444);
return r18939445;
}
double f(double a, double b) {
double r18939446 = a;
double r18939447 = b;
double r18939448 = r18939446 * r18939447;
return r18939448;
}




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