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

Percentage Accurate: 90.9% → 94.2%
Time: 9.4s
Alternatives: 13
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 13 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: 90.9% 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.2% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 2) < -9.9999999999999994e161

    1. Initial program 74.7%

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

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

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

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

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

      \[\leadsto \color{blue}{-4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative74.8%

        \[\leadsto \color{blue}{0.5 \cdot \frac{x \cdot y}{a} + -4.5 \cdot \frac{t \cdot z}{a}} \]
      2. fma-def74.8%

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

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

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

        \[\leadsto \mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, -4.5 \cdot \color{blue}{\left(\frac{t}{a} \cdot z\right)}\right) \]
    6. Simplified84.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, -4.5 \cdot \left(\frac{t}{a} \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*84.1%

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

        \[\leadsto \mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, \color{blue}{\frac{-4.5 \cdot t}{a}} \cdot z\right) \]
      3. associate-/r/98.9%

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

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

        \[\leadsto \mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, \color{blue}{\frac{t}{\frac{\frac{a}{z}}{-4.5}}}\right) \]
    8. Applied egg-rr99.0%

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

    if -9.9999999999999994e161 < (*.f64 a 2) < 4.99999999999999957e28

    1. Initial program 98.2%

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

    if 4.99999999999999957e28 < (*.f64 a 2)

    1. Initial program 75.0%

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

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

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

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

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

      \[\leadsto \color{blue}{-4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative75.0%

        \[\leadsto \color{blue}{0.5 \cdot \frac{x \cdot y}{a} + -4.5 \cdot \frac{t \cdot z}{a}} \]
      2. fma-def75.0%

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

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

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

        \[\leadsto \mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, -4.5 \cdot \color{blue}{\left(\frac{t}{a} \cdot z\right)}\right) \]
    6. Simplified98.2%

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

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

Alternative 2: 94.2% accurate, 0.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 a 2) < -2.0000000000000001e178

    1. Initial program 73.4%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified73.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 73.5%

      \[\leadsto \color{blue}{-4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative73.5%

        \[\leadsto \color{blue}{0.5 \cdot \frac{x \cdot y}{a} + -4.5 \cdot \frac{t \cdot z}{a}} \]
      2. fma-def73.5%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, -4.5 \cdot \left(\frac{t}{a} \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*83.2%

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

        \[\leadsto \mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, \color{blue}{\frac{-4.5 \cdot t}{a}} \cdot z\right) \]
      3. associate-/r/98.8%

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

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

        \[\leadsto \mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, \color{blue}{\frac{t}{\frac{\frac{a}{z}}{-4.5}}}\right) \]
    8. Applied egg-rr99.0%

      \[\leadsto \mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, \color{blue}{\frac{t}{\frac{\frac{a}{z}}{-4.5}}}\right) \]
    9. Step-by-step derivation
      1. fma-udef99.0%

        \[\leadsto \color{blue}{0.5 \cdot \frac{x}{\frac{a}{y}} + \frac{t}{\frac{\frac{a}{z}}{-4.5}}} \]
      2. div-inv99.0%

        \[\leadsto 0.5 \cdot \color{blue}{\left(x \cdot \frac{1}{\frac{a}{y}}\right)} + \frac{t}{\frac{\frac{a}{z}}{-4.5}} \]
      3. clear-num99.1%

        \[\leadsto 0.5 \cdot \left(x \cdot \color{blue}{\frac{y}{a}}\right) + \frac{t}{\frac{\frac{a}{z}}{-4.5}} \]
      4. div-inv99.0%

        \[\leadsto 0.5 \cdot \left(x \cdot \frac{y}{a}\right) + \color{blue}{t \cdot \frac{1}{\frac{\frac{a}{z}}{-4.5}}} \]
      5. associate-/l/99.1%

        \[\leadsto 0.5 \cdot \left(x \cdot \frac{y}{a}\right) + t \cdot \frac{1}{\color{blue}{\frac{a}{-4.5 \cdot z}}} \]
      6. *-commutative99.1%

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

        \[\leadsto 0.5 \cdot \left(x \cdot \frac{y}{a}\right) + t \cdot \color{blue}{\frac{z \cdot -4.5}{a}} \]
      8. associate-/l*99.0%

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

        \[\leadsto 0.5 \cdot \left(x \cdot \frac{y}{a}\right) + t \cdot \frac{z}{\color{blue}{a \cdot \frac{1}{-4.5}}} \]
      10. metadata-eval98.9%

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

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

    if -2.0000000000000001e178 < (*.f64 a 2) < 4.99999999999999957e28

    1. Initial program 98.2%

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

    if 4.99999999999999957e28 < (*.f64 a 2)

    1. Initial program 75.0%

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

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

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

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

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

      \[\leadsto \color{blue}{-4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative75.0%

        \[\leadsto \color{blue}{0.5 \cdot \frac{x \cdot y}{a} + -4.5 \cdot \frac{t \cdot z}{a}} \]
      2. fma-def75.0%

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

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

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

        \[\leadsto \mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, -4.5 \cdot \color{blue}{\left(\frac{t}{a} \cdot z\right)}\right) \]
    6. Simplified98.2%

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

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

Alternative 3: 96.3% accurate, 0.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t)) < -5.0000000000000005e251 or 3.99999999999999984e275 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t))

    1. Initial program 73.8%

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

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

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

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

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

      \[\leadsto \color{blue}{-4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative68.0%

        \[\leadsto \color{blue}{0.5 \cdot \frac{x \cdot y}{a} + -4.5 \cdot \frac{t \cdot z}{a}} \]
      2. fma-def68.0%

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

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

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

        \[\leadsto \mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, -4.5 \cdot \color{blue}{\left(\frac{t}{a} \cdot z\right)}\right) \]
    6. Simplified91.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, -4.5 \cdot \left(\frac{t}{a} \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*91.6%

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

        \[\leadsto \mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, \color{blue}{\frac{-4.5 \cdot t}{a}} \cdot z\right) \]
      3. associate-/r/94.0%

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

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

        \[\leadsto \mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, \color{blue}{\frac{t}{\frac{\frac{a}{z}}{-4.5}}}\right) \]
    8. Applied egg-rr94.0%

      \[\leadsto \mathsf{fma}\left(0.5, \frac{x}{\frac{a}{y}}, \color{blue}{\frac{t}{\frac{\frac{a}{z}}{-4.5}}}\right) \]
    9. Step-by-step derivation
      1. fma-udef94.0%

        \[\leadsto \color{blue}{0.5 \cdot \frac{x}{\frac{a}{y}} + \frac{t}{\frac{\frac{a}{z}}{-4.5}}} \]
      2. div-inv93.9%

        \[\leadsto 0.5 \cdot \color{blue}{\left(x \cdot \frac{1}{\frac{a}{y}}\right)} + \frac{t}{\frac{\frac{a}{z}}{-4.5}} \]
      3. clear-num93.9%

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

        \[\leadsto 0.5 \cdot \left(x \cdot \frac{y}{a}\right) + \color{blue}{t \cdot \frac{1}{\frac{\frac{a}{z}}{-4.5}}} \]
      5. associate-/l/93.9%

        \[\leadsto 0.5 \cdot \left(x \cdot \frac{y}{a}\right) + t \cdot \frac{1}{\color{blue}{\frac{a}{-4.5 \cdot z}}} \]
      6. *-commutative93.9%

        \[\leadsto 0.5 \cdot \left(x \cdot \frac{y}{a}\right) + t \cdot \frac{1}{\frac{a}{\color{blue}{z \cdot -4.5}}} \]
      7. clear-num93.9%

        \[\leadsto 0.5 \cdot \left(x \cdot \frac{y}{a}\right) + t \cdot \color{blue}{\frac{z \cdot -4.5}{a}} \]
      8. associate-/l*93.9%

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

        \[\leadsto 0.5 \cdot \left(x \cdot \frac{y}{a}\right) + t \cdot \frac{z}{\color{blue}{a \cdot \frac{1}{-4.5}}} \]
      10. metadata-eval93.9%

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

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

    if -5.0000000000000005e251 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z 9) t)) < 3.99999999999999984e275

    1. Initial program 99.1%

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

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

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

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

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

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

