\[\frac{x - \sin x}{x - \tan x}\]
Test:
NMSE problem 3.4.5
Bits:
128 bits
Bits error versus x
Time: 22.3 s
Input Error: 31.7
Output Error: 0.3
Log:
Profile: 🕒
\(\begin{cases} \frac{x - \sin x}{x - \tan x} & \text{when } x \le -8.61646249982272 \cdot 10^{-12} \\ \left(\left(x \cdot \frac{9}{40}\right) \cdot x - \frac{1}{2}\right) - \frac{27}{2800} \cdot {x}^{4} & \text{when } x \le 8.584780819621077 \\ {\left(\sqrt[3]{{\left(\sqrt[3]{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\right)}^3}\right)}^3 & \text{otherwise} \end{cases}\)

    if x < -8.61646249982272e-12

    1. Started with
      \[\frac{x - \sin x}{x - \tan x}\]
      1.0

    if -8.61646249982272e-12 < x < 8.584780819621077

    1. Started with
      \[\frac{x - \sin x}{x - \tan x}\]
      63.0
    2. Using strategy rm
      63.0
    3. Applied div-sub to get
      \[\color{red}{\frac{x - \sin x}{x - \tan x}} \leadsto \color{blue}{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\]
      63.0
    4. Using strategy rm
      63.0
    5. Applied add-cube-cbrt to get
      \[\color{red}{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}} \leadsto \color{blue}{{\left(\sqrt[3]{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\right)}^3}\]
      63.0
    6. Applied taylor to get
      \[{\left(\sqrt[3]{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\right)}^3 \leadsto {\left(\sqrt[3]{\frac{9}{40} \cdot {x}^2 - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)}\right)}^3\]
      1.0
    7. Taylor expanded around 0 to get
      \[{\left(\sqrt[3]{\color{red}{\frac{9}{40} \cdot {x}^2 - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)}}\right)}^3 \leadsto {\left(\sqrt[3]{\color{blue}{\frac{9}{40} \cdot {x}^2 - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)}}\right)}^3\]
      1.0
    8. Applied simplify to get
      \[\color{red}{{\left(\sqrt[3]{\frac{9}{40} \cdot {x}^2 - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)}\right)}^3} \leadsto \color{blue}{\left(\left(x \cdot \frac{9}{40}\right) \cdot x - \frac{1}{2}\right) - \frac{27}{2800} \cdot {x}^{4}}\]
      0.0

    if 8.584780819621077 < x

    1. Started with
      \[\frac{x - \sin x}{x - \tan x}\]
      0.0
    2. Using strategy rm
      0.0
    3. Applied div-sub to get
      \[\color{red}{\frac{x - \sin x}{x - \tan x}} \leadsto \color{blue}{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\]
      0.0
    4. Using strategy rm
      0.0
    5. Applied add-cube-cbrt to get
      \[\color{red}{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}} \leadsto \color{blue}{{\left(\sqrt[3]{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\right)}^3}\]
      0.1
    6. Using strategy rm
      0.1
    7. Applied add-cube-cbrt to get
      \[{\left(\sqrt[3]{\color{red}{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}}\right)}^3 \leadsto {\left(\sqrt[3]{\color{blue}{{\left(\sqrt[3]{\frac{x}{x - \tan x} - \frac{\sin x}{x - \tan x}}\right)}^3}}\right)}^3\]
      0.1

  1. Removed slow pow expressions

Original test:


(lambda ((x default))
  #:name "NMSE problem 3.4.5"
  (/ (- x (sin x)) (- x (tan x))))