Average Error: 31.0 → 0.5
Time: 19.7s
Precision: 64
Internal precision: 2432
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -5.5164922447739564 \cdot 10^{-14}:\\ \;\;\;\;{\left(\frac{\sqrt[3]{x - \sin x}}{\sqrt[3]{x - \tan x}}\right)}^3\\ \mathbf{if}\;x \le 0.22138222595296528:\\ \;\;\;\;\frac{9}{40} \cdot {x}^2 - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\sqrt[3]{x - \sin x}}{\sqrt[3]{x - \tan x}}\right)}^3\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes.
  2. if x < -5.5164922447739564e-14 or 0.22138222595296528 < x

    1. Initial program 0.9

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

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

      \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{x - \sin x}\right)}^3}}{{\left(\sqrt[3]{x - \tan x}\right)}^3}\]
    5. Applied cube-undiv 0.9

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

    if -5.5164922447739564e-14 < x < 0.22138222595296528

    1. Initial program 63.0

      \[\frac{x - \sin x}{x - \tan x}\]
    2. Applied taylor 0.0

      \[\leadsto \frac{9}{40} \cdot {x}^2 - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)\]
    3. 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. Recombined 2 regimes into one program.
  4. Removed slow pow expressions

Runtime

Time bar (total: 19.7s) Debug logProfile

Please include this information when filing a bug report:

herbie shell --seed '#(1064651971 495577305 2200811460 13024471 864198081 231948279)'
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))