e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r238447 = a;
double r238448 = log(r238447);
double r238449 = b;
double r238450 = log(r238449);
double r238451 = r238448 + r238450;
double r238452 = exp(r238451);
return r238452;
}
double f(double a, double b) {
double r238453 = b;
double r238454 = a;
double r238455 = r238453 * r238454;
return r238455;
}




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