e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r5500476 = a;
double r5500477 = log(r5500476);
double r5500478 = b;
double r5500479 = log(r5500478);
double r5500480 = r5500477 + r5500479;
double r5500481 = exp(r5500480);
return r5500481;
}
double f(double a, double b) {
double r5500482 = a;
double r5500483 = b;
double r5500484 = r5500482 * r5500483;
return r5500484;
}




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