Average Error: 2.1 → 2.1
Time: 4.3s
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 r643042 = x;
        double r643043 = y;
        double r643044 = r643042 - r643043;
        double r643045 = z;
        double r643046 = r643045 - r643043;
        double r643047 = r643044 / r643046;
        double r643048 = t;
        double r643049 = r643047 * r643048;
        return r643049;
}

double f(double x, double y, double z, double t) {
        double r643050 = t;
        double r643051 = z;
        double r643052 = y;
        double r643053 = r643051 - r643052;
        double r643054 = x;
        double r643055 = r643054 - r643052;
        double r643056 = r643053 / r643055;
        double r643057 = r643050 / r643056;
        return r643057;
}

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.1
Herbie2.1
\[\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.3

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

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

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

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

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

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

Reproduce

herbie shell --seed 2020100 +o rules:numerics
(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))