Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, B

Percentage Accurate: 95.8% → 99.6%
Time: 8.7s
Alternatives: 9
Speedup: 0.5×

Specification

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

\\
\frac{x}{y - z \cdot t}
\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 9 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: 95.8% accurate, 1.0× speedup?

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

\\
\frac{x}{y - z \cdot t}
\end{array}

Alternative 1: 99.6% accurate, 0.1× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -\infty \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+200}\right):\\ \;\;\;\;-\frac{\frac{x}{t}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(z, -t, y\right)}\\ \end{array} \end{array} \]
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (or (<= (* z t) (- INFINITY)) (not (<= (* z t) 2e+200)))
   (- (/ (/ x t) z))
   (/ x (fma z (- t) y))))
assert(z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (((z * t) <= -((double) INFINITY)) || !((z * t) <= 2e+200)) {
		tmp = -((x / t) / z);
	} else {
		tmp = x / fma(z, -t, y);
	}
	return tmp;
}
z, t = sort([z, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((Float64(z * t) <= Float64(-Inf)) || !(Float64(z * t) <= 2e+200))
		tmp = Float64(-Float64(Float64(x / t) / z));
	else
		tmp = Float64(x / fma(z, Float64(-t), y));
	end
	return tmp
end
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], (-Infinity)], N[Not[LessEqual[N[(z * t), $MachinePrecision], 2e+200]], $MachinePrecision]], (-N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), N[(x / N[(z * (-t) + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -\infty \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+200}\right):\\
\;\;\;\;-\frac{\frac{x}{t}}{z}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(z, -t, y\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z t) < -inf.0 or 1.9999999999999999e200 < (*.f64 z t)

    1. Initial program 76.4%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around 0 76.4%

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{t}}{z}} \]
      3. distribute-neg-frac99.8%

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

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

    if -inf.0 < (*.f64 z t) < 1.9999999999999999e200

    1. Initial program 99.8%

      \[\frac{x}{y - z \cdot t} \]
    2. Step-by-step derivation
      1. cancel-sign-sub-inv99.8%

        \[\leadsto \frac{x}{\color{blue}{y + \left(-z\right) \cdot t}} \]
      2. +-commutative99.8%

        \[\leadsto \frac{x}{\color{blue}{\left(-z\right) \cdot t + y}} \]
      3. distribute-lft-neg-out99.8%

        \[\leadsto \frac{x}{\color{blue}{\left(-z \cdot t\right)} + y} \]
      4. distribute-rgt-neg-out99.8%

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

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(z, -t, y\right)}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\frac{x}{\mathsf{fma}\left(z, -t, y\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot t \leq -\infty \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+200}\right):\\ \;\;\;\;-\frac{\frac{x}{t}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(z, -t, y\right)}\\ \end{array} \]

Alternative 2: 74.2% accurate, 0.2× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} t_1 := \frac{-x}{z \cdot t}\\ t_2 := -\frac{\frac{x}{t}}{z}\\ \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+54}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \cdot t \leq -2 \cdot 10^{-34}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-141}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-55}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+200}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
NOTE: 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 t))) (t_2 (- (/ (/ x t) z))))
   (if (<= (* z t) -1e+54)
     t_2
     (if (<= (* z t) -2e-34)
       (/ x y)
       (if (<= (* z t) -1e-61)
         t_1
         (if (<= (* z t) 5e-141)
           (/ x y)
           (if (<= (* z t) 5e-85)
             t_1
             (if (<= (* z t) 5e-55)
               (/ x y)
               (if (<= (* z t) 5e+76)
                 t_1
                 (if (<= (* z t) 2e+200) (/ x y) t_2))))))))))
assert(z < t);
double code(double x, double y, double z, double t) {
	double t_1 = -x / (z * t);
	double t_2 = -((x / t) / z);
	double tmp;
	if ((z * t) <= -1e+54) {
		tmp = t_2;
	} else if ((z * t) <= -2e-34) {
		tmp = x / y;
	} else if ((z * t) <= -1e-61) {
		tmp = t_1;
	} else if ((z * t) <= 5e-141) {
		tmp = x / y;
	} else if ((z * t) <= 5e-85) {
		tmp = t_1;
	} else if ((z * t) <= 5e-55) {
		tmp = x / y;
	} else if ((z * t) <= 5e+76) {
		tmp = t_1;
	} else if ((z * t) <= 2e+200) {
		tmp = x / y;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: 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) :: t_2
    real(8) :: tmp
    t_1 = -x / (z * t)
    t_2 = -((x / t) / z)
    if ((z * t) <= (-1d+54)) then
        tmp = t_2
    else if ((z * t) <= (-2d-34)) then
        tmp = x / y
    else if ((z * t) <= (-1d-61)) then
        tmp = t_1
    else if ((z * t) <= 5d-141) then
        tmp = x / y
    else if ((z * t) <= 5d-85) then
        tmp = t_1
    else if ((z * t) <= 5d-55) then
        tmp = x / y
    else if ((z * t) <= 5d+76) then
        tmp = t_1
    else if ((z * t) <= 2d+200) then
        tmp = x / y
    else
        tmp = t_2
    end if
    code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = -x / (z * t);
	double t_2 = -((x / t) / z);
	double tmp;
	if ((z * t) <= -1e+54) {
		tmp = t_2;
	} else if ((z * t) <= -2e-34) {
		tmp = x / y;
	} else if ((z * t) <= -1e-61) {
		tmp = t_1;
	} else if ((z * t) <= 5e-141) {
		tmp = x / y;
	} else if ((z * t) <= 5e-85) {
		tmp = t_1;
	} else if ((z * t) <= 5e-55) {
		tmp = x / y;
	} else if ((z * t) <= 5e+76) {
		tmp = t_1;
	} else if ((z * t) <= 2e+200) {
		tmp = x / y;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t):
	t_1 = -x / (z * t)
	t_2 = -((x / t) / z)
	tmp = 0
	if (z * t) <= -1e+54:
		tmp = t_2
	elif (z * t) <= -2e-34:
		tmp = x / y
	elif (z * t) <= -1e-61:
		tmp = t_1
	elif (z * t) <= 5e-141:
		tmp = x / y
	elif (z * t) <= 5e-85:
		tmp = t_1
	elif (z * t) <= 5e-55:
		tmp = x / y
	elif (z * t) <= 5e+76:
		tmp = t_1
	elif (z * t) <= 2e+200:
		tmp = x / y
	else:
		tmp = t_2
	return tmp
z, t = sort([z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(-x) / Float64(z * t))
	t_2 = Float64(-Float64(Float64(x / t) / z))
	tmp = 0.0
	if (Float64(z * t) <= -1e+54)
		tmp = t_2;
	elseif (Float64(z * t) <= -2e-34)
		tmp = Float64(x / y);
	elseif (Float64(z * t) <= -1e-61)
		tmp = t_1;
	elseif (Float64(z * t) <= 5e-141)
		tmp = Float64(x / y);
	elseif (Float64(z * t) <= 5e-85)
		tmp = t_1;
	elseif (Float64(z * t) <= 5e-55)
		tmp = Float64(x / y);
	elseif (Float64(z * t) <= 5e+76)
		tmp = t_1;
	elseif (Float64(z * t) <= 2e+200)
		tmp = Float64(x / y);
	else
		tmp = t_2;
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = -x / (z * t);
	t_2 = -((x / t) / z);
	tmp = 0.0;
	if ((z * t) <= -1e+54)
		tmp = t_2;
	elseif ((z * t) <= -2e-34)
		tmp = x / y;
	elseif ((z * t) <= -1e-61)
		tmp = t_1;
	elseif ((z * t) <= 5e-141)
		tmp = x / y;
	elseif ((z * t) <= 5e-85)
		tmp = t_1;
	elseif ((z * t) <= 5e-55)
		tmp = x / y;
	elseif ((z * t) <= 5e+76)
		tmp = t_1;
	elseif ((z * t) <= 2e+200)
		tmp = x / y;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: 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 * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = (-N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision])}, If[LessEqual[N[(z * t), $MachinePrecision], -1e+54], t$95$2, If[LessEqual[N[(z * t), $MachinePrecision], -2e-34], N[(x / y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], -1e-61], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 5e-141], N[(x / y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 5e-85], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 5e-55], N[(x / y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 5e+76], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 2e+200], N[(x / y), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := \frac{-x}{z \cdot t}\\
t_2 := -\frac{\frac{x}{t}}{z}\\
\mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+54}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-61}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-85}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+76}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 z t) < -1.0000000000000001e54 or 1.9999999999999999e200 < (*.f64 z t)

    1. Initial program 86.5%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around 0 81.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    3. Step-by-step derivation
      1. mul-1-neg81.3%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{t}}{z}} \]
      3. distribute-neg-frac90.6%

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

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

    if -1.0000000000000001e54 < (*.f64 z t) < -1.99999999999999986e-34 or -1e-61 < (*.f64 z t) < 4.9999999999999999e-141 or 5.0000000000000002e-85 < (*.f64 z t) < 5.0000000000000002e-55 or 4.99999999999999991e76 < (*.f64 z t) < 1.9999999999999999e200

    1. Initial program 99.9%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around inf 84.2%

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

    if -1.99999999999999986e-34 < (*.f64 z t) < -1e-61 or 4.9999999999999999e-141 < (*.f64 z t) < 5.0000000000000002e-85 or 5.0000000000000002e-55 < (*.f64 z t) < 4.99999999999999991e76

    1. Initial program 99.7%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around 0 67.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+54}:\\ \;\;\;\;-\frac{\frac{x}{t}}{z}\\ \mathbf{elif}\;z \cdot t \leq -2 \cdot 10^{-34}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-61}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-141}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-85}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-55}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+76}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+200}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\frac{x}{t}}{z}\\ \end{array} \]

