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

Percentage Accurate: 91.0% → 95.6%
Time: 8.6s
Alternatives: 11
Speedup: 0.4×

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 11 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.0% 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: 95.6% 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 -\infty:\\ \;\;\;\;x \cdot {\left(\sqrt{\frac{y - t \cdot \frac{z}{x}}{a\_m}}\right)}^{2}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+267}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(-t\right)\right)}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{x}{a\_m}, z \cdot \frac{t}{-a\_m}\right)\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) 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))
      (* x (pow (sqrt (/ (- y (* t (/ z x))) a_m)) 2.0))
      (if (<= t_1 5e+267)
        (/ (fma x y (* z (- t))) a_m)
        (fma y (/ x 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 t_1 = (x * y) - (z * t);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = x * pow(sqrt(((y - (t * (z / x))) / a_m)), 2.0);
	} else if (t_1 <= 5e+267) {
		tmp = fma(x, y, (z * -t)) / a_m;
	} else {
		tmp = fma(y, (x / a_m), (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(x * (sqrt(Float64(Float64(y - Float64(t * Float64(z / x))) / a_m)) ^ 2.0));
	elseif (t_1 <= 5e+267)
		tmp = Float64(fma(x, y, Float64(z * Float64(-t))) / a_m);
	else
		tmp = fma(y, Float64(x / a_m), Float64(z * Float64(t / Float64(-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, (-Infinity)], N[(x * N[Power[N[Sqrt[N[(N[(y - N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a$95$m), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+267], N[(N[(x * y + N[(z * (-t)), $MachinePrecision]), $MachinePrecision] / a$95$m), $MachinePrecision], N[(y * N[(x / a$95$m), $MachinePrecision] + N[(z * N[(t / (-a$95$m)), $MachinePrecision]), $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:\\
\;\;\;\;x \cdot {\left(\sqrt{\frac{y - t \cdot \frac{z}{x}}{a\_m}}\right)}^{2}\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+267}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(-t\right)\right)}{a\_m}\\

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


\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 72.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{{\left(\sqrt{\frac{y}{a} - t \cdot \frac{\frac{z}{x}}{a}}\right)}^{2}} \]
      3. associate-*r/37.5%

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

        \[\leadsto x \cdot {\left(\sqrt{\color{blue}{\frac{y - t \cdot \frac{z}{x}}{a}}}\right)}^{2} \]
    7. Applied egg-rr37.5%

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

    if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 4.9999999999999999e267

    1. Initial program 98.8%

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

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

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{t \cdot z}}{a} \]
      3. div-sub98.8%

        \[\leadsto \color{blue}{\frac{x \cdot y - t \cdot z}{a}} \]
      4. *-commutative98.8%

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
      5. fmm-def98.8%

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

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

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

    if 4.9999999999999999e267 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

Alternative 2: 96.7% accurate, 0.1× 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:\\ \;\;\;\;x \cdot \left(\frac{y}{a\_m} - t \cdot \frac{\frac{z}{x}}{a\_m}\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+267}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(-t\right)\right)}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{x}{a\_m}, z \cdot \frac{t}{-a\_m}\right)\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) 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))
      (* x (- (/ y a_m) (* t (/ (/ z x) a_m))))
      (if (<= t_1 5e+267)
        (/ (fma x y (* z (- t))) a_m)
        (fma y (/ x 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 t_1 = (x * y) - (z * t);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = x * ((y / a_m) - (t * ((z / x) / a_m)));
	} else if (t_1 <= 5e+267) {
		tmp = fma(x, y, (z * -t)) / a_m;
	} else {
		tmp = fma(y, (x / a_m), (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(x * Float64(Float64(y / a_m) - Float64(t * Float64(Float64(z / x) / a_m))));
	elseif (t_1 <= 5e+267)
		tmp = Float64(fma(x, y, Float64(z * Float64(-t))) / a_m);
	else
		tmp = fma(y, Float64(x / a_m), Float64(z * Float64(t / Float64(-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, (-Infinity)], N[(x * N[(N[(y / a$95$m), $MachinePrecision] - N[(t * N[(N[(z / x), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+267], N[(N[(x * y + N[(z * (-t)), $MachinePrecision]), $MachinePrecision] / a$95$m), $MachinePrecision], N[(y * N[(x / a$95$m), $MachinePrecision] + N[(z * N[(t / (-a$95$m)), $MachinePrecision]), $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:\\
\;\;\;\;x \cdot \left(\frac{y}{a\_m} - t \cdot \frac{\frac{z}{x}}{a\_m}\right)\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+267}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(-t\right)\right)}{a\_m}\\

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


\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 72.3%

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 4.9999999999999999e267

    1. Initial program 98.8%

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

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

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{t \cdot z}}{a} \]
      3. div-sub98.8%

        \[\leadsto \color{blue}{\frac{x \cdot y - t \cdot z}{a}} \]
      4. *-commutative98.8%

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
      5. fmm-def98.8%

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

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

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

    if 4.9999999999999999e267 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

Alternative 3: 95.0% accurate, 0.1× 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}\;a\_m \leq 7 \cdot 10^{-30}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(-t\right)\right)}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{a\_m}{x}} - t \cdot \frac{z}{a\_m}\\ \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) 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 (<= a_m 7e-30)
    (/ (fma x y (* z (- t))) a_m)
    (- (/ y (/ a_m x)) (* t (/ z 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 (a_m <= 7e-30) {
		tmp = fma(x, y, (z * -t)) / a_m;
	} else {
		tmp = (y / (a_m / x)) - (t * (z / 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 (a_m <= 7e-30)
		tmp = Float64(fma(x, y, Float64(z * Float64(-t))) / a_m);
	else
		tmp = Float64(Float64(y / Float64(a_m / x)) - Float64(t * Float64(z / 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_] := N[(a$95$s * If[LessEqual[a$95$m, 7e-30], N[(N[(x * y + N[(z * (-t)), $MachinePrecision]), $MachinePrecision] / a$95$m), $MachinePrecision], N[(N[(y / N[(a$95$m / x), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / a$95$m), $MachinePrecision]), $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}\;a\_m \leq 7 \cdot 10^{-30}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(-t\right)\right)}{a\_m}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 7.0000000000000006e-30

    1. Initial program 91.4%

      \[\frac{x \cdot y - z \cdot t}{a} \]
    2. Step-by-step derivation
      1. div-sub88.7%

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
      2. *-commutative88.7%

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{t \cdot z}}{a} \]
      3. div-sub91.4%

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot t}}{a} \]
      5. fmm-def92.5%

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

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

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

    if 7.0000000000000006e-30 < a

    1. Initial program 88.3%

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

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

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

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

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

        \[\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*89.3%

        \[\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-rr89.3%

      \[\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. fmm-undef89.3%

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x \cdot y}{\sqrt{a}}}{\sqrt{a}}} - z \cdot \frac{t}{a} \]
      3. *-lft-identity89.3%

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

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

        \[\leadsto \color{blue}{\frac{x}{\sqrt{a}} \cdot \frac{y}{\sqrt{a}}} - z \cdot \frac{t}{a} \]
      6. associate-*r/91.7%

        \[\leadsto \frac{x}{\sqrt{a}} \cdot \frac{y}{\sqrt{a}} - \color{blue}{\frac{z \cdot t}{a}} \]
      7. *-commutative91.7%

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

        \[\leadsto \frac{x}{\sqrt{a}} \cdot \frac{y}{\sqrt{a}} - \color{blue}{t \cdot \frac{z}{a}} \]
    6. Simplified92.8%

      \[\leadsto \color{blue}{\frac{x}{\sqrt{a}} \cdot \frac{y}{\sqrt{a}} - t \cdot \frac{z}{a}} \]
    7. Step-by-step derivation
      1. clear-num92.8%

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

        \[\leadsto \color{blue}{\frac{1 \cdot y}{\frac{\sqrt{a}}{x} \cdot \sqrt{a}}} - t \cdot \frac{z}{a} \]
      3. *-un-lft-identity91.9%

        \[\leadsto \frac{\color{blue}{y}}{\frac{\sqrt{a}}{x} \cdot \sqrt{a}} - t \cdot \frac{z}{a} \]
    8. Applied egg-rr91.9%

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

        \[\leadsto \frac{y}{\color{blue}{\frac{\sqrt{a} \cdot \sqrt{a}}{x}}} - t \cdot \frac{z}{a} \]
      2. rem-square-sqrt92.0%

        \[\leadsto \frac{y}{\frac{\color{blue}{a}}{x}} - t \cdot \frac{z}{a} \]
    10. Simplified92.0%

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

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

Alternative 4: 71.7% accurate, 0.2× 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 \frac{y}{a\_m}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4 \cdot 10^{-14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-155}:\\ \;\;\;\;t \cdot \frac{z}{-a\_m}\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-36}:\\ \;\;\;\;z \cdot \frac{t}{-a\_m}\\ \mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+111}:\\ \;\;\;\;\frac{x \cdot y}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) 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 a_m))))
   (*
    a_s
    (if (<= (* x y) -4e-14)
      t_1
      (if (<= (* x y) 4e-155)
        (* t (/ z (- a_m)))
        (if (<= (* x y) 2e-71)
          t_1
          (if (<= (* x y) 2e-36)
            (* z (/ t (- a_m)))
            (if (<= (* x y) 4e+111) (/ (* x y) a_m) t_1))))))))
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 / a_m);
	double tmp;
	if ((x * y) <= -4e-14) {
		tmp = t_1;
	} else if ((x * y) <= 4e-155) {
		tmp = t * (z / -a_m);
	} else if ((x * y) <= 2e-71) {
		tmp = t_1;
	} else if ((x * y) <= 2e-36) {
		tmp = z * (t / -a_m);
	} else if ((x * y) <= 4e+111) {
		tmp = (x * y) / a_m;
	} else {
		tmp = t_1;
	}
	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 / a_m)
    if ((x * y) <= (-4d-14)) then
        tmp = t_1
    else if ((x * y) <= 4d-155) then
        tmp = t * (z / -a_m)
    else if ((x * y) <= 2d-71) then
        tmp = t_1
    else if ((x * y) <= 2d-36) then
        tmp = z * (t / -a_m)
    else if ((x * y) <= 4d+111) then
        tmp = (x * y) / a_m
    else
        tmp = t_1
    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 / a_m);
	double tmp;
	if ((x * y) <= -4e-14) {
		tmp = t_1;
	} else if ((x * y) <= 4e-155) {
		tmp = t * (z / -a_m);
	} else if ((x * y) <= 2e-71) {
		tmp = t_1;
	} else if ((x * y) <= 2e-36) {
		tmp = z * (t / -a_m);
	} else if ((x * y) <= 4e+111) {
		tmp = (x * y) / a_m;
	} else {
		tmp = t_1;
	}
	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 / a_m)
	tmp = 0
	if (x * y) <= -4e-14:
		tmp = t_1
	elif (x * y) <= 4e-155:
		tmp = t * (z / -a_m)
	elif (x * y) <= 2e-71:
		tmp = t_1
	elif (x * y) <= 2e-36:
		tmp = z * (t / -a_m)
	elif (x * y) <= 4e+111:
		tmp = (x * y) / a_m
	else:
		tmp = t_1
	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(x * Float64(y / a_m))
	tmp = 0.0
	if (Float64(x * y) <= -4e-14)
		tmp = t_1;
	elseif (Float64(x * y) <= 4e-155)
		tmp = Float64(t * Float64(z / Float64(-a_m)));
	elseif (Float64(x * y) <= 2e-71)
		tmp = t_1;
	elseif (Float64(x * y) <= 2e-36)
		tmp = Float64(z * Float64(t / Float64(-a_m)));
	elseif (Float64(x * y) <= 4e+111)
		tmp = Float64(Float64(x * y) / a_m);
	else
		tmp = t_1;
	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 / a_m);
	tmp = 0.0;
	if ((x * y) <= -4e-14)
		tmp = t_1;
	elseif ((x * y) <= 4e-155)
		tmp = t * (z / -a_m);
	elseif ((x * y) <= 2e-71)
		tmp = t_1;
	elseif ((x * y) <= 2e-36)
		tmp = z * (t / -a_m);
	elseif ((x * y) <= 4e+111)
		tmp = (x * y) / a_m;
	else
		tmp = t_1;
	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[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[N[(x * y), $MachinePrecision], -4e-14], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 4e-155], N[(t * N[(z / (-a$95$m)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e-71], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-36], N[(z * N[(t / (-a$95$m)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+111], N[(N[(x * y), $MachinePrecision] / a$95$m), $MachinePrecision], t$95$1]]]]]), $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 \frac{y}{a\_m}\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+111}:\\
\;\;\;\;\frac{x \cdot y}{a\_m}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -4e-14 or 4.00000000000000006e-155 < (*.f64 x y) < 1.9999999999999998e-71 or 3.99999999999999983e111 < (*.f64 x y)

    1. Initial program 85.1%

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

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

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

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

    if -4e-14 < (*.f64 x y) < 4.00000000000000006e-155

    1. Initial program 95.3%

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

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

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

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

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

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

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

    if 1.9999999999999998e-71 < (*.f64 x y) < 1.9999999999999999e-36

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-36 < (*.f64 x y) < 3.99999999999999983e111

    1. Initial program 96.2%

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

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

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

Alternative 5: 72.7% accurate, 0.2× 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 \frac{y}{a\_m}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4 \cdot 10^{-14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-155}:\\ \;\;\;\;\frac{z \cdot t}{-a\_m}\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-36}:\\ \;\;\;\;z \cdot \frac{t}{-a\_m}\\ \mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+111}:\\ \;\;\;\;\frac{x \cdot y}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) 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 a_m))))
   (*
    a_s
    (if (<= (* x y) -4e-14)
      t_1
      (if (<= (* x y) 4e-155)
        (/ (* z t) (- a_m))
        (if (<= (* x y) 2e-71)
          t_1
          (if (<= (* x y) 2e-36)
            (* z (/ t (- a_m)))
            (if (<= (* x y) 4e+111) (/ (* x y) a_m) t_1))))))))
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 / a_m);
	double tmp;
	if ((x * y) <= -4e-14) {
		tmp = t_1;
	} else if ((x * y) <= 4e-155) {
		tmp = (z * t) / -a_m;
	} else if ((x * y) <= 2e-71) {
		tmp = t_1;
	} else if ((x * y) <= 2e-36) {
		tmp = z * (t / -a_m);
	} else if ((x * y) <= 4e+111) {
		tmp = (x * y) / a_m;
	} else {
		tmp = t_1;
	}
	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 / a_m)
    if ((x * y) <= (-4d-14)) then
        tmp = t_1
    else if ((x * y) <= 4d-155) then
        tmp = (z * t) / -a_m
    else if ((x * y) <= 2d-71) then
        tmp = t_1
    else if ((x * y) <= 2d-36) then
        tmp = z * (t / -a_m)
    else if ((x * y) <= 4d+111) then
        tmp = (x * y) / a_m
    else
        tmp = t_1
    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 / a_m);
	double tmp;
	if ((x * y) <= -4e-14) {
		tmp = t_1;
	} else if ((x * y) <= 4e-155) {
		tmp = (z * t) / -a_m;
	} else if ((x * y) <= 2e-71) {
		tmp = t_1;
	} else if ((x * y) <= 2e-36) {
		tmp = z * (t / -a_m);
	} else if ((x * y) <= 4e+111) {
		tmp = (x * y) / a_m;
	} else {
		tmp = t_1;
	}
	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 / a_m)
	tmp = 0
	if (x * y) <= -4e-14:
		tmp = t_1
	elif (x * y) <= 4e-155:
		tmp = (z * t) / -a_m
	elif (x * y) <= 2e-71:
		tmp = t_1
	elif (x * y) <= 2e-36:
		tmp = z * (t / -a_m)
	elif (x * y) <= 4e+111:
		tmp = (x * y) / a_m
	else:
		tmp = t_1
	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(x * Float64(y / a_m))
	tmp = 0.0
	if (Float64(x * y) <= -4e-14)
		tmp = t_1;
	elseif (Float64(x * y) <= 4e-155)
		tmp = Float64(Float64(z * t) / Float64(-a_m));
	elseif (Float64(x * y) <= 2e-71)
		tmp = t_1;
	elseif (Float64(x * y) <= 2e-36)
		tmp = Float64(z * Float64(t / Float64(-a_m)));
	elseif (Float64(x * y) <= 4e+111)
		tmp = Float64(Float64(x * y) / a_m);
	else
		tmp = t_1;
	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 / a_m);
	tmp = 0.0;
	if ((x * y) <= -4e-14)
		tmp = t_1;
	elseif ((x * y) <= 4e-155)
		tmp = (z * t) / -a_m;
	elseif ((x * y) <= 2e-71)
		tmp = t_1;
	elseif ((x * y) <= 2e-36)
		tmp = z * (t / -a_m);
	elseif ((x * y) <= 4e+111)
		tmp = (x * y) / a_m;
	else
		tmp = t_1;
	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[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[N[(x * y), $MachinePrecision], -4e-14], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 4e-155], N[(N[(z * t), $MachinePrecision] / (-a$95$m)), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e-71], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-36], N[(z * N[(t / (-a$95$m)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+111], N[(N[(x * y), $MachinePrecision] / a$95$m), $MachinePrecision], t$95$1]]]]]), $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 \frac{y}{a\_m}\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+111}:\\
