Data.Colour.Matrix:inverse from colour-2.3.3, B

Percentage Accurate: 91.1% → 96.1%
Time: 9.6s
Alternatives: 12
Speedup: 0.6×

Specification

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

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

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

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

Alternative 1: 96.1% accurate, 0.0× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\ \\ \begin{array}{l} t_1 := x \cdot y - z \cdot t\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+286}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, \frac{y}{t}, -z\right)}{\sqrt{a\_m}} \cdot \frac{t}{\sqrt{a\_m}}\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+285}:\\ \;\;\;\;\frac{t\_1}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x \cdot \frac{y}{z} - t}{a\_m}\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
 :precision binary64
 (let* ((t_1 (- (* x y) (* z t))))
   (*
    a_s
    (if (<= t_1 -1e+286)
      (* (/ (fma x (/ y t) (- z)) (sqrt a_m)) (/ t (sqrt a_m)))
      (if (<= t_1 4e+285) (/ t_1 a_m) (* z (/ (- (* x (/ y z)) t) a_m)))))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
	double t_1 = (x * y) - (z * t);
	double tmp;
	if (t_1 <= -1e+286) {
		tmp = (fma(x, (y / t), -z) / sqrt(a_m)) * (t / sqrt(a_m));
	} else if (t_1 <= 4e+285) {
		tmp = t_1 / a_m;
	} else {
		tmp = z * (((x * (y / z)) - t) / a_m);
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0, a)
x, y, z, t, a_m = sort([x, y, z, t, a_m])
x, y, z, t, a_m = sort([x, y, z, t, a_m])
function code(a_s, x, y, z, t, a_m)
	t_1 = Float64(Float64(x * y) - Float64(z * t))
	tmp = 0.0
	if (t_1 <= -1e+286)
		tmp = Float64(Float64(fma(x, Float64(y / t), Float64(-z)) / sqrt(a_m)) * Float64(t / sqrt(a_m)));
	elseif (t_1 <= 4e+285)
		tmp = Float64(t_1 / a_m);
	else
		tmp = Float64(z * Float64(Float64(Float64(x * Float64(y / z)) - t) / a_m));
	end
	return Float64(a_s * tmp)
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[t$95$1, -1e+286], N[(N[(N[(x * N[(y / t), $MachinePrecision] + (-z)), $MachinePrecision] / N[Sqrt[a$95$m], $MachinePrecision]), $MachinePrecision] * N[(t / N[Sqrt[a$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+285], N[(t$95$1 / a$95$m), $MachinePrecision], N[(z * N[(N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+286}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, \frac{y}{t}, -z\right)}{\sqrt{a\_m}} \cdot \frac{t}{\sqrt{a\_m}}\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+285}:\\
\;\;\;\;\frac{t\_1}{a\_m}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (*.f64 x y) (*.f64 z t)) < -1.00000000000000003e286

    1. Initial program 75.4%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 75.4%

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

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

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

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

        \[\leadsto \frac{\left(x \cdot \frac{y}{t} - z\right) \cdot t}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}} \]
      3. times-frac48.0%

        \[\leadsto \color{blue}{\frac{x \cdot \frac{y}{t} - z}{\sqrt{a}} \cdot \frac{t}{\sqrt{a}}} \]
      4. fma-neg48.0%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, \frac{y}{t}, -z\right)}}{\sqrt{a}} \cdot \frac{t}{\sqrt{a}} \]
    7. Applied egg-rr48.0%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, \frac{y}{t}, -z\right)}{\sqrt{a}} \cdot \frac{t}{\sqrt{a}}} \]

    if -1.00000000000000003e286 < (-.f64 (*.f64 x y) (*.f64 z t)) < 3.9999999999999999e285

    1. Initial program 98.8%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing

    if 3.9999999999999999e285 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 64.6%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub62.0%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sqrt{a}}, \frac{x \cdot y}{\sqrt{a}}, -\frac{z \cdot t}{a}\right)} \]
      6. associate-/l*37.5%

        \[\leadsto \mathsf{fma}\left(\frac{1}{\sqrt{a}}, \frac{x \cdot y}{\sqrt{a}}, -\color{blue}{z \cdot \frac{t}{a}}\right) \]
    4. Applied egg-rr37.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sqrt{a}}, \frac{x \cdot y}{\sqrt{a}}, -z \cdot \frac{t}{a}\right)} \]
    5. Step-by-step derivation
      1. fma-undefine37.5%

        \[\leadsto \color{blue}{\frac{1}{\sqrt{a}} \cdot \frac{x \cdot y}{\sqrt{a}} + \left(-z \cdot \frac{t}{a}\right)} \]
      2. distribute-lft-neg-in37.5%

        \[\leadsto \frac{1}{\sqrt{a}} \cdot \frac{x \cdot y}{\sqrt{a}} + \color{blue}{\left(-z\right) \cdot \frac{t}{a}} \]
      3. cancel-sign-sub-inv37.5%

        \[\leadsto \color{blue}{\frac{1}{\sqrt{a}} \cdot \frac{x \cdot y}{\sqrt{a}} - z \cdot \frac{t}{a}} \]
      4. associate-/l*39.9%

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

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

        \[\leadsto \frac{1}{\sqrt{a}} \cdot \left(x \cdot \frac{y}{\sqrt{a}}\right) - \frac{\color{blue}{t \cdot z}}{a} \]
      7. associate-/l*37.2%

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

      \[\leadsto \color{blue}{\frac{1}{\sqrt{a}} \cdot \left(x \cdot \frac{y}{\sqrt{a}}\right) - t \cdot \frac{z}{a}} \]
    7. Taylor expanded in z around inf 82.0%

      \[\leadsto \color{blue}{z \cdot \left(\frac{x \cdot y}{a \cdot z} - \frac{t}{a}\right)} \]
    8. Step-by-step derivation
      1. times-frac87.2%

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

        \[\leadsto z \cdot \left(\color{blue}{\frac{x \cdot \frac{y}{z}}{a}} - \frac{t}{a}\right) \]
      3. div-sub95.2%

        \[\leadsto z \cdot \color{blue}{\frac{x \cdot \frac{y}{z} - t}{a}} \]
    9. Simplified95.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y - z \cdot t \leq -1 \cdot 10^{+286}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, \frac{y}{t}, -z\right)}{\sqrt{a}} \cdot \frac{t}{\sqrt{a}}\\ \mathbf{elif}\;x \cdot y - z \cdot t \leq 4 \cdot 10^{+285}:\\ \;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x \cdot \frac{y}{z} - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 71.4% accurate, 0.3× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\ \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \frac{y}{a\_m}\\ \mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-46}:\\ \;\;\;\;z \cdot \frac{-t}{a\_m}\\ \mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-87} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{-99}\right):\\ \;\;\;\;\frac{x \cdot y}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot t}{-a\_m}\\ \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
 :precision binary64
 (*
  a_s
  (if (<= (* x y) -2e+39)
    (* x (/ y a_m))
    (if (<= (* x y) -1e-46)
      (* z (/ (- t) a_m))
      (if (or (<= (* x y) -2e-87) (not (<= (* x y) 5e-99)))
        (/ (* x y) a_m)
        (/ (* z t) (- a_m)))))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
	double tmp;
	if ((x * y) <= -2e+39) {
		tmp = x * (y / a_m);
	} else if ((x * y) <= -1e-46) {
		tmp = z * (-t / a_m);
	} else if (((x * y) <= -2e-87) || !((x * y) <= 5e-99)) {
		tmp = (x * y) / a_m;
	} else {
		tmp = (z * t) / -a_m;
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a_m
    real(8) :: tmp
    if ((x * y) <= (-2d+39)) then
        tmp = x * (y / a_m)
    else if ((x * y) <= (-1d-46)) then
        tmp = z * (-t / a_m)
    else if (((x * y) <= (-2d-87)) .or. (.not. ((x * y) <= 5d-99))) then
        tmp = (x * y) / a_m
    else
        tmp = (z * t) / -a_m
    end if
    code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
	double tmp;
	if ((x * y) <= -2e+39) {
		tmp = x * (y / a_m);
	} else if ((x * y) <= -1e-46) {
		tmp = z * (-t / a_m);
	} else if (((x * y) <= -2e-87) || !((x * y) <= 5e-99)) {
		tmp = (x * y) / a_m;
	} else {
		tmp = (z * t) / -a_m;
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
def code(a_s, x, y, z, t, a_m):
	tmp = 0
	if (x * y) <= -2e+39:
		tmp = x * (y / a_m)
	elif (x * y) <= -1e-46:
		tmp = z * (-t / a_m)
	elif ((x * y) <= -2e-87) or not ((x * y) <= 5e-99):
		tmp = (x * y) / a_m
	else:
		tmp = (z * t) / -a_m
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
x, y, z, t, a_m = sort([x, y, z, t, a_m])
x, y, z, t, a_m = sort([x, y, z, t, a_m])
function code(a_s, x, y, z, t, a_m)
	tmp = 0.0
	if (Float64(x * y) <= -2e+39)
		tmp = Float64(x * Float64(y / a_m));
	elseif (Float64(x * y) <= -1e-46)
		tmp = Float64(z * Float64(Float64(-t) / a_m));
	elseif ((Float64(x * y) <= -2e-87) || !(Float64(x * y) <= 5e-99))
		tmp = Float64(Float64(x * y) / a_m);
	else
		tmp = Float64(Float64(z * t) / Float64(-a_m));
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
	tmp = 0.0;
	if ((x * y) <= -2e+39)
		tmp = x * (y / a_m);
	elseif ((x * y) <= -1e-46)
		tmp = z * (-t / a_m);
	elseif (((x * y) <= -2e-87) || ~(((x * y) <= 5e-99)))
		tmp = (x * y) / a_m;
	else
		tmp = (z * t) / -a_m;
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[N[(x * y), $MachinePrecision], -2e+39], N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1e-46], N[(z * N[((-t) / a$95$m), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(x * y), $MachinePrecision], -2e-87], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e-99]], $MachinePrecision]], N[(N[(x * y), $MachinePrecision] / a$95$m), $MachinePrecision], N[(N[(z * t), $MachinePrecision] / (-a$95$m)), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \frac{y}{a\_m}\\

\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-46}:\\
\;\;\;\;z \cdot \frac{-t}{a\_m}\\

