e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r278138 = a;
double r278139 = log(r278138);
double r278140 = b;
double r278141 = log(r278140);
double r278142 = r278139 + r278141;
double r278143 = exp(r278142);
return r278143;
}
double f(double a, double b) {
double r278144 = a;
double r278145 = b;
double r278146 = r278144 * r278145;
return r278146;
}




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