Average Error: 32.0 → 0.0
Time: 37.7s
Precision: 64
Internal Precision: 2432
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -0.036148537611243085:\\ \;\;\;\;\log_* (1 + (e^{\frac{x - \sin x}{x - \tan x}} - 1)^*)\\ \mathbf{if}\;x \le 0.036238543795772536:\\ \;\;\;\;\log_* (1 + (\left(e^{\frac{-1}{2}}\right) \cdot \left((x \cdot \left(x \cdot \frac{9}{40}\right) + \left(\left(\sqrt[3]{(\frac{351}{22400} \cdot \left({x}^{4}\right) + 1)_*} \cdot \sqrt[3]{(\frac{351}{22400} \cdot \left({x}^{4}\right) + 1)_*}\right) \cdot \sqrt[3]{(\frac{351}{22400} \cdot \left({x}^{4}\right) + 1)_*}\right))_*\right) + \left(-1\right))_*)\\ \mathbf{else}:\\ \;\;\;\;\log_* (1 + (e^{\frac{x - \sin x}{x - \tan x}} - 1)^*)\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if x < -0.036148537611243085 or 0.036238543795772536 < x

    1. Initial program 0.0

      \[\frac{x - \sin x}{x - \tan x}\]
    2. Using strategy rm
    3. Applied log1p-expm1-u0.0

      \[\leadsto \color{blue}{\log_* (1 + (e^{\frac{x - \sin x}{x - \tan x}} - 1)^*)}\]

    if -0.036148537611243085 < x < 0.036238543795772536

    1. Initial program 62.7

      \[\frac{x - \sin x}{x - \tan x}\]
    2. Using strategy rm
    3. Applied log1p-expm1-u62.7

      \[\leadsto \color{blue}{\log_* (1 + (e^{\frac{x - \sin x}{x - \tan x}} - 1)^*)}\]
    4. Taylor expanded around 0 0.0

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

      \[\leadsto \color{blue}{\log_* (1 + (\left(e^{\frac{-1}{2}}\right) \cdot \left((x \cdot \left(x \cdot \frac{9}{40}\right) + \left((\frac{351}{22400} \cdot \left({x}^{4}\right) + 1)_*\right))_*\right) + \left(-1\right))_*)}\]
    6. Using strategy rm
    7. Applied add-cube-cbrt0.0

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

Runtime

Time bar (total: 37.7s)Debug logProfile

herbie shell --seed '#(1070355188 2193211668 3977393919 3454156579 3755371326 1656365382)' +o rules:numerics
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))