Average Error: 32.1 → 0.4
Time: 24.7s
Precision: 64
Internal precision: 2432
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -1.2745508074835617 \cdot 10^{-14}:\\ \;\;\;\;\frac{x - \sin x}{x - \tan x}\\ \mathbf{if}\;x \le 1850694803779224.5:\\ \;\;\;\;\frac{9}{40} \cdot {x}^{2} - \left(\frac{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right)\\ \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 < -1.2745508074835617e-14 or 1850694803779224.5 < x

    1. Initial program 0.8

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

    if -1.2745508074835617e-14 < x < 1850694803779224.5

    1. Initial program 63.1

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

      \[\leadsto \frac{9}{40} \cdot {x}^{2} - \left(\frac{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right)\]
    3. 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. Recombined 2 regimes into one program.
  4. Removed slow pow expressions

Runtime

Time bar (total: 24.7s) Debug logProfile

Please include this information when filing a bug report:

herbie shell --seed '#(1067901057 3396600083 3715501224 3126139233 3908045574 1593683916)'
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))