Average Error: 31.4 → 0.0
Time: 26.4s
Precision: 64
Internal precision: 2432
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -0.015158747109532486:\\ \;\;\;\;\frac{x - \sin x}{x - \tan x}\\ \mathbf{if}\;x \le 659531696.815955:\\ \;\;\;\;\left(\frac{9}{40} \cdot {x}^2 - \frac{27}{2800} \cdot {x}^{4}\right) - \frac{1}{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - \sin x}{x - \tan x}\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes.
  2. if x < -0.015158747109532486 or 659531696.815955 < x

    1. Initial program 0.0

      \[\frac{x - \sin x}{x - \tan x}\]

    if -0.015158747109532486 < x < 659531696.815955

    1. Initial program 62.7

      \[\frac{x - \sin x}{x - \tan x}\]
    2. Applied taylor 0.0

      \[\leadsto \frac{9}{40} \cdot {x}^2 - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)\]
    3. Taylor expanded around 0 0.0

      \[\leadsto \color{blue}{\frac{9}{40} \cdot {x}^2 - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)}\]
    4. Using strategy rm
    5. Applied associate--r+ 0.0

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

Runtime

Time bar (total: 26.4s) Debug log

Please include this information when filing a bug report:

herbie shell --seed '#(644180380 3784176976 401987740 22459203 1940947670 3323606534)'
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))