e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r113438 = a;
double r113439 = log(r113438);
double r113440 = b;
double r113441 = log(r113440);
double r113442 = r113439 + r113441;
double r113443 = exp(r113442);
return r113443;
}
double f(double a, double b) {
double r113444 = a;
double r113445 = b;
double r113446 = r113444 * r113445;
return r113446;
}




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