e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r135751 = a;
double r135752 = log(r135751);
double r135753 = b;
double r135754 = log(r135753);
double r135755 = r135752 + r135754;
double r135756 = exp(r135755);
return r135756;
}
double f(double a, double b) {
double r135757 = a;
double r135758 = b;
double r135759 = r135757 * r135758;
return r135759;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
rmApplied exp-sum5.4
Simplified4.7
Simplified0
Final simplification0
herbie shell --seed 2020057 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))