Average Error: 2.2 → 2.2
Time: 5.5s
Precision: 64
\[\frac{x - y}{z - y} \cdot t\]
\[t \cdot \frac{x - y}{z - y}\]
\frac{x - y}{z - y} \cdot t
t \cdot \frac{x - y}{z - y}
double f(double x, double y, double z, double t) {
        double r410113 = x;
        double r410114 = y;
        double r410115 = r410113 - r410114;
        double r410116 = z;
        double r410117 = r410116 - r410114;
        double r410118 = r410115 / r410117;
        double r410119 = t;
        double r410120 = r410118 * r410119;
        return r410120;
}

double f(double x, double y, double z, double t) {
        double r410121 = t;
        double r410122 = x;
        double r410123 = y;
        double r410124 = r410122 - r410123;
        double r410125 = z;
        double r410126 = r410125 - r410123;
        double r410127 = r410124 / r410126;
        double r410128 = r410121 * r410127;
        return r410128;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original2.2
Target2.2
Herbie2.2
\[\frac{t}{\frac{z - y}{x - y}}\]

Derivation

  1. Initial program 2.2

    \[\frac{x - y}{z - y} \cdot t\]
  2. Using strategy rm
  3. Applied *-un-lft-identity2.2

    \[\leadsto \frac{x - y}{\color{blue}{1 \cdot \left(z - y\right)}} \cdot t\]
  4. Applied *-un-lft-identity2.2

    \[\leadsto \frac{\color{blue}{1 \cdot \left(x - y\right)}}{1 \cdot \left(z - y\right)} \cdot t\]
  5. Applied times-frac2.2

    \[\leadsto \color{blue}{\left(\frac{1}{1} \cdot \frac{x - y}{z - y}\right)} \cdot t\]
  6. Simplified2.2

    \[\leadsto \left(\color{blue}{1} \cdot \frac{x - y}{z - y}\right) \cdot t\]
  7. Final simplification2.2

    \[\leadsto t \cdot \frac{x - y}{z - y}\]

Reproduce

herbie shell --seed 2020062 
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
  :precision binary64

  :herbie-target
  (/ t (/ (- z y) (- x y)))

  (* (/ (- x y) (- z y)) t))