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

Percentage Accurate: 91.1% → 96.9%
Time: 7.7s
Alternatives: 11
Speedup: 0.5×

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.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.9% accurate, 0.1× speedup?

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

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


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

    1. Initial program 73.3%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a} + \frac{y \cdot x}{a}} \]
    3. Step-by-step derivation
      1. fma-def71.8%

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

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

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

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

    if -4.9999999999999998e274 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1e288

    1. Initial program 98.6%

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

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

Alternative 2: 71.2% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2 \cdot 10^{-44}:\\ \;\;\;\;\frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-133}:\\ \;\;\;\;\frac{-t}{\frac{a}{z}}\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+59}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \mathbf{elif}\;x \cdot y \leq 10^{+130}:\\ \;\;\;\;-\frac{t}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (if (<= (* x y) -2e-44)
   (/ x (/ a y))
   (if (<= (* x y) 2e-133)
     (/ (- t) (/ a z))
     (if (<= (* x y) 5e+59)
       (/ (* x y) a)
       (if (<= (* x y) 1e+130) (- (* (/ t a) z)) (* y (/ x a)))))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x * y) <= -2e-44) {
		tmp = x / (a / y);
	} else if ((x * y) <= 2e-133) {
		tmp = -t / (a / z);
	} else if ((x * y) <= 5e+59) {
		tmp = (x * y) / a;
	} else if ((x * y) <= 1e+130) {
		tmp = -((t / a) * z);
	} else {
		tmp = y * (x / a);
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
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) :: tmp
    if ((x * y) <= (-2d-44)) then
        tmp = x / (a / y)
    else if ((x * y) <= 2d-133) then
        tmp = -t / (a / z)
    else if ((x * y) <= 5d+59) then
        tmp = (x * y) / a
    else if ((x * y) <= 1d+130) then
        tmp = -((t / a) * z)
    else
        tmp = y * (x / a)
    end if
    code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x * y) <= -2e-44) {
		tmp = x / (a / y);
	} else if ((x * y) <= 2e-133) {
		tmp = -t / (a / z);
	} else if ((x * y) <= 5e+59) {
		tmp = (x * y) / a;
	} else if ((x * y) <= 1e+130) {
		tmp = -((t / a) * z);
	} else {
		tmp = y * (x / a);
	}
	return tmp;
}
[x, y] = sort([x, y])
[z, t] = sort([z, t])
def code(x, y, z, t, a):
	tmp = 0
	if (x * y) <= -2e-44:
		tmp = x / (a / y)
	elif (x * y) <= 2e-133:
		tmp = -t / (a / z)
	elif (x * y) <= 5e+59:
		tmp = (x * y) / a
	elif (x * y) <= 1e+130:
		tmp = -((t / a) * z)
	else:
		tmp = y * (x / a)
	return tmp
x, y = sort([x, y])
z, t = sort([z, t])
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(x * y) <= -2e-44)
		tmp = Float64(x / Float64(a / y));
	elseif (Float64(x * y) <= 2e-133)
		tmp = Float64(Float64(-t) / Float64(a / z));
	elseif (Float64(x * y) <= 5e+59)
		tmp = Float64(Float64(x * y) / a);
	elseif (Float64(x * y) <= 1e+130)
		tmp = Float64(-Float64(Float64(t / a) * z));
	else
		tmp = Float64(y * Float64(x / a));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((x * y) <= -2e-44)
		tmp = x / (a / y);
	elseif ((x * y) <= 2e-133)
		tmp = -t / (a / z);
	elseif ((x * y) <= 5e+59)
		tmp = (x * y) / a;
	elseif ((x * y) <= 1e+130)
		tmp = -((t / a) * z);
	else
		tmp = y * (x / a);
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e-44], N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e-133], N[((-t) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+59], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+130], (-N[(N[(t / a), $MachinePrecision] * z), $MachinePrecision]), N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{-44}:\\
\;\;\;\;\frac{x}{\frac{a}{y}}\\

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

\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+59}:\\
\;\;\;\;\frac{x \cdot y}{a}\\

\mathbf{elif}\;x \cdot y \leq 10^{+130}:\\
\;\;\;\;-\frac{t}{a} \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 x y) < -1.99999999999999991e-44

    1. Initial program 90.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{a}} \]
      2. *-commutative69.9%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{a}{y}}} \]
    6. Applied egg-rr71.3%

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

    if -1.99999999999999991e-44 < (*.f64 x y) < 2.0000000000000001e-133

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a}{z}}} \]
      3. distribute-neg-frac84.2%

        \[\leadsto \color{blue}{\frac{-t}{\frac{a}{z}}} \]
    9. Simplified84.2%

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

    if 2.0000000000000001e-133 < (*.f64 x y) < 4.9999999999999997e59

    1. Initial program 96.8%

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

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

    if 4.9999999999999997e59 < (*.f64 x y) < 1.0000000000000001e130

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{z \cdot \left(-t\right)}}{a} \]
      5. *-rgt-identity63.6%

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

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

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

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

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

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

    if 1.0000000000000001e130 < (*.f64 x y)

    1. Initial program 92.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2 \cdot 10^{-44}:\\ \;\;\;\;\frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-133}:\\ \;\;\;\;\frac{-t}{\frac{a}{z}}\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+59}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \mathbf{elif}\;x \cdot y \leq 10^{+130}:\\ \;\;\;\;-\frac{t}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \end{array} \]

