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

Error

Bits error versus x

Derivation

  1. Split input into 3 regimes
  2. if x < -0.03039944257282741

    1. Initial program 0.0

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

    if -0.03039944257282741 < x < 0.024772907566964195

    1. Initial program 62.8

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

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

      \[\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.024772907566964195 < x

    1. Initial program 0.1

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

Runtime

Time bar (total: 34.9s)Debug logProfile

herbie shell --seed '#(1064397287 3527694221 3797617954 1138343853 2854031332 1153838279)' +o rules:numerics
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))