\[\frac{x - \sin x}{x - \tan x}\]
Test:
NMSE problem 3.4.5
Bits:
128 bits
Bits error versus x
Time: 21.1 s
Input Error: 31.2
Output Error: 0.2
Log:
Profile: 🕒
\(\begin{cases} (e^{\log_* (1 + \frac{x - \sin x}{x - \tan x})} - 1)^* & \text{when } x \le -2.0926544674404998 \cdot 10^{-09} \\ \frac{9}{40} \cdot {x}^2 - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right) & \text{when } x \le 6.840282922734168 \\ (e^{\log_* (1 + \frac{x - \sin x}{x - \tan x})} - 1)^* & \text{otherwise} \end{cases}\)

    if x < -2.0926544674404998e-09 or 6.840282922734168 < x

    1. Started with
      \[\frac{x - \sin x}{x - \tan x}\]
      0.3
    2. Using strategy rm
      0.3
    3. Applied expm1-log1p-u to get
      \[\color{red}{\frac{x - \sin x}{x - \tan x}} \leadsto \color{blue}{(e^{\log_* (1 + \frac{x - \sin x}{x - \tan x})} - 1)^*}\]
      0.4

    if -2.0926544674404998e-09 < x < 6.840282922734168

    1. Started with
      \[\frac{x - \sin x}{x - \tan x}\]
      63.1
    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

  1. Removed slow pow expressions

Original test:


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