Alternative 3: 73.8% accurate, 0.2× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} t_1 := \frac{-x}{z \cdot t}\\ t_2 := \frac{\frac{x}{z}}{-t}\\ \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+64}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \cdot t \leq -2 \cdot 10^{-34}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-141}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-85}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-55}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+200}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\frac{x}{t}}{z}\\ \end{array} \end{array} \]
NOTE: 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 t))) (t_2 (/ (/ x z) (- t))))
   (if (<= (* z t) -2e+64)
     t_2
     (if (<= (* z t) -2e-34)
       (/ x y)
       (if (<= (* z t) -1e-61)
         t_1
         (if (<= (* z t) 5e-141)
           (/ x y)
           (if (<= (* z t) 5e-85)
             t_2
             (if (<= (* z t) 5e-55)
               (/ x y)
               (if (<= (* z t) 5e+76)
                 t_1
                 (if (<= (* z t) 2e+200) (/ x y) (- (/ (/ x t) z))))))))))))
assert(z < t);
double code(double x, double y, double z, double t) {
	double t_1 = -x / (z * t);
	double t_2 = (x / z) / -t;
	double tmp;
	if ((z * t) <= -2e+64) {
		tmp = t_2;
	} else if ((z * t) <= -2e-34) {
		tmp = x / y;
	} else if ((z * t) <= -1e-61) {
		tmp = t_1;
	} else if ((z * t) <= 5e-141) {
		tmp = x / y;
	} else if ((z * t) <= 5e-85) {
		tmp = t_2;
	} else if ((z * t) <= 5e-55) {
		tmp = x / y;
	} else if ((z * t) <= 5e+76) {
		tmp = t_1;
	} else if ((z * t) <= 2e+200) {
		tmp = x / y;
	} else {
		tmp = -((x / t) / z);
	}
	return tmp;
}
NOTE: 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) :: t_2
    real(8) :: tmp
    t_1 = -x / (z * t)
    t_2 = (x / z) / -t
    if ((z * t) <= (-2d+64)) then
        tmp = t_2
    else if ((z * t) <= (-2d-34)) then
        tmp = x / y
    else if ((z * t) <= (-1d-61)) then
        tmp = t_1
    else if ((z * t) <= 5d-141) then
        tmp = x / y
    else if ((z * t) <= 5d-85) then
        tmp = t_2
    else if ((z * t) <= 5d-55) then
        tmp = x / y
    else if ((z * t) <= 5d+76) then
        tmp = t_1
    else if ((z * t) <= 2d+200) then
        tmp = x / y
    else
        tmp = -((x / t) / z)
    end if
    code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = -x / (z * t);
	double t_2 = (x / z) / -t;
	double tmp;
	if ((z * t) <= -2e+64) {
		tmp = t_2;
	} else if ((z * t) <= -2e-34) {
		tmp = x / y;
	} else if ((z * t) <= -1e-61) {
		tmp = t_1;
	} else if ((z * t) <= 5e-141) {
		tmp = x / y;
	} else if ((z * t) <= 5e-85) {
		tmp = t_2;
	} else if ((z * t) <= 5e-55) {
		tmp = x / y;
	} else if ((z * t) <= 5e+76) {
		tmp = t_1;
	} else if ((z * t) <= 2e+200) {
		tmp = x / y;
	} else {
		tmp = -((x / t) / z);
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t):
	t_1 = -x / (z * t)
	t_2 = (x / z) / -t
	tmp = 0
	if (z * t) <= -2e+64:
		tmp = t_2
	elif (z * t) <= -2e-34:
		tmp = x / y
	elif (z * t) <= -1e-61:
		tmp = t_1
	elif (z * t) <= 5e-141:
		tmp = x / y
	elif (z * t) <= 5e-85:
		tmp = t_2
	elif (z * t) <= 5e-55:
		tmp = x / y
	elif (z * t) <= 5e+76:
		tmp = t_1
	elif (z * t) <= 2e+200:
		tmp = x / y
	else:
		tmp = -((x / t) / z)
	return tmp
