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

Percentage Accurate: 89.2% → 96.7%
Time: 8.9s
Alternatives: 12
Speedup: 0.8×

Specification

?
\[\begin{array}{l} \\ \frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
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 = x / ((y - z) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
def code(x, y, z, t):
	return x / ((y - z) * (t - z))
function code(x, y, z, t)
	return Float64(x / Float64(Float64(y - z) * Float64(t - z)))
end
function tmp = code(x, y, z, t)
	tmp = x / ((y - z) * (t - z));
end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{\left(y - z\right) \cdot \left(t - z\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 12 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: 89.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \end{array} \]
(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
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 = x / ((y - z) * (t - z))
end function
public static double code(double x, double y, double z, double t) {
	return x / ((y - z) * (t - z));
}
def code(x, y, z, t):
	return x / ((y - z) * (t - z))
function code(x, y, z, t)
	return Float64(x / Float64(Float64(y - z) * Float64(t - z)))
end
function tmp = code(x, y, z, t)
	tmp = x / ((y - z) * (t - z));
end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 96.7% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \frac{\frac{x}{t - z}}{y - z} \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 (/ (/ x (- t z)) (- y z)))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	return (x / (t - z)) / (y - z);
}
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 = (x / (t - z)) / (y - z)
end function
assert x < y && y < z && z < t;
public static double code(double x, double y, double z, double t) {
	return (x / (t - z)) / (y - z);
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	return (x / (t - z)) / (y - z)
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	return Float64(Float64(x / Float64(t - z)) / Float64(y - z))
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp = code(x, y, z, t)
	tmp = (x / (t - z)) / (y - z);
end
NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := N[(N[(x / N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\frac{\frac{x}{t - z}}{y - z}
\end{array}
Derivation
  1. Initial program 91.3%

    \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}} \]
    2. lift-*.f64N/A

      \[\leadsto \frac{x}{\color{blue}{\left(y - z\right) \cdot \left(t - z\right)}} \]
    3. associate-/l/N/A

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
    4. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
    5. lower-/.f6497.6

      \[\leadsto \frac{\color{blue}{\frac{x}{t - z}}}{y - z} \]
  4. Applied rewrites97.6%

    \[\leadsto \color{blue}{\frac{\frac{x}{t - z}}{y - z}} \]
  5. Add Preprocessing

Alternative 2: 60.6% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{z \cdot z}\\ \mathbf{if}\;z \leq -4.7 \cdot 10^{-42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-148}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+29}:\\ \;\;\;\;\frac{x}{\left(-z\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t\_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
 (let* ((t_1 (/ x (* z z))))
   (if (<= z -4.7e-42)
     t_1
     (if (<= z 2e-148)
       (/ x (* y t))
       (if (<= z 3.1e+29) (/ x (* (- z) y)) t_1)))))
assert(x < y && y < z && z < t);
double code(double x, double y, double z, double t) {
	double t_1 = x / (z * z);
	double tmp;
	if (z <= -4.7e-42) {
		tmp = t_1;
	} else if (z <= 2e-148) {
		tmp = x / (y * t);
	} else if (z <= 3.1e+29) {
		tmp = x / (-z * y);
	} else {
		tmp = t_1;
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = x / (z * z)
    if (z <= (-4.7d-42)) then
        tmp = t_1
    else if (z <= 2d-148) then
        tmp = x / (y * t)
    else if (z <= 3.1d+29) then
        tmp = x / (-z * y)
    else
        tmp = t_1
    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 t_1 = x / (z * z);
	double tmp;
	if (z <= -4.7e-42) {
		tmp = t_1;
	} else if (z <= 2e-148) {
		tmp = x / (y * t);
	} else if (z <= 3.1e+29) {
		tmp = x / (-z * y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t] = sort([x, y, z, t])
def code(x, y, z, t):
	t_1 = x / (z * z)
	tmp = 0
	if z <= -4.7e-42:
		tmp = t_1
	elif z <= 2e-148:
		tmp = x / (y * t)
	elif z <= 3.1e+29:
		tmp = x / (-z * y)
	else:
		tmp = t_1
	return tmp
x, y, z, t = sort([x, y, z, t])
function code(x, y, z, t)
	t_1 = Float64(x / Float64(z * z))
	tmp = 0.0
	if (z <= -4.7e-42)
		tmp = t_1;
	elseif (z <= 2e-148)
		tmp = Float64(x / Float64(y * t));
	elseif (z <= 3.1e+29)
		tmp = Float64(x / Float64(Float64(-z) * y));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t = num2cell(sort([x, y, z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = x / (z * z);
	tmp = 0.0;
	if (z <= -4.7e-42)
		tmp = t_1;
	elseif (z <= 2e-148)
		tmp = x / (y * t);
	elseif (z <= 3.1e+29)
		tmp = x / (-z * y);
	else
		tmp = t_1;
	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_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.7e-42], t$95$1, If[LessEqual[z, 2e-148], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e+29], N[(x / N[((-z) * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x}{z \cdot z}\\
\mathbf{if}\;z \leq -4.7 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.1 \cdot 10^{+29}:\\
\;\;\;\;\frac{x}{\left(-z\right) \cdot y}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.7000000000000001e-42 or 3.0999999999999999e29 < z

    1. Initial program 86.6%

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

      \[\leadsto \frac{x}{\color{blue}{{z}^{2}}} \]
    4. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
      2. lower-*.f6472.6

        \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
    5. Applied rewrites72.6%

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

    if -4.7000000000000001e-42 < z < 1.99999999999999987e-148

    1. Initial program 97.0%

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

      \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
    4. Step-by-step derivation
      1. lower-*.f6469.0

        \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
    5. Applied rewrites69.0%

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

    if 1.99999999999999987e-148 < z < 3.0999999999999999e29

    1. Initial program 93.1%

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

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

        \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
      2. lower-*.f64N/A

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

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

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

      \[\leadsto \frac{x}{\left(-1 \cdot z\right) \cdot y} \]
    7. Step-by-step derivation
      1. Applied rewrites34.9%

        \[\leadsto \frac{x}{\left(-z\right) \cdot y} \]
    8. Recombined 3 regimes into one program.
    9. Final simplification65.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.7 \cdot 10^{-42}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-148}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+29}:\\ \;\;\;\;\frac{x}{\left(-z\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \end{array} \]
    10. Add Preprocessing

    Alternative 3: 76.7% accurate, 0.7× speedup?

    \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{-48}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-32}:\\ \;\;\;\;\frac{x}{\left(z - t\right) \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{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 (<= y -9e-48)
       (/ x (* y (- t z)))
       (if (<= y 3.5e-32) (/ x (* (- z t) z)) (/ (/ x y) t))))
    assert(x < y && y < z && z < t);
    double code(double x, double y, double z, double t) {
    	double tmp;
    	if (y <= -9e-48) {
    		tmp = x / (y * (t - z));
    	} else if (y <= 3.5e-32) {
    		tmp = x / ((z - t) * z);
    	} else {
    		tmp = (x / 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 (y <= (-9d-48)) then
            tmp = x / (y * (t - z))
        else if (y <= 3.5d-32) then
            tmp = x / ((z - t) * z)
        else
            tmp = (x / 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 (y <= -9e-48) {
    		tmp = x / (y * (t - z));
    	} else if (y <= 3.5e-32) {
    		tmp = x / ((z - t) * z);
    	} else {
    		tmp = (x / y) / t;
    	}
    	return tmp;
    }
    
    [x, y, z, t] = sort([x, y, z, t])
    def code(x, y, z, t):
    	tmp = 0
    	if y <= -9e-48:
    		tmp = x / (y * (t - z))
    	elif y <= 3.5e-32:
    		tmp = x / ((z - t) * z)
    	else:
    		tmp = (x / y) / t
    	return tmp
    
    x, y, z, t = sort([x, y, z, t])
    function code(x, y, z, t)
    	tmp = 0.0
    	if (y <= -9e-48)
    		tmp = Float64(x / Float64(y * Float64(t - z)));
    	elseif (y <= 3.5e-32)
    		tmp = Float64(x / Float64(Float64(z - t) * z));
    	else
    		tmp = Float64(Float64(x / 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 (y <= -9e-48)
    		tmp = x / (y * (t - z));
    	elseif (y <= 3.5e-32)
    		tmp = x / ((z - t) * z);
    	else
    		tmp = (x / 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[y, -9e-48], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-32], N[(x / N[(N[(z - t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t), $MachinePrecision]]]
    
    \begin{array}{l}
    [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -9 \cdot 10^{-48}:\\
    \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
    
    \mathbf{elif}\;y \leq 3.5 \cdot 10^{-32}:\\
    \;\;\;\;\frac{x}{\left(z - t\right) \cdot z}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{x}{y}}{t}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -8.99999999999999977e-48

      1. Initial program 90.2%

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

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

          \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
        3. lower--.f6482.0

          \[\leadsto \frac{x}{\color{blue}{\left(t - z\right)} \cdot y} \]
      5. Applied rewrites82.0%

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

      if -8.99999999999999977e-48 < y < 3.4999999999999999e-32

      1. Initial program 94.3%

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

        \[\leadsto \frac{x}{\color{blue}{-1 \cdot \left(z \cdot \left(t - z\right)\right)}} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

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

          \[\leadsto \frac{x}{\color{blue}{\left(-1 \cdot \left(t - z\right)\right) \cdot z}} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(-1 \cdot \left(t - z\right)\right) \cdot z}} \]
        4. mul-1-negN/A

          \[\leadsto \frac{x}{\color{blue}{\left(\mathsf{neg}\left(\left(t - z\right)\right)\right)} \cdot z} \]
        5. sub-negN/A

          \[\leadsto \frac{x}{\left(\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)\right) \cdot z} \]
        6. +-commutativeN/A

          \[\leadsto \frac{x}{\left(\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) + t\right)}\right)\right) \cdot z} \]
        7. distribute-neg-inN/A

          \[\leadsto \frac{x}{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)\right)} \cdot z} \]
        8. remove-double-negN/A

          \[\leadsto \frac{x}{\left(\color{blue}{z} + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot z} \]
        9. unsub-negN/A

          \[\leadsto \frac{x}{\color{blue}{\left(z - t\right)} \cdot z} \]
        10. lower--.f6478.3

          \[\leadsto \frac{x}{\color{blue}{\left(z - t\right)} \cdot z} \]
      5. Applied rewrites78.3%

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

      if 3.4999999999999999e-32 < y

      1. Initial program 86.7%

        \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{x}{\color{blue}{\left(y - z\right) \cdot \left(t - z\right)}} \]
        3. associate-/r*N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
        4. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
        5. lower-/.f6496.5

          \[\leadsto \frac{\color{blue}{\frac{x}{y - z}}}{t - z} \]
      4. Applied rewrites96.5%

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

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

          \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
        2. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
        3. lower-/.f6458.6

          \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y} \]
      7. Applied rewrites58.6%

        \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
      8. Step-by-step derivation
        1. Applied rewrites58.5%

          \[\leadsto \frac{\frac{x}{y}}{\color{blue}{t}} \]
      9. Recombined 3 regimes into one program.
      10. Final simplification74.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{-48}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-32}:\\ \;\;\;\;\frac{x}{\left(z - t\right) \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{t}\\ \end{array} \]
      11. Add Preprocessing

      Alternative 4: 76.8% accurate, 0.7× speedup?

      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{-48}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-32}:\\ \;\;\;\;\frac{x}{\left(z - t\right) \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{t}}{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 (<= y -9e-48)
         (/ x (* y (- t z)))
         (if (<= y 3.5e-32) (/ x (* (- z t) z)) (/ (/ x t) y))))
      assert(x < y && y < z && z < t);
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (y <= -9e-48) {
      		tmp = x / (y * (t - z));
      	} else if (y <= 3.5e-32) {
      		tmp = x / ((z - t) * z);
      	} else {
      		tmp = (x / 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 <= (-9d-48)) then
              tmp = x / (y * (t - z))
          else if (y <= 3.5d-32) then
              tmp = x / ((z - t) * z)
          else
              tmp = (x / 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 <= -9e-48) {
      		tmp = x / (y * (t - z));
      	} else if (y <= 3.5e-32) {
      		tmp = x / ((z - t) * z);
      	} else {
      		tmp = (x / t) / y;
      	}
      	return tmp;
      }
      
      [x, y, z, t] = sort([x, y, z, t])
      def code(x, y, z, t):
      	tmp = 0
      	if y <= -9e-48:
      		tmp = x / (y * (t - z))
      	elif y <= 3.5e-32:
      		tmp = x / ((z - t) * z)
      	else:
      		tmp = (x / t) / y
      	return tmp
      
      x, y, z, t = sort([x, y, z, t])
      function code(x, y, z, t)
      	tmp = 0.0
      	if (y <= -9e-48)
      		tmp = Float64(x / Float64(y * Float64(t - z)));
      	elseif (y <= 3.5e-32)
      		tmp = Float64(x / Float64(Float64(z - t) * z));
      	else
      		tmp = Float64(Float64(x / 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 <= -9e-48)
      		tmp = x / (y * (t - z));
      	elseif (y <= 3.5e-32)
      		tmp = x / ((z - t) * z);
      	else
      		tmp = (x / 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[y, -9e-48], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-32], N[(x / N[(N[(z - t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision]]]
      
      \begin{array}{l}
      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -9 \cdot 10^{-48}:\\
      \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
      
      \mathbf{elif}\;y \leq 3.5 \cdot 10^{-32}:\\
      \;\;\;\;\frac{x}{\left(z - t\right) \cdot z}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{x}{t}}{y}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -8.99999999999999977e-48

        1. Initial program 90.2%

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

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

            \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
          3. lower--.f6482.0

            \[\leadsto \frac{x}{\color{blue}{\left(t - z\right)} \cdot y} \]
        5. Applied rewrites82.0%

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

        if -8.99999999999999977e-48 < y < 3.4999999999999999e-32

        1. Initial program 94.3%

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

          \[\leadsto \frac{x}{\color{blue}{-1 \cdot \left(z \cdot \left(t - z\right)\right)}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

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

            \[\leadsto \frac{x}{\color{blue}{\left(-1 \cdot \left(t - z\right)\right) \cdot z}} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(-1 \cdot \left(t - z\right)\right) \cdot z}} \]
          4. mul-1-negN/A

            \[\leadsto \frac{x}{\color{blue}{\left(\mathsf{neg}\left(\left(t - z\right)\right)\right)} \cdot z} \]
          5. sub-negN/A

            \[\leadsto \frac{x}{\left(\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)\right) \cdot z} \]
          6. +-commutativeN/A

            \[\leadsto \frac{x}{\left(\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) + t\right)}\right)\right) \cdot z} \]
          7. distribute-neg-inN/A

            \[\leadsto \frac{x}{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)\right)} \cdot z} \]
          8. remove-double-negN/A

            \[\leadsto \frac{x}{\left(\color{blue}{z} + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot z} \]
          9. unsub-negN/A

            \[\leadsto \frac{x}{\color{blue}{\left(z - t\right)} \cdot z} \]
          10. lower--.f6478.3

            \[\leadsto \frac{x}{\color{blue}{\left(z - t\right)} \cdot z} \]
        5. Applied rewrites78.3%

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

        if 3.4999999999999999e-32 < y

        1. Initial program 86.7%

          \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y - z\right) \cdot \left(t - z\right)}} \]
          3. associate-/r*N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
          4. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
          5. lower-/.f6496.5

            \[\leadsto \frac{\color{blue}{\frac{x}{y - z}}}{t - z} \]
        4. Applied rewrites96.5%

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

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

            \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
          2. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
          3. lower-/.f6458.6

            \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y} \]
        7. Applied rewrites58.6%

          \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
      3. Recombined 3 regimes into one program.
      4. Final simplification74.8%

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

      Alternative 5: 78.0% accurate, 0.7× speedup?

      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{-48}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-84}:\\ \;\;\;\;\frac{x}{\left(z - t\right) \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot 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 (<= y -9e-48)
         (/ x (* y (- t z)))
         (if (<= y 3.7e-84) (/ x (* (- z t) z)) (/ x (* (- y z) t)))))
      assert(x < y && y < z && z < t);
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (y <= -9e-48) {
      		tmp = x / (y * (t - z));
      	} else if (y <= 3.7e-84) {
      		tmp = x / ((z - t) * z);
      	} else {
      		tmp = x / ((y - z) * 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 (y <= (-9d-48)) then
              tmp = x / (y * (t - z))
          else if (y <= 3.7d-84) then
              tmp = x / ((z - t) * z)
          else
              tmp = x / ((y - z) * 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 (y <= -9e-48) {
      		tmp = x / (y * (t - z));
      	} else if (y <= 3.7e-84) {
      		tmp = x / ((z - t) * z);
      	} else {
      		tmp = x / ((y - z) * t);
      	}
      	return tmp;
      }
      
      [x, y, z, t] = sort([x, y, z, t])
      def code(x, y, z, t):
      	tmp = 0
      	if y <= -9e-48:
      		tmp = x / (y * (t - z))
      	elif y <= 3.7e-84:
      		tmp = x / ((z - t) * z)
      	else:
      		tmp = x / ((y - z) * t)
      	return tmp
      
      x, y, z, t = sort([x, y, z, t])
      function code(x, y, z, t)
      	tmp = 0.0
      	if (y <= -9e-48)
      		tmp = Float64(x / Float64(y * Float64(t - z)));
      	elseif (y <= 3.7e-84)
      		tmp = Float64(x / Float64(Float64(z - t) * z));
      	else
      		tmp = Float64(x / Float64(Float64(y - z) * 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 (y <= -9e-48)
      		tmp = x / (y * (t - z));
      	elseif (y <= 3.7e-84)
      		tmp = x / ((z - t) * z);
      	else
      		tmp = x / ((y - z) * 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[y, -9e-48], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e-84], N[(x / N[(N[(z - t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -9 \cdot 10^{-48}:\\
      \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
      
      \mathbf{elif}\;y \leq 3.7 \cdot 10^{-84}:\\
      \;\;\;\;\frac{x}{\left(z - t\right) \cdot z}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y < -8.99999999999999977e-48

        1. Initial program 90.2%

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

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

            \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
          3. lower--.f6482.0

            \[\leadsto \frac{x}{\color{blue}{\left(t - z\right)} \cdot y} \]
        5. Applied rewrites82.0%

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

        if -8.99999999999999977e-48 < y < 3.6999999999999999e-84

        1. Initial program 93.7%

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

          \[\leadsto \frac{x}{\color{blue}{-1 \cdot \left(z \cdot \left(t - z\right)\right)}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

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

            \[\leadsto \frac{x}{\color{blue}{\left(-1 \cdot \left(t - z\right)\right) \cdot z}} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(-1 \cdot \left(t - z\right)\right) \cdot z}} \]
          4. mul-1-negN/A

            \[\leadsto \frac{x}{\color{blue}{\left(\mathsf{neg}\left(\left(t - z\right)\right)\right)} \cdot z} \]
          5. sub-negN/A

            \[\leadsto \frac{x}{\left(\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)\right) \cdot z} \]
          6. +-commutativeN/A

            \[\leadsto \frac{x}{\left(\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) + t\right)}\right)\right) \cdot z} \]
          7. distribute-neg-inN/A

            \[\leadsto \frac{x}{\color{blue}{\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)\right)} \cdot z} \]
          8. remove-double-negN/A

            \[\leadsto \frac{x}{\left(\color{blue}{z} + \left(\mathsf{neg}\left(t\right)\right)\right) \cdot z} \]
          9. unsub-negN/A

            \[\leadsto \frac{x}{\color{blue}{\left(z - t\right)} \cdot z} \]
          10. lower--.f6479.4

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

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

        if 3.6999999999999999e-84 < y

        1. Initial program 88.7%

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

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

            \[\leadsto \frac{x}{\color{blue}{t \cdot \left(y - z\right)}} \]
          2. lower--.f6460.6

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{-48}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-84}:\\ \;\;\;\;\frac{x}{\left(z - t\right) \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 6: 69.5% accurate, 0.7× speedup?

      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{z \cdot z}\\ \mathbf{if}\;z \leq -8.4 \cdot 10^{+83}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+30}:\\ \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_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
       (let* ((t_1 (/ x (* z z))))
         (if (<= z -8.4e+83) t_1 (if (<= z 7.2e+30) (/ x (* y (- t z))) t_1))))
      assert(x < y && y < z && z < t);
      double code(double x, double y, double z, double t) {
      	double t_1 = x / (z * z);
      	double tmp;
      	if (z <= -8.4e+83) {
      		tmp = t_1;
      	} else if (z <= 7.2e+30) {
      		tmp = x / (y * (t - z));
      	} else {
      		tmp = t_1;
      	}
      	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) :: t_1
          real(8) :: tmp
          t_1 = x / (z * z)
          if (z <= (-8.4d+83)) then
              tmp = t_1
          else if (z <= 7.2d+30) then
              tmp = x / (y * (t - z))
          else
              tmp = t_1
          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 t_1 = x / (z * z);
      	double tmp;
      	if (z <= -8.4e+83) {
      		tmp = t_1;
      	} else if (z <= 7.2e+30) {
      		tmp = x / (y * (t - z));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      [x, y, z, t] = sort([x, y, z, t])
      def code(x, y, z, t):
      	t_1 = x / (z * z)
      	tmp = 0
      	if z <= -8.4e+83:
      		tmp = t_1
      	elif z <= 7.2e+30:
      		tmp = x / (y * (t - z))
      	else:
      		tmp = t_1
      	return tmp
      
      x, y, z, t = sort([x, y, z, t])
      function code(x, y, z, t)
      	t_1 = Float64(x / Float64(z * z))
      	tmp = 0.0
      	if (z <= -8.4e+83)
      		tmp = t_1;
      	elseif (z <= 7.2e+30)
      		tmp = Float64(x / Float64(y * Float64(t - z)));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      x, y, z, t = num2cell(sort([x, y, z, t])){:}
      function tmp_2 = code(x, y, z, t)
      	t_1 = x / (z * z);
      	tmp = 0.0;
      	if (z <= -8.4e+83)
      		tmp = t_1;
      	elseif (z <= 7.2e+30)
      		tmp = x / (y * (t - z));
      	else
      		tmp = t_1;
      	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_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.4e+83], t$95$1, If[LessEqual[z, 7.2e+30], N[(x / N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
      \\
      \begin{array}{l}
      t_1 := \frac{x}{z \cdot z}\\
      \mathbf{if}\;z \leq -8.4 \cdot 10^{+83}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 7.2 \cdot 10^{+30}:\\
      \;\;\;\;\frac{x}{y \cdot \left(t - z\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -8.4000000000000001e83 or 7.2000000000000004e30 < z

        1. Initial program 86.9%

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

          \[\leadsto \frac{x}{\color{blue}{{z}^{2}}} \]
        4. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
          2. lower-*.f6481.9

            \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
        5. Applied rewrites81.9%

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

        if -8.4000000000000001e83 < z < 7.2000000000000004e30

        1. Initial program 94.0%

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

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

            \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(t - z\right) \cdot y}} \]
          3. lower--.f6469.7

            \[\leadsto \frac{x}{\color{blue}{\left(t - z\right)} \cdot y} \]
        5. Applied rewrites69.7%

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

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

      Alternative 7: 68.8% accurate, 0.7× speedup?

      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{z \cdot z}\\ \mathbf{if}\;z \leq -6 \cdot 10^{-41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{+30}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;t\_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
       (let* ((t_1 (/ x (* z z))))
         (if (<= z -6e-41) t_1 (if (<= z 5.6e+30) (/ x (* (- y z) t)) t_1))))
      assert(x < y && y < z && z < t);
      double code(double x, double y, double z, double t) {
      	double t_1 = x / (z * z);
      	double tmp;
      	if (z <= -6e-41) {
      		tmp = t_1;
      	} else if (z <= 5.6e+30) {
      		tmp = x / ((y - z) * t);
      	} else {
      		tmp = t_1;
      	}
      	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) :: t_1
          real(8) :: tmp
          t_1 = x / (z * z)
          if (z <= (-6d-41)) then
              tmp = t_1
          else if (z <= 5.6d+30) then
              tmp = x / ((y - z) * t)
          else
              tmp = t_1
          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 t_1 = x / (z * z);
      	double tmp;
      	if (z <= -6e-41) {
      		tmp = t_1;
      	} else if (z <= 5.6e+30) {
      		tmp = x / ((y - z) * t);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      [x, y, z, t] = sort([x, y, z, t])
      def code(x, y, z, t):
      	t_1 = x / (z * z)
      	tmp = 0
      	if z <= -6e-41:
      		tmp = t_1
      	elif z <= 5.6e+30:
      		tmp = x / ((y - z) * t)
      	else:
      		tmp = t_1
      	return tmp
      
      x, y, z, t = sort([x, y, z, t])
      function code(x, y, z, t)
      	t_1 = Float64(x / Float64(z * z))
      	tmp = 0.0
      	if (z <= -6e-41)
      		tmp = t_1;
      	elseif (z <= 5.6e+30)
      		tmp = Float64(x / Float64(Float64(y - z) * t));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      x, y, z, t = num2cell(sort([x, y, z, t])){:}
      function tmp_2 = code(x, y, z, t)
      	t_1 = x / (z * z);
      	tmp = 0.0;
      	if (z <= -6e-41)
      		tmp = t_1;
      	elseif (z <= 5.6e+30)
      		tmp = x / ((y - z) * t);
      	else
      		tmp = t_1;
      	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_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e-41], t$95$1, If[LessEqual[z, 5.6e+30], N[(x / N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
      \\
      \begin{array}{l}
      t_1 := \frac{x}{z \cdot z}\\
      \mathbf{if}\;z \leq -6 \cdot 10^{-41}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 5.6 \cdot 10^{+30}:\\
      \;\;\;\;\frac{x}{\left(y - z\right) \cdot t}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -5.99999999999999978e-41 or 5.59999999999999966e30 < z

        1. Initial program 86.5%

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

          \[\leadsto \frac{x}{\color{blue}{{z}^{2}}} \]
        4. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
          2. lower-*.f6473.1

            \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
        5. Applied rewrites73.1%

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

        if -5.99999999999999978e-41 < z < 5.59999999999999966e30

        1. Initial program 95.8%

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

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

            \[\leadsto \frac{x}{\color{blue}{t \cdot \left(y - z\right)}} \]
          2. lower--.f6473.0

            \[\leadsto \frac{x}{t \cdot \color{blue}{\left(y - z\right)}} \]
        5. Applied rewrites73.0%

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

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

      Alternative 8: 90.9% accurate, 0.7× speedup?

      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -4.9 \cdot 10^{+200}:\\ \;\;\;\;\frac{\frac{x}{y}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - 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 -4.9e+200) (/ (/ x y) (- t z)) (/ x (* (- y z) (- t z)))))
      assert(x < y && y < z && z < t);
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (y <= -4.9e+200) {
      		tmp = (x / y) / (t - z);
      	} else {
      		tmp = x / ((y - z) * (t - 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 <= (-4.9d+200)) then
              tmp = (x / y) / (t - z)
          else
              tmp = x / ((y - z) * (t - 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 <= -4.9e+200) {
      		tmp = (x / y) / (t - z);
      	} else {
      		tmp = x / ((y - z) * (t - z));
      	}
      	return tmp;
      }
      
      [x, y, z, t] = sort([x, y, z, t])
      def code(x, y, z, t):
      	tmp = 0
      	if y <= -4.9e+200:
      		tmp = (x / y) / (t - z)
      	else:
      		tmp = x / ((y - z) * (t - z))
      	return tmp
      
      x, y, z, t = sort([x, y, z, t])
      function code(x, y, z, t)
      	tmp = 0.0
      	if (y <= -4.9e+200)
      		tmp = Float64(Float64(x / y) / Float64(t - z));
      	else
      		tmp = Float64(x / Float64(Float64(y - z) * Float64(t - 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 <= -4.9e+200)
      		tmp = (x / y) / (t - z);
      	else
      		tmp = x / ((y - z) * (t - 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, -4.9e+200], N[(N[(x / y), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -4.9 \cdot 10^{+200}:\\
      \;\;\;\;\frac{\frac{x}{y}}{t - z}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -4.89999999999999982e200

        1. Initial program 84.9%

          \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y - z\right) \cdot \left(t - z\right)}} \]
          3. associate-/r*N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
          4. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
          5. lower-/.f6499.8

            \[\leadsto \frac{\color{blue}{\frac{x}{y - z}}}{t - z} \]
        4. Applied rewrites99.8%

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

          \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t - z} \]
        6. Step-by-step derivation
          1. lower-/.f6499.8

            \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{t - z} \]
        7. Applied rewrites99.8%

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

        if -4.89999999999999982e200 < y

        1. Initial program 91.9%

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

      Alternative 9: 91.1% accurate, 0.7× speedup?

      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -3.05 \cdot 10^{+115}:\\ \;\;\;\;\frac{\frac{x}{z}}{z - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - 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 (<= z -3.05e+115) (/ (/ x z) (- z t)) (/ x (* (- y z) (- t z)))))
      assert(x < y && y < z && z < t);
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (z <= -3.05e+115) {
      		tmp = (x / z) / (z - t);
      	} else {
      		tmp = x / ((y - z) * (t - 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 (z <= (-3.05d+115)) then
              tmp = (x / z) / (z - t)
          else
              tmp = x / ((y - z) * (t - 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 (z <= -3.05e+115) {
      		tmp = (x / z) / (z - t);
      	} else {
      		tmp = x / ((y - z) * (t - z));
      	}
      	return tmp;
      }
      
      [x, y, z, t] = sort([x, y, z, t])
      def code(x, y, z, t):
      	tmp = 0
      	if z <= -3.05e+115:
      		tmp = (x / z) / (z - t)
      	else:
      		tmp = x / ((y - z) * (t - z))
      	return tmp
      
      x, y, z, t = sort([x, y, z, t])
      function code(x, y, z, t)
      	tmp = 0.0
      	if (z <= -3.05e+115)
      		tmp = Float64(Float64(x / z) / Float64(z - t));
      	else
      		tmp = Float64(x / Float64(Float64(y - z) * Float64(t - 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 (z <= -3.05e+115)
      		tmp = (x / z) / (z - t);
      	else
      		tmp = x / ((y - z) * (t - 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[z, -3.05e+115], N[(N[(x / z), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -3.05 \cdot 10^{+115}:\\
      \;\;\;\;\frac{\frac{x}{z}}{z - t}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -3.04999999999999983e115

        1. Initial program 85.5%

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

          \[\leadsto \color{blue}{-1 \cdot \frac{x}{z \cdot \left(t - z\right)}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{x}{z \cdot \left(t - z\right)}\right)} \]
          2. associate-/r*N/A

            \[\leadsto \mathsf{neg}\left(\color{blue}{\frac{\frac{x}{z}}{t - z}}\right) \]
          3. distribute-neg-frac2N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{z}}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
          4. mul-1-negN/A

            \[\leadsto \frac{\frac{x}{z}}{\color{blue}{-1 \cdot \left(t - z\right)}} \]
          5. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{z}}{-1 \cdot \left(t - z\right)}} \]
          6. lower-/.f64N/A

            \[\leadsto \frac{\color{blue}{\frac{x}{z}}}{-1 \cdot \left(t - z\right)} \]
          7. mul-1-negN/A

            \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\mathsf{neg}\left(\left(t - z\right)\right)}} \]
          8. sub-negN/A

            \[\leadsto \frac{\frac{x}{z}}{\mathsf{neg}\left(\color{blue}{\left(t + \left(\mathsf{neg}\left(z\right)\right)\right)}\right)} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\frac{x}{z}}{\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) + t\right)}\right)} \]
          10. distribute-neg-inN/A

            \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \left(\mathsf{neg}\left(t\right)\right)}} \]
          11. remove-double-negN/A

            \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z} + \left(\mathsf{neg}\left(t\right)\right)} \]
          12. unsub-negN/A

            \[\leadsto \frac{\frac{x}{z}}{\color{blue}{z - t}} \]
          13. lower--.f6496.7

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

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

        if -3.04999999999999983e115 < z

        1. Initial program 92.7%

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

      Alternative 10: 61.8% accurate, 0.8× speedup?

      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} t_1 := \frac{x}{z \cdot z}\\ \mathbf{if}\;z \leq -4.7 \cdot 10^{-42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-5}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;t\_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
       (let* ((t_1 (/ x (* z z))))
         (if (<= z -4.7e-42) t_1 (if (<= z 9.5e-5) (/ x (* y t)) t_1))))
      assert(x < y && y < z && z < t);
      double code(double x, double y, double z, double t) {
      	double t_1 = x / (z * z);
      	double tmp;
      	if (z <= -4.7e-42) {
      		tmp = t_1;
      	} else if (z <= 9.5e-5) {
      		tmp = x / (y * t);
      	} else {
      		tmp = t_1;
      	}
      	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) :: t_1
          real(8) :: tmp
          t_1 = x / (z * z)
          if (z <= (-4.7d-42)) then
              tmp = t_1
          else if (z <= 9.5d-5) then
              tmp = x / (y * t)
          else
              tmp = t_1
          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 t_1 = x / (z * z);
      	double tmp;
      	if (z <= -4.7e-42) {
      		tmp = t_1;
      	} else if (z <= 9.5e-5) {
      		tmp = x / (y * t);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      [x, y, z, t] = sort([x, y, z, t])
      def code(x, y, z, t):
      	t_1 = x / (z * z)
      	tmp = 0
      	if z <= -4.7e-42:
      		tmp = t_1
      	elif z <= 9.5e-5:
      		tmp = x / (y * t)
      	else:
      		tmp = t_1
      	return tmp
      
      x, y, z, t = sort([x, y, z, t])
      function code(x, y, z, t)
      	t_1 = Float64(x / Float64(z * z))
      	tmp = 0.0
      	if (z <= -4.7e-42)
      		tmp = t_1;
      	elseif (z <= 9.5e-5)
      		tmp = Float64(x / Float64(y * t));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      x, y, z, t = num2cell(sort([x, y, z, t])){:}
      function tmp_2 = code(x, y, z, t)
      	t_1 = x / (z * z);
      	tmp = 0.0;
      	if (z <= -4.7e-42)
      		tmp = t_1;
      	elseif (z <= 9.5e-5)
      		tmp = x / (y * t);
      	else
      		tmp = t_1;
      	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_] := Block[{t$95$1 = N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.7e-42], t$95$1, If[LessEqual[z, 9.5e-5], N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
      \\
      \begin{array}{l}
      t_1 := \frac{x}{z \cdot z}\\
      \mathbf{if}\;z \leq -4.7 \cdot 10^{-42}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 9.5 \cdot 10^{-5}:\\
      \;\;\;\;\frac{x}{y \cdot t}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -4.7000000000000001e-42 or 9.5000000000000005e-5 < z

        1. Initial program 87.2%

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

          \[\leadsto \frac{x}{\color{blue}{{z}^{2}}} \]
        4. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
          2. lower-*.f6470.3

            \[\leadsto \frac{x}{\color{blue}{z \cdot z}} \]
        5. Applied rewrites70.3%

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

        if -4.7000000000000001e-42 < z < 9.5000000000000005e-5

        1. Initial program 95.6%

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

          \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
        4. Step-by-step derivation
          1. lower-*.f6460.1

            \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
        5. Applied rewrites60.1%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.7 \cdot 10^{-42}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-5}:\\ \;\;\;\;\frac{x}{y \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z \cdot z}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 11: 89.7% accurate, 0.8× speedup?

      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{+94}:\\ \;\;\;\;\frac{\frac{x}{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - 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 -4.8e+94) (/ (/ x t) y) (/ x (* (- y z) (- t z)))))
      assert(x < y && y < z && z < t);
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (t <= -4.8e+94) {
      		tmp = (x / t) / y;
      	} else {
      		tmp = x / ((y - z) * (t - 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 <= (-4.8d+94)) then
              tmp = (x / t) / y
          else
              tmp = x / ((y - z) * (t - 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 <= -4.8e+94) {
      		tmp = (x / t) / y;
      	} else {
      		tmp = x / ((y - z) * (t - z));
      	}
      	return tmp;
      }
      
      [x, y, z, t] = sort([x, y, z, t])
      def code(x, y, z, t):
      	tmp = 0
      	if t <= -4.8e+94:
      		tmp = (x / t) / y
      	else:
      		tmp = x / ((y - z) * (t - z))
      	return tmp
      
      x, y, z, t = sort([x, y, z, t])
      function code(x, y, z, t)
      	tmp = 0.0
      	if (t <= -4.8e+94)
      		tmp = Float64(Float64(x / t) / y);
      	else
      		tmp = Float64(x / Float64(Float64(y - z) * Float64(t - 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 <= -4.8e+94)
      		tmp = (x / t) / y;
      	else
      		tmp = x / ((y - z) * (t - 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, -4.8e+94], N[(N[(x / t), $MachinePrecision] / y), $MachinePrecision], N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq -4.8 \cdot 10^{+94}:\\
      \;\;\;\;\frac{\frac{x}{t}}{y}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -4.79999999999999965e94

        1. Initial program 79.0%

          \[\frac{x}{\left(y - z\right) \cdot \left(t - z\right)} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{x}{\color{blue}{\left(y - z\right) \cdot \left(t - z\right)}} \]
          3. associate-/r*N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
          4. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{y - z}}{t - z}} \]
          5. lower-/.f6497.9

            \[\leadsto \frac{\color{blue}{\frac{x}{y - z}}}{t - z} \]
        4. Applied rewrites97.9%

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

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

            \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
          2. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{x}{t}}{y}} \]
          3. lower-/.f6463.8

            \[\leadsto \frac{\color{blue}{\frac{x}{t}}}{y} \]
        7. Applied rewrites63.8%

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

        if -4.79999999999999965e94 < t

        1. Initial program 94.2%

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

      Alternative 12: 40.0% accurate, 1.4× speedup?

      \[\begin{array}{l} [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\ \\ \frac{x}{y \cdot t} \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 (/ x (* y t)))
      assert(x < y && y < z && z < t);
      double code(double x, double y, double z, double t) {
      	return x / (y * t);
      }
      
      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 = x / (y * t)
      end function
      
      assert x < y && y < z && z < t;
      public static double code(double x, double y, double z, double t) {
      	return x / (y * t);
      }
      
      [x, y, z, t] = sort([x, y, z, t])
      def code(x, y, z, t):
      	return x / (y * t)
      
      x, y, z, t = sort([x, y, z, t])
      function code(x, y, z, t)
      	return Float64(x / Float64(y * t))
      end
      
      x, y, z, t = num2cell(sort([x, y, z, t])){:}
      function tmp = code(x, y, z, t)
      	tmp = x / (y * t);
      end
      
      NOTE: x, y, z, and t should be sorted in increasing order before calling this function.
      code[x_, y_, z_, t_] := N[(x / N[(y * t), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      [x, y, z, t] = \mathsf{sort}([x, y, z, t])\\
      \\
      \frac{x}{y \cdot t}
      \end{array}
      
      Derivation
      1. Initial program 91.3%

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

        \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
      4. Step-by-step derivation
        1. lower-*.f6438.2

          \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
      5. Applied rewrites38.2%

        \[\leadsto \frac{x}{\color{blue}{t \cdot y}} \]
      6. Final simplification38.2%

        \[\leadsto \frac{x}{y \cdot t} \]
      7. Add Preprocessing

      Developer Target 1: 88.0% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \left(t - z\right)\\ \mathbf{if}\;\frac{x}{t\_1} < 0:\\ \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{1}{t\_1}\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (* (- y z) (- t z))))
         (if (< (/ x t_1) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 t_1)))))
      double code(double x, double y, double z, double t) {
      	double t_1 = (y - z) * (t - z);
      	double tmp;
      	if ((x / t_1) < 0.0) {
      		tmp = (x / (y - z)) / (t - z);
      	} else {
      		tmp = x * (1.0 / t_1);
      	}
      	return tmp;
      }
      
      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) :: t_1
          real(8) :: tmp
          t_1 = (y - z) * (t - z)
          if ((x / t_1) < 0.0d0) then
              tmp = (x / (y - z)) / (t - z)
          else
              tmp = x * (1.0d0 / t_1)
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t) {
      	double t_1 = (y - z) * (t - z);
      	double tmp;
      	if ((x / t_1) < 0.0) {
      		tmp = (x / (y - z)) / (t - z);
      	} else {
      		tmp = x * (1.0 / t_1);
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	t_1 = (y - z) * (t - z)
      	tmp = 0
      	if (x / t_1) < 0.0:
      		tmp = (x / (y - z)) / (t - z)
      	else:
      		tmp = x * (1.0 / t_1)
      	return tmp
      
      function code(x, y, z, t)
      	t_1 = Float64(Float64(y - z) * Float64(t - z))
      	tmp = 0.0
      	if (Float64(x / t_1) < 0.0)
      		tmp = Float64(Float64(x / Float64(y - z)) / Float64(t - z));
      	else
      		tmp = Float64(x * Float64(1.0 / t_1));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	t_1 = (y - z) * (t - z);
      	tmp = 0.0;
      	if ((x / t_1) < 0.0)
      		tmp = (x / (y - z)) / (t - z);
      	else
      		tmp = x * (1.0 / t_1);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Less[N[(x / t$95$1), $MachinePrecision], 0.0], N[(N[(x / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(y - z\right) \cdot \left(t - z\right)\\
      \mathbf{if}\;\frac{x}{t\_1} < 0:\\
      \;\;\;\;\frac{\frac{x}{y - z}}{t - z}\\
      
      \mathbf{else}:\\
      \;\;\;\;x \cdot \frac{1}{t\_1}\\
      
      
      \end{array}
      \end{array}
      

      Reproduce

      ?
      herbie shell --seed 2024267 
      (FPCore (x y z t)
        :name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
        :precision binary64
      
        :alt
        (! :herbie-platform default (if (< (/ x (* (- y z) (- t z))) 0) (/ (/ x (- y z)) (- t z)) (* x (/ 1 (* (- y z) (- t z))))))
      
        (/ x (* (- y z) (- t z))))