Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, I

Percentage Accurate: 91.2% → 94.7%
Time: 17.2s
Alternatives: 11
Speedup: 0.8×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))
double code(double x, double y, double z, double t, double a) {
	return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
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 * 9.0d0) * t)) / (a * 2.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
	return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
def code(x, y, z, t, a):
	return ((x * y) - ((z * 9.0) * t)) / (a * 2.0)
function code(x, y, z, t, a)
	return Float64(Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) / Float64(a * 2.0))
end
function tmp = code(x, y, z, t, a)
	tmp = ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}
\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.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))
double code(double x, double y, double z, double t, double a) {
	return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
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 * 9.0d0) * t)) / (a * 2.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
	return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
def code(x, y, z, t, a):
	return ((x * y) - ((z * 9.0) * t)) / (a * 2.0)
function code(x, y, z, t, a)
	return Float64(Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) / Float64(a * 2.0))
end
function tmp = code(x, y, z, t, a)
	tmp = ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}
\end{array}

Alternative 1: 94.7% accurate, 0.1× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;a \cdot 2 \leq -1 \cdot 10^{+53} \lor \neg \left(a \cdot 2 \leq 2 \cdot 10^{-45}\right):\\ \;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right) - \frac{y}{a} \cdot \frac{x}{-2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, y, -9 \cdot \left(t \cdot z\right)\right)}{a \cdot 2}\\ \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 (or (<= (* a 2.0) -1e+53) (not (<= (* a 2.0) 2e-45)))
   (- (* t (* -4.5 (/ z a))) (* (/ y a) (/ x -2.0)))
   (/ (fma x y (* -9.0 (* t z))) (* a 2.0))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (((a * 2.0) <= -1e+53) || !((a * 2.0) <= 2e-45)) {
		tmp = (t * (-4.5 * (z / a))) - ((y / a) * (x / -2.0));
	} else {
		tmp = fma(x, y, (-9.0 * (t * z))) / (a * 2.0);
	}
	return tmp;
}
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if ((Float64(a * 2.0) <= -1e+53) || !(Float64(a * 2.0) <= 2e-45))
		tmp = Float64(Float64(t * Float64(-4.5 * Float64(z / a))) - Float64(Float64(y / a) * Float64(x / -2.0)));
	else
		tmp = Float64(fma(x, y, Float64(-9.0 * Float64(t * z))) / Float64(a * 2.0));
	end
	return tmp
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 2.0), $MachinePrecision], -1e+53], N[Not[LessEqual[N[(a * 2.0), $MachinePrecision], 2e-45]], $MachinePrecision]], N[(N[(t * N[(-4.5 * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y / a), $MachinePrecision] * N[(x / -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(-9.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 2 \leq -1 \cdot 10^{+53} \lor \neg \left(a \cdot 2 \leq 2 \cdot 10^{-45}\right):\\
\;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right) - \frac{y}{a} \cdot \frac{x}{-2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 2) < -9.9999999999999999e52 or 1.99999999999999997e-45 < (*.f64 a 2)

    1. Initial program 79.7%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub79.7%

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

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub79.7%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity79.7%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*79.7%

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a \cdot 2} - \frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2} \]
      3. times-frac87.0%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, \frac{x}{2}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right)} \]
      5. div-inv87.0%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, \color{blue}{x \cdot \frac{1}{2}}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right) \]
      6. metadata-eval87.0%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot \color{blue}{0.5}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right) \]
      7. times-frac96.7%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, -\color{blue}{\frac{z}{a} \cdot \frac{9 \cdot t}{2}}\right) \]
      8. *-commutative96.7%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, \color{blue}{\frac{9 \cdot t}{2} \cdot \left(-\frac{z}{a}\right)}\right) \]
      10. *-commutative96.7%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, \color{blue}{\frac{t}{\frac{2}{9}}} \cdot \left(-\frac{z}{a}\right)\right) \]
      12. metadata-eval96.7%

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

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

      \[\leadsto \color{blue}{\frac{t}{a} \cdot \left(z \cdot -4.5\right) - \frac{y \cdot x}{a \cdot -2}} \]
    7. Step-by-step derivation
      1. associate-*l/79.7%

        \[\leadsto \color{blue}{\frac{t \cdot \left(z \cdot -4.5\right)}{a}} - \frac{y \cdot x}{a \cdot -2} \]
      2. associate-*l*79.7%

        \[\leadsto \frac{\color{blue}{\left(t \cdot z\right) \cdot -4.5}}{a} - \frac{y \cdot x}{a \cdot -2} \]
      3. *-commutative79.7%

        \[\leadsto \frac{\color{blue}{-4.5 \cdot \left(t \cdot z\right)}}{a} - \frac{y \cdot x}{a \cdot -2} \]
      4. associate-*r*79.7%

        \[\leadsto \frac{\color{blue}{\left(-4.5 \cdot t\right) \cdot z}}{a} - \frac{y \cdot x}{a \cdot -2} \]
      5. *-commutative79.7%

        \[\leadsto \frac{\color{blue}{\left(t \cdot -4.5\right)} \cdot z}{a} - \frac{y \cdot x}{a \cdot -2} \]
      6. associate-*r/88.7%

        \[\leadsto \color{blue}{\left(t \cdot -4.5\right) \cdot \frac{z}{a}} - \frac{y \cdot x}{a \cdot -2} \]
      7. associate-*l*88.7%

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

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

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

    if -9.9999999999999999e52 < (*.f64 a 2) < 1.99999999999999997e-45

    1. Initial program 95.1%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. fma-neg96.6%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, y, -\left(z \cdot 9\right) \cdot t\right)}}{a \cdot 2} \]
      2. distribute-lft-neg-in96.6%

        \[\leadsto \frac{\mathsf{fma}\left(x, y, \color{blue}{\left(-z \cdot 9\right) \cdot t}\right)}{a \cdot 2} \]
      3. distribute-lft-neg-out96.6%

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

        \[\leadsto \frac{\mathsf{fma}\left(x, y, \color{blue}{\left(9 \cdot \left(-z\right)\right)} \cdot t\right)}{a \cdot 2} \]
      5. neg-mul-196.6%

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

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

        \[\leadsto \frac{\mathsf{fma}\left(x, y, \color{blue}{\left(9 \cdot -1\right) \cdot \left(z \cdot t\right)}\right)}{a \cdot 2} \]
      8. metadata-eval96.7%

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

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

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

