Average Error: 31.3 → 0.0
Time: 10.2s
Precision: 64
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -0.028868508597387585:\\ \;\;\;\;\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}\\ \mathbf{elif}\;x \le 0.027208711435501284:\\ \;\;\;\;\frac{9}{40} \cdot {x}^{2} - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\sqrt[3]{{\left({\left(\frac{x - \sin x}{x - \tan x}\right)}^{3}\right)}^{3}}}\\ \end{array}\]
\frac{x - \sin x}{x - \tan x}
\begin{array}{l}
\mathbf{if}\;x \le -0.028868508597387585:\\
\;\;\;\;\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}\\

\mathbf{elif}\;x \le 0.027208711435501284:\\
\;\;\;\;\frac{9}{40} \cdot {x}^{2} - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt[3]{\sqrt[3]{{\left({\left(\frac{x - \sin x}{x - \tan x}\right)}^{3}\right)}^{3}}}\\

\end{array}
double f(double x) {
        double r14979 = x;
        double r14980 = sin(r14979);
        double r14981 = r14979 - r14980;
        double r14982 = tan(r14979);
        double r14983 = r14979 - r14982;
        double r14984 = r14981 / r14983;
        return r14984;
}

double f(double x) {
        double r14985 = x;
        double r14986 = -0.028868508597387585;
        bool r14987 = r14985 <= r14986;
        double r14988 = tan(r14985);
        double r14989 = r14985 - r14988;
        double r14990 = r14985 / r14989;
        double r14991 = sin(r14985);
        double r14992 = r14991 / r14989;
        double r14993 = r14990 - r14992;
        double r14994 = 0.027208711435501284;
        bool r14995 = r14985 <= r14994;
        double r14996 = 0.225;
        double r14997 = 2.0;
        double r14998 = pow(r14985, r14997);
        double r14999 = r14996 * r14998;
        double r15000 = 0.009642857142857142;
        double r15001 = 4.0;
        double r15002 = pow(r14985, r15001);
        double r15003 = r15000 * r15002;
        double r15004 = 0.5;
        double r15005 = r15003 + r15004;
        double r15006 = r14999 - r15005;
        double r15007 = r14985 - r14991;
        double r15008 = r15007 / r14989;
        double r15009 = 3.0;
        double r15010 = pow(r15008, r15009);
        double r15011 = pow(r15010, r15009);
        double r15012 = cbrt(r15011);
        double r15013 = cbrt(r15012);
        double r15014 = r14995 ? r15006 : r15013;
        double r15015 = r14987 ? r14993 : r15014;
        return r15015;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if x < -0.028868508597387585

    1. Initial program 0.0

      \[\frac{x - \sin x}{x - \tan x}\]
    2. Using strategy rm
    3. Applied div-sub0.1

      \[\leadsto \color{blue}{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\]

    if -0.028868508597387585 < x < 0.027208711435501284

    1. Initial program 63.0

      \[\frac{x - \sin x}{x - \tan x}\]
    2. Taylor expanded around 0 0.0

      \[\leadsto \color{blue}{\frac{9}{40} \cdot {x}^{2} - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)}\]

    if 0.027208711435501284 < x

    1. Initial program 0.1

      \[\frac{x - \sin x}{x - \tan x}\]
    2. Using strategy rm
    3. Applied add-cbrt-cube40.9

      \[\leadsto \frac{x - \sin x}{\color{blue}{\sqrt[3]{\left(\left(x - \tan x\right) \cdot \left(x - \tan x\right)\right) \cdot \left(x - \tan x\right)}}}\]
    4. Applied add-cbrt-cube42.1

      \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\left(x - \sin x\right) \cdot \left(x - \sin x\right)\right) \cdot \left(x - \sin x\right)}}}{\sqrt[3]{\left(\left(x - \tan x\right) \cdot \left(x - \tan x\right)\right) \cdot \left(x - \tan x\right)}}\]
    5. Applied cbrt-undiv42.1

      \[\leadsto \color{blue}{\sqrt[3]{\frac{\left(\left(x - \sin x\right) \cdot \left(x - \sin x\right)\right) \cdot \left(x - \sin x\right)}{\left(\left(x - \tan x\right) \cdot \left(x - \tan x\right)\right) \cdot \left(x - \tan x\right)}}}\]
    6. Simplified0.1

      \[\leadsto \sqrt[3]{\color{blue}{{\left(\frac{x - \sin x}{x - \tan x}\right)}^{3}}}\]
    7. Using strategy rm
    8. Applied add-cbrt-cube0.1

      \[\leadsto \sqrt[3]{\color{blue}{\sqrt[3]{\left({\left(\frac{x - \sin x}{x - \tan x}\right)}^{3} \cdot {\left(\frac{x - \sin x}{x - \tan x}\right)}^{3}\right) \cdot {\left(\frac{x - \sin x}{x - \tan x}\right)}^{3}}}}\]
    9. Simplified0.1

      \[\leadsto \sqrt[3]{\sqrt[3]{\color{blue}{{\left({\left(\frac{x - \sin x}{x - \tan x}\right)}^{3}\right)}^{3}}}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification0.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -0.028868508597387585:\\ \;\;\;\;\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}\\ \mathbf{elif}\;x \le 0.027208711435501284:\\ \;\;\;\;\frac{9}{40} \cdot {x}^{2} - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{\sqrt[3]{{\left({\left(\frac{x - \sin x}{x - \tan x}\right)}^{3}\right)}^{3}}}\\ \end{array}\]

Reproduce

herbie shell --seed 2020057 
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  :precision binary64
  (/ (- x (sin x)) (- x (tan x))))