Average Error: 31.5 → 0.0
Time: 1.1m
Precision: 64
Internal Precision: 2368
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;\frac{9}{40} \cdot {x}^{2} - \left(\frac{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right) \le -0.5146220878049654:\\ \;\;\;\;\log \left(e^{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\right)\\ \mathbf{if}\;\frac{9}{40} \cdot {x}^{2} - \left(\frac{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right) \le -0.4999362032600719:\\ \;\;\;\;\frac{9}{40} \cdot {x}^{2} - \left(\frac{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{\left(\sqrt[3]{{\left(\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}\right)}^{3}}\right)}^{3}}\\ \end{array}\]

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 (- (* 9/40 (pow x 2)) (+ 1/2 (* 27/2800 (pow x 4)))) < -0.5146220878049654

    1. Initial program 0.0

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

      \[\leadsto \color{blue}{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\]
    4. Using strategy rm
    5. Applied add-log-exp0.0

      \[\leadsto \frac{x}{x - \tan x} - \color{blue}{\log \left(e^{\frac{\sin x}{x - \tan x}}\right)}\]
    6. Applied add-log-exp0.0

      \[\leadsto \color{blue}{\log \left(e^{\frac{x}{x - \tan x}}\right)} - \log \left(e^{\frac{\sin x}{x - \tan x}}\right)\]
    7. Applied diff-log0.0

      \[\leadsto \color{blue}{\log \left(\frac{e^{\frac{x}{x - \tan x}}}{e^{\frac{\sin x}{x - \tan x}}}\right)}\]
    8. Applied simplify0.0

      \[\leadsto \log \color{blue}{\left(e^{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\right)}\]

    if -0.5146220878049654 < (- (* 9/40 (pow x 2)) (+ 1/2 (* 27/2800 (pow x 4)))) < -0.4999362032600719

    1. Initial program 62.8

      \[\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{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right)}\]

    if -0.4999362032600719 < (- (* 9/40 (pow x 2)) (+ 1/2 (* 27/2800 (pow x 4))))

    1. Initial program 0.1

      \[\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}}\]
    4. Using strategy rm
    5. Applied add-cbrt-cube0.1

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

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

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

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

Runtime

Time bar (total: 1.1m)Debug logProfile

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