\[\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.5 s
Input Error: 1.7
Output Error: 0.1
Log:
Profile: 🕒
\(\begin{cases} \left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| & \text{when } \frac{x}{y} \cdot z \le -7.5395262704558 \cdot 10^{-121} \\ \left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right| & \text{when } \frac{x}{y} \cdot z \le 2.0473873124579932 \cdot 10^{-66} \\ \left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| & \text{otherwise} \end{cases}\)

    if (* (/ x y) z) < -7.5395262704558e-121 or 2.0473873124579932e-66 < (* (/ x y) z)

    1. Started with
      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
      0.2

    if -7.5395262704558e-121 < (* (/ x y) z) < 2.0473873124579932e-66

    1. Started with
      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
      3.0
    2. Using strategy rm
      3.0
    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|\]
      3.0
    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.0
    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.0

  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))))