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

Percentage Accurate: 91.2% → 97.1%
Time: 7.9s
Alternatives: 10
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 10 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.2% 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.1% accurate, 0.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (*.f64 x y) (*.f64 z t)) < -2.0000000000000001e300 or 4.00000000000000026e260 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 69.8%

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

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

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

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

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

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

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

    if -2.0000000000000001e300 < (-.f64 (*.f64 x y) (*.f64 z t)) < 4.00000000000000026e260

    1. Initial program 97.6%

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

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

Alternative 2: 97.1% accurate, 0.1× speedup?

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\frac{t_1}{a}\\

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


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

    1. Initial program 69.5%

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

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

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

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

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

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

    if -2.0000000000000001e300 < (-.f64 (*.f64 x y) (*.f64 z t)) < 5e307

    1. Initial program 97.7%

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

    if 5e307 < (-.f64 (*.f64 x y) (*.f64 z t))

    1. Initial program 64.5%

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

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

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

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

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

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

Alternative 3: 97.0% accurate, 0.3× speedup?

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

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


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

    1. Initial program 65.9%

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

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

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

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

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

    if -inf.0 < (-.f64 (*.f64 x y) (*.f64 z t)) < 5e307

    1. Initial program 97.7%

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

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

Alternative 4: 71.6% accurate, 0.3× speedup?

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

\mathbf{elif}\;x \cdot y \leq -1.85 \cdot 10^{-20}:\\
\;\;\;\;\left(-t\right) \cdot \frac{z}{a}\\

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

\mathbf{elif}\;x \cdot y \leq 0:\\
\;\;\;\;\frac{-t}{\frac{a}{z}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (*.f64 x y) < -2.0000000000000002e50

    1. Initial program 82.6%

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

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

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

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

    if -2.0000000000000002e50 < (*.f64 x y) < -1.85e-20

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    if -1.85e-20 < (*.f64 x y) < -4.99999999999999993e-119

    1. Initial program 93.1%

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

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

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

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

    if -4.99999999999999993e-119 < (*.f64 x y) < 0.0

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t \cdot \left(-z\right)}}{a} \]
      3. add-sqr-sqrt46.9%

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

        \[\leadsto \frac{t \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{a} \]
      5. sqr-neg39.6%

        \[\leadsto \frac{t \cdot \sqrt{\color{blue}{z \cdot z}}}{a} \]
      6. sqrt-unprod3.1%

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{a} \]
      7. add-sqr-sqrt14.0%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{z}}} \]
    6. Applied egg-rr14.0%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{z}}} \]
    7. Step-by-step derivation
      1. associate-/r/13.9%

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

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

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

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

        \[\leadsto \left(t \cdot \frac{1}{\color{blue}{\sqrt{a \cdot a}}}\right) \cdot z \]
      4. sqr-neg50.1%

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

        \[\leadsto \left(t \cdot \frac{1}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}}\right) \cdot z \]
      6. add-sqr-sqrt85.8%

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

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{-a}{z}}} \]
      9. un-div-inv85.9%

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

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

        \[\leadsto \frac{-t}{-\color{blue}{\left(-\frac{a}{z}\right)}} \]
      12. remove-double-neg85.9%

        \[\leadsto \frac{-t}{\color{blue}{\frac{a}{z}}} \]
    10. Applied egg-rr85.9%

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

    if 0.0 < (*.f64 x y) < 4.00000000000000015e-89

    1. Initial program 97.8%

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

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

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

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

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

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

    if 4.00000000000000015e-89 < (*.f64 x y)

    1. Initial program 89.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{a}} \]
      2. clear-num68.1%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{y \cdot x}}} \]
      3. *-commutative68.1%

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

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

        \[\leadsto \frac{1}{\frac{a}{\color{blue}{y \cdot x}}} \]
      2. clear-num68.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+50}:\\ \;\;\;\;\frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;x \cdot y \leq -1.85 \cdot 10^{-20}:\\ \;\;\;\;\left(-t\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-119}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \mathbf{elif}\;x \cdot y \leq 0:\\ \;\;\;\;\frac{-t}{\frac{a}{z}}\\ \mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-89}:\\ \;\;\;\;\frac{-z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{a}\\ \end{array} \]

