Average Error: 35.7 → 28.4
Time: 18.9s
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}{y \cdot 2}\right) \cdot \cos \left(\frac{x}{y \cdot 2}\right)\right) \cdot \cos \left(\frac{x}{y \cdot 2}\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}{y \cdot 2}\right) \cdot \cos \left(\frac{x}{y \cdot 2}\right)\right) \cdot \cos \left(\frac{x}{y \cdot 2}\right)}}
double f(double x, double y) {
        double r46417543 = x;
        double r46417544 = y;
        double r46417545 = 2.0;
        double r46417546 = r46417544 * r46417545;
        double r46417547 = r46417543 / r46417546;
        double r46417548 = tan(r46417547);
        double r46417549 = sin(r46417547);
        double r46417550 = r46417548 / r46417549;
        return r46417550;
}

double f(double x, double y) {
        double r46417551 = 1.0;
        double r46417552 = x;
        double r46417553 = y;
        double r46417554 = 2.0;
        double r46417555 = r46417553 * r46417554;
        double r46417556 = r46417552 / r46417555;
        double r46417557 = cos(r46417556);
        double r46417558 = r46417557 * r46417557;
        double r46417559 = r46417558 * r46417557;
        double r46417560 = cbrt(r46417559);
        double r46417561 = r46417551 / r46417560;
        return r46417561;
}

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}{y \cdot 2}\right)}}\]
  8. Using strategy rm
  9. Applied add-cbrt-cube28.4

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

    \[\leadsto \frac{1}{\sqrt[3]{\left(\cos \left(\frac{x}{y \cdot 2}\right) \cdot \cos \left(\frac{x}{y \cdot 2}\right)\right) \cdot \cos \left(\frac{x}{y \cdot 2}\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)))))