e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r212461 = a;
double r212462 = log(r212461);
double r212463 = b;
double r212464 = log(r212463);
double r212465 = r212462 + r212464;
double r212466 = exp(r212465);
return r212466;
}
double f(double a, double b) {
double r212467 = b;
double r212468 = a;
double r212469 = r212467 * r212468;
return r212469;
}




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))))