Alternative 3: 92.5% accurate, 0.4× speedup?

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

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


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

    1. Initial program 95.1%

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

    if 5.0000000000000001e261 < (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a)

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{1}{\frac{a}{x}}} - \frac{t \cdot z}{a} \]
      6. clear-num84.5%

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

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

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

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

Alternative 4: 94.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 63.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{\left(-t\right) \cdot 1}{a}} \]
      9. *-rgt-identity94.7%

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

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

    if -inf.0 < (*.f64 z t) < 5.0000000000000002e279

    1. Initial program 96.3%

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

    if 5.0000000000000002e279 < (*.f64 z t)

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 94.0% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 78.4%

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

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

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

        \[\leadsto \frac{x}{\frac{a}{y}} - \color{blue}{\frac{z}{\frac{a}{t}}} \]
    3. Applied egg-rr99.8%

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

    if -1.99999999999999987e146 < (*.f64 z t) < 5.0000000000000002e279

    1. Initial program 96.5%

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

    if 5.0000000000000002e279 < (*.f64 z t)

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 67.8% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} t_1 := t \cdot \left(-\frac{z}{a}\right)\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+103}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{+70}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \mathbf{elif}\;z \leq -28:\\ \;\;\;\;-\frac{t}{a} \cdot z\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-131}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (- (/ z a)))))
   (if (<= z -1.4e+103)
     t_1
     (if (<= z -6.5e+70)
       (* y (/ x a))
       (if (<= z -28.0)
         (- (* (/ t a) z))
         (if (<= z 1.75e-131) (/ (* x y) a) t_1))))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * -(z / a);
	double tmp;
	if (z <= -1.4e+103) {
		tmp = t_1;
	} else if (z <= -6.5e+70) {
		tmp = y * (x / a);
	} else if (z <= -28.0) {
		tmp = -((t / a) * z);
	} else if (z <= 1.75e-131) {
		tmp = (x * y) / a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
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 = t * -(z / a)
    if (z <= (-1.4d+103)) then
        tmp = t_1
    else if (z <= (-6.5d+70)) then
        tmp = y * (x / a)
    else if (z <= (-28.0d0)) then
        tmp = -((t / a) * z)
    else if (z <= 1.75d-131) then
        tmp = (x * y) / a
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * -(z / a);
	double tmp;
	if (z <= -1.4e+103) {
		tmp = t_1;
	} else if (z <= -6.5e+70) {
		tmp = y * (x / a);
	} else if (z <= -28.0) {
		tmp = -((t / a) * z);
	} else if (z <= 1.75e-131) {
		tmp = (x * y) / a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y] = sort([x, y])
[z, t] = sort([z, t])
def code(x, y, z, t, a):
	t_1 = t * -(z / a)
	tmp = 0
	if z <= -1.4e+103:
		tmp = t_1
	elif z <= -6.5e+70:
		tmp = y * (x / a)
	elif z <= -28.0:
		tmp = -((t / a) * z)
	elif z <= 1.75e-131:
		tmp = (x * y) / a
	else:
		tmp = t_1
	return tmp
x, y = sort([x, y])
z, t = sort([z, t])
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(-Float64(z / a)))
	tmp = 0.0
	if (z <= -1.4e+103)
		tmp = t_1;
	elseif (z <= -6.5e+70)
		tmp = Float64(y * Float64(x / a));
	elseif (z <= -28.0)
		tmp = Float64(-Float64(Float64(t / a) * z));
	elseif (z <= 1.75e-131)
		tmp = Float64(Float64(x * y) / a);
	else
		tmp = t_1;
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * -(z / a);
	tmp = 0.0;
	if (z <= -1.4e+103)
		tmp = t_1;
	elseif (z <= -6.5e+70)
		tmp = y * (x / a);
	elseif (z <= -28.0)
		tmp = -((t / a) * z);
	elseif (z <= 1.75e-131)
		tmp = (x * y) / a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * (-N[(z / a), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[z, -1.4e+103], t$95$1, If[LessEqual[z, -6.5e+70], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -28.0], (-N[(N[(t / a), $MachinePrecision] * z), $MachinePrecision]), If[LessEqual[z, 1.75e-131], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(-\frac{z}{a}\right)\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+103}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -6.5 \cdot 10^{+70}:\\
\;\;\;\;y \cdot \frac{x}{a}\\

\mathbf{elif}\;z \leq -28:\\
\;\;\;\;-\frac{t}{a} \cdot z\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{-131}:\\
\;\;\;\;\frac{x \cdot y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.40000000000000004e103 or 1.7500000000000001e-131 < z

    1. Initial program 88.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{\frac{a}{t}}} \]
      6. associate-/r/55.3%

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

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

    if -1.40000000000000004e103 < z < -6.49999999999999978e70

    1. Initial program 99.8%

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

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

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

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

    if -6.49999999999999978e70 < z < -28

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{\left(-t\right) \cdot 1}{a}} \]
      9. *-rgt-identity67.3%

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

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

    if -28 < z < 1.7500000000000001e-131

    1. Initial program 95.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+103}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a}\right)\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{+70}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \mathbf{elif}\;z \leq -28:\\ \;\;\;\;-\frac{t}{a} \cdot z\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-131}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-\frac{z}{a}\right)\\ \end{array} \]

