Average Error: 2.1 → 2.2
Time: 18.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 r22584214 = x;
        double r22584215 = y;
        double r22584216 = r22584214 - r22584215;
        double r22584217 = z;
        double r22584218 = r22584217 - r22584215;
        double r22584219 = r22584216 / r22584218;
        double r22584220 = t;
        double r22584221 = r22584219 * r22584220;
        return r22584221;
}

double f(double x, double y, double z, double t) {
        double r22584222 = 1.0;
        double r22584223 = z;
        double r22584224 = y;
        double r22584225 = r22584223 - r22584224;
        double r22584226 = x;
        double r22584227 = r22584226 - r22584224;
        double r22584228 = r22584225 / r22584227;
        double r22584229 = r22584222 / r22584228;
        double r22584230 = t;
        double r22584231 = r22584229 * r22584230;
        return r22584231;
}

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