z, t = sort([z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(-x) / Float64(z * t))
	t_2 = Float64(Float64(x / z) / Float64(-t))
	tmp = 0.0
	if (Float64(z * t) <= -2e+64)
		tmp = t_2;
	elseif (Float64(z * t) <= -2e-34)
		tmp = Float64(x / y);
	elseif (Float64(z * t) <= -1e-61)
		tmp = t_1;
	elseif (Float64(z * t) <= 5e-141)
		tmp = Float64(x / y);
	elseif (Float64(z * t) <= 5e-85)
		tmp = t_2;
	elseif (Float64(z * t) <= 5e-55)
		tmp = Float64(x / y);
	elseif (Float64(z * t) <= 5e+76)
		tmp = t_1;
	elseif (Float64(z * t) <= 2e+200)
		tmp = Float64(x / y);
	else
		tmp = Float64(-Float64(Float64(x / t) / z));
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = -x / (z * t);
	t_2 = (x / z) / -t;
	tmp = 0.0;
	if ((z * t) <= -2e+64)
		tmp = t_2;
	elseif ((z * t) <= -2e-34)
		tmp = x / y;
	elseif ((z * t) <= -1e-61)
		tmp = t_1;
	elseif ((z * t) <= 5e-141)
		tmp = x / y;
	elseif ((z * t) <= 5e-85)
		tmp = t_2;
	elseif ((z * t) <= 5e-55)
		tmp = x / y;
	elseif ((z * t) <= 5e+76)
		tmp = t_1;
	elseif ((z * t) <= 2e+200)
		tmp = x / y;
	else
		tmp = -((x / t) / z);
	end
	tmp_2 = tmp;
end
NOTE: 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 * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / z), $MachinePrecision] / (-t)), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -2e+64], t$95$2, If[LessEqual[N[(z * t), $MachinePrecision], -2e-34], N[(x / y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], -1e-61], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 5e-141], N[(x / y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 5e-85], t$95$2, If[LessEqual[N[(z * t), $MachinePrecision], 5e-55], N[(x / y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 5e+76], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 2e+200], N[(x / y), $MachinePrecision], (-N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision])]]]]]]]]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := \frac{-x}{z \cdot t}\\
t_2 := \frac{\frac{x}{z}}{-t}\\
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+64}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-61}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-85}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+76}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 z t) < -2.00000000000000004e64 or 4.9999999999999999e-141 < (*.f64 z t) < 5.0000000000000002e-85

    1. Initial program 91.5%

      \[\frac{x}{y - z \cdot t} \]
    2. Step-by-step derivation
      1. *-un-lft-identity91.5%

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

        \[\leadsto \frac{x}{\color{blue}{y \cdot 1} - z \cdot t} \]
      3. add-sqr-sqrt51.6%

        \[\leadsto \frac{x}{y \cdot 1 - z \cdot \color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)}} \]
      4. sqrt-unprod61.3%

        \[\leadsto \frac{x}{y \cdot 1 - z \cdot \color{blue}{\sqrt{t \cdot t}}} \]
      5. sqr-neg61.3%

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

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

        \[\leadsto \frac{x}{y \cdot 1 - z \cdot \color{blue}{\left(-t\right)}} \]
      8. distribute-rgt-neg-in40.8%

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

        \[\leadsto \frac{x}{y \cdot 1 - \color{blue}{-1 \cdot \left(z \cdot t\right)}} \]
      10. add-sqr-sqrt26.0%

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

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

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

        \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \left(z \cdot \color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)}\right)} \]
      14. add-sqr-sqrt91.5%

        \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \left(z \cdot \color{blue}{\left(-t\right)}\right)} \]
      15. distribute-rgt-neg-in91.5%

        \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \color{blue}{\left(-z \cdot t\right)}} \]
      16. prod-diff73.3%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(y, 1, -\left(-z \cdot t\right) \cdot -1\right) + \mathsf{fma}\left(-\left(-z \cdot t\right), -1, \left(-z \cdot t\right) \cdot -1\right)}} \]
    3. Applied egg-rr73.3%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(y, 1, -\left(z \cdot t\right) \cdot -1\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)}} \]
    4. Step-by-step derivation
      1. fma-udef73.3%

        \[\leadsto \frac{x}{\color{blue}{\left(y \cdot 1 + \left(-\left(z \cdot t\right) \cdot -1\right)\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      2. distribute-rgt-neg-in73.3%

        \[\leadsto \frac{x}{\left(y \cdot 1 + \color{blue}{\left(z \cdot t\right) \cdot \left(--1\right)}\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      3. metadata-eval73.3%

        \[\leadsto \frac{x}{\left(y \cdot 1 + \left(z \cdot t\right) \cdot \color{blue}{1}\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      4. distribute-rgt-in73.3%

        \[\leadsto \frac{x}{\color{blue}{1 \cdot \left(y + z \cdot t\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      5. +-commutative73.3%

        \[\leadsto \frac{x}{1 \cdot \color{blue}{\left(z \cdot t + y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      6. fma-def73.3%

        \[\leadsto \frac{x}{1 \cdot \color{blue}{\mathsf{fma}\left(z, t, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      7. *-lft-identity73.3%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(z, t, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      8. fma-def73.3%

        \[\leadsto \frac{x}{\color{blue}{\left(z \cdot t + y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      9. *-commutative73.3%

        \[\leadsto \frac{x}{\left(\color{blue}{t \cdot z} + y\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      10. fma-def73.3%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      11. fma-udef73.3%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(\left(z \cdot t\right) \cdot -1 + \left(z \cdot t\right) \cdot -1\right)}} \]
      12. distribute-lft-out73.3%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(z \cdot t\right) \cdot \left(-1 + -1\right)}} \]
      13. *-commutative73.3%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(t \cdot z\right)} \cdot \left(-1 + -1\right)} \]
      14. metadata-eval73.3%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot \color{blue}{-2}} \]
    5. Simplified73.3%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot -2}} \]
    6. Step-by-step derivation
      1. +-commutative73.3%

        \[\leadsto \frac{x}{\color{blue}{\left(t \cdot z\right) \cdot -2 + \mathsf{fma}\left(t, z, y\right)}} \]
      2. associate-*l*73.3%

        \[\leadsto \frac{x}{\color{blue}{t \cdot \left(z \cdot -2\right)} + \mathsf{fma}\left(t, z, y\right)} \]
      3. fma-def91.4%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(t, z, y\right)\right)}} \]
    7. Applied egg-rr91.4%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(t, z, y\right)\right)}} \]
    8. Taylor expanded in t around inf 83.8%

      \[\leadsto \color{blue}{\frac{x}{t \cdot \left(z + -2 \cdot z\right)}} \]
    9. Step-by-step derivation
      1. distribute-rgt-in65.6%

        \[\leadsto \frac{x}{\color{blue}{z \cdot t + \left(-2 \cdot z\right) \cdot t}} \]
      2. *-commutative65.6%

        \[\leadsto \frac{x}{z \cdot t + \color{blue}{\left(z \cdot -2\right)} \cdot t} \]
      3. associate-*l*65.6%

        \[\leadsto \frac{x}{z \cdot t + \color{blue}{z \cdot \left(-2 \cdot t\right)}} \]
      4. distribute-lft-in83.8%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{t + -2 \cdot t}} \]
      6. distribute-rgt1-in91.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-2 + 1\right) \cdot t}} \]
      7. metadata-eval91.1%

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

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

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

    if -2.00000000000000004e64 < (*.f64 z t) < -1.99999999999999986e-34 or -1e-61 < (*.f64 z t) < 4.9999999999999999e-141 or 5.0000000000000002e-85 < (*.f64 z t) < 5.0000000000000002e-55 or 4.99999999999999991e76 < (*.f64 z t) < 1.9999999999999999e200

    1. Initial program 99.9%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around inf 83.8%

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

    if -1.99999999999999986e-34 < (*.f64 z t) < -1e-61 or 5.0000000000000002e-55 < (*.f64 z t) < 4.99999999999999991e76

    1. Initial program 99.7%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around 0 64.1%

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

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

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

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

    if 1.9999999999999999e200 < (*.f64 z t)

    1. Initial program 80.0%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around 0 80.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    3. Step-by-step derivation
      1. mul-1-neg80.0%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{t}}{z}} \]
      3. distribute-neg-frac99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+64}:\\ \;\;\;\;\frac{\frac{x}{z}}{-t}\\ \mathbf{elif}\;z \cdot t \leq -2 \cdot 10^{-34}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-61}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-141}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-85}:\\ \;\;\;\;\frac{\frac{x}{z}}{-t}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-55}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+76}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+200}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\frac{x}{t}}{z}\\ \end{array} \]

Alternative 4: 73.8% accurate, 0.2× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} t_1 := \frac{\frac{x}{z}}{-t}\\ \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \cdot t \leq -2 \cdot 10^{-34}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-61}:\\ \;\;\;\;x \cdot \frac{\frac{-1}{t}}{z}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-141}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-55}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+76}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+200}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\frac{x}{t}}{z}\\ \end{array} \end{array} \]
NOTE: 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) (- t))))
   (if (<= (* z t) -2e+64)
     t_1
     (if (<= (* z t) -2e-34)
       (/ x y)
       (if (<= (* z t) -1e-61)
         (* x (/ (/ -1.0 t) z))
         (if (<= (* z t) 5e-141)
           (/ x y)
           (if (<= (* z t) 5e-85)
             t_1
             (if (<= (* z t) 5e-55)
               (/ x y)
               (if (<= (* z t) 5e+76)
                 (/ (- x) (* z t))
                 (if (<= (* z t) 2e+200) (/ x y) (- (/ (/ x t) z))))))))))))
