e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r165984 = a;
double r165985 = log(r165984);
double r165986 = b;
double r165987 = log(r165986);
double r165988 = r165985 + r165987;
double r165989 = exp(r165988);
return r165989;
}
double f(double a, double b) {
double r165990 = a;
double r165991 = b;
double r165992 = r165990 * r165991;
return r165992;
}




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