Average Error: 2.0 → 2.0
Time: 5.4s
Precision: 64
\[\frac{x - y}{z - y} \cdot t\]
\[\frac{t}{\frac{z - y}{x - y}} \cdot \sqrt{1}\]
\frac{x - y}{z - y} \cdot t
\frac{t}{\frac{z - y}{x - y}} \cdot \sqrt{1}
double f(double x, double y, double z, double t) {
        double r606176 = x;
        double r606177 = y;
        double r606178 = r606176 - r606177;
        double r606179 = z;
        double r606180 = r606179 - r606177;
        double r606181 = r606178 / r606180;
        double r606182 = t;
        double r606183 = r606181 * r606182;
        return r606183;
}

double f(double x, double y, double z, double t) {
        double r606184 = t;
        double r606185 = z;
        double r606186 = y;
        double r606187 = r606185 - r606186;
        double r606188 = x;
        double r606189 = r606188 - r606186;
        double r606190 = r606187 / r606189;
        double r606191 = r606184 / r606190;
        double r606192 = 1.0;
        double r606193 = sqrt(r606192);
        double r606194 = r606191 * r606193;
        return r606194;
}

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.0
Target2.0
Herbie2.0
\[\frac{t}{\frac{z - y}{x - y}}\]

Derivation

  1. Initial program 2.0

    \[\frac{x - y}{z - y} \cdot t\]
  2. Using strategy rm
  3. Applied clear-num2.2

    \[\leadsto \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \cdot t\]
  4. Using strategy rm
  5. Applied *-un-lft-identity2.2

    \[\leadsto \frac{1}{\color{blue}{1 \cdot \frac{z - y}{x - y}}} \cdot t\]
  6. Applied add-sqr-sqrt2.2

    \[\leadsto \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{1 \cdot \frac{z - y}{x - y}} \cdot t\]
  7. Applied times-frac2.2

    \[\leadsto \color{blue}{\left(\frac{\sqrt{1}}{1} \cdot \frac{\sqrt{1}}{\frac{z - y}{x - y}}\right)} \cdot t\]
  8. Applied associate-*l*2.2

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

    \[\leadsto \frac{\sqrt{1}}{1} \cdot \color{blue}{\frac{t}{\frac{z - y}{x - y}}}\]
  10. Final simplification2.0

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

Reproduce

herbie shell --seed 2020025 
(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))