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

Percentage Accurate: 91.3% → 95.2%
Time: 7.5s
Alternatives: 9
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 95.2% accurate, 0.6× speedup?

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

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


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

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000019e-26 < a

    1. Initial program 84.9%

      \[\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. sub-negN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x, \mathsf{neg}\left(\color{blue}{t \cdot \frac{z}{a}}\right)\right) \]
      13. distribute-lft-neg-inN/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-*.f64N/A

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

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

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

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

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

Alternative 2: 97.2% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 71.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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 1e256

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(-z, t, \color{blue}{y \cdot x}\right)}{a} \]
      10. lower-*.f6499.7

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

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

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

Alternative 3: 95.0% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(-z, t, \color{blue}{y \cdot x}\right)}{a} \]
      10. lower-*.f6471.0

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

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-z, t, y \cdot x\right)}}{a} \]
    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.f6495.4

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

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

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

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

      1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 95.0% accurate, 0.5× speedup?

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

      1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(-z, t, \color{blue}{y \cdot x}\right)}{a} \]
        10. lower-*.f6471.0

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-z, t, y \cdot x\right)}}{a} \]
      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.f6495.4

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

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

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

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

        1. Initial program 94.9%

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

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

      Alternative 5: 72.8% accurate, 0.5× speedup?

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

        1. Initial program 85.5%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-z, t, y \cdot x\right)}}{a} \]
        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.f6477.9

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

          \[\leadsto \color{blue}{\frac{-z}{a} \cdot t} \]
        8. Step-by-step derivation
          1. Applied rewrites79.6%

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

          if -4.99999999999999973e33 < (*.f64 z t) < 1.99999999999999993e90

          1. Initial program 94.6%

            \[\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. lower-/.f64N/A

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

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

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

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

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

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

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

            Alternative 6: 72.9% accurate, 0.6× speedup?

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

              1. Initial program 85.5%

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\left(-z\right)} \cdot \frac{t}{a} \]
                7. lower-/.f6479.2

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

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

              if -4.99999999999999973e33 < (*.f64 z t) < 1.99999999999999993e90

              1. Initial program 94.6%

                \[\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. lower-/.f64N/A

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

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

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

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

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

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

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

                Alternative 7: 72.9% accurate, 0.6× speedup?

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

                  1. Initial program 85.5%

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\left(-z\right)} \cdot \frac{t}{a} \]
                    7. lower-/.f6479.2

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

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

                  if -4.99999999999999973e33 < (*.f64 z t) < 1.99999999999999993e90

                  1. Initial program 94.6%

                    \[\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. lower-/.f64N/A

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

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

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

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

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

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

                  Alternative 8: 72.7% accurate, 0.6× speedup?

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

                    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-z, t, y \cdot x\right)}}{a} \]
                    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.f6479.1

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

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

                    if -9.9999999999999999e52 < (*.f64 z t) < 1.99999999999999993e90

                    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. lower-/.f64N/A

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

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

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

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

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

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

                    Alternative 9: 51.7% accurate, 1.5× speedup?

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

                      \[\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. lower-/.f64N/A

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

                        \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
                      3. lower-*.f6451.2

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

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

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

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

                      Developer Target 1: 91.9% 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 2024294 
                      (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))