Average Error: 2.3 → 2.3
Time: 15.3s
Precision: 64
\[\frac{x - y}{z - y} \cdot t\]
\[\frac{x - y}{z - y} \cdot t\]
\frac{x - y}{z - y} \cdot t
\frac{x - y}{z - y} \cdot t
double f(double x, double y, double z, double t) {
        double r398145 = x;
        double r398146 = y;
        double r398147 = r398145 - r398146;
        double r398148 = z;
        double r398149 = r398148 - r398146;
        double r398150 = r398147 / r398149;
        double r398151 = t;
        double r398152 = r398150 * r398151;
        return r398152;
}

double f(double x, double y, double z, double t) {
        double r398153 = x;
        double r398154 = y;
        double r398155 = r398153 - r398154;
        double r398156 = z;
        double r398157 = r398156 - r398154;
        double r398158 = r398155 / r398157;
        double r398159 = t;
        double r398160 = r398158 * r398159;
        return r398160;
}

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

Derivation

  1. Initial program 2.3

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

    \[\leadsto \color{blue}{\left(\left(x - y\right) \cdot \frac{1}{z - y}\right)} \cdot t\]
  4. Applied associate-*l*10.8

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

    \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{t}{z - y}}\]
  6. Using strategy rm
  7. Applied clear-num11.4

    \[\leadsto \left(x - y\right) \cdot \color{blue}{\frac{1}{\frac{z - y}{t}}}\]
  8. Using strategy rm
  9. Applied associate-/r/10.8

    \[\leadsto \left(x - y\right) \cdot \color{blue}{\left(\frac{1}{z - y} \cdot t\right)}\]
  10. Applied associate-*r*2.4

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

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

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

Reproduce

herbie shell --seed 2019323 +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))