\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-87} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{-99}\right):\\
\;\;\;\;\frac{x \cdot y}{a\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{z \cdot t}{-a\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -1.99999999999999988e39

    1. Initial program 88.6%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 73.5%

      \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
    4. Step-by-step derivation
      1. associate-*r/73.4%

        \[\leadsto \color{blue}{x \cdot \frac{y}{a}} \]
    5. Simplified73.4%

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

    if -1.99999999999999988e39 < (*.f64 x y) < -1.00000000000000002e-46

    1. Initial program 94.3%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 74.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
    4. Step-by-step derivation
      1. *-commutative74.6%

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

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \frac{t}{a}\right)} \]
      3. neg-mul-174.2%

        \[\leadsto \color{blue}{-z \cdot \frac{t}{a}} \]
      4. distribute-rgt-neg-in74.2%

        \[\leadsto \color{blue}{z \cdot \left(-\frac{t}{a}\right)} \]
      5. distribute-frac-neg74.2%

        \[\leadsto z \cdot \color{blue}{\frac{-t}{a}} \]
    5. Simplified74.2%

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

    if -1.00000000000000002e-46 < (*.f64 x y) < -2.00000000000000004e-87 or 4.99999999999999969e-99 < (*.f64 x y)

    1. Initial program 90.9%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 74.2%

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

    if -2.00000000000000004e-87 < (*.f64 x y) < 4.99999999999999969e-99

    1. Initial program 93.7%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 83.4%

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

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot t\right) \cdot z}}{a} \]
      2. mul-1-neg83.4%

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

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

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