assert(z < t);
double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / -t;
	double tmp;
	if ((z * t) <= -2e+64) {
		tmp = t_1;
	} else if ((z * t) <= -2e-34) {
		tmp = x / y;
	} else if ((z * t) <= -1e-61) {
		tmp = x * ((-1.0 / t) / z);
	} else if ((z * t) <= 5e-141) {
		tmp = x / y;
	} else if ((z * t) <= 5e-85) {
		tmp = t_1;
	} else if ((z * t) <= 5e-55) {
		tmp = x / y;
	} else if ((z * t) <= 5e+76) {
		tmp = -x / (z * t);
	} else if ((z * t) <= 2e+200) {
		tmp = x / y;
	} else {
		tmp = -((x / t) / z);
	}
	return tmp;
}
NOTE: 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) / -t
    if ((z * t) <= (-2d+64)) then
        tmp = t_1
    else if ((z * t) <= (-2d-34)) then
        tmp = x / y
    else if ((z * t) <= (-1d-61)) then
        tmp = x * (((-1.0d0) / t) / z)
    else if ((z * t) <= 5d-141) then
        tmp = x / y
    else if ((z * t) <= 5d-85) then
        tmp = t_1
    else if ((z * t) <= 5d-55) then
        tmp = x / y
    else if ((z * t) <= 5d+76) then
        tmp = -x / (z * t)
    else if ((z * t) <= 2d+200) then
        tmp = x / y
    else
        tmp = -((x / t) / z)
    end if
    code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = (x / z) / -t;
	double tmp;
	if ((z * t) <= -2e+64) {
		tmp = t_1;
	} else if ((z * t) <= -2e-34) {
		tmp = x / y;
	} else if ((z * t) <= -1e-61) {
		tmp = x * ((-1.0 / t) / z);
	} else if ((z * t) <= 5e-141) {
		tmp = x / y;
	} else if ((z * t) <= 5e-85) {
		tmp = t_1;
	} else if ((z * t) <= 5e-55) {
		tmp = x / y;
	} else if ((z * t) <= 5e+76) {
		tmp = -x / (z * t);
	} else if ((z * t) <= 2e+200) {
		tmp = x / y;
	} else {
		tmp = -((x / t) / z);
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t):
	t_1 = (x / z) / -t
	tmp = 0
	if (z * t) <= -2e+64:
		tmp = t_1
	elif (z * t) <= -2e-34:
		tmp = x / y
	elif (z * t) <= -1e-61:
		tmp = x * ((-1.0 / t) / z)
	elif (z * t) <= 5e-141:
		tmp = x / y
	elif (z * t) <= 5e-85:
		tmp = t_1
	elif (z * t) <= 5e-55:
		tmp = x / y
	elif (z * t) <= 5e+76:
		tmp = -x / (z * t)
	elif (z * t) <= 2e+200:
		tmp = x / y
	else:
		tmp = -((x / t) / z)
	return tmp