Alternative 4: 92.7% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 z 9) t) < 9.99999999999999907e214

    1. Initial program 93.2%

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

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

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

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

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

    if 9.99999999999999907e214 < (*.f64 (*.f64 z 9) t)

    1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

Alternative 5: 92.7% accurate, 0.8× speedup?

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

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


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

    1. Initial program 61.6%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified61.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 61.6%

      \[\leadsto \color{blue}{-4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative61.6%

        \[\leadsto \color{blue}{0.5 \cdot \frac{x \cdot y}{a} + -4.5 \cdot \frac{t \cdot z}{a}} \]
      2. fma-def61.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} \cdot 0.5} \]
      2. *-commutative61.6%

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

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

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

    if -inf.0 < (*.f64 x y)

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \frac{0.5}{a} - \left(z \cdot \left(9 \cdot t\right)\right) \cdot \frac{0.5}{a}} \]
    6. Step-by-step derivation
      1. distribute-rgt-out--92.8%

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

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

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

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

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

Alternative 6: 73.5% accurate, 0.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\


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

    1. Initial program 87.4%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.5 \cdot \frac{x}{\frac{a}{y}}} \]
    7. Step-by-step derivation
      1. clear-num83.8%

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

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

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

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

    if -2e17 < (*.f64 x y) < 1.99999999999999989e49

    1. Initial program 93.5%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified93.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 77.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-4.5}{\frac{\frac{a}{t}}{z}}} \]
    10. Applied egg-rr79.3%

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

    if 1.99999999999999989e49 < (*.f64 x y)

    1. Initial program 87.5%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified87.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 79.9%

      \[\leadsto \color{blue}{-4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative79.9%

        \[\leadsto \color{blue}{0.5 \cdot \frac{x \cdot y}{a} + -4.5 \cdot \frac{t \cdot z}{a}} \]
      2. fma-def79.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} \cdot 0.5} \]
      2. *-commutative69.1%

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

        \[\leadsto \color{blue}{\left(y \cdot \frac{x}{a}\right)} \cdot 0.5 \]
    9. Simplified74.3%

      \[\leadsto \color{blue}{\left(y \cdot \frac{x}{a}\right) \cdot 0.5} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.4%

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

Alternative 7: 68.0% accurate, 1.2× speedup?

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

\mathbf{elif}\;t \leq 2.25 \cdot 10^{+34}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.10000000000000018e-158

    1. Initial program 88.5%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified88.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 58.1%

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

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

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

    if -3.10000000000000018e-158 < t < 2.25e34

    1. Initial program 93.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.5 \cdot \frac{x}{\frac{a}{y}}} \]
    7. Step-by-step derivation
      1. clear-num75.2%

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

        \[\leadsto 0.5 \cdot \color{blue}{\left(\frac{1}{\frac{a}{y}} \cdot x\right)} \]
      3. clear-num74.6%

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

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

    if 2.25e34 < t

    1. Initial program 89.3%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified89.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 64.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.1 \cdot 10^{-158}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+34}:\\ \;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \end{array} \]

