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

Percentage Accurate: 91.3% → 93.3%
Time: 9.0s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 91.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot y - \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: 93.3% accurate, 0.7× speedup?

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

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


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

    1. Initial program 96.6%

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

    if 1e308 < (*.f64 (*.f64 z 9) t)

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-4.5 \cdot \frac{t}{a}\right) \cdot z} \]
    9. Step-by-step derivation
      1. expm1-log1p-u47.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(-4.5 \cdot \frac{t}{a}\right)\right)} \cdot z \]
      2. expm1-udef34.0%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(-4.5 \cdot \frac{t}{a}\right)} - 1\right)} \cdot z \]
      3. associate-*r/34.0%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{-4.5 \cdot t}{a}}\right)} - 1\right) \cdot z \]
      4. *-commutative34.0%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{t \cdot -4.5}}{a}\right)} - 1\right) \cdot z \]
      5. associate-/l*34.0%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{t}{\frac{a}{-4.5}}}\right)} - 1\right) \cdot z \]
    10. Applied egg-rr34.0%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{t}{\frac{a}{-4.5}}\right)} - 1\right)} \cdot z \]
    11. Step-by-step derivation
      1. expm1-def48.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{t}{\frac{a}{-4.5}}\right)\right)} \cdot z \]
      2. expm1-log1p99.8%

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

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

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

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

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

