Average Error: 31.0 → 0.1
Time: 57.3s
Precision: 64
Internal Precision: 2368
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;\log \left(e^{x \cdot \left(\frac{9}{40} \cdot x\right) - (\frac{27}{2800} \cdot \left({x}^{4}\right) + \frac{1}{2})_*}\right) = -\infty:\\ \;\;\;\;(e^{\log_* (1 + \frac{x - \sin x}{x - \tan x})} - 1)^*\\ \mathbf{if}\;\log \left(e^{x \cdot \left(\frac{9}{40} \cdot x\right) - (\frac{27}{2800} \cdot \left({x}^{4}\right) + \frac{1}{2})_*}\right) \le -0.48088526681752664:\\ \;\;\;\;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]{\frac{x - \sin x}{x - \tan x}}\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Split input into 3 regimes
  2. if (log (exp (- (* x (* 9/40 x)) (fma 27/2800 (pow x 4) 1/2)))) < -inf.0

    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 -inf.0 < (log (exp (- (* x (* 9/40 x)) (fma 27/2800 (pow x 4) 1/2)))) < -0.48088526681752664

    1. Initial program 62.4

      \[\frac{x - \sin x}{x - \tan x}\]
    2. Taylor expanded around 0 0.2

      \[\leadsto \color{blue}{\frac{9}{40} \cdot {x}^{2} - \left(\frac{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right)}\]
    3. Applied simplify0.2

      \[\leadsto \color{blue}{x \cdot \left(x \cdot \frac{9}{40}\right) - (\frac{27}{2800} \cdot \left({x}^{4}\right) + \frac{1}{2})_*}\]

    if -0.48088526681752664 < (log (exp (- (* x (* 9/40 x)) (fma 27/2800 (pow x 4) 1/2))))

    1. Initial program 0.0

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

      \[\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}}}\]
  3. Recombined 3 regimes into one program.

Runtime

Time bar (total: 57.3s)Debug logProfile

herbie shell --seed '#(1071821486 549052472 3784827256 1559736200 3548510075 881134285)' +o rules:numerics
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))