z, t = sort([z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) / Float64(-t))
	tmp = 0.0
	if (Float64(z * t) <= -2e+64)
		tmp = t_1;
	elseif (Float64(z * t) <= -2e-34)
		tmp = Float64(x / y);
	elseif (Float64(z * t) <= -1e-61)
		tmp = Float64(x * Float64(Float64(-1.0 / t) / z));
	elseif (Float64(z * t) <= 5e-141)
		tmp = Float64(x / y);
	elseif (Float64(z * t) <= 5e-85)
		tmp = t_1;
	elseif (Float64(z * t) <= 5e-55)
		tmp = Float64(x / y);
	elseif (Float64(z * t) <= 5e+76)
		tmp = Float64(Float64(-x) / Float64(z * t));
	elseif (Float64(z * t) <= 2e+200)
		tmp = Float64(x / y);
	else
		tmp = Float64(-Float64(Float64(x / t) / z));
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = (x / z) / -t;
	tmp = 0.0;
	if ((z * t) <= -2e+64)
		tmp = t_1;
	elseif ((z * t) <= -2e-34)
		tmp = x / y;
	elseif ((z * t) <= -1e-61)
		tmp = x * ((-1.0 / t) / z);
	elseif ((z * t) <= 5e-141)
		tmp = x / y;
	elseif ((z * t) <= 5e-85)
		tmp = t_1;
	elseif ((z * t) <= 5e-55)
		tmp = x / y;
	elseif ((z * t) <= 5e+76)
		tmp = -x / (z * t);
	elseif ((z * t) <= 2e+200)
		tmp = x / y;
	else
		tmp = -((x / t) / z);
	end
	tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] / (-t)), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -2e+64], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], -2e-34], N[(x / y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], -1e-61], N[(x * N[(N[(-1.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 5e-141], N[(x / y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 5e-85], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 5e-55], N[(x / y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 5e+76], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 2e+200], N[(x / y), $MachinePrecision], (-N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision])]]]]]]]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{x}{z}}{-t}\\
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+64}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-85}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+76}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 z t) < -2.00000000000000004e64 or 4.9999999999999999e-141 < (*.f64 z t) < 5.0000000000000002e-85

    1. Initial program 91.5%

      \[\frac{x}{y - z \cdot t} \]
    2. Step-by-step derivation
      1. *-un-lft-identity91.5%

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

        \[\leadsto \frac{x}{\color{blue}{y \cdot 1} - z \cdot t} \]
      3. add-sqr-sqrt51.6%

        \[\leadsto \frac{x}{y \cdot 1 - z \cdot \color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)}} \]
      4. sqrt-unprod61.3%

        \[\leadsto \frac{x}{y \cdot 1 - z \cdot \color{blue}{\sqrt{t \cdot t}}} \]
      5. sqr-neg61.3%

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

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

        \[\leadsto \frac{x}{y \cdot 1 - z \cdot \color{blue}{\left(-t\right)}} \]
      8. distribute-rgt-neg-in40.8%

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

        \[\leadsto \frac{x}{y \cdot 1 - \color{blue}{-1 \cdot \left(z \cdot t\right)}} \]
      10. add-sqr-sqrt26.0%

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

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

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

        \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \left(z \cdot \color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)}\right)} \]
      14. add-sqr-sqrt91.5%

        \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \left(z \cdot \color{blue}{\left(-t\right)}\right)} \]
      15. distribute-rgt-neg-in91.5%

        \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \color{blue}{\left(-z \cdot t\right)}} \]
      16. prod-diff73.3%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(y, 1, -\left(-z \cdot t\right) \cdot -1\right) + \mathsf{fma}\left(-\left(-z \cdot t\right), -1, \left(-z \cdot t\right) \cdot -1\right)}} \]
    3. Applied egg-rr73.3%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(y, 1, -\left(z \cdot t\right) \cdot -1\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)}} \]
    4. Step-by-step derivation
      1. fma-udef73.3%

        \[\leadsto \frac{x}{\color{blue}{\left(y \cdot 1 + \left(-\left(z \cdot t\right) \cdot -1\right)\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      2. distribute-rgt-neg-in73.3%

        \[\leadsto \frac{x}{\left(y \cdot 1 + \color{blue}{\left(z \cdot t\right) \cdot \left(--1\right)}\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      3. metadata-eval73.3%

        \[\leadsto \frac{x}{\left(y \cdot 1 + \left(z \cdot t\right) \cdot \color{blue}{1}\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      4. distribute-rgt-in73.3%

        \[\leadsto \frac{x}{\color{blue}{1 \cdot \left(y + z \cdot t\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      5. +-commutative73.3%

        \[\leadsto \frac{x}{1 \cdot \color{blue}{\left(z \cdot t + y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      6. fma-def73.3%

        \[\leadsto \frac{x}{1 \cdot \color{blue}{\mathsf{fma}\left(z, t, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      7. *-lft-identity73.3%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(z, t, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      8. fma-def73.3%

        \[\leadsto \frac{x}{\color{blue}{\left(z \cdot t + y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      9. *-commutative73.3%

        \[\leadsto \frac{x}{\left(\color{blue}{t \cdot z} + y\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      10. fma-def73.3%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      11. fma-udef73.3%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(\left(z \cdot t\right) \cdot -1 + \left(z \cdot t\right) \cdot -1\right)}} \]
      12. distribute-lft-out73.3%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(z \cdot t\right) \cdot \left(-1 + -1\right)}} \]
      13. *-commutative73.3%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(t \cdot z\right)} \cdot \left(-1 + -1\right)} \]
      14. metadata-eval73.3%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot \color{blue}{-2}} \]
    5. Simplified73.3%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot -2}} \]
    6. Step-by-step derivation
      1. +-commutative73.3%

        \[\leadsto \frac{x}{\color{blue}{\left(t \cdot z\right) \cdot -2 + \mathsf{fma}\left(t, z, y\right)}} \]
      2. associate-*l*73.3%

        \[\leadsto \frac{x}{\color{blue}{t \cdot \left(z \cdot -2\right)} + \mathsf{fma}\left(t, z, y\right)} \]
      3. fma-def91.4%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(t, z, y\right)\right)}} \]
    7. Applied egg-rr91.4%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(t, z, y\right)\right)}} \]
    8. Taylor expanded in t around inf 83.8%

      \[\leadsto \color{blue}{\frac{x}{t \cdot \left(z + -2 \cdot z\right)}} \]
    9. Step-by-step derivation
      1. distribute-rgt-in65.6%

        \[\leadsto \frac{x}{\color{blue}{z \cdot t + \left(-2 \cdot z\right) \cdot t}} \]
      2. *-commutative65.6%

        \[\leadsto \frac{x}{z \cdot t + \color{blue}{\left(z \cdot -2\right)} \cdot t} \]
      3. associate-*l*65.6%

        \[\leadsto \frac{x}{z \cdot t + \color{blue}{z \cdot \left(-2 \cdot t\right)}} \]
      4. distribute-lft-in83.8%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{z}}{t + -2 \cdot t}} \]
      6. distribute-rgt1-in91.1%

        \[\leadsto \frac{\frac{x}{z}}{\color{blue}{\left(-2 + 1\right) \cdot t}} \]
      7. metadata-eval91.1%

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

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

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

    if -2.00000000000000004e64 < (*.f64 z t) < -1.99999999999999986e-34 or -1e-61 < (*.f64 z t) < 4.9999999999999999e-141 or 5.0000000000000002e-85 < (*.f64 z t) < 5.0000000000000002e-55 or 4.99999999999999991e76 < (*.f64 z t) < 1.9999999999999999e200

    1. Initial program 99.9%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around inf 83.8%

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

    if -1.99999999999999986e-34 < (*.f64 z t) < -1e-61

    1. Initial program 99.8%

      \[\frac{x}{y - z \cdot t} \]
    2. Step-by-step derivation
      1. *-un-lft-identity99.8%

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

        \[\leadsto \frac{x}{\color{blue}{y \cdot 1} - z \cdot t} \]
      3. add-sqr-sqrt42.6%

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

        \[\leadsto \frac{x}{y \cdot 1 - z \cdot \color{blue}{\sqrt{t \cdot t}}} \]
      5. sqr-neg18.8%

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

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

        \[\leadsto \frac{x}{y \cdot 1 - z \cdot \color{blue}{\left(-t\right)}} \]
      8. distribute-rgt-neg-in16.1%

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

        \[\leadsto \frac{x}{y \cdot 1 - \color{blue}{-1 \cdot \left(z \cdot t\right)}} \]
      10. add-sqr-sqrt14.7%

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

        \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \left(z \cdot \color{blue}{\sqrt{t \cdot t}}\right)} \]
      12. sqr-neg32.5%

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

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

        \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \left(z \cdot \color{blue}{\left(-t\right)}\right)} \]
      15. distribute-rgt-neg-in99.8%

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

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(y, 1, -\left(-z \cdot t\right) \cdot -1\right) + \mathsf{fma}\left(-\left(-z \cdot t\right), -1, \left(-z \cdot t\right) \cdot -1\right)}} \]
    3. Applied egg-rr99.8%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(y, 1, -\left(z \cdot t\right) \cdot -1\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)}} \]
    4. Step-by-step derivation
      1. fma-udef99.8%

        \[\leadsto \frac{x}{\color{blue}{\left(y \cdot 1 + \left(-\left(z \cdot t\right) \cdot -1\right)\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      2. distribute-rgt-neg-in99.8%

        \[\leadsto \frac{x}{\left(y \cdot 1 + \color{blue}{\left(z \cdot t\right) \cdot \left(--1\right)}\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      3. metadata-eval99.8%

        \[\leadsto \frac{x}{\left(y \cdot 1 + \left(z \cdot t\right) \cdot \color{blue}{1}\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      4. distribute-rgt-in99.8%

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

        \[\leadsto \frac{x}{1 \cdot \color{blue}{\left(z \cdot t + y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      6. fma-def99.8%

        \[\leadsto \frac{x}{1 \cdot \color{blue}{\mathsf{fma}\left(z, t, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      7. *-lft-identity99.8%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(z, t, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      8. fma-def99.8%

        \[\leadsto \frac{x}{\color{blue}{\left(z \cdot t + y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      9. *-commutative99.8%

        \[\leadsto \frac{x}{\left(\color{blue}{t \cdot z} + y\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      10. fma-def99.8%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      11. fma-udef99.8%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(\left(z \cdot t\right) \cdot -1 + \left(z \cdot t\right) \cdot -1\right)}} \]
      12. distribute-lft-out99.8%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(z \cdot t\right) \cdot \left(-1 + -1\right)}} \]
      13. *-commutative99.8%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(t \cdot z\right)} \cdot \left(-1 + -1\right)} \]
      14. metadata-eval99.8%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot \color{blue}{-2}} \]
    5. Simplified99.8%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot -2}} \]
    6. Step-by-step derivation
      1. +-commutative99.8%

        \[\leadsto \frac{x}{\color{blue}{\left(t \cdot z\right) \cdot -2 + \mathsf{fma}\left(t, z, y\right)}} \]
      2. associate-*l*99.8%

        \[\leadsto \frac{x}{\color{blue}{t \cdot \left(z \cdot -2\right)} + \mathsf{fma}\left(t, z, y\right)} \]
      3. fma-def99.8%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(t, z, y\right)\right)}} \]
    7. Applied egg-rr99.8%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(t, z, y\right)\right)}} \]
    8. Step-by-step derivation
      1. clear-num99.6%

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

        \[\leadsto \color{blue}{\frac{1}{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(t, z, y\right)\right)} \cdot x} \]
      3. fma-udef99.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(t, z \cdot -2, \color{blue}{t \cdot z + y}\right)} \cdot x \]
      4. *-commutative99.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(t, z \cdot -2, \color{blue}{z \cdot t} + y\right)} \cdot x \]
      5. fma-def99.3%

        \[\leadsto \frac{1}{\mathsf{fma}\left(t, z \cdot -2, \color{blue}{\mathsf{fma}\left(z, t, y\right)}\right)} \cdot x \]
    9. Applied egg-rr99.3%

      \[\leadsto \color{blue}{\frac{1}{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(z, t, y\right)\right)} \cdot x} \]
    10. Taylor expanded in t around -inf 77.2%

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

        \[\leadsto \color{blue}{\frac{\frac{-1}{t}}{-1 \cdot z + 2 \cdot z}} \cdot x \]
      2. distribute-rgt-out76.6%

        \[\leadsto \frac{\frac{-1}{t}}{\color{blue}{z \cdot \left(-1 + 2\right)}} \cdot x \]
      3. metadata-eval76.6%

        \[\leadsto \frac{\frac{-1}{t}}{z \cdot \color{blue}{1}} \cdot x \]
      4. *-rgt-identity76.6%

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

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

    if 5.0000000000000002e-55 < (*.f64 z t) < 4.99999999999999991e76

    1. Initial program 99.6%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around 0 61.2%

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

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

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

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

    if 1.9999999999999999e200 < (*.f64 z t)

    1. Initial program 80.0%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around 0 80.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{t \cdot z}} \]
    3. Step-by-step derivation
      1. mul-1-neg80.0%

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{t}}{z}} \]
      3. distribute-neg-frac99.9%

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

      \[\leadsto \color{blue}{\frac{-\frac{x}{t}}{z}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification84.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+64}:\\ \;\;\;\;\frac{\frac{x}{z}}{-t}\\ \mathbf{elif}\;z \cdot t \leq -2 \cdot 10^{-34}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq -1 \cdot 10^{-61}:\\ \;\;\;\;x \cdot \frac{\frac{-1}{t}}{z}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-141}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-85}:\\ \;\;\;\;\frac{\frac{x}{z}}{-t}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{-55}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+76}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+200}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\frac{x}{t}}{z}\\ \end{array} \]