Alternative 2: 72.5% accurate, 0.5× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} t_1 := \frac{x \cdot y}{a \cdot 2}\\ \mathbf{if}\;x \cdot y \leq -400000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-33}:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 10^{+26}:\\ \;\;\;\;\frac{-9 \cdot \left(z \cdot t\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{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
 (let* ((t_1 (/ (* x y) (* a 2.0))))
   (if (<= (* x y) -400000000.0)
     t_1
     (if (<= (* x y) -1e-33)
       (* z (* -4.5 (/ t a)))
       (if (<= (* x y) -4e-84)
         t_1
         (if (<= (* x y) 1e+26)
           (/ (* -9.0 (* z t)) (* a 2.0))
           (* x (* y (/ 0.5 a)))))))))
assert(z < t);
double code(double x, double y, double z, double t, double a) {
	double t_1 = (x * y) / (a * 2.0);
	double tmp;
	if ((x * y) <= -400000000.0) {
		tmp = t_1;
	} else if ((x * y) <= -1e-33) {
		tmp = z * (-4.5 * (t / a));
	} else if ((x * y) <= -4e-84) {
		tmp = t_1;
	} else if ((x * y) <= 1e+26) {
		tmp = (-9.0 * (z * t)) / (a * 2.0);
	} else {
		tmp = x * (y * (0.5 / 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) :: t_1
    real(8) :: tmp
    t_1 = (x * y) / (a * 2.0d0)
    if ((x * y) <= (-400000000.0d0)) then
        tmp = t_1
    else if ((x * y) <= (-1d-33)) then
        tmp = z * ((-4.5d0) * (t / a))
    else if ((x * y) <= (-4d-84)) then
        tmp = t_1
    else if ((x * y) <= 1d+26) then
        tmp = ((-9.0d0) * (z * t)) / (a * 2.0d0)
    else
        tmp = x * (y * (0.5d0 / 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 t_1 = (x * y) / (a * 2.0);
	double tmp;
	if ((x * y) <= -400000000.0) {
		tmp = t_1;
	} else if ((x * y) <= -1e-33) {
		tmp = z * (-4.5 * (t / a));
	} else if ((x * y) <= -4e-84) {
		tmp = t_1;
	} else if ((x * y) <= 1e+26) {
		tmp = (-9.0 * (z * t)) / (a * 2.0);
	} else {
		tmp = x * (y * (0.5 / a));
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t, a):
	t_1 = (x * y) / (a * 2.0)
	tmp = 0
	if (x * y) <= -400000000.0:
		tmp = t_1
	elif (x * y) <= -1e-33:
		tmp = z * (-4.5 * (t / a))
	elif (x * y) <= -4e-84:
		tmp = t_1
	elif (x * y) <= 1e+26:
		tmp = (-9.0 * (z * t)) / (a * 2.0)
	else:
		tmp = x * (y * (0.5 / a))
	return tmp
z, t = sort([z, t])
function code(x, y, z, t, a)
	t_1 = Float64(Float64(x * y) / Float64(a * 2.0))
	tmp = 0.0
	if (Float64(x * y) <= -400000000.0)
		tmp = t_1;
	elseif (Float64(x * y) <= -1e-33)
		tmp = Float64(z * Float64(-4.5 * Float64(t / a)));
	elseif (Float64(x * y) <= -4e-84)
		tmp = t_1;
	elseif (Float64(x * y) <= 1e+26)
		tmp = Float64(Float64(-9.0 * Float64(z * t)) / Float64(a * 2.0));
	else
		tmp = Float64(x * Float64(y * Float64(0.5 / a)));
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = (x * y) / (a * 2.0);
	tmp = 0.0;
	if ((x * y) <= -400000000.0)
		tmp = t_1;
	elseif ((x * y) <= -1e-33)
		tmp = z * (-4.5 * (t / a));
	elseif ((x * y) <= -4e-84)
		tmp = t_1;
	elseif ((x * y) <= 1e+26)
		tmp = (-9.0 * (z * t)) / (a * 2.0);
	else
		tmp = x * (y * (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_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -400000000.0], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1e-33], N[(z * N[(-4.5 * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -4e-84], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1e+26], N[(N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(0.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x \cdot y}{a \cdot 2}\\
\mathbf{if}\;x \cdot y \leq -400000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-84}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -4e8 or -1.0000000000000001e-33 < (*.f64 x y) < -4.0000000000000001e-84

    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}} \]
    4. Taylor expanded in x around inf 73.8%

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

    if -4e8 < (*.f64 x y) < -1.0000000000000001e-33

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-4.5}{1} \cdot \frac{t \cdot z}{a}} \]
      4. metadata-eval73.7%

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

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

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

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

    if -4.0000000000000001e-84 < (*.f64 x y) < 1.00000000000000005e26

    1. Initial program 98.1%

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

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

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

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

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

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

    if 1.00000000000000005e26 < (*.f64 x y)

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -400000000:\\ \;\;\;\;\frac{x \cdot y}{a \cdot 2}\\ \mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-33}:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-84}:\\ \;\;\;\;\frac{x \cdot y}{a \cdot 2}\\ \mathbf{elif}\;x \cdot y \leq 10^{+26}:\\ \;\;\;\;\frac{-9 \cdot \left(z \cdot t\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \end{array} \]

Alternative 3: 72.5% accurate, 0.5× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} t_1 := \frac{x \cdot y}{a \cdot 2}\\ \mathbf{if}\;x \cdot y \leq -400000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-33}:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 10^{+26}:\\ \;\;\;\;\frac{t \cdot \left(z \cdot -9\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{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
 (let* ((t_1 (/ (* x y) (* a 2.0))))
   (if (<= (* x y) -400000000.0)
     t_1
     (if (<= (* x y) -1e-33)
       (* z (* -4.5 (/ t a)))
       (if (<= (* x y) -4e-84)
         t_1
         (if (<= (* x y) 1e+26)
           (/ (* t (* z -9.0)) (* a 2.0))
           (* x (* y (/ 0.5 a)))))))))
assert(z < t);
double code(double x, double y, double z, double t, double a) {
	double t_1 = (x * y) / (a * 2.0);
	double tmp;
	if ((x * y) <= -400000000.0) {
		tmp = t_1;
	} else if ((x * y) <= -1e-33) {
		tmp = z * (-4.5 * (t / a));
	} else if ((x * y) <= -4e-84) {
		tmp = t_1;
	} else if ((x * y) <= 1e+26) {
		tmp = (t * (z * -9.0)) / (a * 2.0);
	} else {
		tmp = x * (y * (0.5 / 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) :: t_1
    real(8) :: tmp
    t_1 = (x * y) / (a * 2.0d0)
    if ((x * y) <= (-400000000.0d0)) then
        tmp = t_1
    else if ((x * y) <= (-1d-33)) then
        tmp = z * ((-4.5d0) * (t / a))
    else if ((x * y) <= (-4d-84)) then
        tmp = t_1
    else if ((x * y) <= 1d+26) then
        tmp = (t * (z * (-9.0d0))) / (a * 2.0d0)
    else
        tmp = x * (y * (0.5d0 / 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 t_1 = (x * y) / (a * 2.0);
	double tmp;
	if ((x * y) <= -400000000.0) {
		tmp = t_1;
	} else if ((x * y) <= -1e-33) {
		tmp = z * (-4.5 * (t / a));
	} else if ((x * y) <= -4e-84) {
		tmp = t_1;
	} else if ((x * y) <= 1e+26) {
		tmp = (t * (z * -9.0)) / (a * 2.0);
	} else {
		tmp = x * (y * (0.5 / a));
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t, a):
	t_1 = (x * y) / (a * 2.0)
	tmp = 0
	if (x * y) <= -400000000.0:
		tmp = t_1
	elif (x * y) <= -1e-33:
		tmp = z * (-4.5 * (t / a))
	elif (x * y) <= -4e-84:
		tmp = t_1
	elif (x * y) <= 1e+26:
		tmp = (t * (z * -9.0)) / (a * 2.0)
	else:
		tmp = x * (y * (0.5 / a))
	return tmp
z, t = sort([z, t])
function code(x, y, z, t, a)
	t_1 = Float64(Float64(x * y) / Float64(a * 2.0))
	tmp = 0.0
	if (Float64(x * y) <= -400000000.0)
		tmp = t_1;
	elseif (Float64(x * y) <= -1e-33)
		tmp = Float64(z * Float64(-4.5 * Float64(t / a)));
	elseif (Float64(x * y) <= -4e-84)
		tmp = t_1;
	elseif (Float64(x * y) <= 1e+26)
		tmp = Float64(Float64(t * Float64(z * -9.0)) / Float64(a * 2.0));
	else
		tmp = Float64(x * Float64(y * Float64(0.5 / a)));
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = (x * y) / (a * 2.0);
	tmp = 0.0;
	if ((x * y) <= -400000000.0)
		tmp = t_1;
	elseif ((x * y) <= -1e-33)
		tmp = z * (-4.5 * (t / a));
	elseif ((x * y) <= -4e-84)
		tmp = t_1;
	elseif ((x * y) <= 1e+26)
		tmp = (t * (z * -9.0)) / (a * 2.0);
	else
		tmp = x * (y * (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_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -400000000.0], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1e-33], N[(z * N[(-4.5 * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -4e-84], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1e+26], N[(N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(0.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x \cdot y}{a \cdot 2}\\
\mathbf{if}\;x \cdot y \leq -400000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-84}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -4e8 or -1.0000000000000001e-33 < (*.f64 x y) < -4.0000000000000001e-84

    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}} \]
    4. Taylor expanded in x around inf 73.8%

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

    if -4e8 < (*.f64 x y) < -1.0000000000000001e-33

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-4.5}{1} \cdot \frac{t \cdot z}{a}} \]
      4. metadata-eval73.7%

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

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

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

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

    if -4.0000000000000001e-84 < (*.f64 x y) < 1.00000000000000005e26

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

    if 1.00000000000000005e26 < (*.f64 x y)

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -400000000:\\ \;\;\;\;\frac{x \cdot y}{a \cdot 2}\\ \mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-33}:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-84}:\\ \;\;\;\;\frac{x \cdot y}{a \cdot 2}\\ \mathbf{elif}\;x \cdot y \leq 10^{+26}:\\ \;\;\;\;\frac{t \cdot \left(z \cdot -9\right)}{a \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \end{array} \]

Alternative 4: 72.5% accurate, 0.6× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} t_1 := \frac{x \cdot y}{a \cdot 2}\\ \mathbf{if}\;x \cdot y \leq -400000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-33}:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 10^{+26}:\\ \;\;\;\;\frac{-4.5}{\frac{a}{z \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{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
 (let* ((t_1 (/ (* x y) (* a 2.0))))
   (if (<= (* x y) -400000000.0)
     t_1
     (if (<= (* x y) -1e-33)
       (* z (* -4.5 (/ t a)))
       (if (<= (* x y) -4e-84)
         t_1
         (if (<= (* x y) 1e+26)
           (/ -4.5 (/ a (* z t)))
           (* x (* y (/ 0.5 a)))))))))
assert(z < t);
double code(double x, double y, double z, double t, double a) {
	double t_1 = (x * y) / (a * 2.0);
	double tmp;
	if ((x * y) <= -400000000.0) {
		tmp = t_1;
	} else if ((x * y) <= -1e-33) {
		tmp = z * (-4.5 * (t / a));
	} else if ((x * y) <= -4e-84) {
		tmp = t_1;
	} else if ((x * y) <= 1e+26) {
		tmp = -4.5 / (a / (z * t));
	} else {
		tmp = x * (y * (0.5 / 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) :: t_1
    real(8) :: tmp
    t_1 = (x * y) / (a * 2.0d0)
    if ((x * y) <= (-400000000.0d0)) then
        tmp = t_1
    else if ((x * y) <= (-1d-33)) then
        tmp = z * ((-4.5d0) * (t / a))
    else if ((x * y) <= (-4d-84)) then
        tmp = t_1
    else if ((x * y) <= 1d+26) then
        tmp = (-4.5d0) / (a / (z * t))
    else
        tmp = x * (y * (0.5d0 / 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 t_1 = (x * y) / (a * 2.0);
	double tmp;
	if ((x * y) <= -400000000.0) {
		tmp = t_1;
	} else if ((x * y) <= -1e-33) {
		tmp = z * (-4.5 * (t / a));
	} else if ((x * y) <= -4e-84) {
		tmp = t_1;
	} else if ((x * y) <= 1e+26) {
		tmp = -4.5 / (a / (z * t));
	} else {
		tmp = x * (y * (0.5 / a));
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t, a):
	t_1 = (x * y) / (a * 2.0)
	tmp = 0
	if (x * y) <= -400000000.0:
		tmp = t_1
	elif (x * y) <= -1e-33:
		tmp = z * (-4.5 * (t / a))
	elif (x * y) <= -4e-84:
		tmp = t_1
	elif (x * y) <= 1e+26:
		tmp = -4.5 / (a / (z * t))
	else:
		tmp = x * (y * (0.5 / a))
	return tmp
z, t = sort([z, t])
function code(x, y, z, t, a)
	t_1 = Float64(Float64(x * y) / Float64(a * 2.0))
	tmp = 0.0
	if (Float64(x * y) <= -400000000.0)
		tmp = t_1;
	elseif (Float64(x * y) <= -1e-33)
		tmp = Float64(z * Float64(-4.5 * Float64(t / a)));
	elseif (Float64(x * y) <= -4e-84)
		tmp = t_1;
	elseif (Float64(x * y) <= 1e+26)
		tmp = Float64(-4.5 / Float64(a / Float64(z * t)));
	else
		tmp = Float64(x * Float64(y * Float64(0.5 / a)));
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = (x * y) / (a * 2.0);
	tmp = 0.0;
	if ((x * y) <= -400000000.0)
		tmp = t_1;
	elseif ((x * y) <= -1e-33)
		tmp = z * (-4.5 * (t / a));
	elseif ((x * y) <= -4e-84)
		tmp = t_1;
	elseif ((x * y) <= 1e+26)
		tmp = -4.5 / (a / (z * t));
	else
		tmp = x * (y * (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_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -400000000.0], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1e-33], N[(z * N[(-4.5 * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -4e-84], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1e+26], N[(-4.5 / N[(a / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(0.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x \cdot y}{a \cdot 2}\\
\mathbf{if}\;x \cdot y \leq -400000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-84}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -4e8 or -1.0000000000000001e-33 < (*.f64 x y) < -4.0000000000000001e-84

    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}} \]
    4. Taylor expanded in x around inf 73.8%

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

    if -4e8 < (*.f64 x y) < -1.0000000000000001e-33

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-4.5}{1} \cdot \frac{t \cdot z}{a}} \]
      4. metadata-eval73.7%

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

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

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

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

    if -4.0000000000000001e-84 < (*.f64 x y) < 1.00000000000000005e26

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-4.5}{1} \cdot \frac{t \cdot z}{a}} \]
      4. metadata-eval84.0%

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

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

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

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

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

        \[\leadsto -4.5 \cdot \color{blue}{\frac{t}{\frac{a}{z}}} \]
      3. clear-num77.8%

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

        \[\leadsto \color{blue}{\frac{-4.5}{\frac{\frac{a}{z}}{t}}} \]
      5. associate-/l/84.1%

        \[\leadsto \frac{-4.5}{\color{blue}{\frac{a}{t \cdot z}}} \]
    10. Applied egg-rr84.1%

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

    if 1.00000000000000005e26 < (*.f64 x y)

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 72.5% accurate, 0.6× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} t_1 := \frac{x \cdot y}{a \cdot 2}\\ \mathbf{if}\;x \cdot y \leq -400000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-33}:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \cdot y \leq 10^{+26}:\\ \;\;\;\;\frac{z \cdot \left(t \cdot -4.5\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{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
 (let* ((t_1 (/ (* x y) (* a 2.0))))
   (if (<= (* x y) -400000000.0)
     t_1
     (if (<= (* x y) -1e-33)
       (* z (* -4.5 (/ t a)))
       (if (<= (* x y) -4e-84)
         t_1
         (if (<= (* x y) 1e+26)
           (/ (* z (* t -4.5)) a)
           (* x (* y (/ 0.5 a)))))))))
assert(z < t);
double code(double x, double y, double z, double t, double a) {
	double t_1 = (x * y) / (a * 2.0);
	double tmp;
	if ((x * y) <= -400000000.0) {
		tmp = t_1;
	} else if ((x * y) <= -1e-33) {
		tmp = z * (-4.5 * (t / a));
	} else if ((x * y) <= -4e-84) {
		tmp = t_1;
	} else if ((x * y) <= 1e+26) {
		tmp = (z * (t * -4.5)) / a;
	} else {
		tmp = x * (y * (0.5 / 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) :: t_1
    real(8) :: tmp
    t_1 = (x * y) / (a * 2.0d0)
    if ((x * y) <= (-400000000.0d0)) then
        tmp = t_1
    else if ((x * y) <= (-1d-33)) then
        tmp = z * ((-4.5d0) * (t / a))
    else if ((x * y) <= (-4d-84)) then
        tmp = t_1
    else if ((x * y) <= 1d+26) then
        tmp = (z * (t * (-4.5d0))) / a
    else
        tmp = x * (y * (0.5d0 / 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 t_1 = (x * y) / (a * 2.0);
	double tmp;
	if ((x * y) <= -400000000.0) {
		tmp = t_1;
	} else if ((x * y) <= -1e-33) {
		tmp = z * (-4.5 * (t / a));
	} else if ((x * y) <= -4e-84) {
		tmp = t_1;
	} else if ((x * y) <= 1e+26) {
		tmp = (z * (t * -4.5)) / a;
	} else {
		tmp = x * (y * (0.5 / a));
	}
	return tmp;
}
[z, t] = sort([z, t])
def code(x, y, z, t, a):
	t_1 = (x * y) / (a * 2.0)
	tmp = 0
	if (x * y) <= -400000000.0:
		tmp = t_1
	elif (x * y) <= -1e-33:
		tmp = z * (-4.5 * (t / a))
	elif (x * y) <= -4e-84:
		tmp = t_1
	elif (x * y) <= 1e+26:
		tmp = (z * (t * -4.5)) / a
	else:
		tmp = x * (y * (0.5 / a))
	return tmp
z, t = sort([z, t])
function code(x, y, z, t, a)
	t_1 = Float64(Float64(x * y) / Float64(a * 2.0))
	tmp = 0.0
	if (Float64(x * y) <= -400000000.0)
		tmp = t_1;
	elseif (Float64(x * y) <= -1e-33)
		tmp = Float64(z * Float64(-4.5 * Float64(t / a)));
	elseif (Float64(x * y) <= -4e-84)
		tmp = t_1;
	elseif (Float64(x * y) <= 1e+26)
		tmp = Float64(Float64(z * Float64(t * -4.5)) / a);
	else
		tmp = Float64(x * Float64(y * Float64(0.5 / a)));
	end
	return tmp
end
z, t = num2cell(sort([z, t])){:}
function tmp_2 = code(x, y, z, t, a)
	t_1 = (x * y) / (a * 2.0);
	tmp = 0.0;
	if ((x * y) <= -400000000.0)
		tmp = t_1;
	elseif ((x * y) <= -1e-33)
		tmp = z * (-4.5 * (t / a));
	elseif ((x * y) <= -4e-84)
		tmp = t_1;
	elseif ((x * y) <= 1e+26)
		tmp = (z * (t * -4.5)) / a;
	else
		tmp = x * (y * (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_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -400000000.0], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1e-33], N[(z * N[(-4.5 * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -4e-84], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1e+26], N[(N[(z * N[(t * -4.5), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x * N[(y * N[(0.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
t_1 := \frac{x \cdot y}{a \cdot 2}\\
\mathbf{if}\;x \cdot y \leq -400000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-84}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 x y) < -4e8 or -1.0000000000000001e-33 < (*.f64 x y) < -4.0000000000000001e-84

    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}} \]
    4. Taylor expanded in x around inf 73.8%

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

    if -4e8 < (*.f64 x y) < -1.0000000000000001e-33

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-4.5}{1} \cdot \frac{t \cdot z}{a}} \]
      4. metadata-eval73.7%

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

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

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

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

    if -4.0000000000000001e-84 < (*.f64 x y) < 1.00000000000000005e26

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

    if 1.00000000000000005e26 < (*.f64 x y)

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 93.1% accurate, 0.8× speedup?

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

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


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

    1. Initial program 95.9%

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

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

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

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

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

    if 4.9999999999999997e303 < (*.f64 x y)

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{y \cdot 0.5}{a}} \]
    8. Applied egg-rr99.9%

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

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

Alternative 7: 66.7% accurate, 0.9× speedup?

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

\mathbf{elif}\;t \leq 8.4 \cdot 10^{-170}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 5.7 \cdot 10^{-149}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\

\mathbf{elif}\;t \leq 1.06 \cdot 10^{+120}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.30000000000000022e-131 or 1.05999999999999994e120 < t

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

    if -2.30000000000000022e-131 < t < 8.4000000000000002e-170 or 5.6999999999999999e-149 < t < 1.05999999999999994e120

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

    if 8.4000000000000002e-170 < t < 5.6999999999999999e-149

    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}} \]
    4. Taylor expanded in x around 0 71.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{-131}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t \leq 8.4 \cdot 10^{-170}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 5.7 \cdot 10^{-149}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;t \leq 1.06 \cdot 10^{+120}:\\ \;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \end{array} \]

Alternative 8: 66.6% accurate, 0.9× speedup?

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

\mathbf{elif}\;t \leq 9 \cdot 10^{-170}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 5.2 \cdot 10^{-149}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\

\mathbf{elif}\;t \leq 8.6 \cdot 10^{+119}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.39999999999999995e-131 or 8.60000000000000063e119 < t

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

    if -3.39999999999999995e-131 < t < 9.00000000000000003e-170 or 5.19999999999999998e-149 < t < 8.60000000000000063e119

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

    if 9.00000000000000003e-170 < t < 5.19999999999999998e-149

    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}} \]
    4. Taylor expanded in x around 0 71.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{-131}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-170}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-149}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{+119}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \end{array} \]