Alternative 3: 96.3% accurate, 0.3× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\ \\ \begin{array}{l} t_1 := x \cdot y - z \cdot t\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;y \cdot \left(\frac{x}{a\_m} - z \cdot \frac{t}{y \cdot a\_m}\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+301}:\\ \;\;\;\;\frac{t\_1}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x \cdot \frac{y}{z} - t}{a\_m}\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
 :precision binary64
 (let* ((t_1 (- (* x y) (* z t))))
   (*
    a_s
    (if (<= t_1 (- INFINITY))
      (* y (- (/ x a_m) (* z (/ t (* y a_m)))))
      (if (<= t_1 5e+301) (/ t_1 a_m) (* z (/ (- (* x (/ y z)) t) a_m)))))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
	double t_1 = (x * y) - (z * t);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = y * ((x / a_m) - (z * (t / (y * a_m))));
	} else if (t_1 <= 5e+301) {
		tmp = t_1 / a_m;
	} else {
		tmp = z * (((x * (y / z)) - t) / a_m);
	}
	return a_s * tmp;
}
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
	double t_1 = (x * y) - (z * t);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = y * ((x / a_m) - (z * (t / (y * a_m))));
	} else if (t_1 <= 5e+301) {
		tmp = t_1 / a_m;
	} else {
		tmp = z * (((x * (y / z)) - t) / a_m);
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
def code(a_s, x, y, z, t, a_m):
	t_1 = (x * y) - (z * t)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = y * ((x / a_m) - (z * (t / (y * a_m))))
	elif t_1 <= 5e+301:
		tmp = t_1 / a_m
	else:
		tmp = z * (((x * (y / z)) - t) / a_m)
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
x, y, z, t, a_m = sort([x, y, z, t, a_m])
x, y, z, t, a_m = sort([x, y, z, t, a_m])
function code(a_s, x, y, z, t, a_m)
	t_1 = Float64(Float64(x * y) - Float64(z * t))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(y * Float64(Float64(x / a_m) - Float64(z * Float64(t / Float64(y * a_m)))));
	elseif (t_1 <= 5e+301)
		tmp = Float64(t_1 / a_m);
	else
		tmp = Float64(z * Float64(Float64(Float64(x * Float64(y / z)) - t) / a_m));
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
	t_1 = (x * y) - (z * t);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = y * ((x / a_m) - (z * (t / (y * a_m))));
	elseif (t_1 <= 5e+301)
		tmp = t_1 / a_m;
	else
		tmp = z * (((x * (y / z)) - t) / a_m);
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(N[(x / a$95$m), $MachinePrecision] - N[(z * N[(t / N[(y * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+301], N[(t$95$1 / a$95$m), $MachinePrecision], N[(z * N[(N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \left(\frac{x}{a\_m} - z \cdot \frac{t}{y \cdot a\_m}\right)\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+301}:\\
\;\;\;\;\frac{t\_1}{a\_m}\\

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


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

    1. Initial program 73.2%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 81.6%

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

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

        \[\leadsto y \cdot \left(\frac{x}{a} + \color{blue}{\left(-\frac{t \cdot z}{a \cdot y}\right)}\right) \]
      3. unsub-neg81.6%

        \[\leadsto y \cdot \color{blue}{\left(\frac{x}{a} - \frac{t \cdot z}{a \cdot y}\right)} \]
      4. *-commutative81.6%

        \[\leadsto y \cdot \left(\frac{x}{a} - \frac{\color{blue}{z \cdot t}}{a \cdot y}\right) \]
      5. associate-/l*95.4%

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

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

    if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 5.0000000000000004e301

    1. Initial program 98.8%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing

    if 5.0000000000000004e301 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 59.3%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub56.3%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sqrt{a}}, \frac{x \cdot y}{\sqrt{a}}, -\frac{z \cdot t}{a}\right)} \]
      6. associate-/l*40.1%

        \[\leadsto \mathsf{fma}\left(\frac{1}{\sqrt{a}}, \frac{x \cdot y}{\sqrt{a}}, -\color{blue}{z \cdot \frac{t}{a}}\right) \]
    4. Applied egg-rr40.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sqrt{a}}, \frac{x \cdot y}{\sqrt{a}}, -z \cdot \frac{t}{a}\right)} \]
    5. Step-by-step derivation
      1. fma-undefine40.1%

        \[\leadsto \color{blue}{\frac{1}{\sqrt{a}} \cdot \frac{x \cdot y}{\sqrt{a}} + \left(-z \cdot \frac{t}{a}\right)} \]
      2. distribute-lft-neg-in40.1%

        \[\leadsto \frac{1}{\sqrt{a}} \cdot \frac{x \cdot y}{\sqrt{a}} + \color{blue}{\left(-z\right) \cdot \frac{t}{a}} \]
      3. cancel-sign-sub-inv40.1%

        \[\leadsto \color{blue}{\frac{1}{\sqrt{a}} \cdot \frac{x \cdot y}{\sqrt{a}} - z \cdot \frac{t}{a}} \]
      4. associate-/l*42.9%

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

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

        \[\leadsto \frac{1}{\sqrt{a}} \cdot \left(x \cdot \frac{y}{\sqrt{a}}\right) - \frac{\color{blue}{t \cdot z}}{a} \]
      7. associate-/l*39.9%

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

      \[\leadsto \color{blue}{\frac{1}{\sqrt{a}} \cdot \left(x \cdot \frac{y}{\sqrt{a}}\right) - t \cdot \frac{z}{a}} \]
    7. Taylor expanded in z around inf 79.3%

      \[\leadsto \color{blue}{z \cdot \left(\frac{x \cdot y}{a \cdot z} - \frac{t}{a}\right)} \]
    8. Step-by-step derivation
      1. times-frac85.3%

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

        \[\leadsto z \cdot \left(\color{blue}{\frac{x \cdot \frac{y}{z}}{a}} - \frac{t}{a}\right) \]
      3. div-sub94.4%

        \[\leadsto z \cdot \color{blue}{\frac{x \cdot \frac{y}{z} - t}{a}} \]
    9. Simplified94.4%

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

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

Alternative 4: 96.4% accurate, 0.3× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\ \\ \begin{array}{l} t_1 := x \cdot y - z \cdot t\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;y \cdot \left(x \cdot \frac{1}{a\_m} - t \cdot \frac{\frac{z}{y}}{a\_m}\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+301}:\\ \;\;\;\;\frac{t\_1}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x \cdot \frac{y}{z} - t}{a\_m}\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
 :precision binary64
 (let* ((t_1 (- (* x y) (* z t))))
   (*
    a_s
    (if (<= t_1 (- INFINITY))
      (* y (- (* x (/ 1.0 a_m)) (* t (/ (/ z y) a_m))))
      (if (<= t_1 5e+301) (/ t_1 a_m) (* z (/ (- (* x (/ y z)) t) a_m)))))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
	double t_1 = (x * y) - (z * t);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = y * ((x * (1.0 / a_m)) - (t * ((z / y) / a_m)));
	} else if (t_1 <= 5e+301) {
		tmp = t_1 / a_m;
	} else {
		tmp = z * (((x * (y / z)) - t) / a_m);
	}
	return a_s * tmp;
}
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
	double t_1 = (x * y) - (z * t);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = y * ((x * (1.0 / a_m)) - (t * ((z / y) / a_m)));
	} else if (t_1 <= 5e+301) {
		tmp = t_1 / a_m;
	} else {
		tmp = z * (((x * (y / z)) - t) / a_m);
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
def code(a_s, x, y, z, t, a_m):
	t_1 = (x * y) - (z * t)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = y * ((x * (1.0 / a_m)) - (t * ((z / y) / a_m)))
	elif t_1 <= 5e+301:
		tmp = t_1 / a_m
	else:
		tmp = z * (((x * (y / z)) - t) / a_m)
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
x, y, z, t, a_m = sort([x, y, z, t, a_m])
x, y, z, t, a_m = sort([x, y, z, t, a_m])
function code(a_s, x, y, z, t, a_m)
	t_1 = Float64(Float64(x * y) - Float64(z * t))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(y * Float64(Float64(x * Float64(1.0 / a_m)) - Float64(t * Float64(Float64(z / y) / a_m))));
	elseif (t_1 <= 5e+301)
		tmp = Float64(t_1 / a_m);
	else
		tmp = Float64(z * Float64(Float64(Float64(x * Float64(y / z)) - t) / a_m));
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
	t_1 = (x * y) - (z * t);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = y * ((x * (1.0 / a_m)) - (t * ((z / y) / a_m)));
	elseif (t_1 <= 5e+301)
		tmp = t_1 / a_m;
	else
		tmp = z * (((x * (y / z)) - t) / a_m);
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(N[(x * N[(1.0 / a$95$m), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(z / y), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+301], N[(t$95$1 / a$95$m), $MachinePrecision], N[(z * N[(N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \left(x \cdot \frac{1}{a\_m} - t \cdot \frac{\frac{z}{y}}{a\_m}\right)\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+301}:\\
\;\;\;\;\frac{t\_1}{a\_m}\\

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


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

    1. Initial program 73.2%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 81.6%

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

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

        \[\leadsto y \cdot \left(\frac{x}{a} + \color{blue}{\left(-\frac{t \cdot z}{a \cdot y}\right)}\right) \]
      3. unsub-neg81.6%

        \[\leadsto y \cdot \color{blue}{\left(\frac{x}{a} - \frac{t \cdot z}{a \cdot y}\right)} \]
      4. *-commutative81.6%

        \[\leadsto y \cdot \left(\frac{x}{a} - \frac{\color{blue}{z \cdot t}}{a \cdot y}\right) \]
      5. associate-/l*95.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 5.0000000000000004e301

    1. Initial program 98.8%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing

    if 5.0000000000000004e301 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 59.3%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub56.3%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sqrt{a}}, \frac{x \cdot y}{\sqrt{a}}, -\frac{z \cdot t}{a}\right)} \]
      6. associate-/l*40.1%

        \[\leadsto \mathsf{fma}\left(\frac{1}{\sqrt{a}}, \frac{x \cdot y}{\sqrt{a}}, -\color{blue}{z \cdot \frac{t}{a}}\right) \]
    4. Applied egg-rr40.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sqrt{a}}, \frac{x \cdot y}{\sqrt{a}}, -z \cdot \frac{t}{a}\right)} \]
    5. Step-by-step derivation
      1. fma-undefine40.1%

        \[\leadsto \color{blue}{\frac{1}{\sqrt{a}} \cdot \frac{x \cdot y}{\sqrt{a}} + \left(-z \cdot \frac{t}{a}\right)} \]
      2. distribute-lft-neg-in40.1%

        \[\leadsto \frac{1}{\sqrt{a}} \cdot \frac{x \cdot y}{\sqrt{a}} + \color{blue}{\left(-z\right) \cdot \frac{t}{a}} \]
      3. cancel-sign-sub-inv40.1%

        \[\leadsto \color{blue}{\frac{1}{\sqrt{a}} \cdot \frac{x \cdot y}{\sqrt{a}} - z \cdot \frac{t}{a}} \]
      4. associate-/l*42.9%

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

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

        \[\leadsto \frac{1}{\sqrt{a}} \cdot \left(x \cdot \frac{y}{\sqrt{a}}\right) - \frac{\color{blue}{t \cdot z}}{a} \]
      7. associate-/l*39.9%

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

      \[\leadsto \color{blue}{\frac{1}{\sqrt{a}} \cdot \left(x \cdot \frac{y}{\sqrt{a}}\right) - t \cdot \frac{z}{a}} \]
    7. Taylor expanded in z around inf 79.3%

      \[\leadsto \color{blue}{z \cdot \left(\frac{x \cdot y}{a \cdot z} - \frac{t}{a}\right)} \]
    8. Step-by-step derivation
      1. times-frac85.3%

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

        \[\leadsto z \cdot \left(\color{blue}{\frac{x \cdot \frac{y}{z}}{a}} - \frac{t}{a}\right) \]
      3. div-sub94.4%

        \[\leadsto z \cdot \color{blue}{\frac{x \cdot \frac{y}{z} - t}{a}} \]
    9. Simplified94.4%

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

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

