e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r2098539 = a;
double r2098540 = log(r2098539);
double r2098541 = b;
double r2098542 = log(r2098541);
double r2098543 = r2098540 + r2098542;
double r2098544 = exp(r2098543);
return r2098544;
}
double f(double a, double b) {
double r2098545 = a;
double r2098546 = b;
double r2098547 = r2098545 * r2098546;
return r2098547;
}




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))))