Average Error: 0.6 → 0.5
Time: 2.8s
Precision: binary64
\[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\]
\[\begin{array}{l} \mathbf{if}\;x \le -4.491713979474546 \cdot 10^{83}:\\ \;\;\;\;1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{\frac{x}{y - z}}{y - t}\\ \end{array}\]
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
\begin{array}{l}
\mathbf{if}\;x \le -4.491713979474546 \cdot 10^{83}:\\
\;\;\;\;1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\

\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{x}{y - z}}{y - t}\\

\end{array}
double code(double x, double y, double z, double t) {
	return ((double) (1.0 - ((double) (x / ((double) (((double) (y - z)) * ((double) (y - t))))))));
}
double code(double x, double y, double z, double t) {
	double VAR;
	if ((x <= -4.491713979474546e+83)) {
		VAR = ((double) (1.0 - ((double) (x / ((double) (((double) (y - z)) * ((double) (y - t))))))));
	} else {
		VAR = ((double) (1.0 - ((double) (((double) (x / ((double) (y - z)))) / ((double) (y - t))))));
	}
	return VAR;
}

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

Derivation

  1. Split input into 2 regimes
  2. if x < -4.491713979474546e83

    1. Initial program 0.2

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

    if -4.491713979474546e83 < x

    1. Initial program 0.7

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

      \[\leadsto 1 - \color{blue}{\frac{\frac{x}{y - z}}{y - t}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -4.491713979474546 \cdot 10^{83}:\\ \;\;\;\;1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{\frac{x}{y - z}}{y - t}\\ \end{array}\]

Reproduce

herbie shell --seed 2020184 
(FPCore (x y z t)
  :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, A"
  :precision binary64
  (- 1.0 (/ x (* (- y z) (- y t)))))