Alternative 8: 68.0% accurate, 1.2× speedup?

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

\mathbf{elif}\;t \leq 7.4 \cdot 10^{+33}:\\
\;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.10000000000000018e-158

    1. Initial program 88.5%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified88.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 58.1%

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

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

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

    if -3.10000000000000018e-158 < t < 7.3999999999999997e33

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

    if 7.3999999999999997e33 < t

    1. Initial program 89.3%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified89.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 64.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.1 \cdot 10^{-158}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 7.4 \cdot 10^{+33}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \end{array} \]

Alternative 9: 67.0% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.00000000000000014e-194

    1. Initial program 89.2%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified89.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 57.1%

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

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

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

    if -8.00000000000000014e-194 < t < 1.7e34

    1. Initial program 93.3%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified93.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 92.1%

      \[\leadsto \color{blue}{-4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative92.1%

        \[\leadsto \color{blue}{0.5 \cdot \frac{x \cdot y}{a} + -4.5 \cdot \frac{t \cdot z}{a}} \]
      2. fma-def92.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7e34 < t

    1. Initial program 89.3%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified89.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 64.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{-194}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+34}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{0.5}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \end{array} \]

Alternative 10: 67.1% accurate, 1.2× speedup?

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

\mathbf{elif}\;t \leq 1.35 \cdot 10^{+34}:\\
\;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.00000000000000014e-194

    1. Initial program 89.2%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified89.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 57.1%

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

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

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

    if -8.00000000000000014e-194 < t < 1.35e34

    1. Initial program 93.3%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified93.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 92.1%

      \[\leadsto \color{blue}{-4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative92.1%

        \[\leadsto \color{blue}{0.5 \cdot \frac{x \cdot y}{a} + -4.5 \cdot \frac{t \cdot z}{a}} \]
      2. fma-def92.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} \cdot 0.5} \]
      2. *-commutative71.6%

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

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

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

    if 1.35e34 < t

    1. Initial program 89.3%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified89.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 64.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{-194}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+34}:\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \end{array} \]

Alternative 11: 67.0% accurate, 1.2× speedup?

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

\mathbf{elif}\;t \leq 9.5 \cdot 10^{+33}:\\
\;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.00000000000000014e-194

    1. Initial program 89.2%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified89.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 57.1%

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

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

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

    if -8.00000000000000014e-194 < t < 9.5000000000000003e33

    1. Initial program 93.3%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified93.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 92.1%

      \[\leadsto \color{blue}{-4.5 \cdot \frac{t \cdot z}{a} + 0.5 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative92.1%

        \[\leadsto \color{blue}{0.5 \cdot \frac{x \cdot y}{a} + -4.5 \cdot \frac{t \cdot z}{a}} \]
      2. fma-def92.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{a} \cdot 0.5} \]
      2. *-commutative71.6%

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

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

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

    if 9.5000000000000003e33 < t

    1. Initial program 89.3%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified89.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 64.3%

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

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

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

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

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

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

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

        \[\leadsto \left(-4.5 \cdot \color{blue}{\frac{1}{\frac{a}{t}}}\right) \cdot z \]
      5. un-div-inv77.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{-194}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+33}:\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{-4.5}{\frac{a}{t}}\\ \end{array} \]

Alternative 12: 50.9% accurate, 1.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.56000000000000007e69

    1. Initial program 92.2%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified92.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 31.2%

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

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

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

    if -1.56000000000000007e69 < x

    1. Initial program 90.3%

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

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

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

        \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
    3. Simplified90.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 56.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.56 \cdot 10^{+69}:\\ \;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \end{array} \]

Alternative 13: 51.1% accurate, 1.9× speedup?

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

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

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

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

      \[\leadsto \frac{x \cdot y - \color{blue}{z \cdot \left(9 \cdot t\right)}}{a \cdot 2} \]
  3. Simplified90.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 51.9%

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

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

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

    \[\leadsto \color{blue}{-4.5 \cdot \left(\frac{t}{a} \cdot z\right)} \]
  7. Final simplification56.3%

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

Developer target: 93.3% 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 2023314 
(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)))