\[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
Test:
fabs fraction 1
Bits:
128 bits
Bits error versus x
Bits error versus y
Bits error versus z
Time: 7.1 s
Input Error: 1.5
Output Error: 1.3
Log:
Profile: 🕒
\(\begin{cases} \left|\left(\frac{x}{y} + \frac{4}{y}\right) - \frac{x}{\frac{y}{z}}\right| & \text{when } x \le -1.472725252691468 \cdot 10^{+221} \\ \left|\left(\frac{x}{y} + \frac{4}{y}\right) - \frac{x \cdot z}{y}\right| & \text{when } x \le 9.245824237648221 \cdot 10^{-45} \\ \left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right| & \text{otherwise} \end{cases}\)

    if x < -1.472725252691468e+221

    1. Started with
      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
      0.1
    2. Applied taylor to get
      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \leadsto \left|\left(\frac{x}{y} + 4 \cdot \frac{1}{y}\right) - \frac{x}{y} \cdot z\right|\]
      0.1
    3. Taylor expanded around 0 to get
      \[\left|\color{red}{\left(\frac{x}{y} + 4 \cdot \frac{1}{y}\right)} - \frac{x}{y} \cdot z\right| \leadsto \left|\color{blue}{\left(\frac{x}{y} + 4 \cdot \frac{1}{y}\right)} - \frac{x}{y} \cdot z\right|\]
      0.1
    4. Applied simplify to get
      \[\color{red}{\left|\left(\frac{x}{y} + 4 \cdot \frac{1}{y}\right) - \frac{x}{y} \cdot z\right|} \leadsto \color{blue}{\left|\left(\frac{x}{y} + \frac{4}{y}\right) - \frac{x \cdot z}{y}\right|}\]
      15.4
    5. Applied taylor to get
      \[\left|\left(\frac{x}{y} + \frac{4}{y}\right) - \frac{x \cdot z}{y}\right| \leadsto \left|\left(\frac{x}{y} + 4 \cdot \frac{1}{y}\right) - \frac{x \cdot z}{y}\right|\]
      15.4
    6. Taylor expanded around 0 to get
      \[\left|\color{red}{\left(\frac{x}{y} + 4 \cdot \frac{1}{y}\right)} - \frac{x \cdot z}{y}\right| \leadsto \left|\color{blue}{\left(\frac{x}{y} + 4 \cdot \frac{1}{y}\right)} - \frac{x \cdot z}{y}\right|\]
      15.4
    7. Applied simplify to get
      \[\color{red}{\left|\left(\frac{x}{y} + 4 \cdot \frac{1}{y}\right) - \frac{x \cdot z}{y}\right|} \leadsto \color{blue}{\left|\left(\frac{x}{y} + \frac{4}{y}\right) - \frac{x}{\frac{y}{z}}\right|}\]
      0.1

    if -1.472725252691468e+221 < x < 9.245824237648221e-45

    1. Started with
      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
      2.0
    2. Applied taylor to get
      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \leadsto \left|\left(\frac{x}{y} + 4 \cdot \frac{1}{y}\right) - \frac{x}{y} \cdot z\right|\]
      2.0
    3. Taylor expanded around 0 to get
      \[\left|\color{red}{\left(\frac{x}{y} + 4 \cdot \frac{1}{y}\right)} - \frac{x}{y} \cdot z\right| \leadsto \left|\color{blue}{\left(\frac{x}{y} + 4 \cdot \frac{1}{y}\right)} - \frac{x}{y} \cdot z\right|\]
      2.0
    4. Applied simplify to get
      \[\color{red}{\left|\left(\frac{x}{y} + 4 \cdot \frac{1}{y}\right) - \frac{x}{y} \cdot z\right|} \leadsto \color{blue}{\left|\left(\frac{x}{y} + \frac{4}{y}\right) - \frac{x \cdot z}{y}\right|}\]
      1.6

    if 9.245824237648221e-45 < x

    1. Started with
      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
      0.3
    2. Using strategy rm
      0.3
    3. Applied div-inv to get
      \[\left|\frac{x + 4}{y} - \color{red}{\frac{x}{y}} \cdot z\right| \leadsto \left|\frac{x + 4}{y} - \color{blue}{\left(x \cdot \frac{1}{y}\right)} \cdot z\right|\]
      0.3
    4. Applied associate-*l* to get
      \[\left|\frac{x + 4}{y} - \color{red}{\left(x \cdot \frac{1}{y}\right) \cdot z}\right| \leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \left(\frac{1}{y} \cdot z\right)}\right|\]
      0.5
    5. Applied simplify to get
      \[\left|\frac{x + 4}{y} - x \cdot \color{red}{\left(\frac{1}{y} \cdot z\right)}\right| \leadsto \left|\frac{x + 4}{y} - x \cdot \color{blue}{\frac{z}{y}}\right|\]
      0.4

  1. Removed slow pow expressions

Original test:


(lambda ((x default) (y default) (z default))
  #:name "fabs fraction 1"
  (fabs (- (/ (+ x 4) y) (* (/ x y) z))))