Average Error: 1.6 → 0.3
Time: 10.5s
Precision: 64
Internal Precision: 576
\[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
\[\begin{array}{l} \mathbf{if}\;x \le -5.93066206360266 \cdot 10^{-23} \lor \neg \left(x \le 2.8784374998929233 \cdot 10^{-121}\right):\\ \;\;\;\;\left|\frac{4 + x}{y} - \frac{x}{\frac{y}{z}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{4 + x}{y} - \frac{1}{\frac{y}{z \cdot x}}\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 x < -5.93066206360266e-23 or 2.8784374998929233e-121 < x

    1. Initial program 0.6

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
    2. Initial simplification0.6

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

    if -5.93066206360266e-23 < x < 2.8784374998929233e-121

    1. Initial program 2.7

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\]
    2. Using strategy rm
    3. Applied associate-*l/0.1

      \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right|\]
    4. Using strategy rm
    5. Applied clear-num0.1

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -5.93066206360266 \cdot 10^{-23} \lor \neg \left(x \le 2.8784374998929233 \cdot 10^{-121}\right):\\ \;\;\;\;\left|\frac{4 + x}{y} - \frac{x}{\frac{y}{z}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{4 + x}{y} - \frac{1}{\frac{y}{z \cdot x}}\right|\\ \end{array}\]

Runtime

Time bar (total: 10.5s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes1.60.30.01.679.1%
herbie shell --seed 2018290 
(FPCore (x y z)
  :name "fabs fraction 1"
  (fabs (- (/ (+ x 4) y) (* (/ x y) z))))