Average Error: 35.7 → 28.4
Time: 17.6s
Precision: 64
\[\frac{\tan \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right)}\]
\[\frac{1}{\sqrt[3]{\left(\cos \left(\frac{x}{2 \cdot y}\right) \cdot \cos \left(\frac{x}{2 \cdot y}\right)\right) \cdot \cos \left(\frac{x}{2 \cdot y}\right)}}\]
\frac{\tan \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right)}
\frac{1}{\sqrt[3]{\left(\cos \left(\frac{x}{2 \cdot y}\right) \cdot \cos \left(\frac{x}{2 \cdot y}\right)\right) \cdot \cos \left(\frac{x}{2 \cdot y}\right)}}
double f(double x, double y) {
        double r33137884 = x;
        double r33137885 = y;
        double r33137886 = 2.0;
        double r33137887 = r33137885 * r33137886;
        double r33137888 = r33137884 / r33137887;
        double r33137889 = tan(r33137888);
        double r33137890 = sin(r33137888);
        double r33137891 = r33137889 / r33137890;
        return r33137891;
}

double f(double x, double y) {
        double r33137892 = 1.0;
        double r33137893 = x;
        double r33137894 = 2.0;
        double r33137895 = y;
        double r33137896 = r33137894 * r33137895;
        double r33137897 = r33137893 / r33137896;
        double r33137898 = cos(r33137897);
        double r33137899 = r33137898 * r33137898;
        double r33137900 = r33137899 * r33137898;
        double r33137901 = cbrt(r33137900);
        double r33137902 = r33137892 / r33137901;
        return r33137902;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original35.7
Target28.8
Herbie28.4
\[\begin{array}{l} \mathbf{if}\;y \lt -1.230369091130699363447511617672816900781 \cdot 10^{114}:\\ \;\;\;\;1\\ \mathbf{elif}\;y \lt -9.102852406811913849731222630299032206502 \cdot 10^{-222}:\\ \;\;\;\;\frac{\sin \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right) \cdot \log \left(e^{\cos \left(\frac{x}{y \cdot 2}\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array}\]

Derivation

  1. Initial program 35.7

    \[\frac{\tan \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right)}\]
  2. Using strategy rm
  3. Applied tan-quot35.7

    \[\leadsto \frac{\color{blue}{\frac{\sin \left(\frac{x}{y \cdot 2}\right)}{\cos \left(\frac{x}{y \cdot 2}\right)}}}{\sin \left(\frac{x}{y \cdot 2}\right)}\]
  4. Applied associate-/l/35.7

    \[\leadsto \color{blue}{\frac{\sin \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right) \cdot \cos \left(\frac{x}{y \cdot 2}\right)}}\]
  5. Using strategy rm
  6. Applied clear-num35.7

    \[\leadsto \color{blue}{\frac{1}{\frac{\sin \left(\frac{x}{y \cdot 2}\right) \cdot \cos \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right)}}}\]
  7. Simplified28.4

    \[\leadsto \frac{1}{\color{blue}{\cos \left(\frac{x}{2 \cdot y}\right)}}\]
  8. Using strategy rm
  9. Applied add-cbrt-cube28.4

    \[\leadsto \frac{1}{\color{blue}{\sqrt[3]{\left(\cos \left(\frac{x}{2 \cdot y}\right) \cdot \cos \left(\frac{x}{2 \cdot y}\right)\right) \cdot \cos \left(\frac{x}{2 \cdot y}\right)}}}\]
  10. Final simplification28.4

    \[\leadsto \frac{1}{\sqrt[3]{\left(\cos \left(\frac{x}{2 \cdot y}\right) \cdot \cos \left(\frac{x}{2 \cdot y}\right)\right) \cdot \cos \left(\frac{x}{2 \cdot y}\right)}}\]

Reproduce

herbie shell --seed 2019174 
(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)))))