e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r192117 = a;
double r192118 = log(r192117);
double r192119 = b;
double r192120 = log(r192119);
double r192121 = r192118 + r192120;
double r192122 = exp(r192121);
return r192122;
}
double f(double a, double b) {
double r192123 = a;
double r192124 = b;
double r192125 = r192123 * r192124;
return r192125;
}




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