e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r155154 = a;
double r155155 = log(r155154);
double r155156 = b;
double r155157 = log(r155156);
double r155158 = r155155 + r155157;
double r155159 = exp(r155158);
return r155159;
}
double f(double a, double b) {
double r155160 = a;
double r155161 = b;
double r155162 = r155160 * r155161;
return r155162;
}




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