Average Error: 31.0 → 0.2
Time: 58.3s
Precision: 64
Internal Precision: 2368
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -53.43681621028146 \lor \neg \left(x \le 1.4418063718747118\right):\\ \;\;\;\;\sqrt{\frac{x - \sin x}{x - \tan x}} \cdot \sqrt{\frac{x - \sin x}{x - \tan x}}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \frac{9}{40}\right) \cdot x - (\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 < -53.43681621028146 or 1.4418063718747118 < x

    1. Initial program 0.0

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

      \[\leadsto \color{blue}{\sqrt{\frac{x - \sin x}{x - \tan x}} \cdot \sqrt{\frac{x - \sin x}{x - \tan x}}}\]

    if -53.43681621028146 < x < 1.4418063718747118

    1. Initial program 62.2

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

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

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

    \[\leadsto \color{blue}{\begin{array}{l} \mathbf{if}\;x \le -53.43681621028146 \lor \neg \left(x \le 1.4418063718747118\right):\\ \;\;\;\;\sqrt{\frac{x - \sin x}{x - \tan x}} \cdot \sqrt{\frac{x - \sin x}{x - \tan x}}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \frac{9}{40}\right) \cdot x - (\frac{27}{2800} \cdot \left({x}^{4}\right) + \frac{1}{2})_*\\ \end{array}}\]

Runtime

Time bar (total: 58.3s)Debug logProfile

herbie shell --seed '#(1072936661 1621281212 3440817831 3219514234 460296804 1258167384)' +o rules:numerics
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))