Alternative 2: 94.1% accurate, 0.3× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := t \cdot \left(z \cdot 9\right)\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-222}:\\ \;\;\;\;\frac{y \cdot x - t_1}{a \cdot 2}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{-251}:\\ \;\;\;\;\frac{y}{a} \cdot \frac{x}{2}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+219}:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(z \cdot \left(t \cdot 9\right) - y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right)\\ \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 9.0))))
   (if (<= t_1 (- INFINITY))
     (* z (* -4.5 (/ t a)))
     (if (<= t_1 -5e-222)
       (/ (- (* y x) t_1) (* a 2.0))
       (if (<= t_1 2e-251)
         (* (/ y a) (/ x 2.0))
         (if (<= t_1 5e+219)
           (* (/ -0.5 a) (- (* z (* t 9.0)) (* y x)))
           (* t (* -4.5 (/ z a)))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (z * 9.0);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = z * (-4.5 * (t / a));
	} else if (t_1 <= -5e-222) {
		tmp = ((y * x) - t_1) / (a * 2.0);
	} else if (t_1 <= 2e-251) {
		tmp = (y / a) * (x / 2.0);
	} else if (t_1 <= 5e+219) {
		tmp = (-0.5 / a) * ((z * (t * 9.0)) - (y * x));
	} else {
		tmp = t * (-4.5 * (z / a));
	}
	return tmp;
}
assert x < y;
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (z * 9.0);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = z * (-4.5 * (t / a));
	} else if (t_1 <= -5e-222) {
		tmp = ((y * x) - t_1) / (a * 2.0);
	} else if (t_1 <= 2e-251) {
		tmp = (y / a) * (x / 2.0);
	} else if (t_1 <= 5e+219) {
		tmp = (-0.5 / a) * ((z * (t * 9.0)) - (y * x));
	} else {
		tmp = t * (-4.5 * (z / a));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = t * (z * 9.0)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = z * (-4.5 * (t / a))
	elif t_1 <= -5e-222:
		tmp = ((y * x) - t_1) / (a * 2.0)
	elif t_1 <= 2e-251:
		tmp = (y / a) * (x / 2.0)
	elif t_1 <= 5e+219:
		tmp = (-0.5 / a) * ((z * (t * 9.0)) - (y * x))
	else:
		tmp = t * (-4.5 * (z / a))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(z * 9.0))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(z * Float64(-4.5 * Float64(t / a)));
	elseif (t_1 <= -5e-222)
		tmp = Float64(Float64(Float64(y * x) - t_1) / Float64(a * 2.0));
	elseif (t_1 <= 2e-251)
		tmp = Float64(Float64(y / a) * Float64(x / 2.0));
	elseif (t_1 <= 5e+219)
		tmp = Float64(Float64(-0.5 / a) * Float64(Float64(z * Float64(t * 9.0)) - Float64(y * x)));
	else
		tmp = Float64(t * Float64(-4.5 * Float64(z / a)));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (z * 9.0);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = z * (-4.5 * (t / a));
	elseif (t_1 <= -5e-222)
		tmp = ((y * x) - t_1) / (a * 2.0);
	elseif (t_1 <= 2e-251)
		tmp = (y / a) * (x / 2.0);
	elseif (t_1 <= 5e+219)
		tmp = (-0.5 / a) * ((z * (t * 9.0)) - (y * x));
	else
		tmp = t * (-4.5 * (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_] := Block[{t$95$1 = N[(t * N[(z * 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z * N[(-4.5 * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-222], N[(N[(N[(y * x), $MachinePrecision] - t$95$1), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-251], N[(N[(y / a), $MachinePrecision] * N[(x / 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+219], N[(N[(-0.5 / a), $MachinePrecision] * N[(N[(z * N[(t * 9.0), $MachinePrecision]), $MachinePrecision] - N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.5 * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(z \cdot 9\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right)\\

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{-251}:\\
\;\;\;\;\frac{y}{a} \cdot \frac{x}{2}\\

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+219}:\\
\;\;\;\;\frac{-0.5}{a} \cdot \left(z \cdot \left(t \cdot 9\right) - y \cdot x\right)\\

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


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

    1. Initial program 54.5%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub54.5%

        \[\leadsto \color{blue}{\frac{x \cdot y}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      2. +-rgt-identity54.5%

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub54.5%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity54.5%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*54.5%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Taylor expanded in x around 0 65.1%

      \[\leadsto \frac{\color{blue}{-9 \cdot \left(t \cdot z\right)}}{a \cdot 2} \]
    5. Step-by-step derivation
      1. *-commutative65.1%

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

        \[\leadsto \color{blue}{\frac{-9}{2} \cdot \frac{t \cdot z}{a}} \]
      3. metadata-eval65.1%

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

        \[\leadsto -4.5 \cdot \color{blue}{\left(\frac{t}{a} \cdot z\right)} \]
      5. associate-*r*89.4%

        \[\leadsto \color{blue}{\left(-4.5 \cdot \frac{t}{a}\right) \cdot z} \]
    6. Applied egg-rr89.4%

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

    if -inf.0 < (*.f64 (*.f64 z 9) t) < -5.00000000000000008e-222

    1. Initial program 97.5%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]

    if -5.00000000000000008e-222 < (*.f64 (*.f64 z 9) t) < 2.00000000000000003e-251

    1. Initial program 83.7%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub83.7%

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

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub83.7%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity83.7%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*83.7%

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

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

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

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

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

        \[\leadsto \frac{1}{-\color{blue}{2 \cdot a}} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      5. distribute-lft-neg-in83.6%

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

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

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

        \[\leadsto \frac{\color{blue}{-0.5}}{a} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      9. neg-sub083.6%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(0 - \left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right)} \]
      10. sub-neg83.6%

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(x \cdot y + \left(-z \cdot \left(9 \cdot t\right)\right)\right)}\right) \]
      11. +-commutative83.6%

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(\left(-z \cdot \left(9 \cdot t\right)\right) + x \cdot y\right)}\right) \]
      12. associate--r+83.6%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(0 - \left(-z \cdot \left(9 \cdot t\right)\right)\right) - x \cdot y\right)} \]
      13. neg-sub083.6%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-\left(-z \cdot \left(9 \cdot t\right)\right)\right)} - x \cdot y\right) \]
      14. remove-double-neg83.6%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{z \cdot \left(9 \cdot t\right)} - x \cdot y\right) \]
    5. Applied egg-rr83.6%

      \[\leadsto \color{blue}{\frac{-0.5}{a} \cdot \left(z \cdot \left(9 \cdot t\right) - x \cdot y\right)} \]
    6. Taylor expanded in z around 0 81.8%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*81.8%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(-1 \cdot x\right) \cdot y\right)} \]
      2. neg-mul-181.8%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-x\right)} \cdot y\right) \]
      3. *-commutative81.8%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    8. Simplified81.8%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*l/81.9%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(y \cdot \left(-x\right)\right)}{a}} \]
      2. *-commutative81.9%

        \[\leadsto \frac{\color{blue}{\left(y \cdot \left(-x\right)\right) \cdot -0.5}}{a} \]
      3. associate-/l*81.9%

        \[\leadsto \color{blue}{\frac{y \cdot \left(-x\right)}{\frac{a}{-0.5}}} \]
      4. div-inv81.9%

        \[\leadsto \frac{y \cdot \left(-x\right)}{\color{blue}{a \cdot \frac{1}{-0.5}}} \]
      5. metadata-eval81.9%

        \[\leadsto \frac{y \cdot \left(-x\right)}{a \cdot \color{blue}{-2}} \]
      6. distribute-rgt-neg-out81.9%

        \[\leadsto \frac{\color{blue}{-y \cdot x}}{a \cdot -2} \]
      7. distribute-lft-neg-in81.9%

        \[\leadsto \frac{\color{blue}{\left(-y\right) \cdot x}}{a \cdot -2} \]
      8. times-frac93.1%

        \[\leadsto \color{blue}{\frac{-y}{a} \cdot \frac{x}{-2}} \]
      9. distribute-neg-frac93.1%

        \[\leadsto \color{blue}{\left(-\frac{y}{a}\right)} \cdot \frac{x}{-2} \]
      10. clear-num92.9%

        \[\leadsto \left(-\frac{y}{a}\right) \cdot \color{blue}{\frac{1}{\frac{-2}{x}}} \]
      11. associate-*r/92.8%

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

        \[\leadsto \color{blue}{\frac{-\left(-\frac{y}{a}\right) \cdot 1}{-\frac{-2}{x}}} \]
      13. *-rgt-identity92.8%

        \[\leadsto \frac{-\color{blue}{\left(-\frac{y}{a}\right)}}{-\frac{-2}{x}} \]
      14. frac-2neg92.8%

        \[\leadsto \frac{-\left(-\color{blue}{\frac{-y}{-a}}\right)}{-\frac{-2}{x}} \]
      15. distribute-frac-neg92.8%

        \[\leadsto \frac{-\left(-\color{blue}{\left(-\frac{y}{-a}\right)}\right)}{-\frac{-2}{x}} \]
      16. remove-double-neg92.8%

        \[\leadsto \frac{-\color{blue}{\frac{y}{-a}}}{-\frac{-2}{x}} \]
      17. distribute-frac-neg92.8%

        \[\leadsto \frac{\color{blue}{\frac{-y}{-a}}}{-\frac{-2}{x}} \]
      18. frac-2neg92.8%

        \[\leadsto \frac{\color{blue}{\frac{y}{a}}}{-\frac{-2}{x}} \]
    10. Applied egg-rr92.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{a}}{-\frac{-2}{x}}} \]
    11. Step-by-step derivation
      1. associate-/l/95.1%

        \[\leadsto \color{blue}{\frac{y}{\left(-\frac{-2}{x}\right) \cdot a}} \]
      2. distribute-neg-frac95.1%

        \[\leadsto \frac{y}{\color{blue}{\frac{--2}{x}} \cdot a} \]
      3. metadata-eval95.1%

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

        \[\leadsto \frac{y}{\color{blue}{\frac{2}{\frac{x}{a}}}} \]
      5. associate-/l*93.1%

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

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{a \cdot 2}} \]
      8. times-frac93.1%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot \frac{x}{2}} \]
    12. Simplified93.1%

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

    if 2.00000000000000003e-251 < (*.f64 (*.f64 z 9) t) < 5e219

    1. Initial program 96.0%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub96.0%

        \[\leadsto \color{blue}{\frac{x \cdot y}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      2. +-rgt-identity96.0%

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*95.9%

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

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

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

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

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

        \[\leadsto \frac{1}{-\color{blue}{2 \cdot a}} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      5. distribute-lft-neg-in95.9%

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

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

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

        \[\leadsto \frac{\color{blue}{-0.5}}{a} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      9. neg-sub095.9%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(0 - \left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right)} \]
      10. sub-neg95.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(x \cdot y + \left(-z \cdot \left(9 \cdot t\right)\right)\right)}\right) \]
      11. +-commutative95.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(\left(-z \cdot \left(9 \cdot t\right)\right) + x \cdot y\right)}\right) \]
      12. associate--r+95.9%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(0 - \left(-z \cdot \left(9 \cdot t\right)\right)\right) - x \cdot y\right)} \]
      13. neg-sub095.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-\left(-z \cdot \left(9 \cdot t\right)\right)\right)} - x \cdot y\right) \]
      14. remove-double-neg95.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{z \cdot \left(9 \cdot t\right)} - x \cdot y\right) \]
    5. Applied egg-rr95.9%

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

    if 5e219 < (*.f64 (*.f64 z 9) t)

    1. Initial program 52.3%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub48.1%

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

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

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity52.3%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*52.2%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Taylor expanded in x around 0 56.3%

      \[\leadsto \frac{\color{blue}{-9 \cdot \left(t \cdot z\right)}}{a \cdot 2} \]
    5. Step-by-step derivation
      1. *-commutative56.3%

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

        \[\leadsto \color{blue}{\frac{t \cdot z}{a} \cdot \frac{-9}{2}} \]
      3. associate-*r/95.4%

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

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

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

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

      \[\leadsto \color{blue}{\left(\frac{z}{a} \cdot -4.5\right) \cdot t} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification95.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \cdot \left(z \cdot 9\right) \leq -\infty:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t \cdot \left(z \cdot 9\right) \leq -5 \cdot 10^{-222}:\\ \;\;\;\;\frac{y \cdot x - t \cdot \left(z \cdot 9\right)}{a \cdot 2}\\ \mathbf{elif}\;t \cdot \left(z \cdot 9\right) \leq 2 \cdot 10^{-251}:\\ \;\;\;\;\frac{y}{a} \cdot \frac{x}{2}\\ \mathbf{elif}\;t \cdot \left(z \cdot 9\right) \leq 5 \cdot 10^{+219}:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(z \cdot \left(t \cdot 9\right) - y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right)\\ \end{array} \]

Alternative 3: 94.4% accurate, 0.6× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;a \cdot 2 \leq -1 \cdot 10^{+53} \lor \neg \left(a \cdot 2 \leq 2 \cdot 10^{-45}\right):\\ \;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right) - \frac{y}{a} \cdot \frac{x}{-2}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x - z \cdot \left(t \cdot 9\right)}{a \cdot 2}\\ \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 (or (<= (* a 2.0) -1e+53) (not (<= (* a 2.0) 2e-45)))
   (- (* t (* -4.5 (/ z a))) (* (/ y a) (/ x -2.0)))
   (/ (- (* y x) (* z (* t 9.0))) (* a 2.0))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (((a * 2.0) <= -1e+53) || !((a * 2.0) <= 2e-45)) {
		tmp = (t * (-4.5 * (z / a))) - ((y / a) * (x / -2.0));
	} else {
		tmp = ((y * x) - (z * (t * 9.0))) / (a * 2.0);
	}
	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 (((a * 2.0d0) <= (-1d+53)) .or. (.not. ((a * 2.0d0) <= 2d-45))) then
        tmp = (t * ((-4.5d0) * (z / a))) - ((y / a) * (x / (-2.0d0)))
    else
        tmp = ((y * x) - (z * (t * 9.0d0))) / (a * 2.0d0)
    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 (((a * 2.0) <= -1e+53) || !((a * 2.0) <= 2e-45)) {
		tmp = (t * (-4.5 * (z / a))) - ((y / a) * (x / -2.0));
	} else {
		tmp = ((y * x) - (z * (t * 9.0))) / (a * 2.0);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if ((a * 2.0) <= -1e+53) or not ((a * 2.0) <= 2e-45):
		tmp = (t * (-4.5 * (z / a))) - ((y / a) * (x / -2.0))
	else:
		tmp = ((y * x) - (z * (t * 9.0))) / (a * 2.0)
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if ((Float64(a * 2.0) <= -1e+53) || !(Float64(a * 2.0) <= 2e-45))
		tmp = Float64(Float64(t * Float64(-4.5 * Float64(z / a))) - Float64(Float64(y / a) * Float64(x / -2.0)));
	else
		tmp = Float64(Float64(Float64(y * x) - Float64(z * Float64(t * 9.0))) / Float64(a * 2.0));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (((a * 2.0) <= -1e+53) || ~(((a * 2.0) <= 2e-45)))
		tmp = (t * (-4.5 * (z / a))) - ((y / a) * (x / -2.0));
	else
		tmp = ((y * x) - (z * (t * 9.0))) / (a * 2.0);
	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[Or[LessEqual[N[(a * 2.0), $MachinePrecision], -1e+53], N[Not[LessEqual[N[(a * 2.0), $MachinePrecision], 2e-45]], $MachinePrecision]], N[(N[(t * N[(-4.5 * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y / a), $MachinePrecision] * N[(x / -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] - N[(z * N[(t * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 2 \leq -1 \cdot 10^{+53} \lor \neg \left(a \cdot 2 \leq 2 \cdot 10^{-45}\right):\\
\;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right) - \frac{y}{a} \cdot \frac{x}{-2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a 2) < -9.9999999999999999e52 or 1.99999999999999997e-45 < (*.f64 a 2)

    1. Initial program 79.7%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub79.7%

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

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub79.7%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity79.7%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*79.7%

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a \cdot 2} - \frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2} \]
      3. times-frac87.0%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, \frac{x}{2}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right)} \]
      5. div-inv87.0%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, \color{blue}{x \cdot \frac{1}{2}}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right) \]
      6. metadata-eval87.0%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot \color{blue}{0.5}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right) \]
      7. times-frac96.7%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, -\color{blue}{\frac{z}{a} \cdot \frac{9 \cdot t}{2}}\right) \]
      8. *-commutative96.7%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, \color{blue}{\frac{9 \cdot t}{2} \cdot \left(-\frac{z}{a}\right)}\right) \]
      10. *-commutative96.7%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, \color{blue}{\frac{t}{\frac{2}{9}}} \cdot \left(-\frac{z}{a}\right)\right) \]
      12. metadata-eval96.7%

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

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

      \[\leadsto \color{blue}{\frac{t}{a} \cdot \left(z \cdot -4.5\right) - \frac{y \cdot x}{a \cdot -2}} \]
    7. Step-by-step derivation
      1. associate-*l/79.7%

        \[\leadsto \color{blue}{\frac{t \cdot \left(z \cdot -4.5\right)}{a}} - \frac{y \cdot x}{a \cdot -2} \]
      2. associate-*l*79.7%

        \[\leadsto \frac{\color{blue}{\left(t \cdot z\right) \cdot -4.5}}{a} - \frac{y \cdot x}{a \cdot -2} \]
      3. *-commutative79.7%

        \[\leadsto \frac{\color{blue}{-4.5 \cdot \left(t \cdot z\right)}}{a} - \frac{y \cdot x}{a \cdot -2} \]
      4. associate-*r*79.7%

        \[\leadsto \frac{\color{blue}{\left(-4.5 \cdot t\right) \cdot z}}{a} - \frac{y \cdot x}{a \cdot -2} \]
      5. *-commutative79.7%

        \[\leadsto \frac{\color{blue}{\left(t \cdot -4.5\right)} \cdot z}{a} - \frac{y \cdot x}{a \cdot -2} \]
      6. associate-*r/88.7%

        \[\leadsto \color{blue}{\left(t \cdot -4.5\right) \cdot \frac{z}{a}} - \frac{y \cdot x}{a \cdot -2} \]
      7. associate-*l*88.7%

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

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

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

    if -9.9999999999999999e52 < (*.f64 a 2) < 1.99999999999999997e-45

    1. Initial program 95.1%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub91.9%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*95.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 2 \leq -1 \cdot 10^{+53} \lor \neg \left(a \cdot 2 \leq 2 \cdot 10^{-45}\right):\\ \;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right) - \frac{y}{a} \cdot \frac{x}{-2}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x - z \cdot \left(t \cdot 9\right)}{a \cdot 2}\\ \end{array} \]