Alternative 9: 66.6% accurate, 0.9× speedup?

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

\mathbf{elif}\;t \leq 7.6 \cdot 10^{-170}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\

\mathbf{elif}\;t \leq 5.7 \cdot 10^{-149}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.39999999999999995e-131 or 9.2000000000000003e119 < t

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

    if -3.39999999999999995e-131 < t < 7.5999999999999995e-170

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

    if 7.5999999999999995e-170 < t < 5.6999999999999999e-149

    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}} \]
    4. Taylor expanded in x around 0 71.2%

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

    if 5.6999999999999999e-149 < t < 9.2000000000000003e119

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{-131}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{-170}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \mathbf{elif}\;t \leq 5.7 \cdot 10^{-149}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+119}:\\ \;\;\;\;x \cdot \frac{y \cdot 0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\ \end{array} \]

Alternative 10: 66.4% accurate, 0.9× speedup?

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

\mathbf{elif}\;t \leq 9 \cdot 10^{-170}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\

\mathbf{elif}\;t \leq 1.95 \cdot 10^{-148}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.39999999999999995e-131 or 9.99999999999999978e122 < t

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-4.5}{1} \cdot \frac{t \cdot z}{a}} \]
      4. metadata-eval70.3%

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

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

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

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

    if -3.39999999999999995e-131 < t < 9.00000000000000003e-170

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

    if 9.00000000000000003e-170 < t < 1.94999999999999997e-148

    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}} \]
    4. Taylor expanded in x around 0 71.2%

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

    if 1.94999999999999997e-148 < t < 9.99999999999999978e122

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{-131}:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-170}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{-148}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;t \leq 10^{+123}:\\ \;\;\;\;x \cdot \frac{y \cdot 0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right)\\ \end{array} \]

