Average Error: 1.9 → 2.2
Time: 8.9s
Precision: 64
\[\frac{x - y}{z - y} \cdot t\]
\[\frac{1}{\frac{z - y}{x - y}} \cdot t\]
\frac{x - y}{z - y} \cdot t
\frac{1}{\frac{z - y}{x - y}} \cdot t
double f(double x, double y, double z, double t) {
        double r384415 = x;
        double r384416 = y;
        double r384417 = r384415 - r384416;
        double r384418 = z;
        double r384419 = r384418 - r384416;
        double r384420 = r384417 / r384419;
        double r384421 = t;
        double r384422 = r384420 * r384421;
        return r384422;
}

double f(double x, double y, double z, double t) {
        double r384423 = 1.0;
        double r384424 = z;
        double r384425 = y;
        double r384426 = r384424 - r384425;
        double r384427 = x;
        double r384428 = r384427 - r384425;
        double r384429 = r384426 / r384428;
        double r384430 = r384423 / r384429;
        double r384431 = t;
        double r384432 = r384430 * r384431;
        return r384432;
}

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

Original1.9
Target2.0
Herbie2.2
\[\frac{t}{\frac{z - y}{x - y}}\]

Derivation

  1. Initial program 1.9

    \[\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. Final simplification2.2

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

Reproduce

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