Average Error: 30.9 → 0.1
Time: 2.2m
Precision: 64
Internal Precision: 2432
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -0.03485217667902217:\\ \;\;\;\;\frac{\sqrt[3]{x - \sin x} \cdot \sqrt[3]{x - \sin x}}{\sqrt[3]{x - \tan x} \cdot \sqrt[3]{x - \tan x}} \cdot \frac{\sqrt[3]{x - \sin x}}{\sqrt[3]{x - \tan x}}\\ \mathbf{if}\;x \le 0.02695389071819847:\\ \;\;\;\;\frac{9}{40} \cdot {x}^{2} - \left(\frac{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x - \sin x} \cdot \sqrt[3]{x - \sin x}}{\sqrt[3]{x - \tan x} \cdot \sqrt[3]{x - \tan x}} \cdot \frac{\sqrt[3]{x - \sin x}}{\sqrt[3]{x - \tan x}}\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if x < -0.03485217667902217 or 0.02695389071819847 < x

    1. Initial program 0.1

      \[\frac{x - \sin x}{x - \tan x}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt1.4

      \[\leadsto \frac{x - \sin x}{\color{blue}{\left(\sqrt[3]{x - \tan x} \cdot \sqrt[3]{x - \tan x}\right) \cdot \sqrt[3]{x - \tan x}}}\]
    4. Applied add-cube-cbrt0.1

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x - \sin x} \cdot \sqrt[3]{x - \sin x}\right) \cdot \sqrt[3]{x - \sin x}}}{\left(\sqrt[3]{x - \tan x} \cdot \sqrt[3]{x - \tan x}\right) \cdot \sqrt[3]{x - \tan x}}\]
    5. Applied times-frac0.1

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

    if -0.03485217667902217 < x < 0.02695389071819847

    1. Initial program 62.6

      \[\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: 2.2m)Debug logProfile

herbie shell --seed '#(1063154770 1824007522 645063331 41291047 494775821 1237684644)' 
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))