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

Percentage Accurate: 91.6% → 97.2%
Time: 12.6s
Alternatives: 9
Speedup: 0.7×

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 9 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 91.6% 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: 97.2% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\ [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\ \\ \begin{array}{l} t_1 := x \cdot y - z \cdot t\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, x, \left(-t\right) \cdot \frac{z}{a}\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+305}:\\ \;\;\;\;\frac{t\_1}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y}{t}, x, -z\right)}{a} \cdot t\\ \end{array} \end{array} \]
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a 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 (<= t_1 (- INFINITY))
     (fma (/ y a) x (* (- t) (/ z a)))
     (if (<= t_1 2e+305) (/ t_1 a) (* (/ (fma (/ y t) x (- z)) a) t)))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
	double t_1 = (x * y) - (z * t);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = fma((y / a), x, (-t * (z / a)));
	} else if (t_1 <= 2e+305) {
		tmp = t_1 / a;
	} else {
		tmp = (fma((y / t), x, -z) / a) * t;
	}
	return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a])
x, y, z, t, a = sort([x, y, z, t, a])
function code(x, y, z, t, a)
	t_1 = Float64(Float64(x * y) - Float64(z * t))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = fma(Float64(y / a), x, Float64(Float64(-t) * Float64(z / a)));
	elseif (t_1 <= 2e+305)
		tmp = Float64(t_1 / a);
	else
		tmp = Float64(Float64(fma(Float64(y / t), x, Float64(-z)) / a) * t);
	end
	return tmp
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a 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[LessEqual[t$95$1, (-Infinity)], N[(N[(y / a), $MachinePrecision] * x + N[((-t) * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+305], N[(t$95$1 / a), $MachinePrecision], N[(N[(N[(N[(y / t), $MachinePrecision] * x + (-z)), $MachinePrecision] / a), $MachinePrecision] * t), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, x, \left(-t\right) \cdot \frac{z}{a}\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+305}:\\
\;\;\;\;\frac{t\_1}{a}\\

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


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

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

        \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
      2. lift--.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot t}}{a} \]
      3. div-subN/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{z \cdot t}}{a} \]
      5. *-commutativeN/A

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{t \cdot z}}{a} \]
      6. associate-/l*N/A

        \[\leadsto \frac{x \cdot y}{a} - \color{blue}{t \cdot \frac{z}{a}} \]
      7. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \frac{\color{blue}{x \cdot y}}{a} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
      9. associate-/l*N/A

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot x} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
      11. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right)} \]
      12. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}}\right) \]
      14. lower-neg.f64N/A

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

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

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

    if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1.9999999999999999e305

    1. Initial program 99.1%

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

    if 1.9999999999999999e305 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 61.6%

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

        \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
      2. lift--.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot t}}{a} \]
      3. div-subN/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{z \cdot t}}{a} \]
      5. *-commutativeN/A

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{t \cdot z}}{a} \]
      6. associate-/l*N/A

        \[\leadsto \frac{x \cdot y}{a} - \color{blue}{t \cdot \frac{z}{a}} \]
      7. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \frac{\color{blue}{x \cdot y}}{a} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
      9. associate-/l*N/A

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot x} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
      11. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right)} \]
      12. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}}\right) \]
      14. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(-t\right)} \cdot \frac{z}{a}\right) \]
      15. lower-/.f6490.6

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(\frac{x \cdot y}{a \cdot z} + -1 \cdot \frac{t}{a}\right)} \]
      2. distribute-lft-inN/A

        \[\leadsto \color{blue}{z \cdot \frac{x \cdot y}{a \cdot z} + z \cdot \left(-1 \cdot \frac{t}{a}\right)} \]
      3. remove-double-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot \frac{x \cdot y}{a \cdot z}\right)\right)\right)\right)} + z \cdot \left(-1 \cdot \frac{t}{a}\right) \]
      4. distribute-rgt-neg-outN/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{x \cdot y}{a \cdot z} + \frac{t}{a}\right)\right)} \]
      11. *-commutativeN/A

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{z} - t}{a} \cdot z} \]
    8. Taylor expanded in t around inf

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

        \[\leadsto t \cdot \color{blue}{\left(\frac{x \cdot y}{a \cdot t} + -1 \cdot \frac{z}{a}\right)} \]
      2. distribute-rgt-inN/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{a \cdot t} \cdot t + \left(-1 \cdot \frac{z}{a}\right) \cdot t} \]
      3. remove-double-negN/A

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{x \cdot y}{a \cdot t}\right)} \cdot \left(-1 \cdot t\right) + \left(-1 \cdot \frac{z}{a}\right) \cdot t \]
      8. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \frac{x \cdot y}{a \cdot t}\right) \cdot \left(-1 \cdot t\right) + \color{blue}{\frac{z}{a} \cdot \left(-1 \cdot t\right)} \]
      10. distribute-rgt-inN/A

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

        \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(-1 \cdot \frac{x \cdot y}{a \cdot t} + \frac{z}{a}\right)\right)} \]
      12. *-commutativeN/A

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

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

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

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