Alternative 5: 65.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -4 \cdot 10^{-38} \lor \neg \left(z \leq 5.6 \cdot 10^{-130}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.30000000000000033e57 or -3.15e-21 < z < -3.9999999999999998e-38 or 5.60000000000000032e-130 < z

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t \cdot \left(-z\right)}}{a} \]
      3. add-sqr-sqrt24.0%

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)}}{a} \]
      4. sqrt-unprod23.3%

        \[\leadsto \frac{t \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{a} \]
      5. sqr-neg23.3%

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

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{a} \]
      7. add-sqr-sqrt3.8%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{z}}} \]
    6. Applied egg-rr6.5%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{z}}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt3.7%

        \[\leadsto \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{\frac{a}{z}} \]
      2. sqrt-unprod27.5%

        \[\leadsto \frac{\color{blue}{\sqrt{t \cdot t}}}{\frac{a}{z}} \]
      3. sqr-neg27.5%

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

        \[\leadsto \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{\frac{a}{z}} \]
      5. add-sqr-sqrt63.5%

        \[\leadsto \frac{\color{blue}{-t}}{\frac{a}{z}} \]
      6. distribute-frac-neg63.5%

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

        \[\leadsto -\color{blue}{\frac{t}{a} \cdot z} \]
      8. distribute-rgt-neg-in62.2%

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

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

    if -4.30000000000000033e57 < z < -3.15e-21

    1. Initial program 92.2%

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

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

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

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

    if -3.9999999999999998e-38 < z < 5.60000000000000032e-130

    1. Initial program 93.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+57}:\\ \;\;\;\;z \cdot \left(-\frac{t}{a}\right)\\ \mathbf{elif}\;z \leq -3.15 \cdot 10^{-21}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-38} \lor \neg \left(z \leq 5.6 \cdot 10^{-130}\right):\\ \;\;\;\;z \cdot \left(-\frac{t}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \end{array} \]

Alternative 6: 65.7% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := \left(-t\right) \cdot \frac{z}{a}\\ \mathbf{if}\;z \leq -4.2 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.45 \cdot 10^{-17}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-40}:\\ \;\;\;\;z \cdot \left(-\frac{t}{a}\right)\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-130}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- t) (/ z a))))
   (if (<= z -4.2e+57)
     t_1
     (if (<= z -4.45e-17)
       (* y (/ x a))
       (if (<= z -1.2e-40)
         (* z (- (/ t a)))
         (if (<= z 1.3e-130) (/ (* x y) a) t_1))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = -t * (z / a);
	double tmp;
	if (z <= -4.2e+57) {
		tmp = t_1;
	} else if (z <= -4.45e-17) {
		tmp = y * (x / a);
	} else if (z <= -1.2e-40) {
		tmp = z * -(t / a);
	} else if (z <= 1.3e-130) {
		tmp = (x * y) / a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = -t * (z / a)
    if (z <= (-4.2d+57)) then
        tmp = t_1
    else if (z <= (-4.45d-17)) then
        tmp = y * (x / a)
    else if (z <= (-1.2d-40)) then
        tmp = z * -(t / a)
    else if (z <= 1.3d-130) then
        tmp = (x * y) / a
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -t * (z / a);
	double tmp;
	if (z <= -4.2e+57) {
		tmp = t_1;
	} else if (z <= -4.45e-17) {
		tmp = y * (x / a);
	} else if (z <= -1.2e-40) {
		tmp = z * -(t / a);
	} else if (z <= 1.3e-130) {
		tmp = (x * y) / a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = -t * (z / a)
	tmp = 0
	if z <= -4.2e+57:
		tmp = t_1
	elif z <= -4.45e-17:
		tmp = y * (x / a)
	elif z <= -1.2e-40:
		tmp = z * -(t / a)
	elif z <= 1.3e-130:
		tmp = (x * y) / a
	else:
		tmp = t_1
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(Float64(-t) * Float64(z / a))
	tmp = 0.0
	if (z <= -4.2e+57)
		tmp = t_1;
	elseif (z <= -4.45e-17)
		tmp = Float64(y * Float64(x / a));
	elseif (z <= -1.2e-40)
		tmp = Float64(z * Float64(-Float64(t / a)));
	elseif (z <= 1.3e-130)
		tmp = Float64(Float64(x * y) / a);
	else
		tmp = t_1;
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = -t * (z / a);
	tmp = 0.0;
	if (z <= -4.2e+57)
		tmp = t_1;
	elseif (z <= -4.45e-17)
		tmp = y * (x / a);
	elseif (z <= -1.2e-40)
		tmp = z * -(t / a);
	elseif (z <= 1.3e-130)
		tmp = (x * y) / a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) * N[(z / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+57], t$95$1, If[LessEqual[z, -4.45e-17], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.2e-40], N[(z * (-N[(t / a), $MachinePrecision])), $MachinePrecision], If[LessEqual[z, 1.3e-130], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := \left(-t\right) \cdot \frac{z}{a}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+57}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-40}:\\
\;\;\;\;z \cdot \left(-\frac{t}{a}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.19999999999999982e57 or 1.3e-130 < z

    1. Initial program 87.6%

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

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

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

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

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

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

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

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

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

    if -4.19999999999999982e57 < z < -4.4500000000000002e-17

    1. Initial program 92.2%

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

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

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

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

    if -4.4500000000000002e-17 < z < -1.19999999999999996e-40

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t \cdot \left(-z\right)}}{a} \]
      3. add-sqr-sqrt70.5%

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

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

        \[\leadsto \frac{t \cdot \sqrt{\color{blue}{z \cdot z}}}{a} \]
      6. sqrt-unprod0.0%

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{a} \]
      7. add-sqr-sqrt0.9%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{z}}} \]
    6. Applied egg-rr0.9%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{z}}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt0.9%

        \[\leadsto \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{\frac{a}{z}} \]
      2. sqrt-unprod0.4%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{\frac{a}{z}} \]
      5. add-sqr-sqrt70.5%

        \[\leadsto \frac{\color{blue}{-t}}{\frac{a}{z}} \]
      6. distribute-frac-neg70.5%

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

        \[\leadsto -\color{blue}{\frac{t}{a} \cdot z} \]
      8. distribute-rgt-neg-in70.5%

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

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

    if -1.19999999999999996e-40 < z < 1.3e-130

    1. Initial program 93.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+57}:\\ \;\;\;\;\left(-t\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;z \leq -4.45 \cdot 10^{-17}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-40}:\\ \;\;\;\;z \cdot \left(-\frac{t}{a}\right)\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-130}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) \cdot \frac{z}{a}\\ \end{array} \]

