\[\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: 8.0 s
Input Error: 1.6
Output Error: 0.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.3000588146321376 \cdot 10^{+42} \\ \left|\frac{x + 4}{y} - \frac{x \cdot z}{y}\right| & \text{when } x \le 2.5691221779340203 \cdot 10^{-64} \\ \left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right| & \text{otherwise} \end{cases}\)

    if x < -1.3000588146321376e+42

    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 \cdot z}{y}\right|\]
      8.5
    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|\]
      8.5
    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.1

    if -1.3000588146321376e+42 < x < 2.5691221779340203e-64

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

    if 2.5691221779340203e-64 < x

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

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