Average Error: 7.4 → 7.4
Time: 11.2s
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 r531512 = x;
        double r531513 = y;
        double r531514 = z;
        double r531515 = r531513 - r531514;
        double r531516 = t;
        double r531517 = r531516 - r531514;
        double r531518 = r531515 * r531517;
        double r531519 = r531512 / r531518;
        return r531519;
}

double f(double x, double y, double z, double t) {
        double r531520 = x;
        double r531521 = y;
        double r531522 = z;
        double r531523 = r531521 - r531522;
        double r531524 = t;
        double r531525 = r531524 - r531522;
        double r531526 = r531523 * r531525;
        double r531527 = r531520 / r531526;
        return r531527;
}

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.4
Target8.3
Herbie7.4
\[\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. Split input into 2 regimes
  2. if (* (- y z) (- t z)) < -6.05980720513816e+153 or 2.83742858768223e+298 < (* (- y z) (- t z))

    1. Initial program 13.8

      \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\]
    2. Using strategy rm
    3. Applied associate-/r*0.3

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

    if -6.05980720513816e+153 < (* (- y z) (- t z)) < 2.83742858768223e+298

    1. Initial program 1.2

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

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

Reproduce

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