Average Error: 31.6 → 0.0
Time: 1.4m
Precision: 64
Internal Precision: 2432
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -0.02874884769890613:\\ \;\;\;\;\frac{x - \sin x}{x - \tan x}\\ \mathbf{if}\;x \le 0.03136174862029996:\\ \;\;\;\;\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 < -0.02874884769890613 or 0.03136174862029996 < x

    1. Initial program 0.0

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

    if -0.02874884769890613 < x < 0.03136174862029996

    1. Initial program 62.7

      \[\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. Recombined 2 regimes into one program.
  4. Removed slow pow expressions.

Runtime

Time bar (total: 1.4m)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o reduce:binary-search
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))