Average Error: 2.4 → 2.3
Time: 21.8s
Precision: 64
\[\frac{x - y}{z - y} \cdot t\]
\[\frac{t}{\frac{z - y}{x - y}}\]
\frac{x - y}{z - y} \cdot t
\frac{t}{\frac{z - y}{x - y}}
double f(double x, double y, double z, double t) {
        double r351365 = x;
        double r351366 = y;
        double r351367 = r351365 - r351366;
        double r351368 = z;
        double r351369 = r351368 - r351366;
        double r351370 = r351367 / r351369;
        double r351371 = t;
        double r351372 = r351370 * r351371;
        return r351372;
}

double f(double x, double y, double z, double t) {
        double r351373 = t;
        double r351374 = z;
        double r351375 = y;
        double r351376 = r351374 - r351375;
        double r351377 = x;
        double r351378 = r351377 - r351375;
        double r351379 = r351376 / r351378;
        double r351380 = r351373 / r351379;
        return r351380;
}

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

Derivation

  1. Initial program 2.4

    \[\frac{x - y}{z - y} \cdot t\]
  2. Using strategy rm
  3. Applied associate-*l/11.7

    \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot t}{z - y}}\]
  4. Simplified11.7

    \[\leadsto \frac{\color{blue}{t \cdot \left(x - y\right)}}{z - y}\]
  5. Using strategy rm
  6. Applied associate-/l*2.3

    \[\leadsto \color{blue}{\frac{t}{\frac{z - y}{x - y}}}\]
  7. Final simplification2.3

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

Reproduce

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