Alternative 2: 95.8% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\ [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\ \\ \begin{array}{l} t_1 := \frac{x \cdot y - z \cdot t}{a}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+284}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{-t}{x}, z, y\right)}{a} \cdot x\\ \mathbf{elif}\;t\_1 \leq 10^{+284}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y}{t}, x, -z\right)}{a} \cdot t\\ \end{array} \end{array} \]
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a 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 -1e+284)
     (* (/ (fma (/ (- t) x) z y) a) x)
     (if (<= t_1 1e+284) t_1 (* (/ (fma (/ y t) x (- z)) a) t)))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
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 <= -1e+284) {
		tmp = (fma((-t / x), z, y) / a) * x;
	} else if (t_1 <= 1e+284) {
		tmp = t_1;
	} else {
		tmp = (fma((y / t), x, -z) / a) * t;
	}
	return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a])
x, y, z, t, a = sort([x, y, z, t, a])
function code(x, y, z, t, a)
	t_1 = Float64(Float64(Float64(x * y) - Float64(z * t)) / a)
	tmp = 0.0
	if (t_1 <= -1e+284)
		tmp = Float64(Float64(fma(Float64(Float64(-t) / x), z, y) / a) * x);
	elseif (t_1 <= 1e+284)
		tmp = t_1;
	else
		tmp = Float64(Float64(fma(Float64(y / t), x, Float64(-z)) / a) * t);
	end
	return tmp
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a 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, -1e+284], N[(N[(N[(N[((-t) / x), $MachinePrecision] * z + y), $MachinePrecision] / a), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 1e+284], t$95$1, N[(N[(N[(N[(y / t), $MachinePrecision] * x + (-z)), $MachinePrecision] / a), $MachinePrecision] * t), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := \frac{x \cdot y - z \cdot t}{a}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+284}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{-t}{x}, z, y\right)}{a} \cdot x\\

