\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}\frac{y - \frac{z + x}{\frac{y}{z - x}}}{2}double f(double x, double y, double z) {
double r433120 = x;
double r433121 = r433120 * r433120;
double r433122 = y;
double r433123 = r433122 * r433122;
double r433124 = r433121 + r433123;
double r433125 = z;
double r433126 = r433125 * r433125;
double r433127 = r433124 - r433126;
double r433128 = 2.0;
double r433129 = r433122 * r433128;
double r433130 = r433127 / r433129;
return r433130;
}
double f(double x, double y, double z) {
double r433131 = y;
double r433132 = z;
double r433133 = x;
double r433134 = r433132 + r433133;
double r433135 = r433132 - r433133;
double r433136 = r433131 / r433135;
double r433137 = r433134 / r433136;
double r433138 = r433131 - r433137;
double r433139 = 2.0;
double r433140 = r433138 / r433139;
return r433140;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 28.6 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 28.6
Simplified12.5
rmApplied difference-of-squares12.5
Applied associate-/l*0.2
Final simplification0.2
herbie shell --seed 2019323
(FPCore (x y z)
:name "Diagrams.TwoD.Apollonian:initialConfig from diagrams-contrib-1.3.0.5, A"
:precision binary64
:herbie-target
(- (* y 0.5) (* (* (/ 0.5 y) (+ z x)) (- z x)))
(/ (- (+ (* x x) (* y y)) (* z z)) (* y 2)))