\[\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: 10.6 s
Input Error: 1.7
Output Error: 0.2
Log:
Profile: 🕒
\(\begin{cases} \left|\left(\frac{x}{y} + \frac{4}{y}\right) - \frac{x}{\frac{y}{z}}\right| & \text{when } x \le -3.2658192514438068 \cdot 10^{+41} \\ \left|\frac{x + 4}{y} - \frac{x \cdot z}{y}\right| & \text{when } x \le 5.357212585836106 \cdot 10^{-39} \\ \left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right| & \text{otherwise} \end{cases}\)

    if x < -3.2658192514438068e+41

    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|\]
      10.3
    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|\]
      10.3
    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 -3.2658192514438068e+41 < x < 5.357212585836106e-39

    1. Started with
      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
      2.8
    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 5.357212585836106e-39 < x

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

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