e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r4521819 = a;
double r4521820 = log(r4521819);
double r4521821 = b;
double r4521822 = log(r4521821);
double r4521823 = r4521820 + r4521822;
double r4521824 = exp(r4521823);
return r4521824;
}
double f(double a, double b) {
double r4521825 = a;
double r4521826 = b;
double r4521827 = r4521825 * r4521826;
return r4521827;
}




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