Alternative 4: 92.8% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \cdot x \leq 5 \cdot 10^{+298}:\\ \;\;\;\;\frac{-0.5}{a} \cdot \left(z \cdot \left(t \cdot 9\right) - y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \frac{x}{a}}{2}\\ \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 x) 5e+298)
   (* (/ -0.5 a) (- (* z (* t 9.0)) (* y x)))
   (/ (* y (/ x a)) 2.0)))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y * x) <= 5e+298) {
		tmp = (-0.5 / a) * ((z * (t * 9.0)) - (y * x));
	} else {
		tmp = (y * (x / a)) / 2.0;
	}
	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 * x) <= 5d+298) then
        tmp = ((-0.5d0) / a) * ((z * (t * 9.0d0)) - (y * x))
    else
        tmp = (y * (x / a)) / 2.0d0
    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 * x) <= 5e+298) {
		tmp = (-0.5 / a) * ((z * (t * 9.0)) - (y * x));
	} else {
		tmp = (y * (x / a)) / 2.0;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if (y * x) <= 5e+298:
		tmp = (-0.5 / a) * ((z * (t * 9.0)) - (y * x))
	else:
		tmp = (y * (x / a)) / 2.0
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(y * x) <= 5e+298)
		tmp = Float64(Float64(-0.5 / a) * Float64(Float64(z * Float64(t * 9.0)) - Float64(y * x)));
	else
		tmp = Float64(Float64(y * Float64(x / a)) / 2.0);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y * x) <= 5e+298)
		tmp = (-0.5 / a) * ((z * (t * 9.0)) - (y * x));
	else
		tmp = (y * (x / a)) / 2.0;
	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[(y * x), $MachinePrecision], 5e+298], N[(N[(-0.5 / a), $MachinePrecision] * N[(N[(z * N[(t * 9.0), $MachinePrecision]), $MachinePrecision] - N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \cdot x \leq 5 \cdot 10^{+298}:\\
\;\;\;\;\frac{-0.5}{a} \cdot \left(z \cdot \left(t \cdot 9\right) - y \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < 5.0000000000000003e298

    1. Initial program 90.2%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub88.5%

        \[\leadsto \color{blue}{\frac{x \cdot y}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      2. +-rgt-identity88.5%

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*90.2%

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

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

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

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

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

        \[\leadsto \frac{1}{-\color{blue}{2 \cdot a}} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      5. distribute-lft-neg-in90.1%

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

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

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

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

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(0 - \left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right)} \]
      10. sub-neg90.1%

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

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(\left(-z \cdot \left(9 \cdot t\right)\right) + x \cdot y\right)}\right) \]
      12. associate--r+90.1%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(0 - \left(-z \cdot \left(9 \cdot t\right)\right)\right) - x \cdot y\right)} \]
      13. neg-sub090.1%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-\left(-z \cdot \left(9 \cdot t\right)\right)\right)} - x \cdot y\right) \]
      14. remove-double-neg90.1%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{z \cdot \left(9 \cdot t\right)} - x \cdot y\right) \]
    5. Applied egg-rr90.1%

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

    if 5.0000000000000003e298 < (*.f64 x y)

    1. Initial program 56.9%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub56.9%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*56.9%

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

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

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

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

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

        \[\leadsto \frac{1}{-\color{blue}{2 \cdot a}} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      5. distribute-lft-neg-in56.9%

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

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

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

        \[\leadsto \frac{\color{blue}{-0.5}}{a} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      9. neg-sub056.9%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(0 - \left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right)} \]
      10. sub-neg56.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(x \cdot y + \left(-z \cdot \left(9 \cdot t\right)\right)\right)}\right) \]
      11. +-commutative56.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(\left(-z \cdot \left(9 \cdot t\right)\right) + x \cdot y\right)}\right) \]
      12. associate--r+56.9%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(0 - \left(-z \cdot \left(9 \cdot t\right)\right)\right) - x \cdot y\right)} \]
      13. neg-sub056.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-\left(-z \cdot \left(9 \cdot t\right)\right)\right)} - x \cdot y\right) \]
      14. remove-double-neg56.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{z \cdot \left(9 \cdot t\right)} - x \cdot y\right) \]
    5. Applied egg-rr56.9%

      \[\leadsto \color{blue}{\frac{-0.5}{a} \cdot \left(z \cdot \left(9 \cdot t\right) - x \cdot y\right)} \]
    6. Taylor expanded in z around 0 61.4%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*61.4%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(-1 \cdot x\right) \cdot y\right)} \]
      2. neg-mul-161.4%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-x\right)} \cdot y\right) \]
      3. *-commutative61.4%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    8. Simplified61.4%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*l/61.4%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(y \cdot \left(-x\right)\right)}{a}} \]
      2. *-commutative61.4%

        \[\leadsto \frac{\color{blue}{\left(y \cdot \left(-x\right)\right) \cdot -0.5}}{a} \]
      3. associate-/l*61.4%

        \[\leadsto \color{blue}{\frac{y \cdot \left(-x\right)}{\frac{a}{-0.5}}} \]
      4. div-inv61.4%

        \[\leadsto \frac{y \cdot \left(-x\right)}{\color{blue}{a \cdot \frac{1}{-0.5}}} \]
      5. metadata-eval61.4%

        \[\leadsto \frac{y \cdot \left(-x\right)}{a \cdot \color{blue}{-2}} \]
      6. distribute-rgt-neg-out61.4%

        \[\leadsto \frac{\color{blue}{-y \cdot x}}{a \cdot -2} \]
      7. distribute-lft-neg-in61.4%

        \[\leadsto \frac{\color{blue}{\left(-y\right) \cdot x}}{a \cdot -2} \]
      8. times-frac95.2%

        \[\leadsto \color{blue}{\frac{-y}{a} \cdot \frac{x}{-2}} \]
      9. distribute-neg-frac95.2%

        \[\leadsto \color{blue}{\left(-\frac{y}{a}\right)} \cdot \frac{x}{-2} \]
      10. associate-*r/95.2%

        \[\leadsto \color{blue}{\frac{\left(-\frac{y}{a}\right) \cdot x}{-2}} \]
      11. frac-2neg95.2%

        \[\leadsto \color{blue}{\frac{-\left(-\frac{y}{a}\right) \cdot x}{--2}} \]
      12. *-commutative95.2%

        \[\leadsto \frac{-\color{blue}{x \cdot \left(-\frac{y}{a}\right)}}{--2} \]
      13. clear-num95.2%

        \[\leadsto \frac{-x \cdot \left(-\color{blue}{\frac{1}{\frac{a}{y}}}\right)}{--2} \]
      14. distribute-neg-frac95.2%

        \[\leadsto \frac{-x \cdot \color{blue}{\frac{-1}{\frac{a}{y}}}}{--2} \]
      15. remove-double-neg95.2%

        \[\leadsto \frac{-x \cdot \frac{-1}{\color{blue}{-\left(-\frac{a}{y}\right)}}}{--2} \]
      16. frac-2neg95.2%

        \[\leadsto \frac{-x \cdot \color{blue}{\frac{1}{-\frac{a}{y}}}}{--2} \]
      17. div-inv95.3%

        \[\leadsto \frac{-\color{blue}{\frac{x}{-\frac{a}{y}}}}{--2} \]
      18. distribute-frac-neg95.3%

        \[\leadsto \frac{\color{blue}{\frac{-x}{-\frac{a}{y}}}}{--2} \]
      19. frac-2neg95.3%

        \[\leadsto \frac{\color{blue}{\frac{x}{\frac{a}{y}}}}{--2} \]
      20. associate-/r/95.5%

        \[\leadsto \frac{\color{blue}{\frac{x}{a} \cdot y}}{--2} \]
      21. *-commutative95.5%

        \[\leadsto \frac{\color{blue}{y \cdot \frac{x}{a}}}{--2} \]
      22. metadata-eval95.5%

        \[\leadsto \frac{y \cdot \frac{x}{a}}{\color{blue}{2}} \]
    10. Applied egg-rr95.5%

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

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

