e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r98510 = a;
double r98511 = log(r98510);
double r98512 = b;
double r98513 = log(r98512);
double r98514 = r98511 + r98513;
double r98515 = exp(r98514);
return r98515;
}
double f(double a, double b) {
double r98516 = b;
double r98517 = a;
double r98518 = r98516 * r98517;
return r98518;
}




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