\[\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.9 s
Input Error: 1.7
Output Error: 0.5
Log:
Profile: 🕒
\(\begin{cases} \left|\left(\frac{x}{y} + \frac{4}{y}\right) - \frac{x}{\frac{y}{z}}\right| & \text{when } x \le -3.3953002249205994 \cdot 10^{-153} \\ \left|\frac{\left(x + 4\right) - x \cdot z}{y}\right| & \text{when } x \le 1.6264703330162075 \cdot 10^{-65} \\ \left|\left(\frac{x}{y} + \frac{4}{y}\right) - \frac{x}{\frac{y}{z}}\right| & \text{otherwise} \end{cases}\)

    if x < -3.3953002249205994e-153 or 1.6264703330162075e-65 < x

    1. Started with
      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
      0.8
    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 \cdot z}{y}\right|\]
      5.9
    3. 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|\]
      5.9
    4. 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.9

    if -3.3953002249205994e-153 < x < 1.6264703330162075e-65

    1. Started with
      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
      2.9
    2. Using strategy rm
      2.9
    3. Applied associate-*l/ to get
      \[\left|\frac{x + 4}{y} - \color{red}{\frac{x}{y} \cdot z}\right| \leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right|\]
      0.0
    4. Applied sub-div to get
      \[\left|\color{red}{\frac{x + 4}{y} - \frac{x \cdot z}{y}}\right| \leadsto \left|\color{blue}{\frac{\left(x + 4\right) - x \cdot 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))))