Average Error: 30.6 → 0.0
Time: 50.2s
Precision: 64
Internal Precision: 2432
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -0.03524652167209293:\\ \;\;\;\;\log \left(e^{\frac{x - \sin x}{x - \tan x}}\right)\\ \mathbf{if}\;x \le 0.03196978990602315:\\ \;\;\;\;\frac{9}{40} \cdot {x}^{2} - \left(\frac{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right)\\ \mathbf{else}:\\ \;\;\;\;\log \left(e^{\frac{x - \sin x}{x - \tan x}}\right)\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if x < -0.03524652167209293 or 0.03196978990602315 < x

    1. Initial program 0.0

      \[\frac{x - \sin x}{x - \tan x}\]
    2. Using strategy rm
    3. Applied add-log-exp0.1

      \[\leadsto \color{blue}{\log \left(e^{\frac{x - \sin x}{x - \tan x}}\right)}\]

    if -0.03524652167209293 < x < 0.03196978990602315

    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.

Runtime

Time bar (total: 50.2s)Debug logProfile

herbie shell --seed '#(1070609872 3456127585 2380521889 2328837196 1765472538 734540918)' 
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))