\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}0.5 \cdot \left(\left(y + x \cdot \frac{{x}^{1}}{y}\right) - \frac{{z}^{1}}{\frac{y}{z}}\right)double f(double x, double y, double z) {
double r804863 = x;
double r804864 = r804863 * r804863;
double r804865 = y;
double r804866 = r804865 * r804865;
double r804867 = r804864 + r804866;
double r804868 = z;
double r804869 = r804868 * r804868;
double r804870 = r804867 - r804869;
double r804871 = 2.0;
double r804872 = r804865 * r804871;
double r804873 = r804870 / r804872;
return r804873;
}
double f(double x, double y, double z) {
double r804874 = 0.5;
double r804875 = y;
double r804876 = x;
double r804877 = 1.0;
double r804878 = pow(r804876, r804877);
double r804879 = r804878 / r804875;
double r804880 = r804876 * r804879;
double r804881 = r804875 + r804880;
double r804882 = z;
double r804883 = pow(r804882, r804877);
double r804884 = r804875 / r804882;
double r804885 = r804883 / r804884;
double r804886 = r804881 - r804885;
double r804887 = r804874 * r804886;
return r804887;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 28.7 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 28.7
Taylor expanded around 0 12.3
Simplified12.3
rmApplied sqr-pow12.3
Applied associate-/l*6.7
Simplified6.7
rmApplied sqr-pow6.7
Applied associate-/l*0.2
Simplified0.2
rmApplied add-sqr-sqrt32.5
Applied *-un-lft-identity32.5
Applied times-frac32.5
Applied add-sqr-sqrt32.5
Applied unpow-prod-down32.5
Applied times-frac32.5
Simplified32.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2020089
(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)))