e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r69998 = a;
double r69999 = log(r69998);
double r70000 = b;
double r70001 = log(r70000);
double r70002 = r69999 + r70001;
double r70003 = exp(r70002);
return r70003;
}
double f(double a, double b) {
double r70004 = b;
double r70005 = a;
double r70006 = r70004 * r70005;
return r70006;
}




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