Alternative 7: 65.6% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+57}:\\ \;\;\;\;\frac{-t}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-14}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-37}:\\ \;\;\;\;z \cdot \left(-\frac{t}{a}\right)\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-130}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) \cdot \frac{z}{a}\\ \end{array} \end{array} \]
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3e+57)
   (/ (- t) (/ a z))
   (if (<= z -3.7e-14)
     (* y (/ x a))
     (if (<= z -1.2e-37)
       (* z (- (/ t a)))
       (if (<= z 6.8e-130) (/ (* x y) a) (* (- t) (/ z a)))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3e+57) {
		tmp = -t / (a / z);
	} else if (z <= -3.7e-14) {
		tmp = y * (x / a);
	} else if (z <= -1.2e-37) {
		tmp = z * -(t / a);
	} else if (z <= 6.8e-130) {
		tmp = (x * y) / a;
	} else {
		tmp = -t * (z / a);
	}
	return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-3d+57)) then
        tmp = -t / (a / z)
    else if (z <= (-3.7d-14)) then
        tmp = y * (x / a)
    else if (z <= (-1.2d-37)) then
        tmp = z * -(t / a)
    else if (z <= 6.8d-130) then
        tmp = (x * y) / a
    else
        tmp = -t * (z / a)
    end if
    code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3e+57) {
		tmp = -t / (a / z);
	} else if (z <= -3.7e-14) {
		tmp = y * (x / a);
	} else if (z <= -1.2e-37) {
		tmp = z * -(t / a);
	} else if (z <= 6.8e-130) {
		tmp = (x * y) / a;
	} else {
		tmp = -t * (z / a);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3e+57:
		tmp = -t / (a / z)
	elif z <= -3.7e-14:
		tmp = y * (x / a)
	elif z <= -1.2e-37:
		tmp = z * -(t / a)
	elif z <= 6.8e-130:
		tmp = (x * y) / a
	else:
		tmp = -t * (z / a)
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3e+57)
		tmp = Float64(Float64(-t) / Float64(a / z));
	elseif (z <= -3.7e-14)
		tmp = Float64(y * Float64(x / a));
	elseif (z <= -1.2e-37)
		tmp = Float64(z * Float64(-Float64(t / a)));
	elseif (z <= 6.8e-130)
		tmp = Float64(Float64(x * y) / a);
	else
		tmp = Float64(Float64(-t) * Float64(z / a));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3e+57)
		tmp = -t / (a / z);
	elseif (z <= -3.7e-14)
		tmp = y * (x / a);
	elseif (z <= -1.2e-37)
		tmp = z * -(t / a);
	elseif (z <= 6.8e-130)
		tmp = (x * y) / a;
	else
		tmp = -t * (z / a);
	end
	tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e+57], N[((-t) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.7e-14], N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.2e-37], N[(z * (-N[(t / a), $MachinePrecision])), $MachinePrecision], If[LessEqual[z, 6.8e-130], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], N[((-t) * N[(z / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+57}:\\
\;\;\;\;\frac{-t}{\frac{a}{z}}\\

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

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-37}:\\
\;\;\;\;z \cdot \left(-\frac{t}{a}\right)\\

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

\mathbf{else}:\\
\;\;\;\;\left(-t\right) \cdot \frac{z}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3e57

    1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)}}{a} \]
      4. sqrt-unprod52.7%

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

        \[\leadsto \frac{t \cdot \sqrt{\color{blue}{z \cdot z}}}{a} \]
      6. sqrt-unprod0.0%

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{a} \]
      7. add-sqr-sqrt3.2%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{z}}} \]
    6. Applied egg-rr9.0%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{z}}} \]
    7. Step-by-step derivation
      1. associate-/r/3.3%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot z} \]
    8. Applied egg-rr3.3%

      \[\leadsto \color{blue}{\frac{t}{a} \cdot z} \]
    9. Step-by-step derivation
      1. div-inv3.3%

        \[\leadsto \color{blue}{\left(t \cdot \frac{1}{a}\right)} \cdot z \]
      2. add-sqr-sqrt2.7%

        \[\leadsto \left(t \cdot \frac{1}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}}\right) \cdot z \]
      3. sqrt-unprod38.0%

        \[\leadsto \left(t \cdot \frac{1}{\color{blue}{\sqrt{a \cdot a}}}\right) \cdot z \]
      4. sqr-neg38.0%

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

        \[\leadsto \left(t \cdot \frac{1}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}}\right) \cdot z \]
      6. add-sqr-sqrt77.7%

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

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{-a}{z}}} \]
      9. un-div-inv74.0%

        \[\leadsto \color{blue}{\frac{t}{\frac{-a}{z}}} \]
      10. frac-2neg74.0%

        \[\leadsto \color{blue}{\frac{-t}{-\frac{-a}{z}}} \]
      11. distribute-frac-neg74.0%

        \[\leadsto \frac{-t}{-\color{blue}{\left(-\frac{a}{z}\right)}} \]
      12. remove-double-neg74.0%

        \[\leadsto \frac{-t}{\color{blue}{\frac{a}{z}}} \]
    10. Applied egg-rr74.0%

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

    if -3e57 < z < -3.70000000000000001e-14

    1. Initial program 92.2%

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

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

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

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

    if -3.70000000000000001e-14 < z < -1.19999999999999995e-37

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t \cdot \left(-z\right)}}{a} \]
      3. add-sqr-sqrt70.5%

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

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

        \[\leadsto \frac{t \cdot \sqrt{\color{blue}{z \cdot z}}}{a} \]
      6. sqrt-unprod0.0%

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{a} \]
      7. add-sqr-sqrt0.9%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{z}}} \]
    6. Applied egg-rr0.9%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{z}}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt0.9%

        \[\leadsto \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{\frac{a}{z}} \]
      2. sqrt-unprod0.4%

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

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

        \[\leadsto \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{\frac{a}{z}} \]
      5. add-sqr-sqrt70.5%

        \[\leadsto \frac{\color{blue}{-t}}{\frac{a}{z}} \]
      6. distribute-frac-neg70.5%

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

        \[\leadsto -\color{blue}{\frac{t}{a} \cdot z} \]
      8. distribute-rgt-neg-in70.5%

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

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

    if -1.19999999999999995e-37 < z < 6.8000000000000001e-130

    1. Initial program 93.1%

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

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

    if 6.8000000000000001e-130 < z

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+57}:\\ \;\;\;\;\frac{-t}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq -3.7 \cdot 10^{-14}:\\ \;\;\;\;y \cdot \frac{x}{a}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-37}:\\ \;\;\;\;z \cdot \left(-\frac{t}{a}\right)\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-130}:\\ \;\;\;\;\frac{x \cdot y}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) \cdot \frac{z}{a}\\ \end{array} \]

