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

Percentage Accurate: 91.5% → 97.2%
Time: 9.4s
Alternatives: 11
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 11 alternatives:

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

Initial Program: 91.5% 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 := y \cdot x - t \cdot z\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{a}, y, \frac{-z}{a} \cdot t\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+287}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-z, t, y \cdot x\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\frac{y}{z}}{a}, x, \frac{-t}{a}\right) \cdot z\\ \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 (- (* y x) (* t z))))
   (if (<= t_1 (- INFINITY))
     (fma (/ x a) y (* (/ (- z) a) t))
     (if (<= t_1 4e+287)
       (/ (fma (- z) t (* y x)) a)
       (* (fma (/ (/ y z) a) x (/ (- t) a)) z)))))
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 = (y * x) - (t * z);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = fma((x / a), y, ((-z / a) * t));
	} else if (t_1 <= 4e+287) {
		tmp = fma(-z, t, (y * x)) / a;
	} else {
		tmp = fma(((y / z) / a), x, (-t / a)) * z;
	}
	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(y * x) - Float64(t * z))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = fma(Float64(x / a), y, Float64(Float64(Float64(-z) / a) * t));
	elseif (t_1 <= 4e+287)
		tmp = Float64(fma(Float64(-z), t, Float64(y * x)) / a);
	else
		tmp = Float64(fma(Float64(Float64(y / z) / a), x, Float64(Float64(-t) / a)) * z);
	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[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / a), $MachinePrecision] * y + N[(N[((-z) / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+287], N[(N[((-z) * t + N[(y * x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(N[(N[(y / z), $MachinePrecision] / a), $MachinePrecision] * x + N[((-t) / a), $MachinePrecision]), $MachinePrecision] * z), $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 := y \cdot x - t \cdot z\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{a}, y, \frac{-z}{a} \cdot t\right)\\

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

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


\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 76.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. 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-/.f6487.4

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

      \[\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)) < 4.0000000000000003e287

    1. Initial program 98.4%

      \[\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.f6498.4

        \[\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-*.f6498.4

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

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

    if 4.0000000000000003e287 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 59.5%

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

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

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

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

      \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
    6. 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)} \]
    7. 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. *-commutativeN/A

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

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

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

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

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

Alternative 2: 97.3% 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 := \mathsf{fma}\left(\frac{x}{a}, y, \frac{-z}{a} \cdot t\right)\\ t_2 := y \cdot x - t \cdot z\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+233}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-z, t, y \cdot x\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \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 (fma (/ x a) y (* (/ (- z) a) t))) (t_2 (- (* y x) (* t z))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 2e+233) (/ (fma (- z) t (* y x)) a) t_1))))
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 = fma((x / a), y, ((-z / a) * t));
	double t_2 = (y * x) - (t * z);
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= 2e+233) {
		tmp = fma(-z, t, (y * x)) / a;
	} else {
		tmp = t_1;
	}
	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 = fma(Float64(x / a), y, Float64(Float64(Float64(-z) / a) * t))
	t_2 = Float64(Float64(y * x) - Float64(t * z))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= 2e+233)
		tmp = Float64(fma(Float64(-z), t, Float64(y * x)) / a);
	else
		tmp = t_1;
	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 / a), $MachinePrecision] * y + N[(N[((-z) / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 2e+233], N[(N[((-z) * t + N[(y * x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]
\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 := \mathsf{fma}\left(\frac{x}{a}, y, \frac{-z}{a} \cdot t\right)\\
t_2 := y \cdot x - t \cdot z\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 72.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. *-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-/.f6489.0

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

      \[\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)) < 1.99999999999999995e233

    1. Initial program 98.3%

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

        \[\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-*.f6498.3

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

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

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

Alternative 3: 94.9% accurate, 0.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])\\ \\ \begin{array}{l} \mathbf{if}\;t \cdot z \leq -1 \cdot 10^{+290}:\\ \;\;\;\;\frac{-t}{a} \cdot z\\ \mathbf{elif}\;t \cdot z \leq 10^{+225}:\\ \;\;\;\;\frac{y \cdot x - t \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{-a}{z}}\\ \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 (<= (* t z) -1e+290)
   (* (/ (- t) a) z)
   (if (<= (* t z) 1e+225) (/ (- (* y x) (* t z)) a) (/ t (/ (- a) z)))))
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 ((t * z) <= -1e+290) {
		tmp = (-t / a) * z;
	} else if ((t * z) <= 1e+225) {
		tmp = ((y * x) - (t * z)) / a;
	} else {
		tmp = t / (-a / z);
	}
	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 ((t * z) <= (-1d+290)) then
        tmp = (-t / a) * z
    else if ((t * z) <= 1d+225) then
        tmp = ((y * x) - (t * z)) / a
    else
        tmp = t / (-a / z)
    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 ((t * z) <= -1e+290) {
		tmp = (-t / a) * z;
	} else if ((t * z) <= 1e+225) {
		tmp = ((y * x) - (t * z)) / a;
	} else {
		tmp = t / (-a / z);
	}
	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 (t * z) <= -1e+290:
		tmp = (-t / a) * z
	elif (t * z) <= 1e+225:
		tmp = ((y * x) - (t * z)) / a
	else:
		tmp = t / (-a / z)
	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(t * z) <= -1e+290)
		tmp = Float64(Float64(Float64(-t) / a) * z);
	elseif (Float64(t * z) <= 1e+225)
		tmp = Float64(Float64(Float64(y * x) - Float64(t * z)) / a);
	else
		tmp = Float64(t / Float64(Float64(-a) / z));
	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 ((t * z) <= -1e+290)
		tmp = (-t / a) * z;
	elseif ((t * z) <= 1e+225)
		tmp = ((y * x) - (t * z)) / a;
	else
		tmp = t / (-a / z);
	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[(t * z), $MachinePrecision], -1e+290], N[(N[((-t) / a), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[N[(t * z), $MachinePrecision], 1e+225], N[(N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(t / N[((-a) / z), $MachinePrecision]), $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}\;t \cdot z \leq -1 \cdot 10^{+290}:\\
\;\;\;\;\frac{-t}{a} \cdot z\\

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

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


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

    1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t}}{a} \cdot z \]
    8. Applied rewrites90.0%

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

    if -1.00000000000000006e290 < (*.f64 z t) < 9.99999999999999928e224

    1. Initial program 95.8%

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

    if 9.99999999999999928e224 < (*.f64 z t)

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t}}{a} \cdot z \]
    8. Applied rewrites89.0%

      \[\leadsto \color{blue}{\frac{-t}{a} \cdot z} \]
    9. Step-by-step derivation
      1. Applied rewrites92.2%

        \[\leadsto \frac{t}{\color{blue}{\frac{-a}{z}}} \]
    10. Recombined 3 regimes into one program.
    11. Final simplification95.1%

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

    Alternative 4: 93.6% 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}\;a \leq 8.4 \cdot 10^{+64}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-z, t, y \cdot x\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{a}, y, \left(\frac{-1}{a} \cdot t\right) \cdot z\right)\\ \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 8.4e+64)
       (/ (fma (- z) t (* y x)) a)
       (fma (/ x a) y (* (* (/ -1.0 a) t) z))))
    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 <= 8.4e+64) {
    		tmp = fma(-z, t, (y * x)) / a;
    	} else {
    		tmp = fma((x / a), y, (((-1.0 / a) * t) * z));
    	}
    	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 <= 8.4e+64)
    		tmp = Float64(fma(Float64(-z), t, Float64(y * x)) / a);
    	else
    		tmp = fma(Float64(x / a), y, Float64(Float64(Float64(-1.0 / a) * t) * z));
    	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_] := If[LessEqual[a, 8.4e+64], N[(N[((-z) * t + N[(y * x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x / a), $MachinePrecision] * y + N[(N[(N[(-1.0 / a), $MachinePrecision] * t), $MachinePrecision] * z), $MachinePrecision]), $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 8.4 \cdot 10^{+64}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(-z, t, y \cdot x\right)}{a}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{x}{a}, y, \left(\frac{-1}{a} \cdot t\right) \cdot z\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < 8.4000000000000001e64

      1. Initial program 93.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.f6494.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-*.f6494.2

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

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

      if 8.4000000000000001e64 < a

      1. Initial program 81.1%

        \[\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-/.f6492.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 92.5% 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}\;a \leq 10^{+71}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-z, t, y \cdot x\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-z, \frac{t}{a}, \frac{y \cdot x}{a}\right)\\ \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 1e+71)
       (/ (fma (- z) t (* y x)) a)
       (fma (- z) (/ t a) (/ (* y x) 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 (a <= 1e+71) {
    		tmp = fma(-z, t, (y * x)) / a;
    	} else {
    		tmp = fma(-z, (t / a), ((y * x) / 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 (a <= 1e+71)
    		tmp = Float64(fma(Float64(-z), t, Float64(y * x)) / a);
    	else
    		tmp = fma(Float64(-z), Float64(t / a), Float64(Float64(y * x) / a));
    	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_] := If[LessEqual[a, 1e+71], N[(N[((-z) * t + N[(y * x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[((-z) * N[(t / a), $MachinePrecision] + N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision]), $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 10^{+71}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(-z, t, y \cdot x\right)}{a}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(-z, \frac{t}{a}, \frac{y \cdot x}{a}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < 1e71

      1. Initial program 93.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.f6494.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-*.f6494.2

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

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

      if 1e71 < a

      1. Initial program 81.1%

        \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 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}\;y \cdot x \leq -1 \cdot 10^{-28}:\\ \;\;\;\;\frac{x}{a} \cdot y\\ \mathbf{elif}\;y \cdot x \leq 10^{-61}:\\ \;\;\;\;\frac{-t}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{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 (<= (* y x) -1e-28)
       (* (/ x a) y)
       (if (<= (* y x) 1e-61) (* (/ (- t) a) z) (/ (* y x) 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 ((y * x) <= -1e-28) {
    		tmp = (x / a) * y;
    	} else if ((y * x) <= 1e-61) {
    		tmp = (-t / a) * z;
    	} else {
    		tmp = (y * x) / 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 ((y * x) <= (-1d-28)) then
            tmp = (x / a) * y
        else if ((y * x) <= 1d-61) then
            tmp = (-t / a) * z
        else
            tmp = (y * x) / 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 ((y * x) <= -1e-28) {
    		tmp = (x / a) * y;
    	} else if ((y * x) <= 1e-61) {
    		tmp = (-t / a) * z;
    	} else {
    		tmp = (y * x) / 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 (y * x) <= -1e-28:
    		tmp = (x / a) * y
    	elif (y * x) <= 1e-61:
    		tmp = (-t / a) * z
    	else:
    		tmp = (y * x) / 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(y * x) <= -1e-28)
    		tmp = Float64(Float64(x / a) * y);
    	elseif (Float64(y * x) <= 1e-61)
    		tmp = Float64(Float64(Float64(-t) / a) * z);
    	else
    		tmp = Float64(Float64(y * x) / 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 ((y * x) <= -1e-28)
    		tmp = (x / a) * y;
    	elseif ((y * x) <= 1e-61)
    		tmp = (-t / a) * z;
    	else
    		tmp = (y * x) / 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[(y * x), $MachinePrecision], -1e-28], N[(N[(x / a), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[N[(y * x), $MachinePrecision], 1e-61], N[(N[((-t) / a), $MachinePrecision] * z), $MachinePrecision], N[(N[(y * x), $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}\;y \cdot x \leq -1 \cdot 10^{-28}:\\
    \;\;\;\;\frac{x}{a} \cdot y\\
    
    \mathbf{elif}\;y \cdot x \leq 10^{-61}:\\
    \;\;\;\;\frac{-t}{a} \cdot z\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{y \cdot x}{a}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (*.f64 x y) < -9.99999999999999971e-29

      1. Initial program 92.4%

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

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
      6. Taylor expanded in t around 0

        \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
      7. 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-/.f6476.4

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

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

      if -9.99999999999999971e-29 < (*.f64 x y) < 1e-61

      1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1e-61 < (*.f64 x y)

      1. Initial program 87.6%

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

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

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

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

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

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

    Alternative 7: 73.7% 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} t_1 := \frac{-z}{a} \cdot t\\ \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{-17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+58}:\\ \;\;\;\;\frac{y \cdot x}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \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 (* (/ (- z) a) t)))
       (if (<= (* t z) -2e-17) t_1 (if (<= (* t z) 5e+58) (/ (* y x) a) t_1))))
    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 = (-z / a) * t;
    	double tmp;
    	if ((t * z) <= -2e-17) {
    		tmp = t_1;
    	} else if ((t * z) <= 5e+58) {
    		tmp = (y * x) / a;
    	} else {
    		tmp = t_1;
    	}
    	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) :: t_1
        real(8) :: tmp
        t_1 = (-z / a) * t
        if ((t * z) <= (-2d-17)) then
            tmp = t_1
        else if ((t * z) <= 5d+58) then
            tmp = (y * x) / a
        else
            tmp = t_1
        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 t_1 = (-z / a) * t;
    	double tmp;
    	if ((t * z) <= -2e-17) {
    		tmp = t_1;
    	} else if ((t * z) <= 5e+58) {
    		tmp = (y * x) / a;
    	} else {
    		tmp = t_1;
    	}
    	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 = (-z / a) * t
    	tmp = 0
    	if (t * z) <= -2e-17:
    		tmp = t_1
    	elif (t * z) <= 5e+58:
    		tmp = (y * x) / a
    	else:
    		tmp = t_1
    	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(-z) / a) * t)
    	tmp = 0.0
    	if (Float64(t * z) <= -2e-17)
    		tmp = t_1;
    	elseif (Float64(t * z) <= 5e+58)
    		tmp = Float64(Float64(y * x) / a);
    	else
    		tmp = t_1;
    	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 = (-z / a) * t;
    	tmp = 0.0;
    	if ((t * z) <= -2e-17)
    		tmp = t_1;
    	elseif ((t * z) <= 5e+58)
    		tmp = (y * x) / a;
    	else
    		tmp = t_1;
    	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[((-z) / a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[N[(t * z), $MachinePrecision], -2e-17], t$95$1, If[LessEqual[N[(t * z), $MachinePrecision], 5e+58], N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
    
    \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{-z}{a} \cdot t\\
    \mathbf{if}\;t \cdot z \leq -2 \cdot 10^{-17}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \cdot z \leq 5 \cdot 10^{+58}:\\
    \;\;\;\;\frac{y \cdot x}{a}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 z t) < -2.00000000000000014e-17 or 4.99999999999999986e58 < (*.f64 z t)

      1. Initial program 86.8%

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(-t\right)} \cdot \frac{z}{a} \]
        6. lower-/.f6474.9

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

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

      if -2.00000000000000014e-17 < (*.f64 z t) < 4.99999999999999986e58

      1. Initial program 94.8%

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

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

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

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

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

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

    Alternative 8: 93.5% 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}\;t \cdot z \leq -1 \cdot 10^{+290}:\\ \;\;\;\;\frac{-t}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-y, x, t \cdot z\right) \cdot \frac{-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
     (if (<= (* t z) -1e+290)
       (* (/ (- t) a) z)
       (* (fma (- y) x (* t z)) (/ -1.0 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 ((t * z) <= -1e+290) {
    		tmp = (-t / a) * z;
    	} else {
    		tmp = fma(-y, x, (t * z)) * (-1.0 / 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(t * z) <= -1e+290)
    		tmp = Float64(Float64(Float64(-t) / a) * z);
    	else
    		tmp = Float64(fma(Float64(-y), x, Float64(t * z)) * Float64(-1.0 / a));
    	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_] := If[LessEqual[N[(t * z), $MachinePrecision], -1e+290], N[(N[((-t) / a), $MachinePrecision] * z), $MachinePrecision], N[(N[((-y) * x + N[(t * z), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / a), $MachinePrecision]), $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}\;t \cdot z \leq -1 \cdot 10^{+290}:\\
    \;\;\;\;\frac{-t}{a} \cdot z\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(-y, x, t \cdot z\right) \cdot \frac{-1}{a}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 z t) < -1.00000000000000006e290

      1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-t}}{a} \cdot z \]
      8. Applied rewrites90.0%

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

      if -1.00000000000000006e290 < (*.f64 z t)

      1. Initial program 93.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. frac-2negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 93.6% 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}\;t \cdot z \leq -1 \cdot 10^{+290}:\\ \;\;\;\;\frac{-t}{a} \cdot z\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-z, t, y \cdot x\right)}{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 (<= (* t z) -1e+290) (* (/ (- t) a) z) (/ (fma (- z) t (* y x)) 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 ((t * z) <= -1e+290) {
    		tmp = (-t / a) * z;
    	} else {
    		tmp = fma(-z, t, (y * x)) / 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(t * z) <= -1e+290)
    		tmp = Float64(Float64(Float64(-t) / a) * z);
    	else
    		tmp = Float64(fma(Float64(-z), t, Float64(y * x)) / a);
    	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_] := If[LessEqual[N[(t * z), $MachinePrecision], -1e+290], N[(N[((-t) / a), $MachinePrecision] * z), $MachinePrecision], N[(N[((-z) * t + N[(y * x), $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}\;t \cdot z \leq -1 \cdot 10^{+290}:\\
    \;\;\;\;\frac{-t}{a} \cdot z\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(-z, t, y \cdot x\right)}{a}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 z t) < -1.00000000000000006e290

      1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-t}}{a} \cdot z \]
      8. Applied rewrites90.0%

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

      if -1.00000000000000006e290 < (*.f64 z t)

      1. Initial program 93.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.f6493.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-*.f6493.9

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

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

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

    Alternative 10: 51.6% 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{y}{a} \cdot x \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 (* (/ y a) x))
    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 (y / a) * x;
    }
    
    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 = (y / a) * x
    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 (y / a) * x;
    }
    
    [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 (y / a) * x
    
    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(y / a) * x)
    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 = (y / a) * x;
    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[(y / a), $MachinePrecision] * x), $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{y}{a} \cdot x
    \end{array}
    
    Derivation
    1. Initial program 90.9%

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

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

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

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

      \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
    6. Taylor expanded in t around 0

      \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
    7. 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-/.f6451.9

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

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

        \[\leadsto \frac{y}{a} \cdot \color{blue}{x} \]
      2. Add Preprocessing

      Alternative 11: 51.1% 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 90.9%

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

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a} \]
      6. Taylor expanded in t around 0

        \[\leadsto \color{blue}{\frac{x \cdot y}{a}} \]
      7. 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-/.f6451.9

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

        \[\leadsto \color{blue}{\frac{x}{a} \cdot y} \]
      9. Add Preprocessing

      Developer Target 1: 91.5% 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 2024270 
      (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))