e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r3291022 = a;
double r3291023 = log(r3291022);
double r3291024 = b;
double r3291025 = log(r3291024);
double r3291026 = r3291023 + r3291025;
double r3291027 = exp(r3291026);
return r3291027;
}
double f(double a, double b) {
double r3291028 = a;
double r3291029 = b;
double r3291030 = r3291028 * r3291029;
return r3291030;
}




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