Alternative 5: 92.9% accurate, 0.8× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \cdot x \leq 5 \cdot 10^{+298}:\\ \;\;\;\;\frac{y \cdot x - z \cdot \left(t \cdot 9\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \frac{x}{a}}{2}\\ \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 x) 5e+298)
   (/ (- (* y x) (* z (* t 9.0))) (* a 2.0))
   (/ (* y (/ x a)) 2.0)))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y * x) <= 5e+298) {
		tmp = ((y * x) - (z * (t * 9.0))) / (a * 2.0);
	} else {
		tmp = (y * (x / a)) / 2.0;
	}
	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 * x) <= 5d+298) then
        tmp = ((y * x) - (z * (t * 9.0d0))) / (a * 2.0d0)
    else
        tmp = (y * (x / a)) / 2.0d0
    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 * x) <= 5e+298) {
		tmp = ((y * x) - (z * (t * 9.0))) / (a * 2.0);
	} else {
		tmp = (y * (x / a)) / 2.0;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if (y * x) <= 5e+298:
		tmp = ((y * x) - (z * (t * 9.0))) / (a * 2.0)
	else:
		tmp = (y * (x / a)) / 2.0
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(y * x) <= 5e+298)
		tmp = Float64(Float64(Float64(y * x) - Float64(z * Float64(t * 9.0))) / Float64(a * 2.0));
	else
		tmp = Float64(Float64(y * Float64(x / a)) / 2.0);
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y * x) <= 5e+298)
		tmp = ((y * x) - (z * (t * 9.0))) / (a * 2.0);
	else
		tmp = (y * (x / a)) / 2.0;
	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[(y * x), $MachinePrecision], 5e+298], N[(N[(N[(y * x), $MachinePrecision] - N[(z * N[(t * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \cdot x \leq 5 \cdot 10^{+298}:\\
\;\;\;\;\frac{y \cdot x - z \cdot \left(t \cdot 9\right)}{a \cdot 2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x y) < 5.0000000000000003e298

    1. Initial program 90.2%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub88.5%

        \[\leadsto \color{blue}{\frac{x \cdot y}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      2. +-rgt-identity88.5%

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*90.2%

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

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

    if 5.0000000000000003e298 < (*.f64 x y)

    1. Initial program 56.9%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub56.9%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*56.9%

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

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

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

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

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

        \[\leadsto \frac{1}{-\color{blue}{2 \cdot a}} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      5. distribute-lft-neg-in56.9%

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

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

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

        \[\leadsto \frac{\color{blue}{-0.5}}{a} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      9. neg-sub056.9%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(0 - \left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right)} \]
      10. sub-neg56.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(x \cdot y + \left(-z \cdot \left(9 \cdot t\right)\right)\right)}\right) \]
      11. +-commutative56.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(\left(-z \cdot \left(9 \cdot t\right)\right) + x \cdot y\right)}\right) \]
      12. associate--r+56.9%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(0 - \left(-z \cdot \left(9 \cdot t\right)\right)\right) - x \cdot y\right)} \]
      13. neg-sub056.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-\left(-z \cdot \left(9 \cdot t\right)\right)\right)} - x \cdot y\right) \]
      14. remove-double-neg56.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{z \cdot \left(9 \cdot t\right)} - x \cdot y\right) \]
    5. Applied egg-rr56.9%

      \[\leadsto \color{blue}{\frac{-0.5}{a} \cdot \left(z \cdot \left(9 \cdot t\right) - x \cdot y\right)} \]
    6. Taylor expanded in z around 0 61.4%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*61.4%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(-1 \cdot x\right) \cdot y\right)} \]
      2. neg-mul-161.4%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-x\right)} \cdot y\right) \]
      3. *-commutative61.4%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    8. Simplified61.4%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*l/61.4%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(y \cdot \left(-x\right)\right)}{a}} \]
      2. *-commutative61.4%

        \[\leadsto \frac{\color{blue}{\left(y \cdot \left(-x\right)\right) \cdot -0.5}}{a} \]
      3. associate-/l*61.4%

        \[\leadsto \color{blue}{\frac{y \cdot \left(-x\right)}{\frac{a}{-0.5}}} \]
      4. div-inv61.4%

        \[\leadsto \frac{y \cdot \left(-x\right)}{\color{blue}{a \cdot \frac{1}{-0.5}}} \]
      5. metadata-eval61.4%

        \[\leadsto \frac{y \cdot \left(-x\right)}{a \cdot \color{blue}{-2}} \]
      6. distribute-rgt-neg-out61.4%

        \[\leadsto \frac{\color{blue}{-y \cdot x}}{a \cdot -2} \]
      7. distribute-lft-neg-in61.4%

        \[\leadsto \frac{\color{blue}{\left(-y\right) \cdot x}}{a \cdot -2} \]
      8. times-frac95.2%

        \[\leadsto \color{blue}{\frac{-y}{a} \cdot \frac{x}{-2}} \]
      9. distribute-neg-frac95.2%

        \[\leadsto \color{blue}{\left(-\frac{y}{a}\right)} \cdot \frac{x}{-2} \]
      10. associate-*r/95.2%

        \[\leadsto \color{blue}{\frac{\left(-\frac{y}{a}\right) \cdot x}{-2}} \]
      11. frac-2neg95.2%

        \[\leadsto \color{blue}{\frac{-\left(-\frac{y}{a}\right) \cdot x}{--2}} \]
      12. *-commutative95.2%

        \[\leadsto \frac{-\color{blue}{x \cdot \left(-\frac{y}{a}\right)}}{--2} \]
      13. clear-num95.2%

        \[\leadsto \frac{-x \cdot \left(-\color{blue}{\frac{1}{\frac{a}{y}}}\right)}{--2} \]
      14. distribute-neg-frac95.2%

        \[\leadsto \frac{-x \cdot \color{blue}{\frac{-1}{\frac{a}{y}}}}{--2} \]
      15. remove-double-neg95.2%

        \[\leadsto \frac{-x \cdot \frac{-1}{\color{blue}{-\left(-\frac{a}{y}\right)}}}{--2} \]
      16. frac-2neg95.2%

        \[\leadsto \frac{-x \cdot \color{blue}{\frac{1}{-\frac{a}{y}}}}{--2} \]
      17. div-inv95.3%

        \[\leadsto \frac{-\color{blue}{\frac{x}{-\frac{a}{y}}}}{--2} \]
      18. distribute-frac-neg95.3%

        \[\leadsto \frac{\color{blue}{\frac{-x}{-\frac{a}{y}}}}{--2} \]
      19. frac-2neg95.3%

        \[\leadsto \frac{\color{blue}{\frac{x}{\frac{a}{y}}}}{--2} \]
      20. associate-/r/95.5%

        \[\leadsto \frac{\color{blue}{\frac{x}{a} \cdot y}}{--2} \]
      21. *-commutative95.5%

        \[\leadsto \frac{\color{blue}{y \cdot \frac{x}{a}}}{--2} \]
      22. metadata-eval95.5%

        \[\leadsto \frac{y \cdot \frac{x}{a}}{\color{blue}{2}} \]
    10. Applied egg-rr95.5%

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

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

Alternative 6: 66.7% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := 0.5 \cdot \frac{x}{\frac{a}{y}}\\ t_2 := -4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{if}\;z \leq -2.05 \cdot 10^{+101}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+60}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{+49}:\\ \;\;\;\;-4.5 \cdot \frac{t \cdot z}{a}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-42}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \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 (* 0.5 (/ x (/ a y)))) (t_2 (* -4.5 (/ t (/ a z)))))
   (if (<= z -2.05e+101)
     t_2
     (if (<= z -4.5e+60)
       t_1
       (if (<= z -2.1e+49)
         (* -4.5 (/ (* t z) a))
         (if (<= z 1.9e-42) t_1 t_2))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = 0.5 * (x / (a / y));
	double t_2 = -4.5 * (t / (a / z));
	double tmp;
	if (z <= -2.05e+101) {
		tmp = t_2;
	} else if (z <= -4.5e+60) {
		tmp = t_1;
	} else if (z <= -2.1e+49) {
		tmp = -4.5 * ((t * z) / a);
	} else if (z <= 1.9e-42) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = 0.5d0 * (x / (a / y))
    t_2 = (-4.5d0) * (t / (a / z))
    if (z <= (-2.05d+101)) then
        tmp = t_2
    else if (z <= (-4.5d+60)) then
        tmp = t_1
    else if (z <= (-2.1d+49)) then
        tmp = (-4.5d0) * ((t * z) / a)
    else if (z <= 1.9d-42) then
        tmp = t_1
    else
        tmp = t_2
    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 = 0.5 * (x / (a / y));
	double t_2 = -4.5 * (t / (a / z));
	double tmp;
	if (z <= -2.05e+101) {
		tmp = t_2;
	} else if (z <= -4.5e+60) {
		tmp = t_1;
	} else if (z <= -2.1e+49) {
		tmp = -4.5 * ((t * z) / a);
	} else if (z <= 1.9e-42) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = 0.5 * (x / (a / y))
	t_2 = -4.5 * (t / (a / z))
	tmp = 0
	if z <= -2.05e+101:
		tmp = t_2
	elif z <= -4.5e+60:
		tmp = t_1
	elif z <= -2.1e+49:
		tmp = -4.5 * ((t * z) / a)
	elif z <= 1.9e-42:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(0.5 * Float64(x / Float64(a / y)))
	t_2 = Float64(-4.5 * Float64(t / Float64(a / z)))
	tmp = 0.0
	if (z <= -2.05e+101)
		tmp = t_2;
	elseif (z <= -4.5e+60)
		tmp = t_1;
	elseif (z <= -2.1e+49)
		tmp = Float64(-4.5 * Float64(Float64(t * z) / a));
	elseif (z <= 1.9e-42)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = 0.5 * (x / (a / y));
	t_2 = -4.5 * (t / (a / z));
	tmp = 0.0;
	if (z <= -2.05e+101)
		tmp = t_2;
	elseif (z <= -4.5e+60)
		tmp = t_1;
	elseif (z <= -2.1e+49)
		tmp = -4.5 * ((t * z) / a);
	elseif (z <= 1.9e-42)
		tmp = t_1;
	else
		tmp = t_2;
	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[(0.5 * N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.5 * N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e+101], t$95$2, If[LessEqual[z, -4.5e+60], t$95$1, If[LessEqual[z, -2.1e+49], N[(-4.5 * N[(N[(t * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e-42], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := 0.5 \cdot \frac{x}{\frac{a}{y}}\\
t_2 := -4.5 \cdot \frac{t}{\frac{a}{z}}\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{+101}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -4.5 \cdot 10^{+60}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2.1 \cdot 10^{+49}:\\
\;\;\;\;-4.5 \cdot \frac{t \cdot z}{a}\\

\mathbf{elif}\;z \leq 1.9 \cdot 10^{-42}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.05e101 or 1.90000000000000009e-42 < z

    1. Initial program 82.6%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub80.2%

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

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub82.6%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity82.6%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*82.6%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Taylor expanded in x around 0 62.8%

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

        \[\leadsto -4.5 \cdot \color{blue}{\frac{t}{\frac{a}{z}}} \]
    6. Simplified73.5%

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

    if -2.05e101 < z < -4.50000000000000013e60 or -2.10000000000000011e49 < z < 1.90000000000000009e-42

    1. Initial program 92.1%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub91.4%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*92.1%

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

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

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

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a \cdot 2} - \frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2} \]
      3. times-frac91.4%

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot \color{blue}{0.5}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right) \]
      7. times-frac89.4%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, -\color{blue}{\frac{z}{a} \cdot \frac{9 \cdot t}{2}}\right) \]
      8. *-commutative89.4%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, \color{blue}{\frac{9 \cdot t}{2} \cdot \left(-\frac{z}{a}\right)}\right) \]
      10. *-commutative89.4%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, \color{blue}{\frac{t}{\frac{2}{9}}} \cdot \left(-\frac{z}{a}\right)\right) \]
      12. metadata-eval89.4%

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

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

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

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

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

    if -4.50000000000000013e60 < z < -2.10000000000000011e49

    1. Initial program 80.7%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub80.7%

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

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub80.7%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity80.7%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*80.7%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Taylor expanded in x around 0 61.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+101}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+60}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{+49}:\\ \;\;\;\;-4.5 \cdot \frac{t \cdot z}{a}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-42}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \end{array} \]

