e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r218151 = a;
double r218152 = log(r218151);
double r218153 = b;
double r218154 = log(r218153);
double r218155 = r218152 + r218154;
double r218156 = exp(r218155);
return r218156;
}
double f(double a, double b) {
double r218157 = a;
double r218158 = b;
double r218159 = r218157 * r218158;
return r218159;
}




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