2 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}\sqrt{z \cdot \left(x + y\right) + y \cdot x} \cdot 2double f(double x, double y, double z) {
double r562691 = 2.0;
double r562692 = x;
double r562693 = y;
double r562694 = r562692 * r562693;
double r562695 = z;
double r562696 = r562692 * r562695;
double r562697 = r562694 + r562696;
double r562698 = r562693 * r562695;
double r562699 = r562697 + r562698;
double r562700 = sqrt(r562699);
double r562701 = r562691 * r562700;
return r562701;
}
double f(double x, double y, double z) {
double r562702 = z;
double r562703 = x;
double r562704 = y;
double r562705 = r562703 + r562704;
double r562706 = r562702 * r562705;
double r562707 = r562704 * r562703;
double r562708 = r562706 + r562707;
double r562709 = sqrt(r562708);
double r562710 = 2.0;
double r562711 = r562709 * r562710;
return r562711;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 20.2 |
|---|---|
| Target | 19.4 |
| Herbie | 20.2 |
Initial program 20.2
Simplified20.2
rmApplied *-un-lft-identity20.2
Applied sqrt-prod20.2
Simplified20.2
Simplified20.2
Final simplification20.2
herbie shell --seed 2019195
(FPCore (x y z)
:name "Diagrams.TwoD.Apollonian:descartes from diagrams-contrib-1.3.0.5"
:herbie-target
(if (< z 7.636950090573675e+176) (* 2.0 (sqrt (+ (* (+ x y) z) (* x y)))) (* (* (+ (* 0.25 (* (* (pow y -0.75) (* (pow z -0.75) x)) (+ y z))) (* (pow z 0.25) (pow y 0.25))) (+ (* 0.25 (* (* (pow y -0.75) (* (pow z -0.75) x)) (+ y z))) (* (pow z 0.25) (pow y 0.25)))) 2.0))
(* 2.0 (sqrt (+ (+ (* x y) (* x z)) (* y z)))))