Alternative 7: 66.7% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := -4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{if}\;z \leq -2.05 \cdot 10^{+101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{+49}:\\ \;\;\;\;-4.5 \cdot \frac{t \cdot z}{a}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-41}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \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 (* -4.5 (/ t (/ a z)))))
   (if (<= z -2.05e+101)
     t_1
     (if (<= z -1.7e+60)
       (* x (* y (/ 0.5 a)))
       (if (<= z -2.2e+49)
         (* -4.5 (/ (* t z) a))
         (if (<= z 3.7e-41) (* 0.5 (/ x (/ a y))) t_1))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = -4.5 * (t / (a / z));
	double tmp;
	if (z <= -2.05e+101) {
		tmp = t_1;
	} else if (z <= -1.7e+60) {
		tmp = x * (y * (0.5 / a));
	} else if (z <= -2.2e+49) {
		tmp = -4.5 * ((t * z) / a);
	} else if (z <= 3.7e-41) {
		tmp = 0.5 * (x / (a / y));
	} 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 = (-4.5d0) * (t / (a / z))
    if (z <= (-2.05d+101)) then
        tmp = t_1
    else if (z <= (-1.7d+60)) then
        tmp = x * (y * (0.5d0 / a))
    else if (z <= (-2.2d+49)) then
        tmp = (-4.5d0) * ((t * z) / a)
    else if (z <= 3.7d-41) then
        tmp = 0.5d0 * (x / (a / y))
    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 = -4.5 * (t / (a / z));
	double tmp;
	if (z <= -2.05e+101) {
		tmp = t_1;
	} else if (z <= -1.7e+60) {
		tmp = x * (y * (0.5 / a));
	} else if (z <= -2.2e+49) {
		tmp = -4.5 * ((t * z) / a);
	} else if (z <= 3.7e-41) {
		tmp = 0.5 * (x / (a / y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = -4.5 * (t / (a / z))
	tmp = 0
	if z <= -2.05e+101:
		tmp = t_1
	elif z <= -1.7e+60:
		tmp = x * (y * (0.5 / a))
	elif z <= -2.2e+49:
		tmp = -4.5 * ((t * z) / a)
	elif z <= 3.7e-41:
		tmp = 0.5 * (x / (a / y))
	else:
		tmp = t_1
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(-4.5 * Float64(t / Float64(a / z)))
	tmp = 0.0
	if (z <= -2.05e+101)
		tmp = t_1;
	elseif (z <= -1.7e+60)
		tmp = Float64(x * Float64(y * Float64(0.5 / a)));
	elseif (z <= -2.2e+49)
		tmp = Float64(-4.5 * Float64(Float64(t * z) / a));
	elseif (z <= 3.7e-41)
		tmp = Float64(0.5 * Float64(x / Float64(a / y)));
	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 = -4.5 * (t / (a / z));
	tmp = 0.0;
	if (z <= -2.05e+101)
		tmp = t_1;
	elseif (z <= -1.7e+60)
		tmp = x * (y * (0.5 / a));
	elseif (z <= -2.2e+49)
		tmp = -4.5 * ((t * z) / a);
	elseif (z <= 3.7e-41)
		tmp = 0.5 * (x / (a / y));
	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[(-4.5 * N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e+101], t$95$1, If[LessEqual[z, -1.7e+60], N[(x * N[(y * N[(0.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.2e+49], N[(-4.5 * N[(N[(t * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-41], N[(0.5 * N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := -4.5 \cdot \frac{t}{\frac{a}{z}}\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{+101}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.7 \cdot 10^{+60}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\

\mathbf{elif}\;z \leq -2.2 \cdot 10^{+49}:\\
\;\;\;\;-4.5 \cdot \frac{t \cdot z}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.05e101 or 3.7000000000000002e-41 < z

    1. Initial program 82.6%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub80.2%

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

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub82.6%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity82.6%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*82.6%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Taylor expanded in x around 0 62.8%

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

        \[\leadsto -4.5 \cdot \color{blue}{\frac{t}{\frac{a}{z}}} \]
    6. Simplified73.5%

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

    if -2.05e101 < z < -1.7e60

    1. Initial program 89.1%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub89.1%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*88.9%

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

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

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

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

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

        \[\leadsto \frac{1}{-\color{blue}{2 \cdot a}} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      5. distribute-lft-neg-in89.1%

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

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

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

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

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(0 - \left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right)} \]
      10. sub-neg89.1%

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

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(\left(-z \cdot \left(9 \cdot t\right)\right) + x \cdot y\right)}\right) \]
      12. associate--r+89.1%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(0 - \left(-z \cdot \left(9 \cdot t\right)\right)\right) - x \cdot y\right)} \]
      13. neg-sub089.1%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-\left(-z \cdot \left(9 \cdot t\right)\right)\right)} - x \cdot y\right) \]
      14. remove-double-neg89.1%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{z \cdot \left(9 \cdot t\right)} - x \cdot y\right) \]
    5. Applied egg-rr89.1%

      \[\leadsto \color{blue}{\frac{-0.5}{a} \cdot \left(z \cdot \left(9 \cdot t\right) - x \cdot y\right)} \]
    6. Taylor expanded in z around 0 57.2%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*57.2%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(-1 \cdot x\right) \cdot y\right)} \]
      2. neg-mul-157.2%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-x\right)} \cdot y\right) \]
      3. *-commutative57.2%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    8. Simplified57.2%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*l/57.2%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(y \cdot \left(-x\right)\right)}{a}} \]
      2. *-commutative57.2%

        \[\leadsto \frac{\color{blue}{\left(y \cdot \left(-x\right)\right) \cdot -0.5}}{a} \]
      3. associate-/l*57.2%

        \[\leadsto \color{blue}{\frac{y \cdot \left(-x\right)}{\frac{a}{-0.5}}} \]
      4. div-inv57.2%

        \[\leadsto \frac{y \cdot \left(-x\right)}{\color{blue}{a \cdot \frac{1}{-0.5}}} \]
      5. metadata-eval57.2%

        \[\leadsto \frac{y \cdot \left(-x\right)}{a \cdot \color{blue}{-2}} \]
      6. distribute-rgt-neg-out57.2%

        \[\leadsto \frac{\color{blue}{-y \cdot x}}{a \cdot -2} \]
      7. distribute-lft-neg-in57.2%

        \[\leadsto \frac{\color{blue}{\left(-y\right) \cdot x}}{a \cdot -2} \]
      8. times-frac67.6%

        \[\leadsto \color{blue}{\frac{-y}{a} \cdot \frac{x}{-2}} \]
      9. distribute-neg-frac67.6%

        \[\leadsto \color{blue}{\left(-\frac{y}{a}\right)} \cdot \frac{x}{-2} \]
      10. clear-num67.3%

        \[\leadsto \left(-\frac{y}{a}\right) \cdot \color{blue}{\frac{1}{\frac{-2}{x}}} \]
      11. associate-*r/67.8%

        \[\leadsto \color{blue}{\frac{\left(-\frac{y}{a}\right) \cdot 1}{\frac{-2}{x}}} \]
      12. frac-2neg67.8%

        \[\leadsto \color{blue}{\frac{-\left(-\frac{y}{a}\right) \cdot 1}{-\frac{-2}{x}}} \]
      13. *-rgt-identity67.8%

        \[\leadsto \frac{-\color{blue}{\left(-\frac{y}{a}\right)}}{-\frac{-2}{x}} \]
      14. frac-2neg67.8%

        \[\leadsto \frac{-\left(-\color{blue}{\frac{-y}{-a}}\right)}{-\frac{-2}{x}} \]
      15. distribute-frac-neg67.8%

        \[\leadsto \frac{-\left(-\color{blue}{\left(-\frac{y}{-a}\right)}\right)}{-\frac{-2}{x}} \]
      16. remove-double-neg67.8%

        \[\leadsto \frac{-\color{blue}{\frac{y}{-a}}}{-\frac{-2}{x}} \]
      17. distribute-frac-neg67.8%

        \[\leadsto \frac{\color{blue}{\frac{-y}{-a}}}{-\frac{-2}{x}} \]
      18. frac-2neg67.8%

        \[\leadsto \frac{\color{blue}{\frac{y}{a}}}{-\frac{-2}{x}} \]
    10. Applied egg-rr67.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{a}}{-\frac{-2}{x}}} \]
    11. Step-by-step derivation
      1. associate-/l/78.0%

        \[\leadsto \color{blue}{\frac{y}{\left(-\frac{-2}{x}\right) \cdot a}} \]
      2. distribute-neg-frac78.0%

        \[\leadsto \frac{y}{\color{blue}{\frac{--2}{x}} \cdot a} \]
      3. metadata-eval78.0%

        \[\leadsto \frac{y}{\frac{\color{blue}{2}}{x} \cdot a} \]
    12. Simplified78.0%

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

        \[\leadsto \frac{y}{\color{blue}{\frac{2 \cdot a}{x}}} \]
      2. associate-/r/67.6%

        \[\leadsto \color{blue}{\frac{y}{2 \cdot a} \cdot x} \]
      3. div-inv67.8%

        \[\leadsto \color{blue}{\left(y \cdot \frac{1}{2 \cdot a}\right)} \cdot x \]
      4. associate-/r*67.8%

        \[\leadsto \left(y \cdot \color{blue}{\frac{\frac{1}{2}}{a}}\right) \cdot x \]
      5. metadata-eval67.8%

        \[\leadsto \left(y \cdot \frac{\color{blue}{0.5}}{a}\right) \cdot x \]
    14. Applied egg-rr67.8%

      \[\leadsto \color{blue}{\left(y \cdot \frac{0.5}{a}\right) \cdot x} \]

    if -1.7e60 < z < -2.2000000000000001e49

    1. Initial program 80.7%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub80.7%

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

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub80.7%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity80.7%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*80.7%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Taylor expanded in x around 0 61.5%

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

    if -2.2000000000000001e49 < z < 3.7000000000000002e-41

    1. Initial program 92.4%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub91.5%

        \[\leadsto \color{blue}{\frac{x \cdot y}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      2. +-rgt-identity91.5%

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub92.4%

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*92.4%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Step-by-step derivation
      1. div-sub91.6%

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

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a \cdot 2} - \frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2} \]
      3. times-frac90.8%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, \frac{x}{2}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right)} \]
      5. div-inv90.8%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot \color{blue}{0.5}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right) \]
      7. times-frac89.4%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, -\color{blue}{\frac{z}{a} \cdot \frac{9 \cdot t}{2}}\right) \]
      8. *-commutative89.4%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, \color{blue}{\frac{9 \cdot t}{2} \cdot \left(-\frac{z}{a}\right)}\right) \]
      10. *-commutative89.4%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, \color{blue}{\frac{t}{\frac{2}{9}}} \cdot \left(-\frac{z}{a}\right)\right) \]
      12. metadata-eval89.4%

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

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\frac{x}{\frac{a}{y}}} \]
    8. Simplified66.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+101}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{+49}:\\ \;\;\;\;-4.5 \cdot \frac{t \cdot z}{a}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-41}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \end{array} \]

