Average Error: 31.6 → 0.0
Time: 1.0m
Precision: 64
Internal Precision: 2432
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -0.02633994752950995:\\ \;\;\;\;\left(\sqrt[3]{\frac{x - \sin x}{x - \tan x}} \cdot \sqrt[3]{\frac{x - \sin x}{x - \tan x}}\right) \cdot \sqrt[3]{\log \left(e^{\frac{x - \sin x}{x - \frac{\sin x}{\cos x}}}\right)}\\ \mathbf{if}\;x \le 0.031557394741020095:\\ \;\;\;\;x \cdot \left(x \cdot \frac{9}{40}\right) - (\frac{27}{2800} \cdot \left({x}^{4}\right) + \frac{1}{2})_*\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt[3]{\frac{x - \sin x}{x - \tan x}} \cdot \sqrt[3]{\frac{x - \sin x}{x - \tan x}}\right) \cdot \sqrt[3]{\log \left(e^{\frac{x - \sin x}{x - \frac{\sin x}{\cos x}}}\right)}\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if x < -0.02633994752950995 or 0.031557394741020095 < x

    1. Initial program 0.0

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

      \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{x - \sin x}{x - \tan x}} \cdot \sqrt[3]{\frac{x - \sin x}{x - \tan x}}\right) \cdot \sqrt[3]{\frac{x - \sin x}{x - \tan x}}}\]
    4. Taylor expanded around inf 0.1

      \[\leadsto \left(\sqrt[3]{\frac{x - \sin x}{x - \tan x}} \cdot \sqrt[3]{\frac{x - \sin x}{x - \tan x}}\right) \cdot \sqrt[3]{\frac{x - \sin x}{\color{blue}{x - \frac{\sin x}{\cos x}}}}\]
    5. Using strategy rm
    6. Applied add-log-exp0.1

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

    if -0.02633994752950995 < x < 0.031557394741020095

    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)}\]
    3. Applied simplify0.0

      \[\leadsto \color{blue}{x \cdot \left(x \cdot \frac{9}{40}\right) - (\frac{27}{2800} \cdot \left({x}^{4}\right) + \frac{1}{2})_*}\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 1.0m)Debug logProfile

herbie shell --seed '#(1070706311 3771791028 4128836681 4194990999 2341756049 504035650)' +o rules:numerics
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))