Average Error: 2.2 → 2.2
Time: 4.8s
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 r433177 = x;
        double r433178 = y;
        double r433179 = r433177 - r433178;
        double r433180 = z;
        double r433181 = r433180 - r433178;
        double r433182 = r433179 / r433181;
        double r433183 = t;
        double r433184 = r433182 * r433183;
        return r433184;
}

double f(double x, double y, double z, double t) {
        double r433185 = t;
        double r433186 = x;
        double r433187 = y;
        double r433188 = r433186 - r433187;
        double r433189 = z;
        double r433190 = r433189 - r433187;
        double r433191 = r433188 / r433190;
        double r433192 = r433185 * r433191;
        return r433192;
}

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