e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r168154 = a;
double r168155 = log(r168154);
double r168156 = b;
double r168157 = log(r168156);
double r168158 = r168155 + r168157;
double r168159 = exp(r168158);
return r168159;
}
double f(double a, double b) {
double r168160 = a;
double r168161 = b;
double r168162 = r168160 * r168161;
return r168162;
}




Bits error versus a




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