Average Error: 2.0 → 2.0
Time: 11.3s
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 r2428 = x;
        double r2429 = y;
        double r2430 = r2428 - r2429;
        double r2431 = z;
        double r2432 = r2431 - r2429;
        double r2433 = r2430 / r2432;
        double r2434 = t;
        double r2435 = r2433 * r2434;
        return r2435;
}

double f(double x, double y, double z, double t) {
        double r2436 = t;
        double r2437 = z;
        double r2438 = y;
        double r2439 = r2437 - r2438;
        double r2440 = x;
        double r2441 = r2440 - r2438;
        double r2442 = r2439 / r2441;
        double r2443 = r2436 / r2442;
        double r2444 = 1.0;
        double r2445 = sqrt(r2444);
        double r2446 = r2443 * r2445;
        return r2446;
}

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