\;\;\;\;\frac{x \cdot y}{a\_m}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -4e-14 or 4.00000000000000006e-155 < (*.f64 x y) < 1.9999999999999998e-71 or 3.99999999999999983e111 < (*.f64 x y)

    1. Initial program 85.1%

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

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

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

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

    if -4e-14 < (*.f64 x y) < 4.00000000000000006e-155

    1. Initial program 95.3%

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

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

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

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

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

    if 1.9999999999999998e-71 < (*.f64 x y) < 1.9999999999999999e-36

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-36 < (*.f64 x y) < 3.99999999999999983e111

    1. Initial program 96.2%

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

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

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

Alternative 6: 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 -5 \cdot 10^{+234} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+267}\right):\\ \;\;\;\;x \cdot \frac{y}{a\_m} - z \cdot \frac{t}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1}{a\_m}\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) 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 (or (<= t_1 -5e+234) (not (<= t_1 5e+267)))
      (- (* x (/ y a_m)) (* z (/ t a_m)))
      (/ t_1 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 <= -5e+234) || !(t_1 <= 5e+267)) {
		tmp = (x * (y / a_m)) - (z * (t / a_m));
	} else {
		tmp = t_1 / 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 <= (-5d+234)) .or. (.not. (t_1 <= 5d+267))) then
        tmp = (x * (y / a_m)) - (z * (t / a_m))
    else
        tmp = t_1 / 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 <= -5e+234) || !(t_1 <= 5e+267)) {
		tmp = (x * (y / a_m)) - (z * (t / a_m));
	} else {
		tmp = t_1 / 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 <= -5e+234) or not (t_1 <= 5e+267):
		tmp = (x * (y / a_m)) - (z * (t / a_m))
	else:
		tmp = t_1 / 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 <= -5e+234) || !(t_1 <= 5e+267))
		tmp = Float64(Float64(x * Float64(y / a_m)) - Float64(z * Float64(t / a_m)));
	else
		tmp = Float64(t_1 / 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 <= -5e+234) || ~((t_1 <= 5e+267)))
		tmp = (x * (y / a_m)) - (z * (t / a_m));
	else
		tmp = t_1 / 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[Or[LessEqual[t$95$1, -5e+234], N[Not[LessEqual[t$95$1, 5e+267]], $MachinePrecision]], N[(N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision] - N[(z * N[(t / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / 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])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+234} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+267}\right):\\
\;\;\;\;x \cdot \frac{y}{a\_m} - z \cdot \frac{t}{a\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{a\_m}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (*.f64 x y) (*.f64 z t)) < -5.0000000000000003e234 or 4.9999999999999999e267 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 72.2%

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

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

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

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

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

    if -5.0000000000000003e234 < (-.f64 (*.f64 x y) (*.f64 z t)) < 4.9999999999999999e267

    1. Initial program 98.7%

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

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

Alternative 7: 96.5% 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 -5 \cdot 10^{+234}:\\ \;\;\;\;\frac{x}{\frac{a\_m}{y}} - t \cdot \frac{z}{a\_m}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+267}:\\ \;\;\;\;\frac{t\_1}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{a\_m} - z \cdot \frac{t}{a\_m}\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) 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 -5e+234)
      (- (/ x (/ a_m y)) (* t (/ z a_m)))
      (if (<= t_1 5e+267) (/ t_1 a_m) (- (* 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 t_1 = (x * y) - (z * t);
	double tmp;
	if (t_1 <= -5e+234) {
		tmp = (x / (a_m / y)) - (t * (z / a_m));
	} else if (t_1 <= 5e+267) {
		tmp = t_1 / a_m;
	} else {
		tmp = (x * (y / a_m)) - (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 <= (-5d+234)) then
        tmp = (x / (a_m / y)) - (t * (z / a_m))
    else if (t_1 <= 5d+267) then
        tmp = t_1 / a_m
    else
        tmp = (x * (y / a_m)) - (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 <= -5e+234) {
		tmp = (x / (a_m / y)) - (t * (z / a_m));
	} else if (t_1 <= 5e+267) {
		tmp = t_1 / a_m;
	} else {
		tmp = (x * (y / a_m)) - (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 <= -5e+234:
		tmp = (x / (a_m / y)) - (t * (z / a_m))
	elif t_1 <= 5e+267:
		tmp = t_1 / a_m
	else:
		tmp = (x * (y / a_m)) - (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 <= -5e+234)
		tmp = Float64(Float64(x / Float64(a_m / y)) - Float64(t * Float64(z / a_m)));
	elseif (t_1 <= 5e+267)
		tmp = Float64(t_1 / a_m);
	else
		tmp = Float64(Float64(x * Float64(y / a_m)) - Float64(z * Float64(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 <= -5e+234)
		tmp = (x / (a_m / y)) - (t * (z / a_m));
	elseif (t_1 <= 5e+267)
		tmp = t_1 / a_m;
	else
		tmp = (x * (y / a_m)) - (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, -5e+234], N[(N[(x / N[(a$95$m / y), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+267], N[(t$95$1 / a$95$m), $MachinePrecision], N[(N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision] - N[(z * N[(t / a$95$m), $MachinePrecision]), $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 -5 \cdot 10^{+234}:\\
\;\;\;\;\frac{x}{\frac{a\_m}{y}} - t \cdot \frac{z}{a\_m}\\

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

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a\_m} - z \cdot \frac{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)) < -5.0000000000000003e234

    1. Initial program 81.2%

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

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

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

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

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

        \[\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.8%

        \[\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.8%

      \[\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. fmm-undef37.8%

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

        \[\leadsto \color{blue}{\frac{1 \cdot \frac{x \cdot y}{\sqrt{a}}}{\sqrt{a}}} - z \cdot \frac{t}{a} \]
      3. *-lft-identity37.8%

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

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

        \[\leadsto \color{blue}{\frac{x}{\sqrt{a}} \cdot \frac{y}{\sqrt{a}}} - z \cdot \frac{t}{a} \]
      6. associate-*r/40.4%

        \[\leadsto \frac{x}{\sqrt{a}} \cdot \frac{y}{\sqrt{a}} - \color{blue}{\frac{z \cdot t}{a}} \]
      7. *-commutative40.4%

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

        \[\leadsto \frac{x}{\sqrt{a}} \cdot \frac{y}{\sqrt{a}} - \color{blue}{t \cdot \frac{z}{a}} \]
    6. Simplified44.8%

      \[\leadsto \color{blue}{\frac{x}{\sqrt{a}} \cdot \frac{y}{\sqrt{a}} - t \cdot \frac{z}{a}} \]
    7. Step-by-step derivation
      1. *-commutative44.8%

        \[\leadsto \color{blue}{\frac{y}{\sqrt{a}} \cdot \frac{x}{\sqrt{a}}} - t \cdot \frac{z}{a} \]
      2. clear-num44.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{a}}{y}}} \cdot \frac{x}{\sqrt{a}} - t \cdot \frac{z}{a} \]
      3. frac-times44.9%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{\frac{\sqrt{a}}{y} \cdot \sqrt{a}}} - t \cdot \frac{z}{a} \]
      4. *-un-lft-identity44.9%

        \[\leadsto \frac{\color{blue}{x}}{\frac{\sqrt{a}}{y} \cdot \sqrt{a}} - t \cdot \frac{z}{a} \]
    8. Applied egg-rr44.9%

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

        \[\leadsto \frac{x}{\color{blue}{\frac{\sqrt{a} \cdot \sqrt{a}}{y}}} - t \cdot \frac{z}{a} \]
      2. rem-square-sqrt97.3%

        \[\leadsto \frac{x}{\frac{\color{blue}{a}}{y}} - t \cdot \frac{z}{a} \]
    10. Simplified97.3%

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

    if -5.0000000000000003e234 < (-.f64 (*.f64 x y) (*.f64 z t)) < 4.9999999999999999e267

    1. Initial program 98.7%

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

    if 4.9999999999999999e267 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 63.0%

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

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

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

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

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

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

Alternative 8: 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:\\ \;\;\;\;x \cdot \left(\frac{y}{a\_m} - t \cdot \frac{\frac{z}{x}}{a\_m}\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+267}:\\ \;\;\;\;\frac{t\_1}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{a\_m} - z \cdot \frac{t}{a\_m}\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) 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))
      (* x (- (/ y a_m) (* t (/ (/ z x) a_m))))
      (if (<= t_1 5e+267) (/ t_1 a_m) (- (* 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 t_1 = (x * y) - (z * t);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = x * ((y / a_m) - (t * ((z / x) / a_m)));
	} else if (t_1 <= 5e+267) {
		tmp = t_1 / a_m;
	} else {
		tmp = (x * (y / a_m)) - (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 = x * ((y / a_m) - (t * ((z / x) / a_m)));
	} else if (t_1 <= 5e+267) {
		tmp = t_1 / a_m;
	} else {
		tmp = (x * (y / a_m)) - (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 = x * ((y / a_m) - (t * ((z / x) / a_m)))
	elif t_1 <= 5e+267:
		tmp = t_1 / a_m
	else:
		tmp = (x * (y / a_m)) - (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(x * Float64(Float64(y / a_m) - Float64(t * Float64(Float64(z / x) / a_m))));
	elseif (t_1 <= 5e+267)
		tmp = Float64(t_1 / a_m);
	else
		tmp = Float64(Float64(x * Float64(y / a_m)) - Float64(z * Float64(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 = x * ((y / a_m) - (t * ((z / x) / a_m)));
	elseif (t_1 <= 5e+267)
		tmp = t_1 / a_m;
	else
		tmp = (x * (y / a_m)) - (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[(x * N[(N[(y / a$95$m), $MachinePrecision] - N[(t * N[(N[(z / x), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+267], N[(t$95$1 / a$95$m), $MachinePrecision], N[(N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision] - N[(z * N[(t / a$95$m), $MachinePrecision]), $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:\\
\;\;\;\;x \cdot \left(\frac{y}{a\_m} - t \cdot \frac{\frac{z}{x}}{a\_m}\right)\\

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

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a\_m} - z \cdot \frac{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 72.3%

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 4.9999999999999999e267

    1. Initial program 98.8%

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

    if 4.9999999999999999e267 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 63.0%

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

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

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

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

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

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

Alternative 9: 71.6% 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 \frac{y}{a\_m}\\ a\_s \cdot \begin{array}{l} \mathbf{if}\;x \cdot y \leq -4 \cdot 10^{-14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-155}:\\ \;\;\;\;t \cdot \frac{z}{-a\_m}\\ \mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+111}:\\ \;\;\;\;\frac{x \cdot y}{a\_m}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) 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 a_m))))
   (*
    a_s
    (if (<= (* x y) -4e-14)
      t_1
      (if (<= (* x y) 4e-155)
        (* t (/ z (- a_m)))
        (if (<= (* x y) 4e+111) (/ (* x y) a_m) t_1))))))
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 / a_m);
	double tmp;
	if ((x * y) <= -4e-14) {
		tmp = t_1;
	} else if ((x * y) <= 4e-155) {
		tmp = t * (z / -a_m);
	} else if ((x * y) <= 4e+111) {
		tmp = (x * y) / a_m;
	} else {
		tmp = t_1;
	}
	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 / a_m)
    if ((x * y) <= (-4d-14)) then
        tmp = t_1
    else if ((x * y) <= 4d-155) then
        tmp = t * (z / -a_m)
    else if ((x * y) <= 4d+111) then
        tmp = (x * y) / a_m
    else
        tmp = t_1
    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 / a_m);
	double tmp;
	if ((x * y) <= -4e-14) {
		tmp = t_1;
	} else if ((x * y) <= 4e-155) {
		tmp = t * (z / -a_m);
	} else if ((x * y) <= 4e+111) {
		tmp = (x * y) / a_m;
	} else {
		tmp = t_1;
	}
	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 / a_m)
	tmp = 0
	if (x * y) <= -4e-14:
		tmp = t_1
	elif (x * y) <= 4e-155:
		tmp = t * (z / -a_m)
	elif (x * y) <= 4e+111:
		tmp = (x * y) / a_m
	else:
		tmp = t_1
	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(x * Float64(y / a_m))
	tmp = 0.0
	if (Float64(x * y) <= -4e-14)
		tmp = t_1;
	elseif (Float64(x * y) <= 4e-155)
		tmp = Float64(t * Float64(z / Float64(-a_m)));
	elseif (Float64(x * y) <= 4e+111)
		tmp = Float64(Float64(x * y) / a_m);
	else
		tmp = t_1;
	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 / a_m);
	tmp = 0.0;
	if ((x * y) <= -4e-14)
		tmp = t_1;
	elseif ((x * y) <= 4e-155)
		tmp = t * (z / -a_m);
	elseif ((x * y) <= 4e+111)
		tmp = (x * y) / a_m;
	else
		tmp = t_1;
	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[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[N[(x * y), $MachinePrecision], -4e-14], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 4e-155], N[(t * N[(z / (-a$95$m)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+111], N[(N[(x * y), $MachinePrecision] / a$95$m), $MachinePrecision], t$95$1]]]), $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 \frac{y}{a\_m}\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;x \cdot y \leq -4 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+111}:\\
\;\;\;\;\frac{x \cdot y}{a\_m}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -4e-14 or 3.99999999999999983e111 < (*.f64 x y)

    1. Initial program 84.0%

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

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

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

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

    if -4e-14 < (*.f64 x y) < 4.00000000000000006e-155

    1. Initial program 95.3%

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

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

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

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

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

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

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

    if 4.00000000000000006e-155 < (*.f64 x y) < 3.99999999999999983e111

    1. Initial program 95.6%

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

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

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

Alternative 10: 93.5% 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])\\ \\ a\_s \cdot \begin{array}{l} \mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+234} \lor \neg \left(x \cdot y \leq 10^{+164}\right):\\ \;\;\;\;x \cdot \frac{y}{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 #s(literal 1 binary64) 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 (<= (* x y) -5e+234) (not (<= (* x y) 1e+164)))
    (* x (/ y 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 (((x * y) <= -5e+234) || !((x * y) <= 1e+164)) {
		tmp = x * (y / 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 (((x * y) <= (-5d+234)) .or. (.not. ((x * y) <= 1d+164))) then
        tmp = x * (y / 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 (((x * y) <= -5e+234) || !((x * y) <= 1e+164)) {
		tmp = x * (y / 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 ((x * y) <= -5e+234) or not ((x * y) <= 1e+164):
		tmp = x * (y / 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(x * y) <= -5e+234) || !(Float64(x * y) <= 1e+164))
		tmp = Float64(x * Float64(y / 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 (((x * y) <= -5e+234) || ~(((x * y) <= 1e+164)))
		tmp = x * (y / 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[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+234], N[Not[LessEqual[N[(x * y), $MachinePrecision], 1e+164]], $MachinePrecision]], N[(x * N[(y / 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}\;x \cdot y \leq -5 \cdot 10^{+234} \lor \neg \left(x \cdot y \leq 10^{+164}\right):\\
\;\;\;\;x \cdot \frac{y}{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 x y) < -5.0000000000000003e234 or 1e164 < (*.f64 x y)

    1. Initial program 74.2%

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

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

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

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

    if -5.0000000000000003e234 < (*.f64 x y) < 1e164

    1. Initial program 95.5%

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

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

Alternative 11: 51.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 \left(x \cdot \frac{y}{a\_m}\right) \end{array} \]
a\_m = (fabs.f64 a)
a\_s = (copysign.f64 #s(literal 1 binary64) 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 90.5%

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

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

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

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

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

Developer target: 91.5% 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 2024089 
(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))