Average Error: 31.0 → 0.0
Time: 42.0s
Precision: 64
Internal Precision: 2624
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -0.017033296873819756 \lor \neg \left(x \le 0.016375988937567955\right):\\ \;\;\;\;(e^{\log_* (1 + \frac{x - \sin x}{x - \tan x})} - 1)^*\\ \mathbf{else}:\\ \;\;\;\;(e^{(\left(x \cdot x\right) \cdot \frac{9}{20} + \left(\log \frac{1}{2}\right))_* - \frac{27}{224} \cdot {x}^{4}} - 1)^*\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if x < -0.017033296873819756 or 0.016375988937567955 < x

    1. Initial program 0.0

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

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

    if -0.017033296873819756 < x < 0.016375988937567955

    1. Initial program 62.9

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

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

      \[\leadsto (e^{\color{blue}{\left(\log \frac{1}{2} + \frac{9}{20} \cdot {x}^{2}\right) - \frac{27}{224} \cdot {x}^{4}}} - 1)^*\]
    5. Simplified0.0

      \[\leadsto (e^{\color{blue}{(\left(x \cdot x\right) \cdot \frac{9}{20} + \left(\log \frac{1}{2}\right))_* - \frac{27}{224} \cdot {x}^{4}}} - 1)^*\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -0.017033296873819756 \lor \neg \left(x \le 0.016375988937567955\right):\\ \;\;\;\;(e^{\log_* (1 + \frac{x - \sin x}{x - \tan x})} - 1)^*\\ \mathbf{else}:\\ \;\;\;\;(e^{(\left(x \cdot x\right) \cdot \frac{9}{20} + \left(\log \frac{1}{2}\right))_* - \frac{27}{224} \cdot {x}^{4}} - 1)^*\\ \end{array}\]

Runtime

Time bar (total: 42.0s)Debug logProfile

herbie shell --seed 2018219 +o rules:numerics
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))