Average Error: 2.1 → 2.2
Time: 13.1s
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 r17357510 = x;
        double r17357511 = y;
        double r17357512 = r17357510 - r17357511;
        double r17357513 = z;
        double r17357514 = r17357513 - r17357511;
        double r17357515 = r17357512 / r17357514;
        double r17357516 = t;
        double r17357517 = r17357515 * r17357516;
        return r17357517;
}

double f(double x, double y, double z, double t) {
        double r17357518 = 1.0;
        double r17357519 = z;
        double r17357520 = y;
        double r17357521 = r17357519 - r17357520;
        double r17357522 = x;
        double r17357523 = r17357522 - r17357520;
        double r17357524 = r17357521 / r17357523;
        double r17357525 = r17357518 / r17357524;
        double r17357526 = t;
        double r17357527 = r17357525 * r17357526;
        return r17357527;
}

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

Derivation

  1. Initial program 2.1

    \[\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 2019171 +o rules:numerics
(FPCore (x y z t)
  :name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"

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

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