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

Error

Bits error versus x

Bits error versus y

Bits error versus z

Derivation

  1. Split input into 2 regimes
  2. if x < 7.677693216052269e-236

    1. Initial program 1.4

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

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

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

    if 7.677693216052269e-236 < x

    1. Initial program 1.7

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le 7.677693216052269 \cdot 10^{-236}:\\ \;\;\;\;\left|\frac{4 + x}{y} - \left(\sqrt[3]{\frac{x}{y}} \cdot z\right) \cdot \left(\sqrt[3]{\frac{x}{y}} \cdot \sqrt[3]{\frac{x}{y}}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{4 + x}{y} - x \cdot \left(\frac{1}{y} \cdot z\right)\right|\\ \end{array}\]

Reproduce

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