Alternative 5: 99.6% accurate, 0.5× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -\infty \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+200}\right):\\ \;\;\;\;-\frac{\frac{x}{t}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y - z \cdot t}\\ \end{array} \end{array} \]
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (if (or (<= (* z t) (- INFINITY)) (not (<= (* z t) 2e+200)))
   (- (/ (/ x t) z))
   (/ x (- y (* z t)))))
assert(z < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (((z * t) <= -((double) INFINITY)) || !((z * t) <= 2e+200)) {
		tmp = -((x / t) / z);
	} else {
		tmp = x / (y - (z * t));
	}
	return tmp;
}
assert z < t;
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (((z * t) <= -Double.POSITIVE_INFINITY) || !((z * t) <= 2e+200)) {
		tmp = -((x / t) / z);
	} else {
		tmp = x / (y - (z * t));
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t):
	tmp = 0
	if ((z * t) <= -math.inf) or not ((z * t) <= 2e+200):
		tmp = -((x / t) / z)
	else:
		tmp = x / (y - (z * t))
	return tmp
z, t = sort([z, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((Float64(z * t) <= Float64(-Inf)) || !(Float64(z * t) <= 2e+200))
		tmp = Float64(-Float64(Float64(x / t) / z));
	else
		tmp = Float64(x / Float64(y - Float64(z * t)));
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (((z * t) <= -Inf) || ~(((z * t) <= 2e+200)))
		tmp = -((x / t) / z);
	else
		tmp = x / (y - (z * t));
	end
	tmp_2 = tmp;
end
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], (-Infinity)], N[Not[LessEqual[N[(z * t), $MachinePrecision], 2e+200]], $MachinePrecision]], (-N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), N[(x / N[(y - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -\infty \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+200}\right):\\
\;\;\;\;-\frac{\frac{x}{t}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z t) < -inf.0 or 1.9999999999999999e200 < (*.f64 z t)

    1. Initial program 76.4%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around 0 76.4%

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

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

        \[\leadsto -\color{blue}{\frac{\frac{x}{t}}{z}} \]
      3. distribute-neg-frac99.8%

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

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

    if -inf.0 < (*.f64 z t) < 1.9999999999999999e200

    1. Initial program 99.8%

      \[\frac{x}{y - z \cdot t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot t \leq -\infty \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+200}\right):\\ \;\;\;\;-\frac{\frac{x}{t}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y - z \cdot t}\\ \end{array} \]

Alternative 6: 72.0% accurate, 0.5× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} t_1 := \frac{-x}{z \cdot t}\\ \mathbf{if}\;y \leq -5.2 \cdot 10^{+85}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{+21}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{-37}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;y \leq 1060000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{y}{x}}\\ \end{array} \end{array} \]
NOTE: 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 t))))
   (if (<= y -5.2e+85)
     (/ x y)
     (if (<= y -1.65e+21)
       t_1
       (if (<= y -8.5e-37)
         (/ x y)
         (if (<= y 1060000000.0) t_1 (/ 1.0 (/ y x))))))))
assert(z < t);
double code(double x, double y, double z, double t) {
	double t_1 = -x / (z * t);
	double tmp;
	if (y <= -5.2e+85) {
		tmp = x / y;
	} else if (y <= -1.65e+21) {
		tmp = t_1;
	} else if (y <= -8.5e-37) {
		tmp = x / y;
	} else if (y <= 1060000000.0) {
		tmp = t_1;
	} else {
		tmp = 1.0 / (y / x);
	}
	return tmp;
}
NOTE: 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 * t)
    if (y <= (-5.2d+85)) then
        tmp = x / y
    else if (y <= (-1.65d+21)) then
        tmp = t_1
    else if (y <= (-8.5d-37)) then
        tmp = x / y
    else if (y <= 1060000000.0d0) then
        tmp = t_1
    else
        tmp = 1.0d0 / (y / x)
    end if
    code = tmp
end function
assert z < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = -x / (z * t);
	double tmp;
	if (y <= -5.2e+85) {
		tmp = x / y;
	} else if (y <= -1.65e+21) {
		tmp = t_1;
	} else if (y <= -8.5e-37) {
		tmp = x / y;
	} else if (y <= 1060000000.0) {
		tmp = t_1;
	} else {
		tmp = 1.0 / (y / x);
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t):
	t_1 = -x / (z * t)
	tmp = 0
	if y <= -5.2e+85:
		tmp = x / y
	elif y <= -1.65e+21:
		tmp = t_1
	elif y <= -8.5e-37:
		tmp = x / y
	elif y <= 1060000000.0:
		tmp = t_1
	else:
		tmp = 1.0 / (y / x)
	return tmp
z, t = sort([z, t])
function code(x, y, z, t)
	t_1 = Float64(Float64(-x) / Float64(z * t))
	tmp = 0.0
	if (y <= -5.2e+85)
		tmp = Float64(x / y);
	elseif (y <= -1.65e+21)
		tmp = t_1;
	elseif (y <= -8.5e-37)
		tmp = Float64(x / y);
	elseif (y <= 1060000000.0)
		tmp = t_1;
	else
		tmp = Float64(1.0 / Float64(y / x));
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = -x / (z * t);
	tmp = 0.0;
	if (y <= -5.2e+85)
		tmp = x / y;
	elseif (y <= -1.65e+21)
		tmp = t_1;
	elseif (y <= -8.5e-37)
		tmp = x / y;
	elseif (y <= 1060000000.0)
		tmp = t_1;
	else
		tmp = 1.0 / (y / x);
	end
	tmp_2 = tmp;
