e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r17867565 = a;
double r17867566 = log(r17867565);
double r17867567 = b;
double r17867568 = log(r17867567);
double r17867569 = r17867566 + r17867568;
double r17867570 = exp(r17867569);
return r17867570;
}
double f(double a, double b) {
double r17867571 = a;
double r17867572 = b;
double r17867573 = r17867571 * r17867572;
return r17867573;
}




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