e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r115657 = a;
double r115658 = log(r115657);
double r115659 = b;
double r115660 = log(r115659);
double r115661 = r115658 + r115660;
double r115662 = exp(r115661);
return r115662;
}
double f(double a, double b) {
double r115663 = b;
double r115664 = a;
double r115665 = r115663 * r115664;
return r115665;
}




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