end
NOTE: 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 * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.2e+85], N[(x / y), $MachinePrecision], If[LessEqual[y, -1.65e+21], t$95$1, If[LessEqual[y, -8.5e-37], N[(x / y), $MachinePrecision], If[LessEqual[y, 1060000000.0], t$95$1, N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := \frac{-x}{z \cdot t}\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{+85}:\\
\;\;\;\;\frac{x}{y}\\

\mathbf{elif}\;y \leq -1.65 \cdot 10^{+21}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -8.5 \cdot 10^{-37}:\\
\;\;\;\;\frac{x}{y}\\

\mathbf{elif}\;y \leq 1060000000:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.20000000000000021e85 or -1.65e21 < y < -8.5000000000000007e-37

    1. Initial program 96.9%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around inf 80.1%

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

    if -5.20000000000000021e85 < y < -1.65e21 or -8.5000000000000007e-37 < y < 1.06e9

    1. Initial program 95.3%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around 0 71.4%

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

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

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

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

    if 1.06e9 < y

    1. Initial program 97.0%

      \[\frac{x}{y - z \cdot t} \]
    2. Step-by-step derivation
      1. *-un-lft-identity97.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{y \cdot 1 - \color{blue}{-1 \cdot \left(z \cdot t\right)}} \]
      10. add-sqr-sqrt33.8%

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

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

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

        \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \left(z \cdot \color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)}\right)} \]
      14. add-sqr-sqrt97.0%

        \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \left(z \cdot \color{blue}{\left(-t\right)}\right)} \]
      15. distribute-rgt-neg-in97.0%

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

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(y, 1, -\left(-z \cdot t\right) \cdot -1\right) + \mathsf{fma}\left(-\left(-z \cdot t\right), -1, \left(-z \cdot t\right) \cdot -1\right)}} \]
    3. Applied egg-rr90.6%

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

        \[\leadsto \frac{x}{\color{blue}{\left(y \cdot 1 + \left(-\left(z \cdot t\right) \cdot -1\right)\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      2. distribute-rgt-neg-in90.6%

        \[\leadsto \frac{x}{\left(y \cdot 1 + \color{blue}{\left(z \cdot t\right) \cdot \left(--1\right)}\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      3. metadata-eval90.6%

        \[\leadsto \frac{x}{\left(y \cdot 1 + \left(z \cdot t\right) \cdot \color{blue}{1}\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      4. distribute-rgt-in90.6%

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

        \[\leadsto \frac{x}{1 \cdot \color{blue}{\left(z \cdot t + y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      6. fma-def90.6%

        \[\leadsto \frac{x}{1 \cdot \color{blue}{\mathsf{fma}\left(z, t, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      7. *-lft-identity90.6%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(z, t, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      8. fma-def90.6%

        \[\leadsto \frac{x}{\color{blue}{\left(z \cdot t + y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      9. *-commutative90.6%

        \[\leadsto \frac{x}{\left(\color{blue}{t \cdot z} + y\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      10. fma-def90.6%

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
      11. fma-udef90.6%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(\left(z \cdot t\right) \cdot -1 + \left(z \cdot t\right) \cdot -1\right)}} \]
      12. distribute-lft-out90.6%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(z \cdot t\right) \cdot \left(-1 + -1\right)}} \]
      13. *-commutative90.6%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(t \cdot z\right)} \cdot \left(-1 + -1\right)} \]
      14. metadata-eval90.6%

        \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot \color{blue}{-2}} \]
    5. Simplified90.6%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot -2}} \]
    6. Step-by-step derivation
      1. clear-num90.4%

        \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot -2}{x}}} \]
      2. inv-pow90.4%

        \[\leadsto \color{blue}{{\left(\frac{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot -2}{x}\right)}^{-1}} \]
      3. +-commutative90.4%

        \[\leadsto {\left(\frac{\color{blue}{\left(t \cdot z\right) \cdot -2 + \mathsf{fma}\left(t, z, y\right)}}{x}\right)}^{-1} \]
      4. associate-*l*90.4%

        \[\leadsto {\left(\frac{\color{blue}{t \cdot \left(z \cdot -2\right)} + \mathsf{fma}\left(t, z, y\right)}{x}\right)}^{-1} \]
      5. fma-def96.8%

        \[\leadsto {\left(\frac{\color{blue}{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(t, z, y\right)\right)}}{x}\right)}^{-1} \]
    7. Applied egg-rr96.8%

      \[\leadsto \color{blue}{{\left(\frac{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(t, z, y\right)\right)}{x}\right)}^{-1}} \]
    8. Step-by-step derivation
      1. unpow-196.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(t, z, y\right)\right)}{x}}} \]
      2. fma-udef90.4%

        \[\leadsto \frac{1}{\frac{\color{blue}{t \cdot \left(z \cdot -2\right) + \mathsf{fma}\left(t, z, y\right)}}{x}} \]
      3. fma-udef90.4%

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

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

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

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

        \[\leadsto \frac{1}{\frac{\left(\color{blue}{\left(-2 \cdot t\right) \cdot z} + t \cdot z\right) + y}{x}} \]
      8. distribute-rgt-in96.8%

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

        \[\leadsto \frac{1}{\frac{z \cdot \color{blue}{\left(t + -2 \cdot t\right)} + y}{x}} \]
      10. fma-def96.8%

        \[\leadsto \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, t + -2 \cdot t, y\right)}}{x}} \]
      11. distribute-rgt1-in96.8%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(z, \color{blue}{\left(-2 + 1\right) \cdot t}, y\right)}{x}} \]
      12. metadata-eval96.8%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(z, \color{blue}{-1} \cdot t, y\right)}{x}} \]
      13. mul-1-neg96.8%

        \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(z, \color{blue}{-t}, y\right)}{x}} \]
    9. Simplified96.8%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, -t, y\right)}{x}}} \]
    10. Taylor expanded in z around 0 87.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+85}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{+21}:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{-37}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{elif}\;y \leq 1060000000:\\ \;\;\;\;\frac{-x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{y}{x}}\\ \end{array} \]

Alternative 7: 63.1% accurate, 0.5× speedup?

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

\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z t) < -4.99999999999999973e182 or 4.0000000000000001e138 < (*.f64 z t)

    1. Initial program 82.4%

      \[\frac{x}{y - z \cdot t} \]
    2. Step-by-step derivation
      1. flip3--0.0%

        \[\leadsto \frac{x}{\color{blue}{\frac{{y}^{3} - {\left(z \cdot t\right)}^{3}}{y \cdot y + \left(\left(z \cdot t\right) \cdot \left(z \cdot t\right) + y \cdot \left(z \cdot t\right)\right)}}} \]
      2. clear-num0.0%

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

      \[\leadsto \frac{x}{\color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, y, \left(z \cdot t\right) \cdot \mathsf{fma}\left(z, t, y\right)\right)}{{y}^{3} - {\left(z \cdot t\right)}^{3}}}}} \]
    4. Taylor expanded in y around 0 80.6%

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

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

      \[\leadsto \frac{x}{\frac{1}{\color{blue}{\frac{\frac{-1}{t}}{z}}}} \]
    7. Step-by-step derivation
      1. clear-num80.6%

        \[\leadsto \frac{x}{\color{blue}{\frac{z}{\frac{-1}{t}}}} \]
      2. div-inv80.6%

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

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

        \[\leadsto \frac{x}{z \cdot \frac{1}{\frac{\color{blue}{1}}{-t}}} \]
      5. remove-double-div80.6%

        \[\leadsto \frac{x}{z \cdot \color{blue}{\left(-t\right)}} \]
      6. add-sqr-sqrt44.7%

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

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

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

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

        \[\leadsto \frac{x}{z \cdot \color{blue}{t}} \]
    8. Applied egg-rr57.7%

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

    if -4.99999999999999973e182 < (*.f64 z t) < 4.0000000000000001e138

    1. Initial program 99.8%

      \[\frac{x}{y - z \cdot t} \]
    2. Taylor expanded in y around inf 67.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+182} \lor \neg \left(z \cdot t \leq 4 \cdot 10^{+138}\right):\\ \;\;\;\;\frac{x}{z \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]

