e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r96989 = a;
double r96990 = log(r96989);
double r96991 = b;
double r96992 = log(r96991);
double r96993 = r96990 + r96992;
double r96994 = exp(r96993);
return r96994;
}
double f(double a, double b) {
double r96995 = b;
double r96996 = a;
double r96997 = r96995 * r96996;
return r96997;
}




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