Alternative 8: 93.1% accurate, 0.7× speedup?

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

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


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

    1. Initial program 58.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{t \cdot \left(-z\right)}}{a} \]
      3. add-sqr-sqrt39.0%

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

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

        \[\leadsto \frac{t \cdot \sqrt{\color{blue}{z \cdot z}}}{a} \]
      6. sqrt-unprod0.0%

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{a} \]
      7. add-sqr-sqrt0.1%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{z}}} \]
    6. Applied egg-rr0.2%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{z}}} \]
    7. Step-by-step derivation
      1. associate-/r/0.2%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot z} \]
    8. Applied egg-rr0.2%

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

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

        \[\leadsto \left(t \cdot \frac{1}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}}\right) \cdot z \]
      3. sqrt-unprod44.2%

        \[\leadsto \left(t \cdot \frac{1}{\color{blue}{\sqrt{a \cdot a}}}\right) \cdot z \]
      4. sqr-neg44.2%

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

        \[\leadsto \left(t \cdot \frac{1}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}}\right) \cdot z \]
      6. add-sqr-sqrt99.8%

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

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

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{-a}{z}}} \]
      9. un-div-inv99.9%

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

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

        \[\leadsto \frac{-t}{-\color{blue}{\left(-\frac{a}{z}\right)}} \]
      12. remove-double-neg99.9%

        \[\leadsto \frac{-t}{\color{blue}{\frac{a}{z}}} \]
    10. Applied egg-rr99.9%

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

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

    1. Initial program 92.2%

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

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