Alternative 5: 93.8% accurate, 0.4× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\ \\ \begin{array}{l} t_1 := \frac{x \cdot y - z \cdot t}{a\_m}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq 2 \cdot 10^{+304}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - t \cdot \frac{z}{x}}{a\_m}\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
 :precision binary64
 (let* ((t_1 (/ (- (* x y) (* z t)) a_m)))
   (* a_s (if (<= t_1 2e+304) t_1 (* x (/ (- y (* t (/ z x))) a_m))))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
	double t_1 = ((x * y) - (z * t)) / a_m;
	double tmp;
	if (t_1 <= 2e+304) {
		tmp = t_1;
	} else {
		tmp = x * ((y - (t * (z / x))) / a_m);
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a_m
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((x * y) - (z * t)) / a_m
    if (t_1 <= 2d+304) then
        tmp = t_1
    else
        tmp = x * ((y - (t * (z / x))) / a_m)
    end if
    code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
	double t_1 = ((x * y) - (z * t)) / a_m;
	double tmp;
	if (t_1 <= 2e+304) {
		tmp = t_1;
	} else {
		tmp = x * ((y - (t * (z / x))) / a_m);
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
def code(a_s, x, y, z, t, a_m):
	t_1 = ((x * y) - (z * t)) / a_m
	tmp = 0
	if t_1 <= 2e+304:
		tmp = t_1
	else:
		tmp = x * ((y - (t * (z / x))) / a_m)
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
x, y, z, t, a_m = sort([x, y, z, t, a_m])
x, y, z, t, a_m = sort([x, y, z, t, a_m])
function code(a_s, x, y, z, t, a_m)
	t_1 = Float64(Float64(Float64(x * y) - Float64(z * t)) / a_m)
	tmp = 0.0
	if (t_1 <= 2e+304)
		tmp = t_1;
	else
		tmp = Float64(x * Float64(Float64(y - Float64(t * Float64(z / x))) / a_m));
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
	t_1 = ((x * y) - (z * t)) / a_m;
	tmp = 0.0;
	if (t_1 <= 2e+304)
		tmp = t_1;
	else
		tmp = x * ((y - (t * (z / x))) / a_m);
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a$95$m), $MachinePrecision]}, N[(a$95$s * If[LessEqual[t$95$1, 2e+304], t$95$1, N[(x * N[(N[(y - N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
\begin{array}{l}
t_1 := \frac{x \cdot y - z \cdot t}{a\_m}\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a) < 1.9999999999999999e304

    1. Initial program 95.3%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing

    if 1.9999999999999999e304 < (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a)

    1. Initial program 74.9%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 78.5%

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \frac{t \cdot z}{a \cdot x} + \frac{y}{a}\right)} \]
    4. Taylor expanded in a around 0 81.4%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y + -1 \cdot \frac{t \cdot z}{x}\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*87.4%

        \[\leadsto \color{blue}{x \cdot \frac{y + -1 \cdot \frac{t \cdot z}{x}}{a}} \]
      2. mul-1-neg87.4%

        \[\leadsto x \cdot \frac{y + \color{blue}{\left(-\frac{t \cdot z}{x}\right)}}{a} \]
      3. unsub-neg87.4%

        \[\leadsto x \cdot \frac{\color{blue}{y - \frac{t \cdot z}{x}}}{a} \]
      4. associate-/l*95.7%

        \[\leadsto x \cdot \frac{y - \color{blue}{t \cdot \frac{z}{x}}}{a} \]
    6. Simplified95.7%

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

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

Alternative 6: 93.9% accurate, 0.4× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\ \\ \begin{array}{l} t_1 := x \cdot y - z \cdot t\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq 4 \cdot 10^{+285}:\\ \;\;\;\;\frac{t\_1}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{x \cdot \frac{y}{z} - t}{a\_m}\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
 :precision binary64
 (let* ((t_1 (- (* x y) (* z t))))
   (* a_s (if (<= t_1 4e+285) (/ t_1 a_m) (* z (/ (- (* x (/ y z)) t) a_m))))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
	double t_1 = (x * y) - (z * t);
	double tmp;
	if (t_1 <= 4e+285) {
		tmp = t_1 / a_m;
	} else {
		tmp = z * (((x * (y / z)) - t) / a_m);
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a_m
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * y) - (z * t)
    if (t_1 <= 4d+285) then
        tmp = t_1 / a_m
    else
        tmp = z * (((x * (y / z)) - t) / a_m)
    end if
    code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
	double t_1 = (x * y) - (z * t);
	double tmp;
	if (t_1 <= 4e+285) {
		tmp = t_1 / a_m;
	} else {
		tmp = z * (((x * (y / z)) - t) / a_m);
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
def code(a_s, x, y, z, t, a_m):
	t_1 = (x * y) - (z * t)
	tmp = 0
	if t_1 <= 4e+285:
		tmp = t_1 / a_m
	else:
		tmp = z * (((x * (y / z)) - t) / a_m)
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
x, y, z, t, a_m = sort([x, y, z, t, a_m])
x, y, z, t, a_m = sort([x, y, z, t, a_m])
function code(a_s, x, y, z, t, a_m)
	t_1 = Float64(Float64(x * y) - Float64(z * t))
	tmp = 0.0
	if (t_1 <= 4e+285)
		tmp = Float64(t_1 / a_m);
	else
		tmp = Float64(z * Float64(Float64(Float64(x * Float64(y / z)) - t) / a_m));
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
	t_1 = (x * y) - (z * t);
	tmp = 0.0;
	if (t_1 <= 4e+285)
		tmp = t_1 / a_m;
	else
		tmp = z * (((x * (y / z)) - t) / a_m);
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[t$95$1, 4e+285], N[(t$95$1 / a$95$m), $MachinePrecision], N[(z * N[(N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{+285}:\\
\;\;\;\;\frac{t\_1}{a\_m}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (*.f64 x y) (*.f64 z t)) < 3.9999999999999999e285

    1. Initial program 96.3%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing

    if 3.9999999999999999e285 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 64.6%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-sub62.0%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sqrt{a}}, \frac{x \cdot y}{\sqrt{a}}, -\frac{z \cdot t}{a}\right)} \]
      6. associate-/l*37.5%

        \[\leadsto \mathsf{fma}\left(\frac{1}{\sqrt{a}}, \frac{x \cdot y}{\sqrt{a}}, -\color{blue}{z \cdot \frac{t}{a}}\right) \]
    4. Applied egg-rr37.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sqrt{a}}, \frac{x \cdot y}{\sqrt{a}}, -z \cdot \frac{t}{a}\right)} \]
    5. Step-by-step derivation
      1. fma-undefine37.5%

        \[\leadsto \color{blue}{\frac{1}{\sqrt{a}} \cdot \frac{x \cdot y}{\sqrt{a}} + \left(-z \cdot \frac{t}{a}\right)} \]
      2. distribute-lft-neg-in37.5%

        \[\leadsto \frac{1}{\sqrt{a}} \cdot \frac{x \cdot y}{\sqrt{a}} + \color{blue}{\left(-z\right) \cdot \frac{t}{a}} \]
      3. cancel-sign-sub-inv37.5%

        \[\leadsto \color{blue}{\frac{1}{\sqrt{a}} \cdot \frac{x \cdot y}{\sqrt{a}} - z \cdot \frac{t}{a}} \]
      4. associate-/l*39.9%

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

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

        \[\leadsto \frac{1}{\sqrt{a}} \cdot \left(x \cdot \frac{y}{\sqrt{a}}\right) - \frac{\color{blue}{t \cdot z}}{a} \]
      7. associate-/l*37.2%

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

      \[\leadsto \color{blue}{\frac{1}{\sqrt{a}} \cdot \left(x \cdot \frac{y}{\sqrt{a}}\right) - t \cdot \frac{z}{a}} \]
    7. Taylor expanded in z around inf 82.0%

      \[\leadsto \color{blue}{z \cdot \left(\frac{x \cdot y}{a \cdot z} - \frac{t}{a}\right)} \]
    8. Step-by-step derivation
      1. times-frac87.2%

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

        \[\leadsto z \cdot \left(\color{blue}{\frac{x \cdot \frac{y}{z}}{a}} - \frac{t}{a}\right) \]
      3. div-sub95.2%

        \[\leadsto z \cdot \color{blue}{\frac{x \cdot \frac{y}{z} - t}{a}} \]
    9. Simplified95.2%

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

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

Alternative 7: 68.7% accurate, 0.6× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\ \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+37} \lor \neg \left(z \leq 9.8 \cdot 10^{-146}\right):\\ \;\;\;\;\left(-t\right) \cdot \frac{z}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{a\_m}\\ \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
 :precision binary64
 (*
  a_s
  (if (or (<= z -3.8e+37) (not (<= z 9.8e-146)))
    (* (- t) (/ z a_m))
    (/ (* x y) a_m))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
	double tmp;
	if ((z <= -3.8e+37) || !(z <= 9.8e-146)) {
		tmp = -t * (z / a_m);
	} else {
		tmp = (x * y) / a_m;
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a_m
    real(8) :: tmp
    if ((z <= (-3.8d+37)) .or. (.not. (z <= 9.8d-146))) then
        tmp = -t * (z / a_m)
    else
        tmp = (x * y) / a_m
    end if
    code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
	double tmp;
	if ((z <= -3.8e+37) || !(z <= 9.8e-146)) {
		tmp = -t * (z / a_m);
	} else {
		tmp = (x * y) / a_m;
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
def code(a_s, x, y, z, t, a_m):
	tmp = 0
	if (z <= -3.8e+37) or not (z <= 9.8e-146):
		tmp = -t * (z / a_m)
	else:
		tmp = (x * y) / a_m
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
x, y, z, t, a_m = sort([x, y, z, t, a_m])
x, y, z, t, a_m = sort([x, y, z, t, a_m])
function code(a_s, x, y, z, t, a_m)
	tmp = 0.0
	if ((z <= -3.8e+37) || !(z <= 9.8e-146))
		tmp = Float64(Float64(-t) * Float64(z / a_m));
	else
		tmp = Float64(Float64(x * y) / a_m);
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
	tmp = 0.0;
	if ((z <= -3.8e+37) || ~((z <= 9.8e-146)))
		tmp = -t * (z / a_m);
	else
		tmp = (x * y) / a_m;
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[Or[LessEqual[z, -3.8e+37], N[Not[LessEqual[z, 9.8e-146]], $MachinePrecision]], N[((-t) * N[(z / a$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / a$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+37} \lor \neg \left(z \leq 9.8 \cdot 10^{-146}\right):\\
\;\;\;\;\left(-t\right) \cdot \frac{z}{a\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.7999999999999999e37 or 9.8000000000000008e-146 < z

    1. Initial program 87.2%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 60.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
    4. Step-by-step derivation
      1. mul-1-neg60.9%

        \[\leadsto \color{blue}{-\frac{t \cdot z}{a}} \]
      2. associate-/l*64.0%

        \[\leadsto -\color{blue}{t \cdot \frac{z}{a}} \]
      3. distribute-rgt-neg-in64.0%

        \[\leadsto \color{blue}{t \cdot \left(-\frac{z}{a}\right)} \]
      4. distribute-neg-frac264.0%

        \[\leadsto t \cdot \color{blue}{\frac{z}{-a}} \]
    5. Simplified64.0%

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

    if -3.7999999999999999e37 < z < 9.8000000000000008e-146

    1. Initial program 98.1%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 72.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+37} \lor \neg \left(z \leq 9.8 \cdot 10^{-146}\right):\\ \;\;\;\;\left(-t\right) \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 68.5% accurate, 0.6× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\ \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{+37} \lor \neg \left(z \leq 1.42 \cdot 10^{-145}\right):\\ \;\;\;\;z \cdot \frac{-t}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{a\_m}\\ \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
 :precision binary64
 (*
  a_s
  (if (or (<= z -2.15e+37) (not (<= z 1.42e-145)))
    (* z (/ (- t) a_m))
    (/ (* x y) a_m))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
	double tmp;
	if ((z <= -2.15e+37) || !(z <= 1.42e-145)) {
		tmp = z * (-t / a_m);
	} else {
		tmp = (x * y) / a_m;
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a_m
    real(8) :: tmp
    if ((z <= (-2.15d+37)) .or. (.not. (z <= 1.42d-145))) then
        tmp = z * (-t / a_m)
    else
        tmp = (x * y) / a_m
    end if
    code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
	double tmp;
	if ((z <= -2.15e+37) || !(z <= 1.42e-145)) {
		tmp = z * (-t / a_m);
	} else {
		tmp = (x * y) / a_m;
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
def code(a_s, x, y, z, t, a_m):
	tmp = 0
	if (z <= -2.15e+37) or not (z <= 1.42e-145):
		tmp = z * (-t / a_m)
	else:
		tmp = (x * y) / a_m
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
x, y, z, t, a_m = sort([x, y, z, t, a_m])
x, y, z, t, a_m = sort([x, y, z, t, a_m])
function code(a_s, x, y, z, t, a_m)
	tmp = 0.0
	if ((z <= -2.15e+37) || !(z <= 1.42e-145))
		tmp = Float64(z * Float64(Float64(-t) / a_m));
	else
		tmp = Float64(Float64(x * y) / a_m);
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
	tmp = 0.0;
	if ((z <= -2.15e+37) || ~((z <= 1.42e-145)))
		tmp = z * (-t / a_m);
	else
		tmp = (x * y) / a_m;
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[Or[LessEqual[z, -2.15e+37], N[Not[LessEqual[z, 1.42e-145]], $MachinePrecision]], N[(z * N[((-t) / a$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / a$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+37} \lor \neg \left(z \leq 1.42 \cdot 10^{-145}\right):\\
\;\;\;\;z \cdot \frac{-t}{a\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1499999999999998e37 or 1.4200000000000001e-145 < z

    1. Initial program 87.2%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 60.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
    4. Step-by-step derivation
      1. *-commutative60.9%

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

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \frac{t}{a}\right)} \]
      3. neg-mul-162.4%

        \[\leadsto \color{blue}{-z \cdot \frac{t}{a}} \]
      4. distribute-rgt-neg-in62.4%

        \[\leadsto \color{blue}{z \cdot \left(-\frac{t}{a}\right)} \]
      5. distribute-frac-neg62.4%

        \[\leadsto z \cdot \color{blue}{\frac{-t}{a}} \]
    5. Simplified62.4%

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

    if -2.1499999999999998e37 < z < 1.4200000000000001e-145

    1. Initial program 98.1%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 72.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{+37} \lor \neg \left(z \leq 1.42 \cdot 10^{-145}\right):\\ \;\;\;\;z \cdot \frac{-t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 92.6% accurate, 0.6× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\ \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+200}:\\ \;\;\;\;z \cdot \frac{-t}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y - z \cdot t}{a\_m}\\ \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
 :precision binary64
 (*
  a_s
  (if (<= (* z t) -1e+200) (* z (/ (- t) a_m)) (/ (- (* x y) (* z t)) a_m))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
	double tmp;
	if ((z * t) <= -1e+200) {
		tmp = z * (-t / a_m);
	} else {
		tmp = ((x * y) - (z * t)) / a_m;
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a_m
    real(8) :: tmp
    if ((z * t) <= (-1d+200)) then
        tmp = z * (-t / a_m)
    else
        tmp = ((x * y) - (z * t)) / a_m
    end if
    code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
	double tmp;
	if ((z * t) <= -1e+200) {
		tmp = z * (-t / a_m);
	} else {
		tmp = ((x * y) - (z * t)) / a_m;
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
def code(a_s, x, y, z, t, a_m):
	tmp = 0
	if (z * t) <= -1e+200:
		tmp = z * (-t / a_m)
	else:
		tmp = ((x * y) - (z * t)) / a_m
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
x, y, z, t, a_m = sort([x, y, z, t, a_m])
x, y, z, t, a_m = sort([x, y, z, t, a_m])
function code(a_s, x, y, z, t, a_m)
	tmp = 0.0
	if (Float64(z * t) <= -1e+200)
		tmp = Float64(z * Float64(Float64(-t) / a_m));
	else
		tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a_m);
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
	tmp = 0.0;
	if ((z * t) <= -1e+200)
		tmp = z * (-t / a_m);
	else
		tmp = ((x * y) - (z * t)) / a_m;
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[N[(z * t), $MachinePrecision], -1e+200], N[(z * N[((-t) / a$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+200}:\\
\;\;\;\;z \cdot \frac{-t}{a\_m}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z t) < -9.9999999999999997e199

    1. Initial program 74.6%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 80.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
    4. Step-by-step derivation
      1. *-commutative80.4%

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

        \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \frac{t}{a}\right)} \]
      3. neg-mul-1100.0%

        \[\leadsto \color{blue}{-z \cdot \frac{t}{a}} \]
      4. distribute-rgt-neg-in100.0%

        \[\leadsto \color{blue}{z \cdot \left(-\frac{t}{a}\right)} \]
      5. distribute-frac-neg100.0%

        \[\leadsto z \cdot \color{blue}{\frac{-t}{a}} \]
    5. Simplified100.0%

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

    if -9.9999999999999997e199 < (*.f64 z t)

    1. Initial program 94.2%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification95.0%

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

Alternative 10: 49.8% accurate, 0.9× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\ \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq 1.5 \cdot 10^{-157}:\\ \;\;\;\;x \cdot \frac{y}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{a\_m}\\ \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
 :precision binary64
 (* a_s (if (<= y 1.5e-157) (* x (/ y a_m)) (* y (/ x a_m)))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
	double tmp;
	if (y <= 1.5e-157) {
		tmp = x * (y / a_m);
	} else {
		tmp = y * (x / a_m);
	}
	return a_s * tmp;
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a_m
    real(8) :: tmp
    if (y <= 1.5d-157) then
        tmp = x * (y / a_m)
    else
        tmp = y * (x / a_m)
    end if
    code = a_s * tmp
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
	double tmp;
	if (y <= 1.5e-157) {
		tmp = x * (y / a_m);
	} else {
		tmp = y * (x / a_m);
	}
	return a_s * tmp;
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
def code(a_s, x, y, z, t, a_m):
	tmp = 0
	if y <= 1.5e-157:
		tmp = x * (y / a_m)
	else:
		tmp = y * (x / a_m)
	return a_s * tmp
a\_m = abs(a)
a\_s = copysign(1.0, a)
x, y, z, t, a_m = sort([x, y, z, t, a_m])
x, y, z, t, a_m = sort([x, y, z, t, a_m])
function code(a_s, x, y, z, t, a_m)
	tmp = 0.0
	if (y <= 1.5e-157)
		tmp = Float64(x * Float64(y / a_m));
	else
		tmp = Float64(y * Float64(x / a_m));
	end
	return Float64(a_s * tmp)
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
	tmp = 0.0;
	if (y <= 1.5e-157)
		tmp = x * (y / a_m);
	else
		tmp = y * (x / a_m);
	end
	tmp_2 = a_s * tmp;
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[y, 1.5e-157], N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / a$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq 1.5 \cdot 10^{-157}:\\
\;\;\;\;x \cdot \frac{y}{a\_m}\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a\_m}\\


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

    1. Initial program 92.3%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 52.9%

      \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
    4. Step-by-step derivation
      1. associate-*r/52.3%

        \[\leadsto \color{blue}{x \cdot \frac{y}{a}} \]
    5. Simplified52.3%

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

    if 1.5e-157 < y

    1. Initial program 90.6%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 87.9%

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
    7. Step-by-step derivation
      1. *-commutative50.0%

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
      2. associate-*r/49.9%

        \[\leadsto \color{blue}{y \cdot \frac{x}{a}} \]
    8. Simplified49.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.5 \cdot 10^{-157}:\\ \;\;\;\;x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 50.4% accurate, 1.8× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\ \\ a\_s \cdot \left(x \cdot \frac{y}{a\_m}\right) \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m) :precision binary64 (* a_s (* x (/ y a_m))))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
	return a_s * (x * (y / a_m));
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a_m
    code = a_s * (x * (y / a_m))
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
	return a_s * (x * (y / a_m));
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
def code(a_s, x, y, z, t, a_m):
	return a_s * (x * (y / a_m))
a\_m = abs(a)
a\_s = copysign(1.0, a)
x, y, z, t, a_m = sort([x, y, z, t, a_m])
x, y, z, t, a_m = sort([x, y, z, t, a_m])
function code(a_s, x, y, z, t, a_m)
	return Float64(a_s * Float64(x * Float64(y / a_m)))
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp = code(a_s, x, y, z, t, a_m)
	tmp = a_s * (x * (y / a_m));
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \left(x \cdot \frac{y}{a\_m}\right)
\end{array}
Derivation
  1. Initial program 91.6%

    \[\frac{x \cdot y - z \cdot t}{a} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf 51.7%

    \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
  4. Step-by-step derivation
    1. associate-*r/50.3%

      \[\leadsto \color{blue}{x \cdot \frac{y}{a}} \]
  5. Simplified50.3%

    \[\leadsto \color{blue}{x \cdot \frac{y}{a}} \]
  6. Final simplification50.3%

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

Alternative 12: 49.5% accurate, 1.8× speedup?

\[\begin{array}{l} a\_m = \left|a\right| \\ a\_s = \mathsf{copysign}\left(1, a\right) \\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\ [x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\ \\ a\_s \cdot \frac{x \cdot y}{a\_m} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m) :precision binary64 (* a_s (/ (* x y) a_m)))
a\_m = fabs(a);
a\_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
	return a_s * ((x * y) / a_m);
}
a\_m = abs(a)
a\_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
    real(8), intent (in) :: a_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a_m
    code = a_s * ((x * y) / a_m)
end function
a\_m = Math.abs(a);
a\_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
	return a_s * ((x * y) / a_m);
}
a\_m = math.fabs(a)
a\_s = math.copysign(1.0, a)
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
[x, y, z, t, a_m] = sort([x, y, z, t, a_m])
def code(a_s, x, y, z, t, a_m):
	return a_s * ((x * y) / a_m)
a\_m = abs(a)
a\_s = copysign(1.0, a)
x, y, z, t, a_m = sort([x, y, z, t, a_m])
x, y, z, t, a_m = sort([x, y, z, t, a_m])
function code(a_s, x, y, z, t, a_m)
	return Float64(a_s * Float64(Float64(x * y) / a_m))
end
a\_m = abs(a);
a\_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp = code(a_s, x, y, z, t, a_m)
	tmp = a_s * ((x * y) / a_m);
end
a\_m = N[Abs[a], $MachinePrecision]
a\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * N[(N[(x * y), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a\_m = \left|a\right|
\\
a\_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \frac{x \cdot y}{a\_m}
\end{array}
Derivation
  1. Initial program 91.6%

    \[\frac{x \cdot y - z \cdot t}{a} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf 51.7%

    \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
  4. Final simplification51.7%

    \[\leadsto \frac{x \cdot y}{a} \]
  5. Add Preprocessing

Developer target: 91.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{a} \cdot x - \frac{t}{a} \cdot z\\ \mathbf{if}\;z < -2.468684968699548 \cdot 10^{+170}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z < 6.309831121978371 \cdot 10^{-71}:\\ \;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- (* (/ y a) x) (* (/ t a) z))))
   (if (< z -2.468684968699548e+170)
     t_1
     (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = ((y / a) * x) - ((t / a) * z);
	double tmp;
	if (z < -2.468684968699548e+170) {
		tmp = t_1;
	} else if (z < 6.309831121978371e-71) {
		tmp = ((x * y) - (z * t)) / a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((y / a) * x) - ((t / a) * z)
    if (z < (-2.468684968699548d+170)) then
        tmp = t_1
    else if (z < 6.309831121978371d-71) then
        tmp = ((x * y) - (z * t)) / a
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = ((y / a) * x) - ((t / a) * z);
	double tmp;
	if (z < -2.468684968699548e+170) {
		tmp = t_1;
	} else if (z < 6.309831121978371e-71) {
		tmp = ((x * y) - (z * t)) / a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = ((y / a) * x) - ((t / a) * z)
	tmp = 0
	if z < -2.468684968699548e+170:
		tmp = t_1
	elif z < 6.309831121978371e-71:
		tmp = ((x * y) - (z * t)) / a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(Float64(y / a) * x) - Float64(Float64(t / a) * z))
	tmp = 0.0
	if (z < -2.468684968699548e+170)
		tmp = t_1;
	elseif (z < 6.309831121978371e-71)
		tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = ((y / a) * x) - ((t / a) * z);
	tmp = 0.0;
	if (z < -2.468684968699548e+170)
		tmp = t_1;
	elseif (z < 6.309831121978371e-71)
		tmp = ((x * y) - (z * t)) / a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y / a), $MachinePrecision] * x), $MachinePrecision] - N[(N[(t / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -2.468684968699548e+170], t$95$1, If[Less[z, 6.309831121978371e-71], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot x - \frac{t}{a} \cdot z\\
\mathbf{if}\;z < -2.468684968699548 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z < 6.309831121978371 \cdot 10^{-71}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024080 
(FPCore (x y z t a)
  :name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
  :precision binary64

  :alt
  (if (< z -2.468684968699548e+170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))

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