e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r95588 = a;
double r95589 = log(r95588);
double r95590 = b;
double r95591 = log(r95590);
double r95592 = r95589 + r95591;
double r95593 = exp(r95592);
return r95593;
}
double f(double a, double b) {
double r95594 = b;
double r95595 = a;
double r95596 = r95594 * r95595;
return r95596;
}




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