Average Error: 1.6 → 0.1
Time: 45.3s
Precision: 64
Internal Precision: 576
\[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
\[\begin{array}{l} \mathbf{if}\;\left|\frac{x + 4}{y} - \left(x \cdot \left(\sqrt[3]{\frac{z}{y}} \cdot \sqrt[3]{\frac{z}{y}}\right)\right) \cdot \left(\sqrt[3]{z} \cdot \sqrt[3]{\frac{1}{y}}\right)\right| \le 2.0608239838679237 \cdot 10^{+306}:\\ \;\;\;\;\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{x + 4}{y} - \left(x \cdot z\right) \cdot \frac{1}{y}\right|\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if (fabs (- (/ (+ x 4) y) (* (* x (* (cbrt (/ z y)) (cbrt (/ z y)))) (* (cbrt z) (cbrt (/ 1 y)))))) < 2.0608239838679237e+306

    1. Initial program 1.6

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
    2. Using strategy rm
    3. Applied div-inv1.7

      \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\left(x \cdot \frac{1}{y}\right)} \cdot z\right|\]
    4. Applied associate-*l*0.1

      \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \left(\frac{1}{y} \cdot z\right)}\right|\]
    5. Applied simplify0.1

      \[\leadsto \left|\frac{x + 4}{y} - x \cdot \color{blue}{\frac{z}{y}}\right|\]

    if 2.0608239838679237e+306 < (fabs (- (/ (+ x 4) y) (* (* x (* (cbrt (/ z y)) (cbrt (/ z y)))) (* (cbrt z) (cbrt (/ 1 y))))))

    1. Initial program 0.1

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
    2. Using strategy rm
    3. Applied div-inv0.2

      \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\left(x \cdot \frac{1}{y}\right)} \cdot z\right|\]
    4. Applied associate-*l*55.7

      \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \left(\frac{1}{y} \cdot z\right)}\right|\]
    5. Applied simplify55.7

      \[\leadsto \left|\frac{x + 4}{y} - x \cdot \color{blue}{\frac{z}{y}}\right|\]
    6. Using strategy rm
    7. Applied div-inv55.7

      \[\leadsto \left|\frac{x + 4}{y} - x \cdot \color{blue}{\left(z \cdot \frac{1}{y}\right)}\right|\]
    8. Applied associate-*r*0.8

      \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\left(x \cdot z\right) \cdot \frac{1}{y}}\right|\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 45.3s)Debug logProfile

herbie shell --seed 2018208 
(FPCore (x y z)
  :name "fabs fraction 1"
  (fabs (- (/ (+ x 4) y) (* (/ x y) z))))