Alternative 11: 66.5% accurate, 0.9× speedup?

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

\mathbf{elif}\;t \leq 6 \cdot 10^{-170}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{-146}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2e-132

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-4.5 \cdot \left(t \cdot z\right)}}{a} \]
      2. *-un-lft-identity67.6%

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

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

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

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

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

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

    if -2e-132 < t < 6.00000000000000027e-170

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

    if 6.00000000000000027e-170 < t < 4.8000000000000003e-146

    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}} \]
    4. Taylor expanded in x around 0 71.2%

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

    if 4.8000000000000003e-146 < t < 8.60000000000000063e119

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.60000000000000063e119 < t

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-4.5 \cdot \left(t \cdot z\right)}}{a} \]
      2. *-un-lft-identity78.6%

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

        \[\leadsto \color{blue}{\frac{-4.5}{1} \cdot \frac{t \cdot z}{a}} \]
      4. metadata-eval78.5%

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

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

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

      \[\leadsto \color{blue}{\left(-4.5 \cdot \frac{t}{a}\right) \cdot z} \]
    9. Step-by-step derivation
      1. expm1-log1p-u15.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(-4.5 \cdot \frac{t}{a}\right)\right)} \cdot z \]
      2. expm1-udef12.8%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(-4.5 \cdot \frac{t}{a}\right)} - 1\right)} \cdot z \]
      3. associate-*r/12.8%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{-4.5 \cdot t}{a}}\right)} - 1\right) \cdot z \]
      4. *-commutative12.8%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{t \cdot -4.5}}{a}\right)} - 1\right) \cdot z \]
      5. associate-/l*12.8%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{t}{\frac{a}{-4.5}}}\right)} - 1\right) \cdot z \]
    10. Applied egg-rr12.8%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{t}{\frac{a}{-4.5}}\right)} - 1\right)} \cdot z \]
    11. Step-by-step derivation
      1. expm1-def15.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{t}{\frac{a}{-4.5}}\right)\right)} \cdot z \]
      2. expm1-log1p87.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-132}:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-170}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-146}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{+119}:\\ \;\;\;\;x \cdot \frac{y \cdot 0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{t \cdot -4.5}{a}\\ \end{array} \]

