Input Error: 31.1b
Output Error: 0.2b
Time: 45.6s
Precision: 64b
Ground Truth: 128b
\[\frac{x - \sin x}{x - \tan x}\]
\[\begin{cases} \log \left(\frac{e^{\frac{x}{x - \tan x}}}{e^{\frac{\sin x}{x - \tan x}}}\right) & \text{when } x \le -7.621017336353511 \cdot 10^{-15} \\ \frac{9}{40} \cdot {x}^2 - \left(\frac{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right) & \text{when } x \le 0.4439134345824553 \\ \log \left(e^{\frac{x - \sin x}{x - \tan x}}\right) & \text{otherwise} \end{cases}\]

Error

Bits error versus x

Derivation

    if x < -7.621017336353511e-15

    1. Initial program 0.3b

      \[\frac{x - \sin x}{x - \tan x}\]
    2. Using strategy rm
    3. Applied add-log-exp 0.3b

      \[\leadsto \color{blue}{\log \left(e^{\frac{x - \sin x}{x - \tan x}}\right)}\]
    4. Using strategy rm
    5. Applied div-sub 0.3b

      \[\leadsto \log \left(e^{\color{blue}{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}}\right)\]
    6. Applied exp-diff 0.8b

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

    if -7.621017336353511e-15 < x < 0.4439134345824553

    1. Initial program 63.2b

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

      \[\leadsto \frac{9}{40} \cdot {x}^2 - \left(\frac{1}{2} + \frac{27}{2800} \cdot {x}^{4}\right)\]
    3. Taylor expanded around 0 0.0b

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

    if 0.4439134345824553 < x

    1. Initial program 0.0b

      \[\frac{x - \sin x}{x - \tan x}\]
    2. Using strategy rm
    3. Applied add-log-exp 0.0b

      \[\leadsto \color{blue}{\log \left(e^{\frac{x - \sin x}{x - \tan x}}\right)}\]
  1. Removed slow pow expressions

Runtime

Total time: 45.6s Debug log

herbie --seed '#(2821629043 2972046827 4043536007 1551340063 2656951254 3464806910)'
(FPCore (x)
  :name "NMSE problem 3.4.5"
  (/ (- x (sin x)) (- x (tan x))))