\mathbf{elif}\;t\_1 \leq 10^{+284}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 76.4%

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

        \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
      2. lift--.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot t}}{a} \]
      3. div-subN/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{z \cdot t}}{a} \]
      5. *-commutativeN/A

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{t \cdot z}}{a} \]
      6. associate-/l*N/A

        \[\leadsto \frac{x \cdot y}{a} - \color{blue}{t \cdot \frac{z}{a}} \]
      7. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \frac{\color{blue}{x \cdot y}}{a} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
      9. associate-/l*N/A

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot x} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
      11. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right)} \]
      12. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}}\right) \]
      14. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(-t\right)} \cdot \frac{z}{a}\right) \]
      15. lower-/.f6489.2

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(\frac{x \cdot y}{a \cdot z} + -1 \cdot \frac{t}{a}\right)} \]
      2. distribute-lft-inN/A

        \[\leadsto \color{blue}{z \cdot \frac{x \cdot y}{a \cdot z} + z \cdot \left(-1 \cdot \frac{t}{a}\right)} \]
      3. remove-double-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot \frac{x \cdot y}{a \cdot z}\right)\right)\right)\right)} + z \cdot \left(-1 \cdot \frac{t}{a}\right) \]
      4. distribute-rgt-neg-outN/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{x \cdot y}{a \cdot z} + \frac{t}{a}\right)\right)} \]
      11. *-commutativeN/A

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{z} - t}{a} \cdot z} \]
    8. Taylor expanded in x around inf

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

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

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

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

        \[\leadsto \left(\frac{\color{blue}{\left(-1 \cdot t\right) \cdot z}}{a \cdot x} + \frac{y}{a}\right) \cdot x \]
      5. *-commutativeN/A

        \[\leadsto \left(\frac{\left(-1 \cdot t\right) \cdot z}{\color{blue}{x \cdot a}} + \frac{y}{a}\right) \cdot x \]
      6. times-fracN/A

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

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

        \[\leadsto \left(\color{blue}{\frac{\left(-1 \cdot \frac{t}{x}\right) \cdot z}{a}} + \frac{y}{a}\right) \cdot x \]
      9. div-add-revN/A

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-1 \cdot \frac{t}{x}, z, y\right)}}{a} \cdot x \]
      12. associate-*r/N/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{-1 \cdot t}{x}}, z, y\right)}{a} \cdot x \]
      13. lower-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\frac{-1 \cdot t}{x}}, z, y\right)}{a} \cdot x \]
      14. mul-1-negN/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{\color{blue}{\mathsf{neg}\left(t\right)}}{x}, z, y\right)}{a} \cdot x \]
      15. lower-neg.f6488.3

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

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

    if -1.00000000000000008e284 < (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a) < 1.00000000000000008e284

    1. Initial program 98.9%

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

    if 1.00000000000000008e284 < (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a)

    1. Initial program 81.4%

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

        \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
      2. lift--.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot t}}{a} \]
      3. div-subN/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{z \cdot t}}{a} \]
      5. *-commutativeN/A

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{t \cdot z}}{a} \]
      6. associate-/l*N/A

        \[\leadsto \frac{x \cdot y}{a} - \color{blue}{t \cdot \frac{z}{a}} \]
      7. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \frac{\color{blue}{x \cdot y}}{a} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
      9. associate-/l*N/A

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot x} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
      11. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right)} \]
      12. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}}\right) \]
      14. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(-t\right)} \cdot \frac{z}{a}\right) \]
      15. lower-/.f6489.1

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(\frac{x \cdot y}{a \cdot z} + -1 \cdot \frac{t}{a}\right)} \]
      2. distribute-lft-inN/A

        \[\leadsto \color{blue}{z \cdot \frac{x \cdot y}{a \cdot z} + z \cdot \left(-1 \cdot \frac{t}{a}\right)} \]
      3. remove-double-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot \frac{x \cdot y}{a \cdot z}\right)\right)\right)\right)} + z \cdot \left(-1 \cdot \frac{t}{a}\right) \]
      4. distribute-rgt-neg-outN/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{x \cdot y}{a \cdot z} + \frac{t}{a}\right)\right)} \]
      11. *-commutativeN/A

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{z} - t}{a} \cdot z} \]
    8. Taylor expanded in t around inf

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

        \[\leadsto t \cdot \color{blue}{\left(\frac{x \cdot y}{a \cdot t} + -1 \cdot \frac{z}{a}\right)} \]
      2. distribute-rgt-inN/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{a \cdot t} \cdot t + \left(-1 \cdot \frac{z}{a}\right) \cdot t} \]
      3. remove-double-negN/A

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{x \cdot y}{a \cdot t}\right)} \cdot \left(-1 \cdot t\right) + \left(-1 \cdot \frac{z}{a}\right) \cdot t \]
      8. *-commutativeN/A

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

        \[\leadsto \left(-1 \cdot \frac{x \cdot y}{a \cdot t}\right) \cdot \left(-1 \cdot t\right) + \color{blue}{\frac{z}{a} \cdot \left(-1 \cdot t\right)} \]
      10. distribute-rgt-inN/A

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

        \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(-1 \cdot \frac{x \cdot y}{a \cdot t} + \frac{z}{a}\right)\right)} \]
      12. *-commutativeN/A

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

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

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

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

