Average Error: 2.9 → 2.9
Time: 11.7s
Precision: 64
\[\frac{x}{y - z \cdot t}\]
\[\frac{x}{y - z \cdot t}\]
\frac{x}{y - z \cdot t}
\frac{x}{y - z \cdot t}
double f(double x, double y, double z, double t) {
        double r44305792 = x;
        double r44305793 = y;
        double r44305794 = z;
        double r44305795 = t;
        double r44305796 = r44305794 * r44305795;
        double r44305797 = r44305793 - r44305796;
        double r44305798 = r44305792 / r44305797;
        return r44305798;
}

double f(double x, double y, double z, double t) {
        double r44305799 = x;
        double r44305800 = y;
        double r44305801 = z;
        double r44305802 = t;
        double r44305803 = r44305801 * r44305802;
        double r44305804 = r44305800 - r44305803;
        double r44305805 = r44305799 / r44305804;
        return r44305805;
}

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.9
Target1.6
Herbie2.9
\[\begin{array}{l} \mathbf{if}\;x \lt -1.618195973607048970493874632750554853795 \cdot 10^{50}:\\ \;\;\;\;\frac{1}{\frac{y}{x} - \frac{z}{x} \cdot t}\\ \mathbf{elif}\;x \lt 2.137830643487644440407921345820165445823 \cdot 10^{131}:\\ \;\;\;\;\frac{x}{y - z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{y}{x} - \frac{z}{x} \cdot t}\\ \end{array}\]

Derivation

  1. Initial program 2.9

    \[\frac{x}{y - z \cdot t}\]
  2. Final simplification2.9

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

Reproduce

herbie shell --seed 2019174 
(FPCore (x y z t)
  :name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, B"

  :herbie-target
  (if (< x -1.618195973607049e+50) (/ 1.0 (- (/ y x) (* (/ z x) t))) (if (< x 2.1378306434876444e+131) (/ x (- y (* z t))) (/ 1.0 (- (/ y x) (* (/ z x) t)))))

  (/ x (- y (* z t))))