Alternative 7: 67.6% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{-188}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+16}:\\ \;\;\;\;-\frac{t}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{a}{y}}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -4.2e-188)
   (* y (/ x a))
   (if (<= y 6.8e+16) (- (* (/ t a) z)) (/ x (/ a y)))))
assert(x < y);
assert(z < t);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -4.2e-188) {
		tmp = y * (x / a);
	} else if (y <= 6.8e+16) {
		tmp = -((t / a) * z);
	} else {
		tmp = x / (a / y);
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
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) :: tmp
    if (y <= (-4.2d-188)) then
        tmp = y * (x / a)
    else if (y <= 6.8d+16) then
        tmp = -((t / a) * z)
    else
        tmp = x / (a / y)
    end if
    code = tmp
end function
assert x < y;
assert z < t;
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -4.2e-188) {
		tmp = y * (x / a);
	} else if (y <= 6.8e+16) {
		tmp = -((t / a) * z);
	} else {
		tmp = x / (a / y);
	}
	return tmp;
}
[x, y] = sort([x, y])
[z, t] = sort([z, t])
def code(x, y, z, t, a):
	tmp = 0
	if y <= -4.2e-188:
		tmp = y * (x / a)
	elif y <= 6.8e+16:
		tmp = -((t / a) * z)
	else:
		tmp = x / (a / y)
	return tmp
x, y = sort([x, y])
z, t = sort([z, t])
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -4.2e-188)
		tmp = Float64(y * Float64(x / a));
	elseif (y <= 6.8e+16)
		tmp = Float64(-Float64(Float64(t / a) * z));
	else
		tmp = Float64(x / Float64(a / y));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -4.2e-188)
		tmp = y * (x / a);
	elseif (y <= 6.8e+16)
		tmp = -((t / a) * z);
	else
		tmp = x / (a / y);
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: z and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.2e-188], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+16], (-N[(N[(t / a), $MachinePrecision] * z), $MachinePrecision]), N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-188}:\\
\;\;\;\;y \cdot \frac{x}{a}\\

\mathbf{elif}\;y \leq 6.8 \cdot 10^{+16}:\\
\;\;\;\;-\frac{t}{a} \cdot z\\

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


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

    1. Initial program 92.2%

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

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

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

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

    if -4.1999999999999998e-188 < y < 6.8e16

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{z \cdot \left(-t\right)}}{a} \]
      5. *-rgt-identity63.8%

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{\left(-t\right) \cdot 1}{a}} \]
      9. *-rgt-identity65.9%

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

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

    if 6.8e16 < y

    1. Initial program 89.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{a}} \]
      2. *-commutative67.4%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{a}{y}}} \]
    6. Applied egg-rr68.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{-188}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+16}:\\ \;\;\;\;-\frac{t}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{a}{y}}\\ \end{array} \]

Alternative 8: 51.7% accurate, 1.3× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.19999999999999999e-145

    1. Initial program 91.6%

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

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

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

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

    if -2.19999999999999999e-145 < z

    1. Initial program 91.6%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot x} \]
    4. Applied egg-rr61.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{-145}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{a}\\ \end{array} \]

Alternative 9: 51.6% accurate, 1.3× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.0000000000000001e-142

    1. Initial program 91.6%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{x}}} \]
    4. Simplified46.8%

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

    if -2.0000000000000001e-142 < z

    1. Initial program 91.6%

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

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot x} \]
    4. Applied egg-rr61.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{-142}:\\ \;\;\;\;\frac{y}{\frac{a}{x}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{a}\\ \end{array} \]

Alternative 10: 51.8% accurate, 1.3× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.29999999999999987e162

    1. Initial program 82.4%

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

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

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

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

    if -3.29999999999999987e162 < z

    1. Initial program 92.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+162}:\\ \;\;\;\;x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \end{array} \]

Alternative 11: 51.3% accurate, 1.8× speedup?

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

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

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

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

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

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

Developer target: 91.6% accurate, 0.6× 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 2023240 
(FPCore (x y z t a)
  :name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
  :precision binary64

  :herbie-target
  (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))