Alternative 8: 66.4% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+101}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{+59}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{+49}:\\ \;\;\;\;-4.5 \cdot \frac{t \cdot z}{a}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-42}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(t \cdot \frac{-4.5}{a}\right)\\ \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 -4e+101)
   (* -4.5 (/ t (/ a z)))
   (if (<= z -1.85e+59)
     (* x (* y (/ 0.5 a)))
     (if (<= z -2.1e+49)
       (* -4.5 (/ (* t z) a))
       (if (<= z 1.7e-42) (* 0.5 (/ x (/ a y))) (* z (* t (/ -4.5 a))))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4e+101) {
		tmp = -4.5 * (t / (a / z));
	} else if (z <= -1.85e+59) {
		tmp = x * (y * (0.5 / a));
	} else if (z <= -2.1e+49) {
		tmp = -4.5 * ((t * z) / a);
	} else if (z <= 1.7e-42) {
		tmp = 0.5 * (x / (a / y));
	} else {
		tmp = z * (t * (-4.5 / 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 <= (-4d+101)) then
        tmp = (-4.5d0) * (t / (a / z))
    else if (z <= (-1.85d+59)) then
        tmp = x * (y * (0.5d0 / a))
    else if (z <= (-2.1d+49)) then
        tmp = (-4.5d0) * ((t * z) / a)
    else if (z <= 1.7d-42) then
        tmp = 0.5d0 * (x / (a / y))
    else
        tmp = z * (t * ((-4.5d0) / 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 <= -4e+101) {
		tmp = -4.5 * (t / (a / z));
	} else if (z <= -1.85e+59) {
		tmp = x * (y * (0.5 / a));
	} else if (z <= -2.1e+49) {
		tmp = -4.5 * ((t * z) / a);
	} else if (z <= 1.7e-42) {
		tmp = 0.5 * (x / (a / y));
	} else {
		tmp = z * (t * (-4.5 / a));
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4e+101:
		tmp = -4.5 * (t / (a / z))
	elif z <= -1.85e+59:
		tmp = x * (y * (0.5 / a))
	elif z <= -2.1e+49:
		tmp = -4.5 * ((t * z) / a)
	elif z <= 1.7e-42:
		tmp = 0.5 * (x / (a / y))
	else:
		tmp = z * (t * (-4.5 / a))
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4e+101)
		tmp = Float64(-4.5 * Float64(t / Float64(a / z)));
	elseif (z <= -1.85e+59)
		tmp = Float64(x * Float64(y * Float64(0.5 / a)));
	elseif (z <= -2.1e+49)
		tmp = Float64(-4.5 * Float64(Float64(t * z) / a));
	elseif (z <= 1.7e-42)
		tmp = Float64(0.5 * Float64(x / Float64(a / y)));
	else
		tmp = Float64(z * Float64(t * Float64(-4.5 / 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 <= -4e+101)
		tmp = -4.5 * (t / (a / z));
	elseif (z <= -1.85e+59)
		tmp = x * (y * (0.5 / a));
	elseif (z <= -2.1e+49)
		tmp = -4.5 * ((t * z) / a);
	elseif (z <= 1.7e-42)
		tmp = 0.5 * (x / (a / y));
	else
		tmp = z * (t * (-4.5 / 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, -4e+101], N[(-4.5 * N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.85e+59], N[(x * N[(y * N[(0.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.1e+49], N[(-4.5 * N[(N[(t * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e-42], N[(0.5 * N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(t * N[(-4.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+101}:\\
\;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\

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

\mathbf{elif}\;z \leq -2.1 \cdot 10^{+49}:\\
\;\;\;\;-4.5 \cdot \frac{t \cdot z}{a}\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-42}:\\
\;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\

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


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

    1. Initial program 86.5%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub86.5%

        \[\leadsto \color{blue}{\frac{x \cdot y}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      2. +-rgt-identity86.5%

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub86.5%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity86.5%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Taylor expanded in x around 0 78.4%

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

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

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

    if -3.9999999999999999e101 < z < -1.84999999999999999e59

    1. Initial program 89.1%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub89.1%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*88.9%

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

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

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

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

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

        \[\leadsto \frac{1}{-\color{blue}{2 \cdot a}} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      5. distribute-lft-neg-in89.1%

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

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

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

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

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(0 - \left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right)} \]
      10. sub-neg89.1%

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

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(\left(-z \cdot \left(9 \cdot t\right)\right) + x \cdot y\right)}\right) \]
      12. associate--r+89.1%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(0 - \left(-z \cdot \left(9 \cdot t\right)\right)\right) - x \cdot y\right)} \]
      13. neg-sub089.1%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-\left(-z \cdot \left(9 \cdot t\right)\right)\right)} - x \cdot y\right) \]
      14. remove-double-neg89.1%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{z \cdot \left(9 \cdot t\right)} - x \cdot y\right) \]
    5. Applied egg-rr89.1%

      \[\leadsto \color{blue}{\frac{-0.5}{a} \cdot \left(z \cdot \left(9 \cdot t\right) - x \cdot y\right)} \]
    6. Taylor expanded in z around 0 57.2%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*57.2%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(-1 \cdot x\right) \cdot y\right)} \]
      2. neg-mul-157.2%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-x\right)} \cdot y\right) \]
      3. *-commutative57.2%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    8. Simplified57.2%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*l/57.2%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(y \cdot \left(-x\right)\right)}{a}} \]
      2. *-commutative57.2%

        \[\leadsto \frac{\color{blue}{\left(y \cdot \left(-x\right)\right) \cdot -0.5}}{a} \]
      3. associate-/l*57.2%

        \[\leadsto \color{blue}{\frac{y \cdot \left(-x\right)}{\frac{a}{-0.5}}} \]
      4. div-inv57.2%

        \[\leadsto \frac{y \cdot \left(-x\right)}{\color{blue}{a \cdot \frac{1}{-0.5}}} \]
      5. metadata-eval57.2%

        \[\leadsto \frac{y \cdot \left(-x\right)}{a \cdot \color{blue}{-2}} \]
      6. distribute-rgt-neg-out57.2%

        \[\leadsto \frac{\color{blue}{-y \cdot x}}{a \cdot -2} \]
      7. distribute-lft-neg-in57.2%

        \[\leadsto \frac{\color{blue}{\left(-y\right) \cdot x}}{a \cdot -2} \]
      8. times-frac67.6%

        \[\leadsto \color{blue}{\frac{-y}{a} \cdot \frac{x}{-2}} \]
      9. distribute-neg-frac67.6%

        \[\leadsto \color{blue}{\left(-\frac{y}{a}\right)} \cdot \frac{x}{-2} \]
      10. clear-num67.3%

        \[\leadsto \left(-\frac{y}{a}\right) \cdot \color{blue}{\frac{1}{\frac{-2}{x}}} \]
      11. associate-*r/67.8%

        \[\leadsto \color{blue}{\frac{\left(-\frac{y}{a}\right) \cdot 1}{\frac{-2}{x}}} \]
      12. frac-2neg67.8%

        \[\leadsto \color{blue}{\frac{-\left(-\frac{y}{a}\right) \cdot 1}{-\frac{-2}{x}}} \]
      13. *-rgt-identity67.8%

        \[\leadsto \frac{-\color{blue}{\left(-\frac{y}{a}\right)}}{-\frac{-2}{x}} \]
      14. frac-2neg67.8%

        \[\leadsto \frac{-\left(-\color{blue}{\frac{-y}{-a}}\right)}{-\frac{-2}{x}} \]
      15. distribute-frac-neg67.8%

        \[\leadsto \frac{-\left(-\color{blue}{\left(-\frac{y}{-a}\right)}\right)}{-\frac{-2}{x}} \]
      16. remove-double-neg67.8%

        \[\leadsto \frac{-\color{blue}{\frac{y}{-a}}}{-\frac{-2}{x}} \]
      17. distribute-frac-neg67.8%

        \[\leadsto \frac{\color{blue}{\frac{-y}{-a}}}{-\frac{-2}{x}} \]
      18. frac-2neg67.8%

        \[\leadsto \frac{\color{blue}{\frac{y}{a}}}{-\frac{-2}{x}} \]
    10. Applied egg-rr67.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{a}}{-\frac{-2}{x}}} \]
    11. Step-by-step derivation
      1. associate-/l/78.0%

        \[\leadsto \color{blue}{\frac{y}{\left(-\frac{-2}{x}\right) \cdot a}} \]
      2. distribute-neg-frac78.0%

        \[\leadsto \frac{y}{\color{blue}{\frac{--2}{x}} \cdot a} \]
      3. metadata-eval78.0%

        \[\leadsto \frac{y}{\frac{\color{blue}{2}}{x} \cdot a} \]
    12. Simplified78.0%

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

        \[\leadsto \frac{y}{\color{blue}{\frac{2 \cdot a}{x}}} \]
      2. associate-/r/67.6%

        \[\leadsto \color{blue}{\frac{y}{2 \cdot a} \cdot x} \]
      3. div-inv67.8%

        \[\leadsto \color{blue}{\left(y \cdot \frac{1}{2 \cdot a}\right)} \cdot x \]
      4. associate-/r*67.8%

        \[\leadsto \left(y \cdot \color{blue}{\frac{\frac{1}{2}}{a}}\right) \cdot x \]
      5. metadata-eval67.8%

        \[\leadsto \left(y \cdot \frac{\color{blue}{0.5}}{a}\right) \cdot x \]
    14. Applied egg-rr67.8%

      \[\leadsto \color{blue}{\left(y \cdot \frac{0.5}{a}\right) \cdot x} \]

    if -1.84999999999999999e59 < z < -2.10000000000000011e49

    1. Initial program 80.7%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub80.7%

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

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub80.7%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity80.7%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*80.7%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Taylor expanded in x around 0 61.5%

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

    if -2.10000000000000011e49 < z < 1.70000000000000011e-42

    1. Initial program 92.4%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub91.5%

        \[\leadsto \color{blue}{\frac{x \cdot y}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      2. +-rgt-identity91.5%

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub92.4%

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*92.4%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Step-by-step derivation
      1. div-sub91.6%

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

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a \cdot 2} - \frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2} \]
      3. times-frac90.8%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, \frac{x}{2}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right)} \]
      5. div-inv90.8%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot \color{blue}{0.5}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right) \]
      7. times-frac89.4%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, -\color{blue}{\frac{z}{a} \cdot \frac{9 \cdot t}{2}}\right) \]
      8. *-commutative89.4%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, \color{blue}{\frac{9 \cdot t}{2} \cdot \left(-\frac{z}{a}\right)}\right) \]
      10. *-commutative89.4%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, \color{blue}{\frac{t}{\frac{2}{9}}} \cdot \left(-\frac{z}{a}\right)\right) \]
      12. metadata-eval89.4%

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

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\frac{x}{\frac{a}{y}}} \]
    8. Simplified66.1%

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

    if 1.70000000000000011e-42 < z

    1. Initial program 81.0%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub77.5%

        \[\leadsto \color{blue}{\frac{x \cdot y}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      2. +-rgt-identity77.5%

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*81.0%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Taylor expanded in x around 0 56.3%

      \[\leadsto \frac{\color{blue}{-9 \cdot \left(t \cdot z\right)}}{a \cdot 2} \]
    5. Step-by-step derivation
      1. *-commutative56.3%

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

        \[\leadsto \color{blue}{\frac{-9}{2} \cdot \frac{t \cdot z}{a}} \]
      3. metadata-eval56.4%

        \[\leadsto \color{blue}{-4.5} \cdot \frac{t \cdot z}{a} \]
      4. associate-*r/65.9%

        \[\leadsto -4.5 \cdot \color{blue}{\left(t \cdot \frac{z}{a}\right)} \]
      5. associate-*r*66.0%

        \[\leadsto \color{blue}{\left(-4.5 \cdot t\right) \cdot \frac{z}{a}} \]
      6. clear-num65.9%

        \[\leadsto \left(-4.5 \cdot t\right) \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      7. div-inv66.0%

        \[\leadsto \color{blue}{\frac{-4.5 \cdot t}{\frac{a}{z}}} \]
      8. associate-/r/63.8%

        \[\leadsto \color{blue}{\frac{-4.5 \cdot t}{a} \cdot z} \]
      9. *-commutative63.8%

        \[\leadsto \frac{\color{blue}{t \cdot -4.5}}{a} \cdot z \]
    6. Applied egg-rr63.8%

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

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

        \[\leadsto \color{blue}{\left(t \cdot \left(-4.5 \cdot \frac{1}{a}\right)\right)} \cdot z \]
      3. div-inv63.9%

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

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

      \[\leadsto \color{blue}{\left(\frac{-4.5}{a} \cdot t\right)} \cdot z \]
  3. Recombined 5 regimes into one program.
  4. Final simplification68.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+101}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{+59}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{+49}:\\ \;\;\;\;-4.5 \cdot \frac{t \cdot z}{a}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-42}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(t \cdot \frac{-4.5}{a}\right)\\ \end{array} \]