Alternative 9: 51.9% accurate, 1.3× speedup?

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

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


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

    1. Initial program 89.0%

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

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

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

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

    if 7.99999999999999932e-145 < y

    1. Initial program 91.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{a}} \]
      2. clear-num57.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{y \cdot x}}} \]
      3. *-commutative57.0%

        \[\leadsto \frac{1}{\frac{a}{\color{blue}{x \cdot y}}} \]
    6. Applied egg-rr57.0%

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

        \[\leadsto \frac{1}{\frac{a}{\color{blue}{y \cdot x}}} \]
      2. clear-num57.1%

        \[\leadsto \color{blue}{\frac{y \cdot x}{a}} \]
      3. *-commutative57.1%

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

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

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

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

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

Alternative 10: 51.4% accurate, 1.8× speedup?

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

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

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

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

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

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

Developer target: 91.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{a} \cdot x - \frac{t}{a} \cdot z\\ \mathbf{if}\;z < -2.468684968699548 \cdot 10^{+170}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z < 6.309831121978371 \cdot 10^{-71}:\\ \;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- (* (/ y a) x) (* (/ t a) z))))
   (if (< z -2.468684968699548e+170)
     t_1
     (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = ((y / a) * x) - ((t / a) * z);
	double tmp;
	if (z < -2.468684968699548e+170) {
		tmp = t_1;
	} else if (z < 6.309831121978371e-71) {
		tmp = ((x * y) - (z * t)) / a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((y / a) * x) - ((t / a) * z)
    if (z < (-2.468684968699548d+170)) then
        tmp = t_1
    else if (z < 6.309831121978371d-71) then
        tmp = ((x * y) - (z * t)) / a
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = ((y / a) * x) - ((t / a) * z);
	double tmp;
	if (z < -2.468684968699548e+170) {
		tmp = t_1;
	} else if (z < 6.309831121978371e-71) {
		tmp = ((x * y) - (z * t)) / a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = ((y / a) * x) - ((t / a) * z)
	tmp = 0
	if z < -2.468684968699548e+170:
		tmp = t_1
	elif z < 6.309831121978371e-71:
		tmp = ((x * y) - (z * t)) / a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(Float64(y / a) * x) - Float64(Float64(t / a) * z))
	tmp = 0.0
	if (z < -2.468684968699548e+170)
		tmp = t_1;
	elseif (z < 6.309831121978371e-71)
		tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = ((y / a) * x) - ((t / a) * z);
	tmp = 0.0;
	if (z < -2.468684968699548e+170)
		tmp = t_1;
	elseif (z < 6.309831121978371e-71)
		tmp = ((x * y) - (z * t)) / a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y / a), $MachinePrecision] * x), $MachinePrecision] - N[(N[(t / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -2.468684968699548e+170], t$95$1, If[Less[z, 6.309831121978371e-71], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot x - \frac{t}{a} \cdot z\\
\mathbf{if}\;z < -2.468684968699548 \cdot 10^{+170}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z < 6.309831121978371 \cdot 10^{-71}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023182 
(FPCore (x y z t a)
  :name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
  :precision binary64

  :herbie-target
  (if (< z -2.468684968699548e+170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))

  (/ (- (* x y) (* z t)) a))