e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r93902 = a;
double r93903 = log(r93902);
double r93904 = b;
double r93905 = log(r93904);
double r93906 = r93903 + r93905;
double r93907 = exp(r93906);
return r93907;
}
double f(double a, double b) {
double r93908 = b;
double r93909 = a;
double r93910 = r93908 * r93909;
return r93910;
}




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