Alternative 9: 66.6% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} t_1 := t \cdot \left(-4.5 \cdot \frac{z}{a}\right)\\ \mathbf{if}\;z \leq -2.05 \cdot 10^{+101}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+59}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{+49}:\\ \;\;\;\;-4.5 \cdot \frac{t \cdot z}{a}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-43}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \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 (* -4.5 (/ z a)))))
   (if (<= z -2.05e+101)
     t_1
     (if (<= z -4.5e+59)
       (* x (* y (/ 0.5 a)))
       (if (<= z -2.5e+49)
         (* -4.5 (/ (* t z) a))
         (if (<= z 2.5e-43) (* 0.5 (/ x (/ a y))) t_1))))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (-4.5 * (z / a));
	double tmp;
	if (z <= -2.05e+101) {
		tmp = t_1;
	} else if (z <= -4.5e+59) {
		tmp = x * (y * (0.5 / a));
	} else if (z <= -2.5e+49) {
		tmp = -4.5 * ((t * z) / a);
	} else if (z <= 2.5e-43) {
		tmp = 0.5 * (x / (a / y));
	} 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 * ((-4.5d0) * (z / a))
    if (z <= (-2.05d+101)) then
        tmp = t_1
    else if (z <= (-4.5d+59)) then
        tmp = x * (y * (0.5d0 / a))
    else if (z <= (-2.5d+49)) then
        tmp = (-4.5d0) * ((t * z) / a)
    else if (z <= 2.5d-43) then
        tmp = 0.5d0 * (x / (a / y))
    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 * (-4.5 * (z / a));
	double tmp;
	if (z <= -2.05e+101) {
		tmp = t_1;
	} else if (z <= -4.5e+59) {
		tmp = x * (y * (0.5 / a));
	} else if (z <= -2.5e+49) {
		tmp = -4.5 * ((t * z) / a);
	} else if (z <= 2.5e-43) {
		tmp = 0.5 * (x / (a / y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	t_1 = t * (-4.5 * (z / a))
	tmp = 0
	if z <= -2.05e+101:
		tmp = t_1
	elif z <= -4.5e+59:
		tmp = x * (y * (0.5 / a))
	elif z <= -2.5e+49:
		tmp = -4.5 * ((t * z) / a)
	elif z <= 2.5e-43:
		tmp = 0.5 * (x / (a / y))
	else:
		tmp = t_1
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(-4.5 * Float64(z / a)))
	tmp = 0.0
	if (z <= -2.05e+101)
		tmp = t_1;
	elseif (z <= -4.5e+59)
		tmp = Float64(x * Float64(y * Float64(0.5 / a)));
	elseif (z <= -2.5e+49)
		tmp = Float64(-4.5 * Float64(Float64(t * z) / a));
	elseif (z <= 2.5e-43)
		tmp = Float64(0.5 * Float64(x / Float64(a / y)));
	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 * (-4.5 * (z / a));
	tmp = 0.0;
	if (z <= -2.05e+101)
		tmp = t_1;
	elseif (z <= -4.5e+59)
		tmp = x * (y * (0.5 / a));
	elseif (z <= -2.5e+49)
		tmp = -4.5 * ((t * z) / a);
	elseif (z <= 2.5e-43)
		tmp = 0.5 * (x / (a / y));
	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[(-4.5 * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e+101], t$95$1, If[LessEqual[z, -4.5e+59], N[(x * N[(y * N[(0.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.5e+49], N[(-4.5 * N[(N[(t * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-43], N[(0.5 * N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(-4.5 \cdot \frac{z}{a}\right)\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{+101}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -4.5 \cdot 10^{+59}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\

\mathbf{elif}\;z \leq -2.5 \cdot 10^{+49}:\\
\;\;\;\;-4.5 \cdot \frac{t \cdot z}{a}\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-43}:\\
\;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.05e101 or 2.50000000000000009e-43 < z

    1. Initial program 82.6%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub80.2%

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

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub82.6%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity82.6%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*82.6%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Taylor expanded in x around 0 62.8%

      \[\leadsto \frac{\color{blue}{-9 \cdot \left(t \cdot z\right)}}{a \cdot 2} \]
    5. Step-by-step derivation
      1. *-commutative62.8%

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

        \[\leadsto \color{blue}{\frac{t \cdot z}{a} \cdot \frac{-9}{2}} \]
      3. associate-*r/73.4%

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

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

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

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

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

    if -2.05e101 < z < -4.49999999999999959e59

    1. Initial program 89.1%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub89.1%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*88.9%

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

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

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

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

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

        \[\leadsto \frac{1}{-\color{blue}{2 \cdot a}} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      5. distribute-lft-neg-in89.1%

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

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

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

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

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(0 - \left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right)} \]
      10. sub-neg89.1%

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

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(\left(-z \cdot \left(9 \cdot t\right)\right) + x \cdot y\right)}\right) \]
      12. associate--r+89.1%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(0 - \left(-z \cdot \left(9 \cdot t\right)\right)\right) - x \cdot y\right)} \]
      13. neg-sub089.1%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-\left(-z \cdot \left(9 \cdot t\right)\right)\right)} - x \cdot y\right) \]
      14. remove-double-neg89.1%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{z \cdot \left(9 \cdot t\right)} - x \cdot y\right) \]
    5. Applied egg-rr89.1%

      \[\leadsto \color{blue}{\frac{-0.5}{a} \cdot \left(z \cdot \left(9 \cdot t\right) - x \cdot y\right)} \]
    6. Taylor expanded in z around 0 57.2%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*57.2%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(-1 \cdot x\right) \cdot y\right)} \]
      2. neg-mul-157.2%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-x\right)} \cdot y\right) \]
      3. *-commutative57.2%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    8. Simplified57.2%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*l/57.2%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(y \cdot \left(-x\right)\right)}{a}} \]
      2. *-commutative57.2%

        \[\leadsto \frac{\color{blue}{\left(y \cdot \left(-x\right)\right) \cdot -0.5}}{a} \]
      3. associate-/l*57.2%

        \[\leadsto \color{blue}{\frac{y \cdot \left(-x\right)}{\frac{a}{-0.5}}} \]
      4. div-inv57.2%

        \[\leadsto \frac{y \cdot \left(-x\right)}{\color{blue}{a \cdot \frac{1}{-0.5}}} \]
      5. metadata-eval57.2%

        \[\leadsto \frac{y \cdot \left(-x\right)}{a \cdot \color{blue}{-2}} \]
      6. distribute-rgt-neg-out57.2%

        \[\leadsto \frac{\color{blue}{-y \cdot x}}{a \cdot -2} \]
      7. distribute-lft-neg-in57.2%

        \[\leadsto \frac{\color{blue}{\left(-y\right) \cdot x}}{a \cdot -2} \]
      8. times-frac67.6%

        \[\leadsto \color{blue}{\frac{-y}{a} \cdot \frac{x}{-2}} \]
      9. distribute-neg-frac67.6%

        \[\leadsto \color{blue}{\left(-\frac{y}{a}\right)} \cdot \frac{x}{-2} \]
      10. clear-num67.3%

        \[\leadsto \left(-\frac{y}{a}\right) \cdot \color{blue}{\frac{1}{\frac{-2}{x}}} \]
      11. associate-*r/67.8%

        \[\leadsto \color{blue}{\frac{\left(-\frac{y}{a}\right) \cdot 1}{\frac{-2}{x}}} \]
      12. frac-2neg67.8%

        \[\leadsto \color{blue}{\frac{-\left(-\frac{y}{a}\right) \cdot 1}{-\frac{-2}{x}}} \]
      13. *-rgt-identity67.8%

        \[\leadsto \frac{-\color{blue}{\left(-\frac{y}{a}\right)}}{-\frac{-2}{x}} \]
      14. frac-2neg67.8%

        \[\leadsto \frac{-\left(-\color{blue}{\frac{-y}{-a}}\right)}{-\frac{-2}{x}} \]
      15. distribute-frac-neg67.8%

        \[\leadsto \frac{-\left(-\color{blue}{\left(-\frac{y}{-a}\right)}\right)}{-\frac{-2}{x}} \]
      16. remove-double-neg67.8%

        \[\leadsto \frac{-\color{blue}{\frac{y}{-a}}}{-\frac{-2}{x}} \]
      17. distribute-frac-neg67.8%

        \[\leadsto \frac{\color{blue}{\frac{-y}{-a}}}{-\frac{-2}{x}} \]
      18. frac-2neg67.8%

        \[\leadsto \frac{\color{blue}{\frac{y}{a}}}{-\frac{-2}{x}} \]
    10. Applied egg-rr67.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{a}}{-\frac{-2}{x}}} \]
    11. Step-by-step derivation
      1. associate-/l/78.0%

        \[\leadsto \color{blue}{\frac{y}{\left(-\frac{-2}{x}\right) \cdot a}} \]
      2. distribute-neg-frac78.0%

        \[\leadsto \frac{y}{\color{blue}{\frac{--2}{x}} \cdot a} \]
      3. metadata-eval78.0%

        \[\leadsto \frac{y}{\frac{\color{blue}{2}}{x} \cdot a} \]
    12. Simplified78.0%

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

        \[\leadsto \frac{y}{\color{blue}{\frac{2 \cdot a}{x}}} \]
      2. associate-/r/67.6%

        \[\leadsto \color{blue}{\frac{y}{2 \cdot a} \cdot x} \]
      3. div-inv67.8%

        \[\leadsto \color{blue}{\left(y \cdot \frac{1}{2 \cdot a}\right)} \cdot x \]
      4. associate-/r*67.8%

        \[\leadsto \left(y \cdot \color{blue}{\frac{\frac{1}{2}}{a}}\right) \cdot x \]
      5. metadata-eval67.8%

        \[\leadsto \left(y \cdot \frac{\color{blue}{0.5}}{a}\right) \cdot x \]
    14. Applied egg-rr67.8%

      \[\leadsto \color{blue}{\left(y \cdot \frac{0.5}{a}\right) \cdot x} \]

    if -4.49999999999999959e59 < z < -2.5000000000000002e49

    1. Initial program 80.7%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub80.7%

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

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub80.7%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity80.7%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*80.7%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Taylor expanded in x around 0 61.5%

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

    if -2.5000000000000002e49 < z < 2.50000000000000009e-43

    1. Initial program 92.4%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub91.5%

        \[\leadsto \color{blue}{\frac{x \cdot y}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      2. +-rgt-identity91.5%

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub92.4%

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*92.4%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Step-by-step derivation
      1. div-sub91.6%

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

        \[\leadsto \frac{\color{blue}{y \cdot x}}{a \cdot 2} - \frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2} \]
      3. times-frac90.8%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, \frac{x}{2}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right)} \]
      5. div-inv90.8%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot \color{blue}{0.5}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right) \]
      7. times-frac89.4%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, -\color{blue}{\frac{z}{a} \cdot \frac{9 \cdot t}{2}}\right) \]
      8. *-commutative89.4%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, \color{blue}{\frac{9 \cdot t}{2} \cdot \left(-\frac{z}{a}\right)}\right) \]
      10. *-commutative89.4%

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, \color{blue}{\frac{t}{\frac{2}{9}}} \cdot \left(-\frac{z}{a}\right)\right) \]
      12. metadata-eval89.4%

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

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

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

        \[\leadsto 0.5 \cdot \color{blue}{\frac{x}{\frac{a}{y}}} \]
    8. Simplified66.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+101}:\\ \;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right)\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+59}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{+49}:\\ \;\;\;\;-4.5 \cdot \frac{t \cdot z}{a}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-43}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right)\\ \end{array} \]

Alternative 10: 74.4% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y] = \mathsf{sort}([x, y])\\ \\ \begin{array}{l} \mathbf{if}\;y \cdot x \leq -5 \cdot 10^{+67}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;y \cdot x \leq 5 \cdot 10^{-13}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \frac{x}{2}\\ \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 x) -5e+67)
   (* 0.5 (/ x (/ a y)))
   (if (<= (* y x) 5e-13) (* -4.5 (/ t (/ a z))) (* (/ y a) (/ x 2.0)))))
assert(x < y);
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y * x) <= -5e+67) {
		tmp = 0.5 * (x / (a / y));
	} else if ((y * x) <= 5e-13) {
		tmp = -4.5 * (t / (a / z));
	} else {
		tmp = (y / a) * (x / 2.0);
	}
	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 * x) <= (-5d+67)) then
        tmp = 0.5d0 * (x / (a / y))
    else if ((y * x) <= 5d-13) then
        tmp = (-4.5d0) * (t / (a / z))
    else
        tmp = (y / a) * (x / 2.0d0)
    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 * x) <= -5e+67) {
		tmp = 0.5 * (x / (a / y));
	} else if ((y * x) <= 5e-13) {
		tmp = -4.5 * (t / (a / z));
	} else {
		tmp = (y / a) * (x / 2.0);
	}
	return tmp;
}
[x, y] = sort([x, y])
def code(x, y, z, t, a):
	tmp = 0
	if (y * x) <= -5e+67:
		tmp = 0.5 * (x / (a / y))
	elif (y * x) <= 5e-13:
		tmp = -4.5 * (t / (a / z))
	else:
		tmp = (y / a) * (x / 2.0)
	return tmp
x, y = sort([x, y])
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(y * x) <= -5e+67)
		tmp = Float64(0.5 * Float64(x / Float64(a / y)));
	elseif (Float64(y * x) <= 5e-13)
		tmp = Float64(-4.5 * Float64(t / Float64(a / z)));
	else
		tmp = Float64(Float64(y / a) * Float64(x / 2.0));
	end
	return tmp
