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

Percentage Accurate: 98.9% → 98.5%
Time: 7.7s
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: 98.9% 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: 98.5% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ 1 + \frac{\frac{x}{y - t}}{z - y} \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 t)) (- z y))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	return 1.0 + ((x / (y - t)) / (z - 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 - t)) / (z - 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 - t)) / (z - y));
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	return 1.0 + ((x / (y - t)) / (z - y))
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	return Float64(1.0 + Float64(Float64(x / Float64(y - t)) / Float64(z - y)))
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
	tmp = 1.0 + ((x / (y - t)) / (z - 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[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 + \frac{\frac{x}{y - t}}{z - y}
\end{array}
Derivation
  1. Initial program 99.5%

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

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

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

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

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

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

    \[\leadsto 1 - \color{blue}{\frac{\frac{x}{y - t}}{y - z}} \]
  7. Final simplification99.2%

    \[\leadsto 1 + \frac{\frac{x}{y - t}}{z - y} \]
  8. Add Preprocessing

Alternative 2: 91.9% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{-81} \lor \neg \left(t \leq 5.2 \cdot 10^{-121}\right):\\ \;\;\;\;1 + \frac{x}{t \cdot \left(y - z\right)}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{x}{y \cdot \left(z - 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 (or (<= t -1.35e-81) (not (<= t 5.2e-121)))
   (+ 1.0 (/ x (* t (- y z))))
   (+ 1.0 (/ x (* y (- z y))))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -1.35e-81) || !(t <= 5.2e-121)) {
		tmp = 1.0 + (x / (t * (y - z)));
	} else {
		tmp = 1.0 + (x / (y * (z - 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 ((t <= (-1.35d-81)) .or. (.not. (t <= 5.2d-121))) then
        tmp = 1.0d0 + (x / (t * (y - z)))
    else
        tmp = 1.0d0 + (x / (y * (z - 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 ((t <= -1.35e-81) || !(t <= 5.2e-121)) {
		tmp = 1.0 + (x / (t * (y - z)));
	} else {
		tmp = 1.0 + (x / (y * (z - y)));
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if (t <= -1.35e-81) or not (t <= 5.2e-121):
		tmp = 1.0 + (x / (t * (y - z)))
	else:
		tmp = 1.0 + (x / (y * (z - y)))
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -1.35e-81) || !(t <= 5.2e-121))
		tmp = Float64(1.0 + Float64(x / Float64(t * Float64(y - z))));
	else
		tmp = Float64(1.0 + Float64(x / Float64(y * Float64(z - 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 ((t <= -1.35e-81) || ~((t <= 5.2e-121)))
		tmp = 1.0 + (x / (t * (y - z)));
	else
		tmp = 1.0 + (x / (y * (z - 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[t, -1.35e-81], N[Not[LessEqual[t, 5.2e-121]], $MachinePrecision]], N[(1.0 + N[(x / N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x / N[(y * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-81} \lor \neg \left(t \leq 5.2 \cdot 10^{-121}\right):\\
\;\;\;\;1 + \frac{x}{t \cdot \left(y - z\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.34999999999999995e-81 or 5.19999999999999972e-121 < t

    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 inf 93.6%

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

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

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

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

    if -1.34999999999999995e-81 < t < 5.19999999999999972e-121

    1. Initial program 98.6%

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

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

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

Alternative 3: 83.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 -4.8 \cdot 10^{-157}:\\ \;\;\;\;1 + \frac{x}{y \cdot \left(z - y\right)}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{-82}:\\ \;\;\;\;\frac{z - \frac{x}{t}}{z}\\ \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 -4.8e-157)
   (+ 1.0 (/ x (* y (- z y))))
   (if (<= y 1.3e-82) (/ (- z (/ x t)) z) 1.0)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4.8e-157) {
		tmp = 1.0 + (x / (y * (z - y)));
	} else if (y <= 1.3e-82) {
		tmp = (z - (x / t)) / z;
	} 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 <= (-4.8d-157)) then
        tmp = 1.0d0 + (x / (y * (z - y)))
    else if (y <= 1.3d-82) then
        tmp = (z - (x / t)) / z
    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 <= -4.8e-157) {
		tmp = 1.0 + (x / (y * (z - y)));
	} else if (y <= 1.3e-82) {
		tmp = (z - (x / t)) / z;
	} 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 <= -4.8e-157:
		tmp = 1.0 + (x / (y * (z - y)))
	elif y <= 1.3e-82:
		tmp = (z - (x / t)) / z
	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 <= -4.8e-157)
		tmp = Float64(1.0 + Float64(x / Float64(y * Float64(z - y))));
	elseif (y <= 1.3e-82)
		tmp = Float64(Float64(z - Float64(x / t)) / z);
	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 <= -4.8e-157)
		tmp = 1.0 + (x / (y * (z - y)));
	elseif (y <= 1.3e-82)
		tmp = (z - (x / t)) / z;
	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, -4.8e-157], N[(1.0 + N[(x / N[(y * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-82], N[(N[(z - N[(x / t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 1.0]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-157}:\\
\;\;\;\;1 + \frac{x}{y \cdot \left(z - y\right)}\\

\mathbf{elif}\;y \leq 1.3 \cdot 10^{-82}:\\
\;\;\;\;\frac{z - \frac{x}{t}}{z}\\

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


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

    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 85.9%

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

    if -4.8e-157 < y < 1.3e-82

    1. Initial program 98.6%

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

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

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

    if 1.3e-82 < y

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{1} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.8%

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

Alternative 4: 84.0% 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.05 \cdot 10^{-72}:\\ \;\;\;\;1 + \frac{x}{y \cdot \left(t - y\right)}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-77}:\\ \;\;\;\;\frac{z - \frac{x}{t}}{z}\\ \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 -1.05e-72)
   (+ 1.0 (/ x (* y (- t y))))
   (if (<= y 1.05e-77) (/ (- z (/ x t)) z) 1.0)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.05e-72) {
		tmp = 1.0 + (x / (y * (t - y)));
	} else if (y <= 1.05e-77) {
		tmp = (z - (x / t)) / z;
	} 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 <= (-1.05d-72)) then
        tmp = 1.0d0 + (x / (y * (t - y)))
    else if (y <= 1.05d-77) then
        tmp = (z - (x / t)) / z
    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 <= -1.05e-72) {
		tmp = 1.0 + (x / (y * (t - y)));
	} else if (y <= 1.05e-77) {
		tmp = (z - (x / t)) / z;
	} 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 <= -1.05e-72:
		tmp = 1.0 + (x / (y * (t - y)))
	elif y <= 1.05e-77:
		tmp = (z - (x / t)) / z
	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 <= -1.05e-72)
		tmp = Float64(1.0 + Float64(x / Float64(y * Float64(t - y))));
	elseif (y <= 1.05e-77)
		tmp = Float64(Float64(z - Float64(x / t)) / z);
	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 <= -1.05e-72)
		tmp = 1.0 + (x / (y * (t - y)));
	elseif (y <= 1.05e-77)
		tmp = (z - (x / t)) / z;
	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, -1.05e-72], N[(1.0 + N[(x / N[(y * N[(t - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e-77], N[(N[(z - N[(x / t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 1.0]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-72}:\\
\;\;\;\;1 + \frac{x}{y \cdot \left(t - y\right)}\\

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-77}:\\
\;\;\;\;\frac{z - \frac{x}{t}}{z}\\

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


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

    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 89.1%

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

    if -1.05e-72 < y < 1.05000000000000008e-77

    1. Initial program 98.7%

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

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

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

    if 1.05000000000000008e-77 < y

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{1} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.0%

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

Alternative 5: 83.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 -3 \cdot 10^{-70}:\\ \;\;\;\;1\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-81}:\\ \;\;\;\;\frac{z - \frac{x}{t}}{z}\\ \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 -3e-70) 1.0 (if (<= y 9e-81) (/ (- z (/ x t)) z) 1.0)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -3e-70) {
		tmp = 1.0;
	} else if (y <= 9e-81) {
		tmp = (z - (x / t)) / z;
	} 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 <= (-3d-70)) then
        tmp = 1.0d0
    else if (y <= 9d-81) then
        tmp = (z - (x / t)) / z
    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 <= -3e-70) {
		tmp = 1.0;
	} else if (y <= 9e-81) {
		tmp = (z - (x / t)) / z;
	} 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 <= -3e-70:
		tmp = 1.0
	elif y <= 9e-81:
		tmp = (z - (x / t)) / z
	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 <= -3e-70)
		tmp = 1.0;
	elseif (y <= 9e-81)
		tmp = Float64(Float64(z - Float64(x / t)) / z);
	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 <= -3e-70)
		tmp = 1.0;
	elseif (y <= 9e-81)
		tmp = (z - (x / t)) / z;
	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, -3e-70], 1.0, If[LessEqual[y, 9e-81], N[(N[(z - N[(x / t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], 1.0]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{-70}:\\
\;\;\;\;1\\

\mathbf{elif}\;y \leq 9 \cdot 10^{-81}:\\
\;\;\;\;\frac{z - \frac{x}{t}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.0000000000000001e-70 or 9.000000000000001e-81 < y

    1. Initial program 100.0%

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

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

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

    if -3.0000000000000001e-70 < y < 9.000000000000001e-81

    1. Initial program 98.8%

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

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

      \[\leadsto \color{blue}{\frac{z - \frac{x}{t}}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 83.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 -5.3 \cdot 10^{-70}:\\ \;\;\;\;1\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-76}:\\ \;\;\;\;1 - \frac{x}{t \cdot z}\\ \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 -5.3e-70) 1.0 (if (<= y 9e-76) (- 1.0 (/ x (* t z))) 1.0)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -5.3e-70) {
		tmp = 1.0;
	} else if (y <= 9e-76) {
		tmp = 1.0 - (x / (t * z));
	} 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 <= (-5.3d-70)) then
        tmp = 1.0d0
    else if (y <= 9d-76) then
        tmp = 1.0d0 - (x / (t * z))
    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 <= -5.3e-70) {
		tmp = 1.0;
	} else if (y <= 9e-76) {
		tmp = 1.0 - (x / (t * z));
	} 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 <= -5.3e-70:
		tmp = 1.0
	elif y <= 9e-76:
		tmp = 1.0 - (x / (t * z))
	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 <= -5.3e-70)
		tmp = 1.0;
	elseif (y <= 9e-76)
		tmp = Float64(1.0 - Float64(x / Float64(t * z)));
	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 <= -5.3e-70)
		tmp = 1.0;
	elseif (y <= 9e-76)
		tmp = 1.0 - (x / (t * z));
	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, -5.3e-70], 1.0, If[LessEqual[y, 9e-76], N[(1.0 - N[(x / N[(t * z), $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 -5.3 \cdot 10^{-70}:\\
\;\;\;\;1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.29999999999999983e-70 or 9.0000000000000001e-76 < y

    1. Initial program 100.0%

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

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

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

    if -5.29999999999999983e-70 < y < 9.0000000000000001e-76

    1. Initial program 98.8%

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

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

Alternative 7: 89.1% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 1.75 \cdot 10^{-100}:\\ \;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{x}{t \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 (<= t 1.75e-100) (+ 1.0 (/ (/ x z) (- y t))) (+ 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 <= 1.75e-100) {
		tmp = 1.0 + ((x / z) / (y - t));
	} 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 <= 1.75d-100) then
        tmp = 1.0d0 + ((x / z) / (y - t))
    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 <= 1.75e-100) {
		tmp = 1.0 + ((x / z) / (y - t));
	} 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 <= 1.75e-100:
		tmp = 1.0 + ((x / z) / (y - t))
	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 <= 1.75e-100)
		tmp = Float64(1.0 + Float64(Float64(x / z) / Float64(y - t)));
	else
		tmp = Float64(1.0 + Float64(x / Float64(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 <= 1.75e-100)
		tmp = 1.0 + ((x / z) / (y - t));
	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, 1.75e-100], N[(1.0 + N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x / N[(t * 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}\;t \leq 1.75 \cdot 10^{-100}:\\
\;\;\;\;1 + \frac{\frac{x}{z}}{y - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.75e-100

    1. Initial program 99.4%

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

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

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

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

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

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

    if 1.75e-100 < t

    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 inf 92.9%

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

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

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

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

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

Alternative 8: 75.2% accurate, 0.9× 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^{-102}:\\ \;\;\;\;1 + \frac{x}{y \cdot z}\\ \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 (<= t 8.6e-102) (+ 1.0 (/ x (* y z))) 1.0))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 8.6e-102) {
		tmp = 1.0 + (x / (y * z));
	} 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 (t <= 8.6d-102) then
        tmp = 1.0d0 + (x / (y * z))
    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 (t <= 8.6e-102) {
		tmp = 1.0 + (x / (y * z));
	} else {
		tmp = 1.0;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	tmp = 0
	if t <= 8.6e-102:
		tmp = 1.0 + (x / (y * z))
	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 (t <= 8.6e-102)
		tmp = Float64(1.0 + Float64(x / Float64(y * z)));
	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 (t <= 8.6e-102)
		tmp = 1.0 + (x / (y * z));
	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[t, 8.6e-102], N[(1.0 + N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.6 \cdot 10^{-102}:\\
\;\;\;\;1 + \frac{x}{y \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 8.5999999999999995e-102

    1. Initial program 99.4%

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

      \[\leadsto 1 - \color{blue}{\frac{x}{y \cdot \left(y - z\right)}} \]
    4. Taylor expanded in z around inf 65.8%

      \[\leadsto \color{blue}{1 + \frac{x}{y \cdot z}} \]
    5. Step-by-step derivation
      1. *-commutative65.8%

        \[\leadsto 1 + \frac{x}{\color{blue}{z \cdot y}} \]
    6. Simplified65.8%

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

    if 8.5999999999999995e-102 < t

    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 71.3%

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

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.7%

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

Alternative 9: 98.9% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ 1 + \frac{x}{\left(y - t\right) \cdot \left(z - 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 t) (- z y)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	return 1.0 + (x / ((y - t) * (z - 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 - t) * (z - 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 - t) * (z - y)));
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	return 1.0 + (x / ((y - t) * (z - 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 - t) * Float64(z - y))))
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
	tmp = 1.0 + (x / ((y - t) * (z - 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 - t), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
1 + \frac{x}{\left(y - t\right) \cdot \left(z - y\right)}
\end{array}
Derivation
  1. Initial program 99.5%

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

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

Alternative 10: 75.8% 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 99.5%

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

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

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

Reproduce

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