e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r5993036 = a;
double r5993037 = log(r5993036);
double r5993038 = b;
double r5993039 = log(r5993038);
double r5993040 = r5993037 + r5993039;
double r5993041 = exp(r5993040);
return r5993041;
}
double f(double a, double b) {
double r5993042 = b;
double r5993043 = a;
double r5993044 = r5993042 * r5993043;
return r5993044;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
Simplified0
Final simplification0
herbie shell --seed 2019168 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:herbie-target
(* a b)
(exp (+ (log a) (log b))))