end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y * x) <= -5e+67)
		tmp = 0.5 * (x / (a / y));
	elseif ((y * x) <= 5e-13)
		tmp = -4.5 * (t / (a / z));
	else
		tmp = (y / a) * (x / 2.0);
	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[(y * x), $MachinePrecision], -5e+67], N[(0.5 * N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(y * x), $MachinePrecision], 5e-13], N[(-4.5 * N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(x / 2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \cdot x \leq -5 \cdot 10^{+67}:\\
\;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 x y) < -4.99999999999999976e67

    1. Initial program 82.8%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub76.1%

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

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub82.8%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity82.8%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*82.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, \frac{x}{2}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right)} \]
      5. div-inv82.5%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, \color{blue}{x \cdot \frac{1}{2}}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right) \]
      6. metadata-eval82.5%

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot \color{blue}{0.5}, -\frac{z \cdot \left(9 \cdot t\right)}{a \cdot 2}\right) \]
      7. times-frac84.3%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, x \cdot 0.5, \color{blue}{\frac{t}{\frac{2}{9}}} \cdot \left(-\frac{z}{a}\right)\right) \]
      12. metadata-eval84.3%

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

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

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

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

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

    if -4.99999999999999976e67 < (*.f64 x y) < 4.9999999999999999e-13

    1. Initial program 89.7%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub89.7%

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

        \[\leadsto \frac{\color{blue}{x \cdot y + 0}}{a \cdot 2} - \frac{\left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      3. div-sub89.7%

        \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
      4. +-rgt-identity89.7%

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*89.6%

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

      \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
    4. Taylor expanded in x around 0 71.6%

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

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

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

    if 4.9999999999999999e-13 < (*.f64 x y)

    1. Initial program 85.9%

      \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    2. Step-by-step derivation
      1. div-sub84.6%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
      5. associate-*l*85.9%

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

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

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

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

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

        \[\leadsto \frac{1}{-\color{blue}{2 \cdot a}} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      5. distribute-lft-neg-in85.9%

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

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

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

        \[\leadsto \frac{\color{blue}{-0.5}}{a} \cdot \left(-\left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right) \]
      9. neg-sub085.9%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(0 - \left(x \cdot y - z \cdot \left(9 \cdot t\right)\right)\right)} \]
      10. sub-neg85.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(x \cdot y + \left(-z \cdot \left(9 \cdot t\right)\right)\right)}\right) \]
      11. +-commutative85.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(0 - \color{blue}{\left(\left(-z \cdot \left(9 \cdot t\right)\right) + x \cdot y\right)}\right) \]
      12. associate--r+85.9%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(0 - \left(-z \cdot \left(9 \cdot t\right)\right)\right) - x \cdot y\right)} \]
      13. neg-sub085.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-\left(-z \cdot \left(9 \cdot t\right)\right)\right)} - x \cdot y\right) \]
      14. remove-double-neg85.9%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{z \cdot \left(9 \cdot t\right)} - x \cdot y\right) \]
    5. Applied egg-rr85.9%

      \[\leadsto \color{blue}{\frac{-0.5}{a} \cdot \left(z \cdot \left(9 \cdot t\right) - x \cdot y\right)} \]
    6. Taylor expanded in z around 0 65.7%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(-1 \cdot \left(x \cdot y\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*65.7%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(\left(-1 \cdot x\right) \cdot y\right)} \]
      2. neg-mul-165.7%

        \[\leadsto \frac{-0.5}{a} \cdot \left(\color{blue}{\left(-x\right)} \cdot y\right) \]
      3. *-commutative65.7%

        \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    8. Simplified65.7%

      \[\leadsto \frac{-0.5}{a} \cdot \color{blue}{\left(y \cdot \left(-x\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*l/65.6%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(y \cdot \left(-x\right)\right)}{a}} \]
      2. *-commutative65.6%

        \[\leadsto \frac{\color{blue}{\left(y \cdot \left(-x\right)\right) \cdot -0.5}}{a} \]
      3. associate-/l*65.6%

        \[\leadsto \color{blue}{\frac{y \cdot \left(-x\right)}{\frac{a}{-0.5}}} \]
      4. div-inv65.6%

        \[\leadsto \frac{y \cdot \left(-x\right)}{\color{blue}{a \cdot \frac{1}{-0.5}}} \]
      5. metadata-eval65.6%

        \[\leadsto \frac{y \cdot \left(-x\right)}{a \cdot \color{blue}{-2}} \]
      6. distribute-rgt-neg-out65.6%

        \[\leadsto \frac{\color{blue}{-y \cdot x}}{a \cdot -2} \]
      7. distribute-lft-neg-in65.6%

        \[\leadsto \frac{\color{blue}{\left(-y\right) \cdot x}}{a \cdot -2} \]
      8. times-frac74.3%

        \[\leadsto \color{blue}{\frac{-y}{a} \cdot \frac{x}{-2}} \]
      9. distribute-neg-frac74.3%

        \[\leadsto \color{blue}{\left(-\frac{y}{a}\right)} \cdot \frac{x}{-2} \]
      10. clear-num74.2%

        \[\leadsto \left(-\frac{y}{a}\right) \cdot \color{blue}{\frac{1}{\frac{-2}{x}}} \]
      11. associate-*r/74.2%

        \[\leadsto \color{blue}{\frac{\left(-\frac{y}{a}\right) \cdot 1}{\frac{-2}{x}}} \]
      12. frac-2neg74.2%

        \[\leadsto \color{blue}{\frac{-\left(-\frac{y}{a}\right) \cdot 1}{-\frac{-2}{x}}} \]
      13. *-rgt-identity74.2%

        \[\leadsto \frac{-\color{blue}{\left(-\frac{y}{a}\right)}}{-\frac{-2}{x}} \]
      14. frac-2neg74.2%

        \[\leadsto \frac{-\left(-\color{blue}{\frac{-y}{-a}}\right)}{-\frac{-2}{x}} \]
      15. distribute-frac-neg74.2%

        \[\leadsto \frac{-\left(-\color{blue}{\left(-\frac{y}{-a}\right)}\right)}{-\frac{-2}{x}} \]
      16. remove-double-neg74.2%

        \[\leadsto \frac{-\color{blue}{\frac{y}{-a}}}{-\frac{-2}{x}} \]
      17. distribute-frac-neg74.2%

        \[\leadsto \frac{\color{blue}{\frac{-y}{-a}}}{-\frac{-2}{x}} \]
      18. frac-2neg74.2%

        \[\leadsto \frac{\color{blue}{\frac{y}{a}}}{-\frac{-2}{x}} \]
    10. Applied egg-rr74.2%

      \[\leadsto \color{blue}{\frac{\frac{y}{a}}{-\frac{-2}{x}}} \]
    11. Step-by-step derivation
      1. associate-/l/74.1%

        \[\leadsto \color{blue}{\frac{y}{\left(-\frac{-2}{x}\right) \cdot a}} \]
      2. distribute-neg-frac74.1%

        \[\leadsto \frac{y}{\color{blue}{\frac{--2}{x}} \cdot a} \]
      3. metadata-eval74.1%

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

        \[\leadsto \frac{y}{\color{blue}{\frac{2}{\frac{x}{a}}}} \]
      5. associate-/l*74.2%

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

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{a \cdot 2}} \]
      8. times-frac74.3%

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

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

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

Alternative 11: 51.7% accurate, 1.9× speedup?

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

    \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
  2. Step-by-step derivation
    1. div-sub85.8%

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

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

      \[\leadsto \color{blue}{\frac{\left(x \cdot y + 0\right) - \left(z \cdot 9\right) \cdot t}{a \cdot 2}} \]
    4. +-rgt-identity87.3%

      \[\leadsto \frac{\color{blue}{x \cdot y} - \left(z \cdot 9\right) \cdot t}{a \cdot 2} \]
    5. associate-*l*87.3%

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

    \[\leadsto \color{blue}{\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}} \]
  4. Taylor expanded in x around 0 49.9%

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

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

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

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

Developer target: 93.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a < -2.090464557976709 \cdot 10^{+86}:\\ \;\;\;\;0.5 \cdot \frac{y \cdot x}{a} - 4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;a < 2.144030707833976 \cdot 10^{+99}:\\ \;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(x \cdot 0.5\right) - \frac{t}{a} \cdot \left(z \cdot 4.5\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (< a -2.090464557976709e+86)
   (- (* 0.5 (/ (* y x) a)) (* 4.5 (/ t (/ a z))))
   (if (< a 2.144030707833976e+99)
     (/ (- (* x y) (* z (* 9.0 t))) (* a 2.0))
     (- (* (/ y a) (* x 0.5)) (* (/ t a) (* z 4.5))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a < -2.090464557976709e+86) {
		tmp = (0.5 * ((y * x) / a)) - (4.5 * (t / (a / z)));
	} else if (a < 2.144030707833976e+99) {
		tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
	} else {
		tmp = ((y / a) * (x * 0.5)) - ((t / a) * (z * 4.5));
	}
	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) :: tmp
    if (a < (-2.090464557976709d+86)) then
        tmp = (0.5d0 * ((y * x) / a)) - (4.5d0 * (t / (a / z)))
    else if (a < 2.144030707833976d+99) then
        tmp = ((x * y) - (z * (9.0d0 * t))) / (a * 2.0d0)
    else
        tmp = ((y / a) * (x * 0.5d0)) - ((t / a) * (z * 4.5d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a < -2.090464557976709e+86) {
		tmp = (0.5 * ((y * x) / a)) - (4.5 * (t / (a / z)));
	} else if (a < 2.144030707833976e+99) {
		tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
	} else {
		tmp = ((y / a) * (x * 0.5)) - ((t / a) * (z * 4.5));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a < -2.090464557976709e+86:
		tmp = (0.5 * ((y * x) / a)) - (4.5 * (t / (a / z)))
	elif a < 2.144030707833976e+99:
		tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0)
	else:
		tmp = ((y / a) * (x * 0.5)) - ((t / a) * (z * 4.5))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a < -2.090464557976709e+86)
		tmp = Float64(Float64(0.5 * Float64(Float64(y * x) / a)) - Float64(4.5 * Float64(t / Float64(a / z))));
	elseif (a < 2.144030707833976e+99)
		tmp = Float64(Float64(Float64(x * y) - Float64(z * Float64(9.0 * t))) / Float64(a * 2.0));
	else
		tmp = Float64(Float64(Float64(y / a) * Float64(x * 0.5)) - Float64(Float64(t / a) * Float64(z * 4.5)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a < -2.090464557976709e+86)
		tmp = (0.5 * ((y * x) / a)) - (4.5 * (t / (a / z)));
	elseif (a < 2.144030707833976e+99)
		tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
	else
		tmp = ((y / a) * (x * 0.5)) - ((t / a) * (z * 4.5));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Less[a, -2.090464557976709e+86], N[(N[(0.5 * N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] - N[(4.5 * N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[a, 2.144030707833976e+99], N[(N[(N[(x * y), $MachinePrecision] - N[(z * N[(9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / a), $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision] - N[(N[(t / a), $MachinePrecision] * N[(z * 4.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a < -2.090464557976709 \cdot 10^{+86}:\\
\;\;\;\;0.5 \cdot \frac{y \cdot x}{a} - 4.5 \cdot \frac{t}{\frac{a}{z}}\\

\mathbf{elif}\;a < 2.144030707833976 \cdot 10^{+99}:\\
\;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023297 
(FPCore (x y z t a)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, I"
  :precision binary64

  :herbie-target
  (if (< a -2.090464557976709e+86) (- (* 0.5 (/ (* y x) a)) (* 4.5 (/ t (/ a z)))) (if (< a 2.144030707833976e+99) (/ (- (* x y) (* z (* 9.0 t))) (* a 2.0)) (- (* (/ y a) (* x 0.5)) (* (/ t a) (* z 4.5)))))

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