Alternative 8: 53.8% accurate, 1.4× speedup?

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

    \[\frac{x}{y - z \cdot t} \]
  2. Step-by-step derivation
    1. *-un-lft-identity96.1%

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

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

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

      \[\leadsto \frac{x}{y \cdot 1 - z \cdot \color{blue}{\sqrt{t \cdot t}}} \]
    5. sqr-neg72.4%

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

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

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

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

      \[\leadsto \frac{x}{y \cdot 1 - \color{blue}{-1 \cdot \left(z \cdot t\right)}} \]
    10. add-sqr-sqrt30.7%

      \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \left(z \cdot \color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)}\right)} \]
    11. sqrt-unprod71.3%

      \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \left(z \cdot \color{blue}{\sqrt{t \cdot t}}\right)} \]
    12. sqr-neg71.3%

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

      \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \left(z \cdot \color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)}\right)} \]
    14. add-sqr-sqrt96.1%

      \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \left(z \cdot \color{blue}{\left(-t\right)}\right)} \]
    15. distribute-rgt-neg-in96.1%

      \[\leadsto \frac{x}{y \cdot 1 - -1 \cdot \color{blue}{\left(-z \cdot t\right)}} \]
    16. prod-diff87.7%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(y, 1, -\left(-z \cdot t\right) \cdot -1\right) + \mathsf{fma}\left(-\left(-z \cdot t\right), -1, \left(-z \cdot t\right) \cdot -1\right)}} \]
  3. Applied egg-rr87.7%

    \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(y, 1, -\left(z \cdot t\right) \cdot -1\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)}} \]
  4. Step-by-step derivation
    1. fma-udef87.7%

      \[\leadsto \frac{x}{\color{blue}{\left(y \cdot 1 + \left(-\left(z \cdot t\right) \cdot -1\right)\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
    2. distribute-rgt-neg-in87.7%

      \[\leadsto \frac{x}{\left(y \cdot 1 + \color{blue}{\left(z \cdot t\right) \cdot \left(--1\right)}\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
    3. metadata-eval87.7%

      \[\leadsto \frac{x}{\left(y \cdot 1 + \left(z \cdot t\right) \cdot \color{blue}{1}\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
    4. distribute-rgt-in87.7%

      \[\leadsto \frac{x}{\color{blue}{1 \cdot \left(y + z \cdot t\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
    5. +-commutative87.7%

      \[\leadsto \frac{x}{1 \cdot \color{blue}{\left(z \cdot t + y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
    6. fma-def87.7%

      \[\leadsto \frac{x}{1 \cdot \color{blue}{\mathsf{fma}\left(z, t, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
    7. *-lft-identity87.7%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(z, t, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
    8. fma-def87.7%

      \[\leadsto \frac{x}{\color{blue}{\left(z \cdot t + y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
    9. *-commutative87.7%

      \[\leadsto \frac{x}{\left(\color{blue}{t \cdot z} + y\right) + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
    10. fma-def87.7%

      \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z, y\right)} + \mathsf{fma}\left(z \cdot t, -1, \left(z \cdot t\right) \cdot -1\right)} \]
    11. fma-udef87.7%

      \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(\left(z \cdot t\right) \cdot -1 + \left(z \cdot t\right) \cdot -1\right)}} \]
    12. distribute-lft-out87.7%

      \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(z \cdot t\right) \cdot \left(-1 + -1\right)}} \]
    13. *-commutative87.7%

      \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \color{blue}{\left(t \cdot z\right)} \cdot \left(-1 + -1\right)} \]
    14. metadata-eval87.7%

      \[\leadsto \frac{x}{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot \color{blue}{-2}} \]
  5. Simplified87.7%

    \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot -2}} \]
  6. Step-by-step derivation
    1. clear-num87.3%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot -2}{x}}} \]
    2. inv-pow87.3%

      \[\leadsto \color{blue}{{\left(\frac{\mathsf{fma}\left(t, z, y\right) + \left(t \cdot z\right) \cdot -2}{x}\right)}^{-1}} \]
    3. +-commutative87.3%

      \[\leadsto {\left(\frac{\color{blue}{\left(t \cdot z\right) \cdot -2 + \mathsf{fma}\left(t, z, y\right)}}{x}\right)}^{-1} \]
    4. associate-*l*87.3%

      \[\leadsto {\left(\frac{\color{blue}{t \cdot \left(z \cdot -2\right)} + \mathsf{fma}\left(t, z, y\right)}{x}\right)}^{-1} \]
    5. fma-def95.6%

      \[\leadsto {\left(\frac{\color{blue}{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(t, z, y\right)\right)}}{x}\right)}^{-1} \]
  7. Applied egg-rr95.6%

    \[\leadsto \color{blue}{{\left(\frac{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(t, z, y\right)\right)}{x}\right)}^{-1}} \]
  8. Step-by-step derivation
    1. unpow-195.6%

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(t, z \cdot -2, \mathsf{fma}\left(t, z, y\right)\right)}{x}}} \]
    2. fma-udef87.3%

      \[\leadsto \frac{1}{\frac{\color{blue}{t \cdot \left(z \cdot -2\right) + \mathsf{fma}\left(t, z, y\right)}}{x}} \]
    3. fma-udef87.3%

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

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

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

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

      \[\leadsto \frac{1}{\frac{\left(\color{blue}{\left(-2 \cdot t\right) \cdot z} + t \cdot z\right) + y}{x}} \]
    8. distribute-rgt-in95.7%

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

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

      \[\leadsto \frac{1}{\frac{\color{blue}{\mathsf{fma}\left(z, t + -2 \cdot t, y\right)}}{x}} \]
    11. distribute-rgt1-in95.7%

      \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(z, \color{blue}{\left(-2 + 1\right) \cdot t}, y\right)}{x}} \]
    12. metadata-eval95.7%

      \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(z, \color{blue}{-1} \cdot t, y\right)}{x}} \]
    13. mul-1-neg95.7%

      \[\leadsto \frac{1}{\frac{\mathsf{fma}\left(z, \color{blue}{-t}, y\right)}{x}} \]
  9. Simplified95.7%

    \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(z, -t, y\right)}{x}}} \]
  10. Taylor expanded in z around 0 55.8%

    \[\leadsto \frac{1}{\color{blue}{\frac{y}{x}}} \]
  11. Final simplification55.8%

    \[\leadsto \frac{1}{\frac{y}{x}} \]

Alternative 9: 54.3% accurate, 2.3× speedup?

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

    \[\frac{x}{y - z \cdot t} \]
  2. Taylor expanded in y around inf 55.7%

    \[\leadsto \color{blue}{\frac{x}{y}} \]
  3. Final simplification55.7%

    \[\leadsto \frac{x}{y} \]

Developer target: 96.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{1}{\frac{y}{x} - \frac{z}{x} \cdot t}\\
\mathbf{if}\;x < -1.618195973607049 \cdot 10^{+50}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x < 2.1378306434876444 \cdot 10^{+131}:\\
\;\;\;\;\frac{x}{y - z \cdot t}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023299 
(FPCore (x y z t)
  :name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, B"
  :precision binary64

  :herbie-target
  (if (< x -1.618195973607049e+50) (/ 1.0 (- (/ y x) (* (/ z x) t))) (if (< x 2.1378306434876444e+131) (/ x (- y (* z t))) (/ 1.0 (- (/ y x) (* (/ z x) t)))))

  (/ x (- y (* z t))))