e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r104503 = a;
double r104504 = log(r104503);
double r104505 = b;
double r104506 = log(r104505);
double r104507 = r104504 + r104506;
double r104508 = exp(r104507);
return r104508;
}
double f(double a, double b) {
double r104509 = a;
double r104510 = b;
double r104511 = r104509 * r104510;
return r104511;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.6 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.6
Simplified0
Final simplification0
herbie shell --seed 2019195
(FPCore (a b)
:name "Exp of sum of logs"
:herbie-target
(* a b)
(exp (+ (log a) (log b))))