Average Error: 30.8 → 0.0
Time: 29.2s
Precision: 64
Internal Precision: 2432
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -0.041372472737496835:\\ \;\;\;\;\frac{x - \sin x}{x - \tan x}\\ \mathbf{if}\;x \le 0.030907026834446228:\\ \;\;\;\;\log \left(\frac{{x}^{4}}{e^{\frac{1}{2}}} \cdot \frac{351}{22400} + \left(\frac{x \cdot x}{\frac{e^{\frac{1}{2}}}{\frac{9}{40}}} + e^{-\frac{1}{2}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x - \sin x}{x - \tan x}\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if x < -0.041372472737496835 or 0.030907026834446228 < x

    1. Initial program 0.0

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

      \[\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.0

      \[\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.0

      \[\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. Applied simplify0.1

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

    if -0.041372472737496835 < x < 0.030907026834446228

    1. Initial program 62.7

      \[\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)}\]
    3. Using strategy rm
    4. Applied add-log-exp0.0

      \[\leadsto \frac{9}{40} \cdot {x}^{2} - \color{blue}{\log \left(e^{\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}}\right)}\]
    5. Applied add-log-exp0.0

      \[\leadsto \color{blue}{\log \left(e^{\frac{9}{40} \cdot {x}^{2}}\right)} - \log \left(e^{\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}}\right)\]
    6. Applied diff-log0.0

      \[\leadsto \color{blue}{\log \left(\frac{e^{\frac{9}{40} \cdot {x}^{2}}}{e^{\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}}}\right)}\]
    7. Taylor expanded around 0 0.0

      \[\leadsto \log \color{blue}{\left(\frac{351}{22400} \cdot \frac{{x}^{4}}{e^{\frac{1}{2}}} + \left(\frac{1}{e^{\frac{1}{2}}} + \frac{9}{40} \cdot \frac{{x}^{2}}{e^{\frac{1}{2}}}\right)\right)}\]
    8. Applied simplify0.0

      \[\leadsto \color{blue}{\log \left(\left(e^{-\frac{1}{2}} + \frac{\frac{9}{40}}{e^{\frac{1}{2}}} \cdot \left(x \cdot x\right)\right) + \frac{351}{22400} \cdot \frac{{x}^{4}}{e^{\frac{1}{2}}}\right)}\]
  3. Recombined 2 regimes into one program.
  4. Removed slow pow expressions.
  5. Applied simplify0.0

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;x \le -0.041372472737496835:\\ \;\;\;\;\frac{x - \sin x}{x - \tan x}\\ \mathbf{if}\;x \le 0.030907026834446228:\\ \;\;\;\;\log \left(\frac{{x}^{4}}{e^{\frac{1}{2}}} \cdot \frac{351}{22400} + \left(\frac{x \cdot x}{\frac{e^{\frac{1}{2}}}{\frac{9}{40}}} + e^{-\frac{1}{2}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x - \sin x}{x - \tan x}\\ \end{array}}\]

Runtime

Time bar (total: 29.2s)Debug log

herbie shell --seed '#(633950927 2092594946 1442981 2827247922 2812758452 390991499)' 
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))