Alternative 12: 66.5% accurate, 0.9× speedup?

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

\mathbf{elif}\;t \leq 8.8 \cdot 10^{-170}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\

\mathbf{elif}\;t \leq 5.1 \cdot 10^{-149}:\\
\;\;\;\;\frac{-4.5}{\frac{a}{z \cdot t}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.50000000000000009e-140

    1. Initial program 92.9%

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

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

        \[\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. Taylor expanded in x around 0 66.9%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-4.5 \cdot \left(t \cdot z\right)}}{a} \]
      2. *-un-lft-identity67.0%

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

        \[\leadsto \color{blue}{\frac{-4.5}{1} \cdot \frac{t \cdot z}{a}} \]
      4. metadata-eval66.9%

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

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

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

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

    if -1.50000000000000009e-140 < t < 8.80000000000000059e-170

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

    if 8.80000000000000059e-170 < t < 5.09999999999999983e-149

    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}} \]
    4. Taylor expanded in x around 0 71.2%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-4.5 \cdot \left(t \cdot z\right)}}{a} \]
      2. *-un-lft-identity71.0%

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

        \[\leadsto \color{blue}{\frac{-4.5}{1} \cdot \frac{t \cdot z}{a}} \]
      4. metadata-eval71.2%

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

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

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

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

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

        \[\leadsto -4.5 \cdot \color{blue}{\frac{t}{\frac{a}{z}}} \]
      3. clear-num57.7%

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

        \[\leadsto \color{blue}{\frac{-4.5}{\frac{\frac{a}{z}}{t}}} \]
      5. associate-/l/71.4%

        \[\leadsto \frac{-4.5}{\color{blue}{\frac{a}{t \cdot z}}} \]
    10. Applied egg-rr71.4%

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

    if 5.09999999999999983e-149 < t < 1.25000000000000005e120

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25000000000000005e120 < t

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-4.5 \cdot \left(t \cdot z\right)}}{a} \]
      2. *-un-lft-identity78.6%

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

        \[\leadsto \color{blue}{\frac{-4.5}{1} \cdot \frac{t \cdot z}{a}} \]
      4. metadata-eval78.5%

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

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

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

      \[\leadsto \color{blue}{\left(-4.5 \cdot \frac{t}{a}\right) \cdot z} \]
    9. Step-by-step derivation
      1. expm1-log1p-u15.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(-4.5 \cdot \frac{t}{a}\right)\right)} \cdot z \]
      2. expm1-udef12.8%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(-4.5 \cdot \frac{t}{a}\right)} - 1\right)} \cdot z \]
      3. associate-*r/12.8%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{-4.5 \cdot t}{a}}\right)} - 1\right) \cdot z \]
      4. *-commutative12.8%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{t \cdot -4.5}}{a}\right)} - 1\right) \cdot z \]
      5. associate-/l*12.8%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{t}{\frac{a}{-4.5}}}\right)} - 1\right) \cdot z \]
    10. Applied egg-rr12.8%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{t}{\frac{a}{-4.5}}\right)} - 1\right)} \cdot z \]
    11. Step-by-step derivation
      1. expm1-def15.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{t}{\frac{a}{-4.5}}\right)\right)} \cdot z \]
      2. expm1-log1p87.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{-140}:\\ \;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a}\right)\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{-170}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{0.5}{a}\right)\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{-149}:\\ \;\;\;\;\frac{-4.5}{\frac{a}{z \cdot t}}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+120}:\\ \;\;\;\;x \cdot \frac{y \cdot 0.5}{a}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{t \cdot -4.5}{a}\\ \end{array} \]

