\frac{\tan \left(\frac{x}{y \cdot 2.0}\right)}{\sin \left(\frac{x}{y \cdot 2.0}\right)}\begin{array}{l}
\mathbf{if}\;\frac{x}{2.0 \cdot y} \le 4.9406564584125 \cdot 10^{-324}:\\
\;\;\;\;1.0\\
\mathbf{elif}\;\frac{x}{2.0 \cdot y} \le 1.728415504785257 \cdot 10^{+275}:\\
\;\;\;\;\frac{\sqrt[3]{\tan \left(\frac{x}{2.0 \cdot y}\right)} \cdot \sqrt[3]{\tan \left(\frac{x}{2.0 \cdot y}\right)}}{\sqrt[3]{\sin \left(\frac{x}{2.0 \cdot y}\right)} \cdot \sqrt[3]{\sin \left(\frac{x}{2.0 \cdot y}\right)}} \cdot \frac{\sqrt[3]{\tan \left(\frac{x}{2.0 \cdot y}\right)}}{\sqrt[3]{\sin \left(\frac{x}{2.0 \cdot y}\right)}}\\
\mathbf{else}:\\
\;\;\;\;1.0\\
\end{array}double f(double x, double y) {
double r33815740 = x;
double r33815741 = y;
double r33815742 = 2.0;
double r33815743 = r33815741 * r33815742;
double r33815744 = r33815740 / r33815743;
double r33815745 = tan(r33815744);
double r33815746 = sin(r33815744);
double r33815747 = r33815745 / r33815746;
return r33815747;
}
double f(double x, double y) {
double r33815748 = x;
double r33815749 = 2.0;
double r33815750 = y;
double r33815751 = r33815749 * r33815750;
double r33815752 = r33815748 / r33815751;
double r33815753 = 4.9406564584125e-324;
bool r33815754 = r33815752 <= r33815753;
double r33815755 = 1.0;
double r33815756 = 1.728415504785257e+275;
bool r33815757 = r33815752 <= r33815756;
double r33815758 = tan(r33815752);
double r33815759 = cbrt(r33815758);
double r33815760 = r33815759 * r33815759;
double r33815761 = sin(r33815752);
double r33815762 = cbrt(r33815761);
double r33815763 = r33815762 * r33815762;
double r33815764 = r33815760 / r33815763;
double r33815765 = r33815759 / r33815762;
double r33815766 = r33815764 * r33815765;
double r33815767 = r33815757 ? r33815766 : r33815755;
double r33815768 = r33815754 ? r33815755 : r33815767;
return r33815768;
}




Bits error versus x




Bits error versus y
Results
| Original | 35.5 |
|---|---|
| Target | 28.3 |
| Herbie | 27.4 |
if (/ x (* y 2.0)) < 4.9406564584125e-324 or 1.728415504785257e+275 < (/ x (* y 2.0)) Initial program 41.3
Taylor expanded around 0 28.7
if 4.9406564584125e-324 < (/ x (* y 2.0)) < 1.728415504785257e+275Initial program 25.3
rmApplied add-cube-cbrt26.0
Applied add-cube-cbrt25.3
Applied times-frac25.3
Final simplification27.4
herbie shell --seed 2019165
(FPCore (x y)
:name "Diagrams.TwoD.Layout.CirclePacking:approxRadius from diagrams-contrib-1.3.0.5"
:herbie-target
(if (< y -1.2303690911306994e+114) 1.0 (if (< y -9.102852406811914e-222) (/ (sin (/ x (* y 2.0))) (* (sin (/ x (* y 2.0))) (log (exp (cos (/ x (* y 2.0))))))) 1.0))
(/ (tan (/ x (* y 2.0))) (sin (/ x (* y 2.0)))))