Alternative 3: 96.2% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\ [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\ \\ \begin{array}{l} t_1 := \frac{x \cdot y - z \cdot t}{a}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{y \cdot \frac{x}{z} - t}{a} \cdot z\\ \mathbf{elif}\;t\_1 \leq 10^{+284}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y}{t}, x, -z\right)}{a} \cdot t\\ \end{array} \end{array} \]
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a 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 (- INFINITY))
     (* (/ (- (* y (/ x z)) t) a) z)
     (if (<= t_1 1e+284) t_1 (* (/ (fma (/ y t) x (- z)) a) t)))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
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 <= -((double) INFINITY)) {
		tmp = (((y * (x / z)) - t) / a) * z;
	} else if (t_1 <= 1e+284) {
		tmp = t_1;
	} else {
		tmp = (fma((y / t), x, -z) / a) * t;
	}
	return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a])
x, y, z, t, a = sort([x, y, z, t, a])
function code(x, y, z, t, a)
	t_1 = Float64(Float64(Float64(x * y) - Float64(z * t)) / a)
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(Float64(Float64(y * Float64(x / z)) - t) / a) * z);
	elseif (t_1 <= 1e+284)
		tmp = t_1;
	else
		tmp = Float64(Float64(fma(Float64(y / t), x, Float64(-z)) / a) * t);
	end
	return tmp
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a 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, (-Infinity)], N[(N[(N[(N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] / a), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$1, 1e+284], t$95$1, N[(N[(N[(N[(y / t), $MachinePrecision] * x + (-z)), $MachinePrecision] / a), $MachinePrecision] * t), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := \frac{x \cdot y - z \cdot t}{a}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{y \cdot \frac{x}{z} - t}{a} \cdot z\\

\mathbf{elif}\;t\_1 \leq 10^{+284}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 74.8%

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

        \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
      2. lift--.f64N/A

        \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot t}}{a} \]
      3. div-subN/A

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{z \cdot t}}{a} \]
      5. *-commutativeN/A

        \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{t \cdot z}}{a} \]
      6. associate-/l*N/A

        \[\leadsto \frac{x \cdot y}{a} - \color{blue}{t \cdot \frac{z}{a}} \]
      7. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \frac{\color{blue}{x \cdot y}}{a} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
      9. associate-/l*N/A

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

        \[\leadsto \color{blue}{\frac{y}{a} \cdot x} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
      11. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right)} \]
      12. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}}\right) \]
      14. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(-t\right)} \cdot \frac{z}{a}\right) \]
      15. lower-/.f6488.5

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(\frac{x \cdot y}{a \cdot z} + -1 \cdot \frac{t}{a}\right)} \]
      2. distribute-lft-inN/A

        \[\leadsto \color{blue}{z \cdot \frac{x \cdot y}{a \cdot z} + z \cdot \left(-1 \cdot \frac{t}{a}\right)} \]
      3. remove-double-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot \frac{x \cdot y}{a \cdot z}\right)\right)\right)\right)} + z \cdot \left(-1 \cdot \frac{t}{a}\right) \]
      4. distribute-rgt-neg-outN/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{x \cdot y}{a \cdot z} + \frac{t}{a}\right)\right)} \]
      11. *-commutativeN/A

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

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

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

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

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

      if -inf.0 < (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a) < 1.00000000000000008e284

      1. Initial program 99.0%

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

      if 1.00000000000000008e284 < (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a)

      1. Initial program 81.4%

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

          \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
        2. lift--.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot t}}{a} \]
        3. div-subN/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{z \cdot t}}{a} \]
        5. *-commutativeN/A

          \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{t \cdot z}}{a} \]
        6. associate-/l*N/A

          \[\leadsto \frac{x \cdot y}{a} - \color{blue}{t \cdot \frac{z}{a}} \]
        7. fp-cancel-sub-sign-invN/A

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

          \[\leadsto \frac{\color{blue}{x \cdot y}}{a} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
        9. associate-/l*N/A

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

          \[\leadsto \color{blue}{\frac{y}{a} \cdot x} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
        11. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right)} \]
        12. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right) \]
        13. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}}\right) \]
        14. lower-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(-t\right)} \cdot \frac{z}{a}\right) \]
        15. lower-/.f6489.1

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

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

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

          \[\leadsto z \cdot \color{blue}{\left(\frac{x \cdot y}{a \cdot z} + -1 \cdot \frac{t}{a}\right)} \]
        2. distribute-lft-inN/A

          \[\leadsto \color{blue}{z \cdot \frac{x \cdot y}{a \cdot z} + z \cdot \left(-1 \cdot \frac{t}{a}\right)} \]
        3. remove-double-negN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot \frac{x \cdot y}{a \cdot z}\right)\right)\right)\right)} + z \cdot \left(-1 \cdot \frac{t}{a}\right) \]
        4. distribute-rgt-neg-outN/A

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

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

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

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

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

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

          \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{x \cdot y}{a \cdot z} + \frac{t}{a}\right)\right)} \]
        11. *-commutativeN/A

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{z} - t}{a} \cdot z} \]
      8. Taylor expanded in t around inf

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

          \[\leadsto t \cdot \color{blue}{\left(\frac{x \cdot y}{a \cdot t} + -1 \cdot \frac{z}{a}\right)} \]
        2. distribute-rgt-inN/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{a \cdot t} \cdot t + \left(-1 \cdot \frac{z}{a}\right) \cdot t} \]
        3. remove-double-negN/A

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

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

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

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

          \[\leadsto \color{blue}{\left(-1 \cdot \frac{x \cdot y}{a \cdot t}\right)} \cdot \left(-1 \cdot t\right) + \left(-1 \cdot \frac{z}{a}\right) \cdot t \]
        8. *-commutativeN/A

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

          \[\leadsto \left(-1 \cdot \frac{x \cdot y}{a \cdot t}\right) \cdot \left(-1 \cdot t\right) + \color{blue}{\frac{z}{a} \cdot \left(-1 \cdot t\right)} \]
        10. distribute-rgt-inN/A

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

          \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(-1 \cdot \frac{x \cdot y}{a \cdot t} + \frac{z}{a}\right)\right)} \]
        12. *-commutativeN/A

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

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

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

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{y}{t}, x, -z\right)}{a} \cdot t} \]
    9. Recombined 3 regimes into one program.
    10. Add Preprocessing

    Alternative 4: 96.7% accurate, 0.3× speedup?

    \[\begin{array}{l} [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\ [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\ \\ \begin{array}{l} t_1 := x \cdot y - z \cdot t\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+305}\right):\\ \;\;\;\;\frac{y \cdot \frac{x}{z} - t}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1}{a}\\ \end{array} \end{array} \]
    NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
    NOTE: x, y, z, t, and a 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 (- INFINITY)) (not (<= t_1 2e+305)))
         (* (/ (- (* y (/ x z)) t) a) z)
         (/ t_1 a))))
    assert(x < y && y < z && z < t && t < a);
    assert(x < y && y < z && z < t && t < a);
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (x * y) - (z * t);
    	double tmp;
    	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+305)) {
    		tmp = (((y * (x / z)) - t) / a) * z;
    	} else {
    		tmp = t_1 / a;
    	}
    	return tmp;
    }
    
    assert x < y && y < z && z < t && t < a;
    assert x < y && y < z && z < t && t < a;
    public static double code(double x, double y, double z, double t, double a) {
    	double t_1 = (x * y) - (z * t);
    	double tmp;
    	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+305)) {
    		tmp = (((y * (x / z)) - t) / a) * z;
    	} else {
    		tmp = t_1 / a;
    	}
    	return tmp;
    }
    
    [x, y, z, t, a] = sort([x, y, z, t, a])
    [x, y, z, t, a] = sort([x, y, z, t, a])
    def code(x, y, z, t, a):
    	t_1 = (x * y) - (z * t)
    	tmp = 0
    	if (t_1 <= -math.inf) or not (t_1 <= 2e+305):
    		tmp = (((y * (x / z)) - t) / a) * z
    	else:
    		tmp = t_1 / a
    	return tmp
    
    x, y, z, t, a = sort([x, y, z, t, a])
    x, y, z, t, a = sort([x, y, z, t, a])
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(x * y) - Float64(z * t))
    	tmp = 0.0
    	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+305))
    		tmp = Float64(Float64(Float64(Float64(y * Float64(x / z)) - t) / a) * z);
    	else
    		tmp = Float64(t_1 / a);
    	end
    	return tmp
    end
    
    x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
    x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
    function tmp_2 = code(x, y, z, t, a)
    	t_1 = (x * y) - (z * t);
    	tmp = 0.0;
    	if ((t_1 <= -Inf) || ~((t_1 <= 2e+305)))
    		tmp = (((y * (x / z)) - t) / a) * z;
    	else
    		tmp = t_1 / a;
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
    NOTE: x, y, z, t, and a 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, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+305]], $MachinePrecision]], N[(N[(N[(N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] / a), $MachinePrecision] * z), $MachinePrecision], N[(t$95$1 / a), $MachinePrecision]]]
    
    \begin{array}{l}
    [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
    [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
    \\
    \begin{array}{l}
    t_1 := x \cdot y - z \cdot t\\
    \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+305}\right):\\
    \;\;\;\;\frac{y \cdot \frac{x}{z} - t}{a} \cdot z\\
    
    \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)) < -inf.0 or 1.9999999999999999e305 < (-.f64 (*.f64 x y) (*.f64 z t))

      1. Initial program 65.2%

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

          \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
        2. lift--.f64N/A

          \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot t}}{a} \]
        3. div-subN/A

          \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{z \cdot t}}{a} \]
        5. *-commutativeN/A

          \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{t \cdot z}}{a} \]
        6. associate-/l*N/A

          \[\leadsto \frac{x \cdot y}{a} - \color{blue}{t \cdot \frac{z}{a}} \]
        7. fp-cancel-sub-sign-invN/A

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

          \[\leadsto \frac{\color{blue}{x \cdot y}}{a} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
        9. associate-/l*N/A

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

          \[\leadsto \color{blue}{\frac{y}{a} \cdot x} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
        11. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right)} \]
        12. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right) \]
        13. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}}\right) \]
        14. lower-neg.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(-t\right)} \cdot \frac{z}{a}\right) \]
        15. lower-/.f6493.9

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

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

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

          \[\leadsto z \cdot \color{blue}{\left(\frac{x \cdot y}{a \cdot z} + -1 \cdot \frac{t}{a}\right)} \]
        2. distribute-lft-inN/A

          \[\leadsto \color{blue}{z \cdot \frac{x \cdot y}{a \cdot z} + z \cdot \left(-1 \cdot \frac{t}{a}\right)} \]
        3. remove-double-negN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z \cdot \frac{x \cdot y}{a \cdot z}\right)\right)\right)\right)} + z \cdot \left(-1 \cdot \frac{t}{a}\right) \]
        4. distribute-rgt-neg-outN/A

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

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

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

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

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

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

          \[\leadsto \color{blue}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{x \cdot y}{a \cdot z} + \frac{t}{a}\right)\right)} \]
        11. *-commutativeN/A

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{z} - t}{a} \cdot z} \]
      8. Step-by-step derivation
        1. Applied rewrites89.0%

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

        if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1.9999999999999999e305

        1. Initial program 99.1%

          \[\frac{x \cdot y - z \cdot t}{a} \]
        2. Add Preprocessing
      9. Recombined 2 regimes into one program.
      10. Final simplification97.1%

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

      Alternative 5: 71.8% accurate, 0.6× speedup?

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

        1. Initial program 87.7%

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

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

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

            \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
          3. lower-/.f6471.8

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

          \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
        6. Step-by-step derivation
          1. Applied rewrites73.9%

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

          if -4e-52 < (*.f64 x y) < 2e3

          1. Initial program 94.5%

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

              \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
            2. lift--.f64N/A

              \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot t}}{a} \]
            3. div-subN/A

              \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
            4. lift-*.f64N/A

              \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{z \cdot t}}{a} \]
            5. *-commutativeN/A

              \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{t \cdot z}}{a} \]
            6. associate-/l*N/A

              \[\leadsto \frac{x \cdot y}{a} - \color{blue}{t \cdot \frac{z}{a}} \]
            7. fp-cancel-sub-sign-invN/A

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

              \[\leadsto \frac{\color{blue}{x \cdot y}}{a} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
            9. associate-/l*N/A

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

              \[\leadsto \color{blue}{\frac{y}{a} \cdot x} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
            11. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right)} \]
            12. lower-/.f64N/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right) \]
            13. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}}\right) \]
            14. lower-neg.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(-t\right)} \cdot \frac{z}{a}\right) \]
            15. lower-/.f6488.6

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

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

            \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
          6. Step-by-step derivation
            1. *-commutativeN/A

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

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

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

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

              \[\leadsto \color{blue}{\frac{-1 \cdot z}{a}} \cdot t \]
            6. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{-1 \cdot z}{a}} \cdot t \]
            7. mul-1-negN/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(z\right)}}{a} \cdot t \]
            8. lower-neg.f6480.5

              \[\leadsto \frac{\color{blue}{-z}}{a} \cdot t \]
          7. Applied rewrites80.5%

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

          if 2e3 < (*.f64 x y)

          1. Initial program 93.3%

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot t}{a} \]
            5. lower-neg.f6420.0

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

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

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

              \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
          8. Applied rewrites80.7%

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

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

        Alternative 6: 93.7% accurate, 0.7× speedup?

        \[\begin{array}{l} [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\ [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\ \\ \begin{array}{l} \mathbf{if}\;z \cdot t \leq -\infty:\\ \;\;\;\;\frac{-z}{a} \cdot t\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\ \end{array} \end{array} \]
        NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
        NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
        (FPCore (x y z t a)
         :precision binary64
         (if (<= (* z t) (- INFINITY)) (* (/ (- z) a) t) (/ (- (* x y) (* z t)) a)))
        assert(x < y && y < z && z < t && t < a);
        assert(x < y && y < z && z < t && t < a);
        double code(double x, double y, double z, double t, double a) {
        	double tmp;
        	if ((z * t) <= -((double) INFINITY)) {
        		tmp = (-z / a) * t;
        	} else {
        		tmp = ((x * y) - (z * t)) / a;
        	}
        	return tmp;
        }
        
        assert x < y && y < z && z < t && t < a;
        assert x < y && y < z && z < t && t < a;
        public static double code(double x, double y, double z, double t, double a) {
        	double tmp;
        	if ((z * t) <= -Double.POSITIVE_INFINITY) {
        		tmp = (-z / a) * t;
        	} else {
        		tmp = ((x * y) - (z * t)) / a;
        	}
        	return tmp;
        }
        
        [x, y, z, t, a] = sort([x, y, z, t, a])
        [x, y, z, t, a] = sort([x, y, z, t, a])
        def code(x, y, z, t, a):
        	tmp = 0
        	if (z * t) <= -math.inf:
        		tmp = (-z / a) * t
        	else:
        		tmp = ((x * y) - (z * t)) / a
        	return tmp
        
        x, y, z, t, a = sort([x, y, z, t, a])
        x, y, z, t, a = sort([x, y, z, t, a])
        function code(x, y, z, t, a)
        	tmp = 0.0
        	if (Float64(z * t) <= Float64(-Inf))
        		tmp = Float64(Float64(Float64(-z) / a) * t);
        	else
        		tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a);
        	end
        	return tmp
        end
        
        x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
        x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
        function tmp_2 = code(x, y, z, t, a)
        	tmp = 0.0;
        	if ((z * t) <= -Inf)
        		tmp = (-z / a) * t;
        	else
        		tmp = ((x * y) - (z * t)) / a;
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
        NOTE: x, y, z, t, and a 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[((-z) / a), $MachinePrecision] * t), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]
        
        \begin{array}{l}
        [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
        [x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
        \\
        \begin{array}{l}
        \mathbf{if}\;z \cdot t \leq -\infty:\\
        \;\;\;\;\frac{-z}{a} \cdot t\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (*.f64 z t) < -inf.0

          1. Initial program 47.2%

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

              \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot t}{a}} \]
            2. lift--.f64N/A

              \[\leadsto \frac{\color{blue}{x \cdot y - z \cdot t}}{a} \]
            3. div-subN/A

              \[\leadsto \color{blue}{\frac{x \cdot y}{a} - \frac{z \cdot t}{a}} \]
            4. lift-*.f64N/A

              \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{z \cdot t}}{a} \]
            5. *-commutativeN/A

              \[\leadsto \frac{x \cdot y}{a} - \frac{\color{blue}{t \cdot z}}{a} \]
            6. associate-/l*N/A

              \[\leadsto \frac{x \cdot y}{a} - \color{blue}{t \cdot \frac{z}{a}} \]
            7. fp-cancel-sub-sign-invN/A

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

              \[\leadsto \frac{\color{blue}{x \cdot y}}{a} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
            9. associate-/l*N/A

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

              \[\leadsto \color{blue}{\frac{y}{a} \cdot x} + \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a} \]
            11. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right)} \]
            12. lower-/.f64N/A

              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{y}{a}}, x, \left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}\right) \]
            13. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(\mathsf{neg}\left(t\right)\right) \cdot \frac{z}{a}}\right) \]
            14. lower-neg.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \color{blue}{\left(-t\right)} \cdot \frac{z}{a}\right) \]
            15. lower-/.f6487.1

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

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

            \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a}} \]
          6. Step-by-step derivation
            1. *-commutativeN/A

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

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

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

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

              \[\leadsto \color{blue}{\frac{-1 \cdot z}{a}} \cdot t \]
            6. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{-1 \cdot z}{a}} \cdot t \]
            7. mul-1-negN/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(z\right)}}{a} \cdot t \]
            8. lower-neg.f6499.6

              \[\leadsto \frac{\color{blue}{-z}}{a} \cdot t \]
          7. Applied rewrites99.6%

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

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

          1. Initial program 95.3%

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

        Alternative 7: 52.7% accurate, 0.7× speedup?

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

          1. Initial program 85.2%

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

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

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

              \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
            3. lower-/.f6442.0

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

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

          if -1e167 < (-.f64 (*.f64 x y) (*.f64 z t))

          1. Initial program 94.7%

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(z\right)\right)} \cdot t}{a} \]
            5. lower-neg.f6449.7

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

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

            \[\leadsto \frac{\color{blue}{x \cdot y}}{a} \]
          7. Step-by-step derivation
            1. lower-*.f6457.9

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

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

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

        Alternative 8: 51.3% accurate, 1.1× speedup?

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

          1. Initial program 94.7%

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

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

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

              \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
            3. lower-/.f6449.3

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

            \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
          6. Step-by-step derivation
            1. Applied rewrites50.9%

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

            if 6.5999999999999998e-110 < a

            1. Initial program 87.8%

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

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

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

                \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
              3. lower-/.f6450.7

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

              \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
          7. Recombined 2 regimes into one program.
          8. Final simplification50.8%

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

          Alternative 9: 51.5% accurate, 1.5× speedup?

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

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

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

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

              \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
            3. lower-/.f6449.8

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

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

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

          Developer Target 1: 91.4% accurate, 0.5× 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 2024337 
          (FPCore (x y z t a)
            :name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
            :precision binary64
          
            :alt
            (! :herbie-platform default (if (< z -246868496869954800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6309831121978371/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z)))))
          
            (/ (- (* x y) (* z t)) a))