e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r130096 = a;
double r130097 = log(r130096);
double r130098 = b;
double r130099 = log(r130098);
double r130100 = r130097 + r130099;
double r130101 = exp(r130100);
return r130101;
}
double f(double a, double b) {
double r130102 = a;
double r130103 = b;
double r130104 = r130102 * r130103;
return r130104;
}




Bits error versus a




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