\[\frac{x - \sin x}{x - \tan x}\]
Test:
NMSE problem 3.4.5
Bits:
128 bits
Bits error versus x
Time: 7.9 s
Input Error: 15.5
Output Error: 0.0
Log:
Profile: 🕒
\(\begin{cases} \frac{x - \sin x}{x - {\left(\sqrt[3]{\tan x}\right)}^3} & \text{when } x \le -0.22660221f0 \\ \frac{9}{40} \cdot {x}^2 - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right) & \text{when } x \le 117.99512f0 \\ \sqrt[3]{{\left(\frac{x - \sin x}{x - \tan x}\right)}^3} & \text{otherwise} \end{cases}\)

    if x < -0.22660221f0

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

    if -0.22660221f0 < x < 117.99512f0

    1. Started with
      \[\frac{x - \sin x}{x - \tan x}\]
      29.8
    2. Applied taylor to get
      \[\frac{x - \sin x}{x - \tan x} \leadsto \frac{9}{40} \cdot {x}^2 - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)\]
      0.0
    3. Taylor expanded around 0 to get
      \[\color{red}{\frac{9}{40} \cdot {x}^2 - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)} \leadsto \color{blue}{\frac{9}{40} \cdot {x}^2 - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)}\]
      0.0

    if 117.99512f0 < x

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

  1. Removed slow pow expressions

Original test:


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