Average Error: 31.3 → 31.4
Time: 49.3s
Precision: 64
Internal Precision: 2432
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;\frac{x - \sin x}{x - \tan x} \le -0.4928222523204979:\\ \;\;\;\;\left(x \cdot x\right) \cdot \frac{9}{40} - (\frac{27}{2800} \cdot \left({x}^{4}\right) + \frac{1}{2})_*\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot x\right) \cdot \frac{9}{40} - (\frac{27}{2800} \cdot \left({x}^{4}\right) + \frac{1}{2})_*\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if (/ (- x (sin x)) (- x (tan x))) < -0.4928222523204979

    1. Initial program 20.8

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

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

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

    if -0.4928222523204979 < (/ (- x (sin x)) (- x (tan x)))

    1. Initial program 31.4

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

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

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

Runtime

Time bar (total: 49.3s)Debug logProfile

herbie shell --seed '#(1064173506 2580572819 2847706409 4129882574 1125180799 1845288547)' +o rules:numerics
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))