e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r5596846 = a;
double r5596847 = log(r5596846);
double r5596848 = b;
double r5596849 = log(r5596848);
double r5596850 = r5596847 + r5596849;
double r5596851 = exp(r5596850);
return r5596851;
}
double f(double a, double b) {
double r5596852 = a;
double r5596853 = b;
double r5596854 = r5596852 * r5596853;
return r5596854;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.6 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.6
Simplified0
Final simplification0
herbie shell --seed 2019129 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:herbie-target
(* a b)
(exp (+ (log a) (log b))))