Alternative 13: 65.6% accurate, 1.2× speedup?

\[\begin{array}{l} [z, t] = \mathsf{sort}([z, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{-68} \lor \neg \left(y \leq 1.4 \cdot 10^{+101}\right):\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{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 (or (<= y -7.2e-68) (not (<= y 1.4e+101)))
   (* 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 ((y <= -7.2e-68) || !(y <= 1.4e+101)) {
		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 ((y <= (-7.2d-68)) .or. (.not. (y <= 1.4d+101))) 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 ((y <= -7.2e-68) || !(y <= 1.4e+101)) {
		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 (y <= -7.2e-68) or not (y <= 1.4e+101):
		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 ((y <= -7.2e-68) || !(y <= 1.4e+101))
		tmp = Float64(0.5 * Float64(y * Float64(x / a)));
	else
		tmp = Float64(-4.5 * Float64(Float64(z * 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 ((y <= -7.2e-68) || ~((y <= 1.4e+101)))
		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[Or[LessEqual[y, -7.2e-68], N[Not[LessEqual[y, 1.4e+101]], $MachinePrecision]], N[(0.5 * N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t] = \mathsf{sort}([z, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{-68} \lor \neg \left(y \leq 1.4 \cdot 10^{+101}\right):\\
\;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.20000000000000015e-68 or 1.39999999999999991e101 < y

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

    if -7.20000000000000015e-68 < y < 1.39999999999999991e101

    1. Initial program 95.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{-68} \lor \neg \left(y \leq 1.4 \cdot 10^{+101}\right):\\ \;\;\;\;0.5 \cdot \left(y \cdot \frac{x}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\ \end{array} \]

Alternative 14: 51.6% 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 94.3%

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

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

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

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

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

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

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

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

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

Developer target: 93.2% 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 2023308 
(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)))