Average Error: 2.0 → 2.0
Time: 12.4s
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 r421526 = x;
        double r421527 = y;
        double r421528 = r421526 - r421527;
        double r421529 = z;
        double r421530 = r421529 - r421527;
        double r421531 = r421528 / r421530;
        double r421532 = t;
        double r421533 = r421531 * r421532;
        return r421533;
}

double f(double x, double y, double z, double t) {
        double r421534 = t;
        double r421535 = z;
        double r421536 = y;
        double r421537 = r421535 - r421536;
        double r421538 = x;
        double r421539 = r421538 - r421536;
        double r421540 = r421537 / r421539;
        double r421541 = r421534 / r421540;
        return r421541;
}

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. Split input into 2 regimes
  2. if y < -1.5637642633114119e-292 or 6.834072606383064e-27 < y

    1. Initial program 1.3

      \[\frac{x - y}{z - y} \cdot t\]
    2. Using strategy rm
    3. Applied clear-num1.4

      \[\leadsto \color{blue}{\frac{1}{\frac{z - y}{x - y}}} \cdot t\]
    4. Using strategy rm
    5. Applied pow11.4

      \[\leadsto \frac{1}{\frac{z - y}{x - y}} \cdot \color{blue}{{t}^{1}}\]
    6. Applied pow11.4

      \[\leadsto \color{blue}{{\left(\frac{1}{\frac{z - y}{x - y}}\right)}^{1}} \cdot {t}^{1}\]
    7. Applied pow-prod-down1.4

      \[\leadsto \color{blue}{{\left(\frac{1}{\frac{z - y}{x - y}} \cdot t\right)}^{1}}\]
    8. Simplified1.3

      \[\leadsto {\color{blue}{\left(\frac{t}{\frac{z - y}{x - y}}\right)}}^{1}\]

    if -1.5637642633114119e-292 < y < 6.834072606383064e-27

    1. Initial program 4.4

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

      \[\leadsto \color{blue}{\frac{\left(x - y\right) \cdot t}{z - y}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification2.0

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

Reproduce

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