Average Error: 7.5 → 7.5
Time: 14.8s
Precision: 64
\[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\]
\[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\]
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
double f(double x, double y, double z, double t) {
        double r581868 = x;
        double r581869 = y;
        double r581870 = z;
        double r581871 = r581869 - r581870;
        double r581872 = t;
        double r581873 = r581872 - r581870;
        double r581874 = r581871 * r581873;
        double r581875 = r581868 / r581874;
        return r581875;
}

double f(double x, double y, double z, double t) {
        double r581876 = x;
        double r581877 = y;
        double r581878 = z;
        double r581879 = r581877 - r581878;
        double r581880 = t;
        double r581881 = r581880 - r581878;
        double r581882 = r581879 * r581881;
        double r581883 = r581876 / r581882;
        return r581883;
}

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

Original7.5
Target8.2
Herbie7.5
\[\begin{array}{l} \mathbf{if}\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \lt 0.0:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{\left(y - z\right) \cdot \left(t - z\right)}\\ \end{array}\]

Derivation

  1. Initial program 7.5

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity7.5

    \[\leadsto \frac{\color{blue}{1 \cdot x}}{\left(y - z\right) \cdot \left(t - z\right)}\]
  4. Applied times-frac2.2

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

    \[\leadsto \frac{1}{y - z} \cdot \color{blue}{\frac{1}{\frac{t - z}{x}}}\]
  7. Final simplification7.5

    \[\leadsto \frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\]

Reproduce

herbie shell --seed 2019294 
(FPCore (x y z t)
  :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
  :precision binary64

  :herbie-target
  (if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1 (* (- y z) (- t z)))))

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