Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, A

Percentage Accurate: 99.1% → 99.0%
Time: 10.3s
Alternatives: 10
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ 1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \end{array} \]
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
double code(double x, double y, double z, double t) {
	return 1.0 - (x / ((y - z) * (y - t)));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = 1.0d0 - (x / ((y - z) * (y - t)))
end function
public static double code(double x, double y, double z, double t) {
	return 1.0 - (x / ((y - z) * (y - t)));
}
def code(x, y, z, t):
	return 1.0 - (x / ((y - z) * (y - t)))
function code(x, y, z, t)
	return Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t))))
end
function tmp = code(x, y, z, t)
	tmp = 1.0 - (x / ((y - z) * (y - t)));
end
code[x_, y_, z_, t_] := N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 10 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ 1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \end{array} \]
(FPCore (x y z t) :precision binary64 (- 1.0 (/ x (* (- y z) (- y t)))))
double code(double x, double y, double z, double t) {
	return 1.0 - (x / ((y - z) * (y - t)));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = 1.0d0 - (x / ((y - z) * (y - t)))
end function
public static double code(double x, double y, double z, double t) {
	return 1.0 - (x / ((y - z) * (y - t)));
}
def code(x, y, z, t):
	return 1.0 - (x / ((y - z) * (y - t)))
function code(x, y, z, t)
	return Float64(1.0 - Float64(x / Float64(Float64(y - z) * Float64(y - t))))
end
function tmp = code(x, y, z, t)
	tmp = 1.0 - (x / ((y - z) * (y - t)));
end
code[x_, y_, z_, t_] := N[(1.0 - N[(x / N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)}
\end{array}

Alternative 1: 99.0% accurate, 0.5× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;\left(y - z\right) \cdot \left(y - t\right) \leq 2 \cdot 10^{-119}:\\ \;\;\;\;1 + \frac{\frac{x}{y - t}}{z - y}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{x}{\left(y - z\right) \cdot \left(t - y\right)}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= (* (- y z) (- y t)) 2e-119)
   (+ 1.0 (/ (/ x (- y t)) (- z y)))
   (+ 1.0 (/ x (* (- y z) (- t y))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (((y - z) * (y - t)) <= 2e-119) {
		tmp = 1.0 + ((x / (y - t)) / (z - y));
	} else {
		tmp = 1.0 + (x / ((y - z) * (t - y)));
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (((y - z) * (y - t)) <= 2d-119) then
        tmp = 1.0d0 + ((x / (y - t)) / (z - y))
    else
        tmp = 1.0d0 + (x / ((y - z) * (t - y)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (((y - z) * (y - t)) <= 2e-119) {
		tmp = 1.0 + ((x / (y - t)) / (z - y));
	} else {
		tmp = 1.0 + (x / ((y - z) * (t - y)));
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if ((y - z) * (y - t)) <= 2e-119:
		tmp = 1.0 + ((x / (y - t)) / (z - y))
	else:
		tmp = 1.0 + (x / ((y - z) * (t - y)))
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (Float64(Float64(y - z) * Float64(y - t)) <= 2e-119)
		tmp = Float64(1.0 + Float64(Float64(x / Float64(y - t)) / Float64(z - y)));
	else
		tmp = Float64(1.0 + Float64(x / Float64(Float64(y - z) * Float64(t - y))));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (((y - z) * (y - t)) <= 2e-119)
		tmp = 1.0 + ((x / (y - t)) / (z - y));
	else
		tmp = 1.0 + (x / ((y - z) * (t - y)));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[LessEqual[N[(N[(y - z), $MachinePrecision] * N[(y - t), $MachinePrecision]), $MachinePrecision], 2e-119], N[(1.0 + N[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(y - z\right) \cdot \left(y - t\right) \leq 2 \cdot 10^{-119}:\\
\;\;\;\;1 + \frac{\frac{x}{y - t}}{z - y}\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{x}{\left(y - z\right) \cdot \left(t - y\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 y z) (-.f64 y t)) < 2.00000000000000003e-119

    1. Initial program 94.1%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num94.1%

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{\left(y - z\right) \cdot \left(y - t\right)}{x}}} \]
      2. inv-pow94.1%

        \[\leadsto 1 - \color{blue}{{\left(\frac{\left(y - z\right) \cdot \left(y - t\right)}{x}\right)}^{-1}} \]
      3. associate-/l*98.8%

        \[\leadsto 1 - {\color{blue}{\left(\left(y - z\right) \cdot \frac{y - t}{x}\right)}}^{-1} \]
    4. Applied egg-rr98.8%

      \[\leadsto 1 - \color{blue}{{\left(\left(y - z\right) \cdot \frac{y - t}{x}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 94.1%

      \[\leadsto 1 - \color{blue}{\frac{x}{\left(y - t\right) \cdot \left(y - z\right)}} \]
    6. Step-by-step derivation
      1. associate-/r*98.0%

        \[\leadsto 1 - \color{blue}{\frac{\frac{x}{y - t}}{y - z}} \]
    7. Simplified98.0%

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

    if 2.00000000000000003e-119 < (*.f64 (-.f64 y z) (-.f64 y t))

    1. Initial program 99.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(y - z\right) \cdot \left(y - t\right) \leq 2 \cdot 10^{-119}:\\ \;\;\;\;1 + \frac{\frac{x}{y - t}}{z - y}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{x}{\left(y - z\right) \cdot \left(t - y\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 92.1% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{-46} \lor \neg \left(z \leq 3.2 \cdot 10^{-67}\right):\\ \;\;\;\;1 + \frac{x}{z \cdot \left(y - t\right)}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{x}{t - y}}{y}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -1.55e-46) (not (<= z 3.2e-67)))
   (+ 1.0 (/ x (* z (- y t))))
   (+ 1.0 (/ (/ x (- t y)) y))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.55e-46) || !(z <= 3.2e-67)) {
		tmp = 1.0 + (x / (z * (y - t)));
	} else {
		tmp = 1.0 + ((x / (t - y)) / y);
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((z <= (-1.55d-46)) .or. (.not. (z <= 3.2d-67))) then
        tmp = 1.0d0 + (x / (z * (y - t)))
    else
        tmp = 1.0d0 + ((x / (t - y)) / y)
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.55e-46) || !(z <= 3.2e-67)) {
		tmp = 1.0 + (x / (z * (y - t)));
	} else {
		tmp = 1.0 + ((x / (t - y)) / y);
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if (z <= -1.55e-46) or not (z <= 3.2e-67):
		tmp = 1.0 + (x / (z * (y - t)))
	else:
		tmp = 1.0 + ((x / (t - y)) / y)
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -1.55e-46) || !(z <= 3.2e-67))
		tmp = Float64(1.0 + Float64(x / Float64(z * Float64(y - t))));
	else
		tmp = Float64(1.0 + Float64(Float64(x / Float64(t - y)) / y));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -1.55e-46) || ~((z <= 3.2e-67)))
		tmp = 1.0 + (x / (z * (y - t)));
	else
		tmp = 1.0 + ((x / (t - y)) / y);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.55e-46], N[Not[LessEqual[z, 3.2e-67]], $MachinePrecision]], N[(1.0 + N[(x / N[(z * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x / N[(t - y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-46} \lor \neg \left(z \leq 3.2 \cdot 10^{-67}\right):\\
\;\;\;\;1 + \frac{x}{z \cdot \left(y - t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.55e-46 or 3.20000000000000021e-67 < z

    1. Initial program 99.9%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 96.6%

      \[\leadsto 1 - \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - t\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/96.6%

        \[\leadsto 1 - \color{blue}{\frac{-1 \cdot x}{z \cdot \left(y - t\right)}} \]
      2. neg-mul-196.6%

        \[\leadsto 1 - \frac{\color{blue}{-x}}{z \cdot \left(y - t\right)} \]
      3. *-commutative96.6%

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

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

    if -1.55e-46 < z < 3.20000000000000021e-67

    1. Initial program 93.8%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity93.8%

        \[\leadsto 1 - \frac{\color{blue}{1 \cdot x}}{\left(y - z\right) \cdot \left(y - t\right)} \]
      2. times-frac99.7%

        \[\leadsto 1 - \color{blue}{\frac{1}{y - z} \cdot \frac{x}{y - t}} \]
    4. Applied egg-rr99.7%

      \[\leadsto 1 - \color{blue}{\frac{1}{y - z} \cdot \frac{x}{y - t}} \]
    5. Taylor expanded in y around inf 85.2%

      \[\leadsto 1 - \color{blue}{\frac{1}{y}} \cdot \frac{x}{y - t} \]
    6. Step-by-step derivation
      1. associate-*l/85.2%

        \[\leadsto 1 - \color{blue}{\frac{1 \cdot \frac{x}{y - t}}{y}} \]
      2. *-un-lft-identity85.2%

        \[\leadsto 1 - \frac{\color{blue}{\frac{x}{y - t}}}{y} \]
    7. Applied egg-rr85.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{-46} \lor \neg \left(z \leq 3.2 \cdot 10^{-67}\right):\\ \;\;\;\;1 + \frac{x}{z \cdot \left(y - t\right)}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{x}{t - y}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 84.6% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{-142} \lor \neg \left(y \leq 5.5 \cdot 10^{-130}\right):\\ \;\;\;\;1 + \frac{x}{y \cdot \left(t - y\right)}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{t \cdot \frac{z}{x}}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (or (<= y -1.8e-142) (not (<= y 5.5e-130)))
   (+ 1.0 (/ x (* y (- t y))))
   (+ 1.0 (/ -1.0 (* t (/ z x))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -1.8e-142) || !(y <= 5.5e-130)) {
		tmp = 1.0 + (x / (y * (t - y)));
	} else {
		tmp = 1.0 + (-1.0 / (t * (z / x)));
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((y <= (-1.8d-142)) .or. (.not. (y <= 5.5d-130))) then
        tmp = 1.0d0 + (x / (y * (t - y)))
    else
        tmp = 1.0d0 + ((-1.0d0) / (t * (z / x)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -1.8e-142) || !(y <= 5.5e-130)) {
		tmp = 1.0 + (x / (y * (t - y)));
	} else {
		tmp = 1.0 + (-1.0 / (t * (z / x)));
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if (y <= -1.8e-142) or not (y <= 5.5e-130):
		tmp = 1.0 + (x / (y * (t - y)))
	else:
		tmp = 1.0 + (-1.0 / (t * (z / x)))
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((y <= -1.8e-142) || !(y <= 5.5e-130))
		tmp = Float64(1.0 + Float64(x / Float64(y * Float64(t - y))));
	else
		tmp = Float64(1.0 + Float64(-1.0 / Float64(t * Float64(z / x))));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((y <= -1.8e-142) || ~((y <= 5.5e-130)))
		tmp = 1.0 + (x / (y * (t - y)));
	else
		tmp = 1.0 + (-1.0 / (t * (z / x)));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.8e-142], N[Not[LessEqual[y, 5.5e-130]], $MachinePrecision]], N[(1.0 + N[(x / N[(y * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-142} \lor \neg \left(y \leq 5.5 \cdot 10^{-130}\right):\\
\;\;\;\;1 + \frac{x}{y \cdot \left(t - y\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.8e-142 or 5.50000000000000007e-130 < y

    1. Initial program 99.9%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 84.7%

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

    if -1.8e-142 < y < 5.50000000000000007e-130

    1. Initial program 93.0%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 81.4%

      \[\leadsto 1 - \color{blue}{\frac{x}{t \cdot z}} \]
    4. Step-by-step derivation
      1. clear-num81.4%

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{t \cdot z}{x}}} \]
      2. inv-pow81.4%

        \[\leadsto 1 - \color{blue}{{\left(\frac{t \cdot z}{x}\right)}^{-1}} \]
      3. *-commutative81.4%

        \[\leadsto 1 - {\left(\frac{\color{blue}{z \cdot t}}{x}\right)}^{-1} \]
    5. Applied egg-rr81.4%

      \[\leadsto 1 - \color{blue}{{\left(\frac{z \cdot t}{x}\right)}^{-1}} \]
    6. Step-by-step derivation
      1. unpow-181.4%

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{z \cdot t}{x}}} \]
      2. *-commutative81.4%

        \[\leadsto 1 - \frac{1}{\frac{\color{blue}{t \cdot z}}{x}} \]
      3. associate-/l*81.8%

        \[\leadsto 1 - \frac{1}{\color{blue}{t \cdot \frac{z}{x}}} \]
    7. Simplified81.8%

      \[\leadsto 1 - \color{blue}{\frac{1}{t \cdot \frac{z}{x}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification83.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.8 \cdot 10^{-142} \lor \neg \left(y \leq 5.5 \cdot 10^{-130}\right):\\ \;\;\;\;1 + \frac{x}{y \cdot \left(t - y\right)}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{t \cdot \frac{z}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 92.5% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -8.6 \cdot 10^{-266}:\\ \;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-37}:\\ \;\;\;\;1 + \frac{\frac{x}{z - y}}{y}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{x}{t}}{y - z}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= t -8.6e-266)
   (+ 1.0 (/ (/ x z) (- y t)))
   (if (<= t 6.2e-37)
     (+ 1.0 (/ (/ x (- z y)) y))
     (+ 1.0 (/ (/ x t) (- y z))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -8.6e-266) {
		tmp = 1.0 + ((x / z) / (y - t));
	} else if (t <= 6.2e-37) {
		tmp = 1.0 + ((x / (z - y)) / y);
	} else {
		tmp = 1.0 + ((x / t) / (y - z));
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-8.6d-266)) then
        tmp = 1.0d0 + ((x / z) / (y - t))
    else if (t <= 6.2d-37) then
        tmp = 1.0d0 + ((x / (z - y)) / y)
    else
        tmp = 1.0d0 + ((x / t) / (y - z))
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -8.6e-266) {
		tmp = 1.0 + ((x / z) / (y - t));
	} else if (t <= 6.2e-37) {
		tmp = 1.0 + ((x / (z - y)) / y);
	} else {
		tmp = 1.0 + ((x / t) / (y - z));
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if t <= -8.6e-266:
		tmp = 1.0 + ((x / z) / (y - t))
	elif t <= 6.2e-37:
		tmp = 1.0 + ((x / (z - y)) / y)
	else:
		tmp = 1.0 + ((x / t) / (y - z))
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -8.6e-266)
		tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t)));
	elseif (t <= 6.2e-37)
		tmp = Float64(1.0 + Float64(Float64(x / Float64(z - y)) / y));
	else
		tmp = Float64(1.0 + Float64(Float64(x / t) / Float64(y - z)));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= -8.6e-266)
		tmp = 1.0 + ((x / z) / (y - t));
	elseif (t <= 6.2e-37)
		tmp = 1.0 + ((x / (z - y)) / y);
	else
		tmp = 1.0 + ((x / t) / (y - z));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[LessEqual[t, -8.6e-266], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e-37], N[(1.0 + N[(N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x / t), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{-266}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\

\mathbf{elif}\;t \leq 6.2 \cdot 10^{-37}:\\
\;\;\;\;1 + \frac{\frac{x}{z - y}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.60000000000000056e-266

    1. Initial program 97.5%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 79.5%

      \[\leadsto 1 - \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - t\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg79.5%

        \[\leadsto 1 - \color{blue}{\left(-\frac{x}{z \cdot \left(y - t\right)}\right)} \]
      2. associate-/r*79.7%

        \[\leadsto 1 - \left(-\color{blue}{\frac{\frac{x}{z}}{y - t}}\right) \]
      3. distribute-neg-frac79.7%

        \[\leadsto 1 - \color{blue}{\frac{-\frac{x}{z}}{y - t}} \]
    5. Simplified79.7%

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

    if -8.60000000000000056e-266 < t < 6.19999999999999987e-37

    1. Initial program 95.6%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num95.5%

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{\left(y - z\right) \cdot \left(y - t\right)}{x}}} \]
      2. inv-pow95.5%

        \[\leadsto 1 - \color{blue}{{\left(\frac{\left(y - z\right) \cdot \left(y - t\right)}{x}\right)}^{-1}} \]
      3. associate-/l*98.4%

        \[\leadsto 1 - {\color{blue}{\left(\left(y - z\right) \cdot \frac{y - t}{x}\right)}}^{-1} \]
    4. Applied egg-rr98.4%

      \[\leadsto 1 - \color{blue}{{\left(\left(y - z\right) \cdot \frac{y - t}{x}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 95.6%

      \[\leadsto 1 - \color{blue}{\frac{x}{\left(y - t\right) \cdot \left(y - z\right)}} \]
    6. Step-by-step derivation
      1. associate-/r*98.4%

        \[\leadsto 1 - \color{blue}{\frac{\frac{x}{y - t}}{y - z}} \]
    7. Simplified98.4%

      \[\leadsto 1 - \color{blue}{\frac{\frac{x}{y - t}}{y - z}} \]
    8. Taylor expanded in t around 0 86.9%

      \[\leadsto 1 - \color{blue}{\frac{x}{y \cdot \left(y - z\right)}} \]
    9. Step-by-step derivation
      1. associate-/l/88.3%

        \[\leadsto 1 - \color{blue}{\frac{\frac{x}{y - z}}{y}} \]
    10. Simplified88.3%

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

    if 6.19999999999999987e-37 < t

    1. Initial program 99.8%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.9%

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{\left(y - z\right) \cdot \left(y - t\right)}{x}}} \]
      2. inv-pow99.9%

        \[\leadsto 1 - \color{blue}{{\left(\frac{\left(y - z\right) \cdot \left(y - t\right)}{x}\right)}^{-1}} \]
      3. associate-/l*99.9%

        \[\leadsto 1 - {\color{blue}{\left(\left(y - z\right) \cdot \frac{y - t}{x}\right)}}^{-1} \]
    4. Applied egg-rr99.9%

      \[\leadsto 1 - \color{blue}{{\left(\left(y - z\right) \cdot \frac{y - t}{x}\right)}^{-1}} \]
    5. Taylor expanded in x around 0 99.8%

      \[\leadsto 1 - \color{blue}{\frac{x}{\left(y - t\right) \cdot \left(y - z\right)}} \]
    6. Step-by-step derivation
      1. associate-/r*99.9%

        \[\leadsto 1 - \color{blue}{\frac{\frac{x}{y - t}}{y - z}} \]
    7. Simplified99.9%

      \[\leadsto 1 - \color{blue}{\frac{\frac{x}{y - t}}{y - z}} \]
    8. Taylor expanded in y around 0 98.6%

      \[\leadsto 1 - \frac{\color{blue}{-1 \cdot \frac{x}{t}}}{y - z} \]
    9. Step-by-step derivation
      1. associate-*r/98.6%

        \[\leadsto 1 - \frac{\color{blue}{\frac{-1 \cdot x}{t}}}{y - z} \]
      2. mul-1-neg98.6%

        \[\leadsto 1 - \frac{\frac{\color{blue}{-x}}{t}}{y - z} \]
    10. Simplified98.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.6 \cdot 10^{-266}:\\ \;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-37}:\\ \;\;\;\;1 + \frac{\frac{x}{z - y}}{y}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{x}{t}}{y - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 92.1% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{-46}:\\ \;\;\;\;1 + \frac{x}{z \cdot \left(y - t\right)}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-72}:\\ \;\;\;\;1 + \frac{\frac{x}{t - y}}{y}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= z -1.6e-46)
   (+ 1.0 (/ x (* z (- y t))))
   (if (<= z 3.5e-72)
     (+ 1.0 (/ (/ x (- t y)) y))
     (+ 1.0 (/ (/ x z) (- y t))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.6e-46) {
		tmp = 1.0 + (x / (z * (y - t)));
	} else if (z <= 3.5e-72) {
		tmp = 1.0 + ((x / (t - y)) / y);
	} else {
		tmp = 1.0 + ((x / z) / (y - t));
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-1.6d-46)) then
        tmp = 1.0d0 + (x / (z * (y - t)))
    else if (z <= 3.5d-72) then
        tmp = 1.0d0 + ((x / (t - y)) / y)
    else
        tmp = 1.0d0 + ((x / z) / (y - t))
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.6e-46) {
		tmp = 1.0 + (x / (z * (y - t)));
	} else if (z <= 3.5e-72) {
		tmp = 1.0 + ((x / (t - y)) / y);
	} else {
		tmp = 1.0 + ((x / z) / (y - t));
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if z <= -1.6e-46:
		tmp = 1.0 + (x / (z * (y - t)))
	elif z <= 3.5e-72:
		tmp = 1.0 + ((x / (t - y)) / y)
	else:
		tmp = 1.0 + ((x / z) / (y - t))
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.6e-46)
		tmp = Float64(1.0 + Float64(x / Float64(z * Float64(y - t))));
	elseif (z <= 3.5e-72)
		tmp = Float64(1.0 + Float64(Float64(x / Float64(t - y)) / y));
	else
		tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t)));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.6e-46)
		tmp = 1.0 + (x / (z * (y - t)));
	elseif (z <= 3.5e-72)
		tmp = 1.0 + ((x / (t - y)) / y);
	else
		tmp = 1.0 + ((x / z) / (y - t));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[LessEqual[z, -1.6e-46], N[(1.0 + N[(x / N[(z * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e-72], N[(1.0 + N[(N[(x / N[(t - y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-46}:\\
\;\;\;\;1 + \frac{x}{z \cdot \left(y - t\right)}\\

\mathbf{elif}\;z \leq 3.5 \cdot 10^{-72}:\\
\;\;\;\;1 + \frac{\frac{x}{t - y}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.6e-46

    1. Initial program 99.9%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 97.8%

      \[\leadsto 1 - \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - t\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/97.8%

        \[\leadsto 1 - \color{blue}{\frac{-1 \cdot x}{z \cdot \left(y - t\right)}} \]
      2. neg-mul-197.8%

        \[\leadsto 1 - \frac{\color{blue}{-x}}{z \cdot \left(y - t\right)} \]
      3. *-commutative97.8%

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

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

    if -1.6e-46 < z < 3.5e-72

    1. Initial program 93.8%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity93.8%

        \[\leadsto 1 - \frac{\color{blue}{1 \cdot x}}{\left(y - z\right) \cdot \left(y - t\right)} \]
      2. times-frac99.7%

        \[\leadsto 1 - \color{blue}{\frac{1}{y - z} \cdot \frac{x}{y - t}} \]
    4. Applied egg-rr99.7%

      \[\leadsto 1 - \color{blue}{\frac{1}{y - z} \cdot \frac{x}{y - t}} \]
    5. Taylor expanded in y around inf 85.2%

      \[\leadsto 1 - \color{blue}{\frac{1}{y}} \cdot \frac{x}{y - t} \]
    6. Step-by-step derivation
      1. associate-*l/85.2%

        \[\leadsto 1 - \color{blue}{\frac{1 \cdot \frac{x}{y - t}}{y}} \]
      2. *-un-lft-identity85.2%

        \[\leadsto 1 - \frac{\color{blue}{\frac{x}{y - t}}}{y} \]
    7. Applied egg-rr85.2%

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

    if 3.5e-72 < z

    1. Initial program 99.9%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 95.6%

      \[\leadsto 1 - \color{blue}{-1 \cdot \frac{x}{z \cdot \left(y - t\right)}} \]
    4. Step-by-step derivation
      1. mul-1-neg95.6%

        \[\leadsto 1 - \color{blue}{\left(-\frac{x}{z \cdot \left(y - t\right)}\right)} \]
      2. associate-/r*95.6%

        \[\leadsto 1 - \left(-\color{blue}{\frac{\frac{x}{z}}{y - t}}\right) \]
      3. distribute-neg-frac95.6%

        \[\leadsto 1 - \color{blue}{\frac{-\frac{x}{z}}{y - t}} \]
    5. Simplified95.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{-46}:\\ \;\;\;\;1 + \frac{x}{z \cdot \left(y - t\right)}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-72}:\\ \;\;\;\;1 + \frac{\frac{x}{t - y}}{y}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 84.9% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -1.24 \cdot 10^{-142}:\\ \;\;\;\;1 + \frac{x}{y \cdot \left(t - y\right)}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-112}:\\ \;\;\;\;1 + \frac{-1}{t \cdot \frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{x}{y \cdot \left(y - z\right)}\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= y -1.24e-142)
   (+ 1.0 (/ x (* y (- t y))))
   (if (<= y 7e-112)
     (+ 1.0 (/ -1.0 (* t (/ z x))))
     (- 1.0 (/ x (* y (- y z)))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.24e-142) {
		tmp = 1.0 + (x / (y * (t - y)));
	} else if (y <= 7e-112) {
		tmp = 1.0 + (-1.0 / (t * (z / x)));
	} else {
		tmp = 1.0 - (x / (y * (y - z)));
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-1.24d-142)) then
        tmp = 1.0d0 + (x / (y * (t - y)))
    else if (y <= 7d-112) then
        tmp = 1.0d0 + ((-1.0d0) / (t * (z / x)))
    else
        tmp = 1.0d0 - (x / (y * (y - z)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.24e-142) {
		tmp = 1.0 + (x / (y * (t - y)));
	} else if (y <= 7e-112) {
		tmp = 1.0 + (-1.0 / (t * (z / x)));
	} else {
		tmp = 1.0 - (x / (y * (y - z)));
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -1.24e-142:
		tmp = 1.0 + (x / (y * (t - y)))
	elif y <= 7e-112:
		tmp = 1.0 + (-1.0 / (t * (z / x)))
	else:
		tmp = 1.0 - (x / (y * (y - z)))
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -1.24e-142)
		tmp = Float64(1.0 + Float64(x / Float64(y * Float64(t - y))));
	elseif (y <= 7e-112)
		tmp = Float64(1.0 + Float64(-1.0 / Float64(t * Float64(z / x))));
	else
		tmp = Float64(1.0 - Float64(x / Float64(y * Float64(y - z))));
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -1.24e-142)
		tmp = 1.0 + (x / (y * (t - y)));
	elseif (y <= 7e-112)
		tmp = 1.0 + (-1.0 / (t * (z / x)));
	else
		tmp = 1.0 - (x / (y * (y - z)));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[LessEqual[y, -1.24e-142], N[(1.0 + N[(x / N[(y * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e-112], N[(1.0 + N[(-1.0 / N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / N[(y * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.24 \cdot 10^{-142}:\\
\;\;\;\;1 + \frac{x}{y \cdot \left(t - y\right)}\\

\mathbf{elif}\;y \leq 7 \cdot 10^{-112}:\\
\;\;\;\;1 + \frac{-1}{t \cdot \frac{z}{x}}\\

\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{y \cdot \left(y - z\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.24000000000000003e-142

    1. Initial program 99.9%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 83.6%

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

    if -1.24000000000000003e-142 < y < 6.99999999999999988e-112

    1. Initial program 93.2%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 81.0%

      \[\leadsto 1 - \color{blue}{\frac{x}{t \cdot z}} \]
    4. Step-by-step derivation
      1. clear-num81.0%

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{t \cdot z}{x}}} \]
      2. inv-pow81.0%

        \[\leadsto 1 - \color{blue}{{\left(\frac{t \cdot z}{x}\right)}^{-1}} \]
      3. *-commutative81.0%

        \[\leadsto 1 - {\left(\frac{\color{blue}{z \cdot t}}{x}\right)}^{-1} \]
    5. Applied egg-rr81.0%

      \[\leadsto 1 - \color{blue}{{\left(\frac{z \cdot t}{x}\right)}^{-1}} \]
    6. Step-by-step derivation
      1. unpow-181.0%

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{z \cdot t}{x}}} \]
      2. *-commutative81.0%

        \[\leadsto 1 - \frac{1}{\frac{\color{blue}{t \cdot z}}{x}} \]
      3. associate-/l*81.3%

        \[\leadsto 1 - \frac{1}{\color{blue}{t \cdot \frac{z}{x}}} \]
    7. Simplified81.3%

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

    if 6.99999999999999988e-112 < y

    1. Initial program 99.9%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 89.1%

      \[\leadsto 1 - \color{blue}{\frac{x}{y \cdot \left(y - z\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification84.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.24 \cdot 10^{-142}:\\ \;\;\;\;1 + \frac{x}{y \cdot \left(t - y\right)}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-112}:\\ \;\;\;\;1 + \frac{-1}{t \cdot \frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{x}{y \cdot \left(y - z\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 82.3% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{-153}:\\ \;\;\;\;1\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-134}:\\ \;\;\;\;1 + \frac{-1}{t \cdot \frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= y -2.4e-153)
   1.0
   (if (<= y 1.5e-134) (+ 1.0 (/ -1.0 (* t (/ z x)))) 1.0)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -2.4e-153) {
		tmp = 1.0;
	} else if (y <= 1.5e-134) {
		tmp = 1.0 + (-1.0 / (t * (z / x)));
	} else {
		tmp = 1.0;
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-2.4d-153)) then
        tmp = 1.0d0
    else if (y <= 1.5d-134) then
        tmp = 1.0d0 + ((-1.0d0) / (t * (z / x)))
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -2.4e-153) {
		tmp = 1.0;
	} else if (y <= 1.5e-134) {
		tmp = 1.0 + (-1.0 / (t * (z / x)));
	} else {
		tmp = 1.0;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -2.4e-153:
		tmp = 1.0
	elif y <= 1.5e-134:
		tmp = 1.0 + (-1.0 / (t * (z / x)))
	else:
		tmp = 1.0
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -2.4e-153)
		tmp = 1.0;
	elseif (y <= 1.5e-134)
		tmp = Float64(1.0 + Float64(-1.0 / Float64(t * Float64(z / x))));
	else
		tmp = 1.0;
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -2.4e-153)
		tmp = 1.0;
	elseif (y <= 1.5e-134)
		tmp = 1.0 + (-1.0 / (t * (z / x)));
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[LessEqual[y, -2.4e-153], 1.0, If[LessEqual[y, 1.5e-134], N[(1.0 + N[(-1.0 / N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-153}:\\
\;\;\;\;1\\

\mathbf{elif}\;y \leq 1.5 \cdot 10^{-134}:\\
\;\;\;\;1 + \frac{-1}{t \cdot \frac{z}{x}}\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.4000000000000002e-153 or 1.5e-134 < y

    1. Initial program 99.9%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 49.1%

      \[\leadsto 1 - \color{blue}{\frac{x}{t \cdot z}} \]
    4. Step-by-step derivation
      1. *-un-lft-identity49.1%

        \[\leadsto 1 - \frac{\color{blue}{1 \cdot x}}{t \cdot z} \]
      2. times-frac49.1%

        \[\leadsto 1 - \color{blue}{\frac{1}{t} \cdot \frac{x}{z}} \]
      3. frac-2neg49.1%

        \[\leadsto 1 - \color{blue}{\frac{-1}{-t}} \cdot \frac{x}{z} \]
      4. metadata-eval49.1%

        \[\leadsto 1 - \frac{\color{blue}{-1}}{-t} \cdot \frac{x}{z} \]
      5. add-sqr-sqrt25.2%

        \[\leadsto 1 - \frac{-1}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \cdot \frac{x}{z} \]
      6. sqrt-unprod48.8%

        \[\leadsto 1 - \frac{-1}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \cdot \frac{x}{z} \]
      7. sqr-neg48.8%

        \[\leadsto 1 - \frac{-1}{\sqrt{\color{blue}{t \cdot t}}} \cdot \frac{x}{z} \]
      8. sqrt-unprod23.9%

        \[\leadsto 1 - \frac{-1}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \cdot \frac{x}{z} \]
      9. add-sqr-sqrt48.5%

        \[\leadsto 1 - \frac{-1}{\color{blue}{t}} \cdot \frac{x}{z} \]
    5. Applied egg-rr48.5%

      \[\leadsto 1 - \color{blue}{\frac{-1}{t} \cdot \frac{x}{z}} \]
    6. Step-by-step derivation
      1. associate-*l/48.5%

        \[\leadsto 1 - \color{blue}{\frac{-1 \cdot \frac{x}{z}}{t}} \]
      2. associate-*r/48.5%

        \[\leadsto 1 - \frac{\color{blue}{\frac{-1 \cdot x}{z}}}{t} \]
      3. neg-mul-148.5%

        \[\leadsto 1 - \frac{\frac{\color{blue}{-x}}{z}}{t} \]
    7. Simplified48.5%

      \[\leadsto 1 - \color{blue}{\frac{\frac{-x}{z}}{t}} \]
    8. Taylor expanded in x around 0 80.1%

      \[\leadsto \color{blue}{1} \]

    if -2.4000000000000002e-153 < y < 1.5e-134

    1. Initial program 92.3%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 82.2%

      \[\leadsto 1 - \color{blue}{\frac{x}{t \cdot z}} \]
    4. Step-by-step derivation
      1. clear-num82.2%

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{t \cdot z}{x}}} \]
      2. inv-pow82.2%

        \[\leadsto 1 - \color{blue}{{\left(\frac{t \cdot z}{x}\right)}^{-1}} \]
      3. *-commutative82.2%

        \[\leadsto 1 - {\left(\frac{\color{blue}{z \cdot t}}{x}\right)}^{-1} \]
    5. Applied egg-rr82.2%

      \[\leadsto 1 - \color{blue}{{\left(\frac{z \cdot t}{x}\right)}^{-1}} \]
    6. Step-by-step derivation
      1. unpow-182.2%

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{z \cdot t}{x}}} \]
      2. *-commutative82.2%

        \[\leadsto 1 - \frac{1}{\frac{\color{blue}{t \cdot z}}{x}} \]
      3. associate-/l*82.6%

        \[\leadsto 1 - \frac{1}{\color{blue}{t \cdot \frac{z}{x}}} \]
    7. Simplified82.6%

      \[\leadsto 1 - \color{blue}{\frac{1}{t \cdot \frac{z}{x}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{-153}:\\ \;\;\;\;1\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-134}:\\ \;\;\;\;1 + \frac{-1}{t \cdot \frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 82.5% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{-153}:\\ \;\;\;\;1\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-135}:\\ \;\;\;\;1 - \frac{x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (<= y -2.4e-153) 1.0 (if (<= y 4.6e-135) (- 1.0 (/ x (* z t))) 1.0)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -2.4e-153) {
		tmp = 1.0;
	} else if (y <= 4.6e-135) {
		tmp = 1.0 - (x / (z * t));
	} else {
		tmp = 1.0;
	}
	return tmp;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= (-2.4d-153)) then
        tmp = 1.0d0
    else if (y <= 4.6d-135) then
        tmp = 1.0d0 - (x / (z * t))
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -2.4e-153) {
		tmp = 1.0;
	} else if (y <= 4.6e-135) {
		tmp = 1.0 - (x / (z * t));
	} else {
		tmp = 1.0;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -2.4e-153:
		tmp = 1.0
	elif y <= 4.6e-135:
		tmp = 1.0 - (x / (z * t))
	else:
		tmp = 1.0
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -2.4e-153)
		tmp = 1.0;
	elseif (y <= 4.6e-135)
		tmp = Float64(1.0 - Float64(x / Float64(z * t)));
	else
		tmp = 1.0;
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= -2.4e-153)
		tmp = 1.0;
	elseif (y <= 4.6e-135)
		tmp = 1.0 - (x / (z * t));
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[LessEqual[y, -2.4e-153], 1.0, If[LessEqual[y, 4.6e-135], N[(1.0 - N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-153}:\\
\;\;\;\;1\\

\mathbf{elif}\;y \leq 4.6 \cdot 10^{-135}:\\
\;\;\;\;1 - \frac{x}{z \cdot t}\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.4000000000000002e-153 or 4.5999999999999998e-135 < y

    1. Initial program 99.9%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 49.1%

      \[\leadsto 1 - \color{blue}{\frac{x}{t \cdot z}} \]
    4. Step-by-step derivation
      1. *-un-lft-identity49.1%

        \[\leadsto 1 - \frac{\color{blue}{1 \cdot x}}{t \cdot z} \]
      2. times-frac49.1%

        \[\leadsto 1 - \color{blue}{\frac{1}{t} \cdot \frac{x}{z}} \]
      3. frac-2neg49.1%

        \[\leadsto 1 - \color{blue}{\frac{-1}{-t}} \cdot \frac{x}{z} \]
      4. metadata-eval49.1%

        \[\leadsto 1 - \frac{\color{blue}{-1}}{-t} \cdot \frac{x}{z} \]
      5. add-sqr-sqrt25.2%

        \[\leadsto 1 - \frac{-1}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \cdot \frac{x}{z} \]
      6. sqrt-unprod48.8%

        \[\leadsto 1 - \frac{-1}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \cdot \frac{x}{z} \]
      7. sqr-neg48.8%

        \[\leadsto 1 - \frac{-1}{\sqrt{\color{blue}{t \cdot t}}} \cdot \frac{x}{z} \]
      8. sqrt-unprod23.9%

        \[\leadsto 1 - \frac{-1}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \cdot \frac{x}{z} \]
      9. add-sqr-sqrt48.5%

        \[\leadsto 1 - \frac{-1}{\color{blue}{t}} \cdot \frac{x}{z} \]
    5. Applied egg-rr48.5%

      \[\leadsto 1 - \color{blue}{\frac{-1}{t} \cdot \frac{x}{z}} \]
    6. Step-by-step derivation
      1. associate-*l/48.5%

        \[\leadsto 1 - \color{blue}{\frac{-1 \cdot \frac{x}{z}}{t}} \]
      2. associate-*r/48.5%

        \[\leadsto 1 - \frac{\color{blue}{\frac{-1 \cdot x}{z}}}{t} \]
      3. neg-mul-148.5%

        \[\leadsto 1 - \frac{\frac{\color{blue}{-x}}{z}}{t} \]
    7. Simplified48.5%

      \[\leadsto 1 - \color{blue}{\frac{\frac{-x}{z}}{t}} \]
    8. Taylor expanded in x around 0 80.1%

      \[\leadsto \color{blue}{1} \]

    if -2.4000000000000002e-153 < y < 4.5999999999999998e-135

    1. Initial program 92.3%

      \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 82.2%

      \[\leadsto 1 - \color{blue}{\frac{x}{t \cdot z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{-153}:\\ \;\;\;\;1\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-135}:\\ \;\;\;\;1 - \frac{x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 99.1% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ 1 + \frac{x}{\left(y - z\right) \cdot \left(t - y\right)} \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t) :precision binary64 (+ 1.0 (/ x (* (- y z) (- t y)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	return 1.0 + (x / ((y - z) * (t - y)));
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = 1.0d0 + (x / ((y - z) * (t - y)))
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	return 1.0 + (x / ((y - z) * (t - y)));
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	return 1.0 + (x / ((y - z) * (t - y)))
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	return Float64(1.0 + Float64(x / Float64(Float64(y - z) * Float64(t - y))))
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
	tmp = 1.0 + (x / ((y - z) * (t - y)));
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := N[(1.0 + N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 + \frac{x}{\left(y - z\right) \cdot \left(t - y\right)}
\end{array}
Derivation
  1. Initial program 97.7%

    \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
  2. Add Preprocessing
  3. Final simplification97.7%

    \[\leadsto 1 + \frac{x}{\left(y - z\right) \cdot \left(t - y\right)} \]
  4. Add Preprocessing

Alternative 10: 74.9% accurate, 11.0× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ 1 \end{array} \]
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
(FPCore (x y z t) :precision binary64 1.0)
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	return 1.0;
}
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = 1.0d0
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	return 1.0;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	return 1.0
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	return 1.0
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
	tmp = 1.0;
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := 1.0
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1
\end{array}
Derivation
  1. Initial program 97.7%

    \[1 - \frac{x}{\left(y - z\right) \cdot \left(y - t\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in y around 0 58.9%

    \[\leadsto 1 - \color{blue}{\frac{x}{t \cdot z}} \]
  4. Step-by-step derivation
    1. *-un-lft-identity58.9%

      \[\leadsto 1 - \frac{\color{blue}{1 \cdot x}}{t \cdot z} \]
    2. times-frac58.6%

      \[\leadsto 1 - \color{blue}{\frac{1}{t} \cdot \frac{x}{z}} \]
    3. frac-2neg58.6%

      \[\leadsto 1 - \color{blue}{\frac{-1}{-t}} \cdot \frac{x}{z} \]
    4. metadata-eval58.6%

      \[\leadsto 1 - \frac{\color{blue}{-1}}{-t} \cdot \frac{x}{z} \]
    5. add-sqr-sqrt30.2%

      \[\leadsto 1 - \frac{-1}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} \cdot \frac{x}{z} \]
    6. sqrt-unprod51.1%

      \[\leadsto 1 - \frac{-1}{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} \cdot \frac{x}{z} \]
    7. sqr-neg51.1%

      \[\leadsto 1 - \frac{-1}{\sqrt{\color{blue}{t \cdot t}}} \cdot \frac{x}{z} \]
    8. sqrt-unprod22.1%

      \[\leadsto 1 - \frac{-1}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}} \cdot \frac{x}{z} \]
    9. add-sqr-sqrt47.3%

      \[\leadsto 1 - \frac{-1}{\color{blue}{t}} \cdot \frac{x}{z} \]
  5. Applied egg-rr47.3%

    \[\leadsto 1 - \color{blue}{\frac{-1}{t} \cdot \frac{x}{z}} \]
  6. Step-by-step derivation
    1. associate-*l/47.3%

      \[\leadsto 1 - \color{blue}{\frac{-1 \cdot \frac{x}{z}}{t}} \]
    2. associate-*r/47.3%

      \[\leadsto 1 - \frac{\color{blue}{\frac{-1 \cdot x}{z}}}{t} \]
    3. neg-mul-147.3%

      \[\leadsto 1 - \frac{\frac{\color{blue}{-x}}{z}}{t} \]
  7. Simplified47.3%

    \[\leadsto 1 - \color{blue}{\frac{\frac{-x}{z}}{t}} \]
  8. Taylor expanded in x around 0 70.3%

    \[\leadsto \color{blue}{1} \]
  9. Add Preprocessing

Reproduce

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