Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3

Percentage Accurate: 90.1% → 98.2%
Time: 8.1s
Alternatives: 8
Speedup: 1.3×

Specification

?
\[\begin{array}{l} \\ \left(x \cdot y - z \cdot y\right) \cdot t \end{array} \]
(FPCore (x y z t) :precision binary64 (* (- (* x y) (* z y)) t))
double code(double x, double y, double z, double t) {
	return ((x * y) - (z * y)) * t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = ((x * y) - (z * y)) * t
end function
public static double code(double x, double y, double z, double t) {
	return ((x * y) - (z * y)) * t;
}
def code(x, y, z, t):
	return ((x * y) - (z * y)) * t
function code(x, y, z, t)
	return Float64(Float64(Float64(x * y) - Float64(z * y)) * t)
end
function tmp = code(x, y, z, t)
	tmp = ((x * y) - (z * y)) * t;
end
code[x_, y_, z_, t_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}

\\
\left(x \cdot y - z \cdot y\right) \cdot t
\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 8 alternatives:

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

Initial Program: 90.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x \cdot y - z \cdot y\right) \cdot t \end{array} \]
(FPCore (x y z t) :precision binary64 (* (- (* x y) (* z y)) t))
double code(double x, double y, double z, double t) {
	return ((x * y) - (z * y)) * t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = ((x * y) - (z * y)) * t
end function
public static double code(double x, double y, double z, double t) {
	return ((x * y) - (z * y)) * t;
}
def code(x, y, z, t):
	return ((x * y) - (z * y)) * t
function code(x, y, z, t)
	return Float64(Float64(Float64(x * y) - Float64(z * y)) * t)
end
function tmp = code(x, y, z, t)
	tmp = ((x * y) - (z * y)) * t;
end
code[x_, y_, z_, t_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}

\\
\left(x \cdot y - z \cdot y\right) \cdot t
\end{array}

Alternative 1: 98.2% accurate, 0.0× speedup?

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

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


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

    1. Initial program 71.7%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Step-by-step derivation
      1. distribute-rgt-out--75.3%

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

        \[\leadsto \color{blue}{y \cdot \left(\left(x - z\right) \cdot t\right)} \]
    3. Simplified98.8%

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

    if -inf.0 < (*.f64 (-.f64 (*.f64 x y) (*.f64 z y)) t) < 4.9999999999999999e284

    1. Initial program 99.1%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Step-by-step derivation
      1. distribute-rgt-out--99.1%

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(x - z\right) \cdot t\right)} \]
    4. Step-by-step derivation
      1. associate-*r*99.1%

        \[\leadsto \color{blue}{\left(y \cdot \left(x - z\right)\right) \cdot t} \]
      2. distribute-rgt-out--99.1%

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

        \[\leadsto \color{blue}{t \cdot \left(x \cdot y - z \cdot y\right)} \]
      4. prod-diff99.2%

        \[\leadsto t \cdot \color{blue}{\left(\mathsf{fma}\left(x, y, -y \cdot z\right) + \mathsf{fma}\left(-y, z, y \cdot z\right)\right)} \]
      5. *-commutative99.2%

        \[\leadsto t \cdot \left(\mathsf{fma}\left(x, y, -\color{blue}{z \cdot y}\right) + \mathsf{fma}\left(-y, z, y \cdot z\right)\right) \]
      6. fma-neg99.1%

        \[\leadsto t \cdot \left(\color{blue}{\left(x \cdot y - z \cdot y\right)} + \mathsf{fma}\left(-y, z, y \cdot z\right)\right) \]
      7. distribute-rgt-in99.2%

        \[\leadsto \color{blue}{\left(x \cdot y - z \cdot y\right) \cdot t + \mathsf{fma}\left(-y, z, y \cdot z\right) \cdot t} \]
      8. fma-def99.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot y - z \cdot y, t, \mathsf{fma}\left(-y, z, y \cdot z\right) \cdot t\right)} \]
      9. distribute-rgt-out--99.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{y \cdot \left(x - z\right)}, t, \mathsf{fma}\left(-y, z, y \cdot z\right) \cdot t\right) \]
      10. *-commutative99.3%

        \[\leadsto \mathsf{fma}\left(y \cdot \left(x - z\right), t, \mathsf{fma}\left(-y, z, \color{blue}{z \cdot y}\right) \cdot t\right) \]
      11. fma-udef99.1%

        \[\leadsto \mathsf{fma}\left(y \cdot \left(x - z\right), t, \color{blue}{\left(\left(-y\right) \cdot z + z \cdot y\right)} \cdot t\right) \]
      12. distribute-lft-neg-in99.1%

        \[\leadsto \mathsf{fma}\left(y \cdot \left(x - z\right), t, \left(\color{blue}{\left(-y \cdot z\right)} + z \cdot y\right) \cdot t\right) \]
      13. distribute-rgt-neg-in99.1%

        \[\leadsto \mathsf{fma}\left(y \cdot \left(x - z\right), t, \left(\color{blue}{y \cdot \left(-z\right)} + z \cdot y\right) \cdot t\right) \]
      14. fma-def99.3%

        \[\leadsto \mathsf{fma}\left(y \cdot \left(x - z\right), t, \color{blue}{\mathsf{fma}\left(y, -z, z \cdot y\right)} \cdot t\right) \]
      15. *-commutative99.3%

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

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

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

Alternative 2: 95.2% accurate, 0.6× speedup?

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

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


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

    1. Initial program 96.3%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Step-by-step derivation
      1. distribute-rgt-out--96.3%

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

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

    if 4.9999999999999997e162 < (-.f64 (*.f64 x y) (*.f64 z y))

    1. Initial program 72.8%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Step-by-step derivation
      1. distribute-rgt-out--77.3%

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

        \[\leadsto \color{blue}{y \cdot \left(\left(x - z\right) \cdot t\right)} \]
    3. Simplified98.5%

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

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

Alternative 3: 72.2% accurate, 0.6× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := y \cdot \left(t \cdot \left(-z\right)\right)\\ \mathbf{if}\;z \leq -4.6 \cdot 10^{-33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-99}:\\ \;\;\;\;x \cdot \left(y \cdot t\right)\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-51} \lor \neg \left(z \leq 8 \cdot 10^{+75}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot t\\ \end{array} \end{array} \]
NOTE: y and t should be sorted in increasing order before calling this function.
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (* t (- z)))))
   (if (<= z -4.6e-33)
     t_1
     (if (<= z 2e-99)
       (* x (* y t))
       (if (or (<= z 1.8e-51) (not (<= z 8e+75))) t_1 (* (* x y) t))))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = y * (t * -z);
	double tmp;
	if (z <= -4.6e-33) {
		tmp = t_1;
	} else if (z <= 2e-99) {
		tmp = x * (y * t);
	} else if ((z <= 1.8e-51) || !(z <= 8e+75)) {
		tmp = t_1;
	} else {
		tmp = (x * y) * t;
	}
	return tmp;
}
NOTE: y and t should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (t * -z)
    if (z <= (-4.6d-33)) then
        tmp = t_1
    else if (z <= 2d-99) then
        tmp = x * (y * t)
    else if ((z <= 1.8d-51) .or. (.not. (z <= 8d+75))) then
        tmp = t_1
    else
        tmp = (x * y) * t
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = y * (t * -z);
	double tmp;
	if (z <= -4.6e-33) {
		tmp = t_1;
	} else if (z <= 2e-99) {
		tmp = x * (y * t);
	} else if ((z <= 1.8e-51) || !(z <= 8e+75)) {
		tmp = t_1;
	} else {
		tmp = (x * y) * t;
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = y * (t * -z)
	tmp = 0
	if z <= -4.6e-33:
		tmp = t_1
	elif z <= 2e-99:
		tmp = x * (y * t)
	elif (z <= 1.8e-51) or not (z <= 8e+75):
		tmp = t_1
	else:
		tmp = (x * y) * t
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(y * Float64(t * Float64(-z)))
	tmp = 0.0
	if (z <= -4.6e-33)
		tmp = t_1;
	elseif (z <= 2e-99)
		tmp = Float64(x * Float64(y * t));
	elseif ((z <= 1.8e-51) || !(z <= 8e+75))
		tmp = t_1;
	else
		tmp = Float64(Float64(x * y) * t);
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = y * (t * -z);
	tmp = 0.0;
	if (z <= -4.6e-33)
		tmp = t_1;
	elseif (z <= 2e-99)
		tmp = x * (y * t);
	elseif ((z <= 1.8e-51) || ~((z <= 8e+75)))
		tmp = t_1;
	else
		tmp = (x * y) * t;
	end
	tmp_2 = tmp;
end
NOTE: y and t should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t * (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e-33], t$95$1, If[LessEqual[z, 2e-99], N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.8e-51], N[Not[LessEqual[z, 8e+75]], $MachinePrecision]], t$95$1, N[(N[(x * y), $MachinePrecision] * t), $MachinePrecision]]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(t \cdot \left(-z\right)\right)\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{-33}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2 \cdot 10^{-99}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\

\mathbf{elif}\;z \leq 1.8 \cdot 10^{-51} \lor \neg \left(z \leq 8 \cdot 10^{+75}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\left(x \cdot y\right) \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.59999999999999971e-33 or 2e-99 < z < 1.8e-51 or 7.99999999999999941e75 < z

    1. Initial program 86.4%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Step-by-step derivation
      1. distribute-rgt-out--88.6%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(t \cdot z\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*76.5%

        \[\leadsto \color{blue}{\left(-1 \cdot y\right) \cdot \left(t \cdot z\right)} \]
      2. neg-mul-176.5%

        \[\leadsto \color{blue}{\left(-y\right)} \cdot \left(t \cdot z\right) \]
    6. Simplified76.5%

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

    if -4.59999999999999971e-33 < z < 2e-99

    1. Initial program 94.7%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Step-by-step derivation
      1. distribute-rgt-out--94.7%

        \[\leadsto \color{blue}{\left(y \cdot \left(x - z\right)\right)} \cdot t \]
      2. flip--73.4%

        \[\leadsto \left(y \cdot \color{blue}{\frac{x \cdot x - z \cdot z}{x + z}}\right) \cdot t \]
      3. associate-*r/67.5%

        \[\leadsto \color{blue}{\frac{y \cdot \left(x \cdot x - z \cdot z\right)}{x + z}} \cdot t \]
    3. Applied egg-rr67.5%

      \[\leadsto \color{blue}{\frac{y \cdot \left(x \cdot x - z \cdot z\right)}{x + z}} \cdot t \]
    4. Step-by-step derivation
      1. associate-/l*73.3%

        \[\leadsto \color{blue}{\frac{y}{\frac{x + z}{x \cdot x - z \cdot z}}} \cdot t \]
      2. difference-of-squares73.3%

        \[\leadsto \frac{y}{\frac{x + z}{\color{blue}{\left(x + z\right) \cdot \left(x - z\right)}}} \cdot t \]
      3. associate-/r*94.6%

        \[\leadsto \frac{y}{\color{blue}{\frac{\frac{x + z}{x + z}}{x - z}}} \cdot t \]
      4. *-inverses94.6%

        \[\leadsto \frac{y}{\frac{\color{blue}{1}}{x - z}} \cdot t \]
    5. Simplified94.6%

      \[\leadsto \color{blue}{\frac{y}{\frac{1}{x - z}}} \cdot t \]
    6. Step-by-step derivation
      1. associate-*l/92.5%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{\frac{1}{x - z}}{t}}} \]
      3. clear-num94.4%

        \[\leadsto \frac{y}{\color{blue}{\frac{1}{\frac{t}{\frac{1}{x - z}}}}} \]
      4. associate-/r/94.5%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{\frac{t}{1} \cdot \left(x - z\right)}}} \]
      5. /-rgt-identity94.5%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{t} \cdot \left(x - z\right)}} \]
      6. *-commutative94.5%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{\left(x - z\right) \cdot t}}} \]
      7. sub-neg94.5%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{\left(x + \left(-z\right)\right)} \cdot t}} \]
      8. add-sqr-sqrt55.5%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}\right) \cdot t}} \]
      9. sqrt-unprod88.7%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right) \cdot t}} \]
      10. sqr-neg88.7%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \sqrt{\color{blue}{z \cdot z}}\right) \cdot t}} \]
      11. sqrt-unprod34.6%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{\sqrt{z} \cdot \sqrt{z}}\right) \cdot t}} \]
      12. add-sqr-sqrt81.4%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{z}\right) \cdot t}} \]
    7. Applied egg-rr81.4%

      \[\leadsto \color{blue}{\frac{y}{\frac{1}{\left(x + z\right) \cdot t}}} \]
    8. Taylor expanded in x around inf 81.8%

      \[\leadsto \frac{y}{\color{blue}{\frac{1}{t \cdot x}}} \]
    9. Step-by-step derivation
      1. *-commutative81.8%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{x \cdot t}}} \]
    10. Simplified81.8%

      \[\leadsto \frac{y}{\color{blue}{\frac{1}{x \cdot t}}} \]
    11. Step-by-step derivation
      1. associate-/r/81.7%

        \[\leadsto \color{blue}{\frac{y}{1} \cdot \left(x \cdot t\right)} \]
      2. /-rgt-identity81.7%

        \[\leadsto \color{blue}{y} \cdot \left(x \cdot t\right) \]
      3. *-commutative81.7%

        \[\leadsto y \cdot \color{blue}{\left(t \cdot x\right)} \]
      4. associate-*r*81.9%

        \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot x} \]
    12. Applied egg-rr81.9%

      \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot x} \]

    if 1.8e-51 < z < 7.99999999999999941e75

    1. Initial program 94.0%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Taylor expanded in x around inf 73.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{-33}:\\ \;\;\;\;y \cdot \left(t \cdot \left(-z\right)\right)\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-99}:\\ \;\;\;\;x \cdot \left(y \cdot t\right)\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-51} \lor \neg \left(z \leq 8 \cdot 10^{+75}\right):\\ \;\;\;\;y \cdot \left(t \cdot \left(-z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot t\\ \end{array} \]

Alternative 4: 72.2% accurate, 0.6× speedup?

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

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-99}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{-53}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+75}:\\
\;\;\;\;\left(x \cdot y\right) \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.79999999999999994e-33 or 2.49999999999999985e-99 < z < 8.50000000000000044e-53

    1. Initial program 91.1%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Taylor expanded in x around 0 76.8%

      \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot z\right)\right)} \cdot t \]
    3. Step-by-step derivation
      1. neg-mul-176.8%

        \[\leadsto \color{blue}{\left(-y \cdot z\right)} \cdot t \]
      2. distribute-lft-neg-in76.8%

        \[\leadsto \color{blue}{\left(\left(-y\right) \cdot z\right)} \cdot t \]
    4. Simplified76.8%

      \[\leadsto \color{blue}{\left(\left(-y\right) \cdot z\right)} \cdot t \]
    5. Step-by-step derivation
      1. associate-*l*75.6%

        \[\leadsto \color{blue}{\left(-y\right) \cdot \left(z \cdot t\right)} \]
      2. neg-mul-175.6%

        \[\leadsto \color{blue}{\left(-1 \cdot y\right)} \cdot \left(z \cdot t\right) \]
      3. *-commutative75.6%

        \[\leadsto \color{blue}{\left(y \cdot -1\right)} \cdot \left(z \cdot t\right) \]
      4. metadata-eval75.6%

        \[\leadsto \left(y \cdot \color{blue}{\frac{1}{-1}}\right) \cdot \left(z \cdot t\right) \]
      5. div-inv75.6%

        \[\leadsto \color{blue}{\frac{y}{-1}} \cdot \left(z \cdot t\right) \]
      6. associate-*l*76.8%

        \[\leadsto \color{blue}{\left(\frac{y}{-1} \cdot z\right) \cdot t} \]
      7. associate-/r/76.8%

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

        \[\leadsto \color{blue}{\frac{y \cdot t}{\frac{-1}{z}}} \]
      9. associate-/l*76.5%

        \[\leadsto \color{blue}{\frac{y}{\frac{\frac{-1}{z}}{t}}} \]
    6. Applied egg-rr76.5%

      \[\leadsto \color{blue}{\frac{y}{\frac{\frac{-1}{z}}{t}}} \]
    7. Step-by-step derivation
      1. associate-/l*79.2%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{-1}{t}}} \cdot z \]
    8. Simplified79.1%

      \[\leadsto \color{blue}{\frac{y}{\frac{-1}{t}} \cdot z} \]
    9. Step-by-step derivation
      1. clear-num79.0%

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

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

        \[\leadsto \left(\frac{1}{\color{blue}{\frac{--1}{-t}}} \cdot y\right) \cdot z \]
      4. metadata-eval79.2%

        \[\leadsto \left(\frac{1}{\frac{\color{blue}{1}}{-t}} \cdot y\right) \cdot z \]
      5. remove-double-div79.2%

        \[\leadsto \left(\color{blue}{\left(-t\right)} \cdot y\right) \cdot z \]
    10. Applied egg-rr79.2%

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

    if -3.79999999999999994e-33 < z < 2.49999999999999985e-99

    1. Initial program 94.7%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Step-by-step derivation
      1. distribute-rgt-out--94.7%

        \[\leadsto \color{blue}{\left(y \cdot \left(x - z\right)\right)} \cdot t \]
      2. flip--73.4%

        \[\leadsto \left(y \cdot \color{blue}{\frac{x \cdot x - z \cdot z}{x + z}}\right) \cdot t \]
      3. associate-*r/67.5%

        \[\leadsto \color{blue}{\frac{y \cdot \left(x \cdot x - z \cdot z\right)}{x + z}} \cdot t \]
    3. Applied egg-rr67.5%

      \[\leadsto \color{blue}{\frac{y \cdot \left(x \cdot x - z \cdot z\right)}{x + z}} \cdot t \]
    4. Step-by-step derivation
      1. associate-/l*73.3%

        \[\leadsto \color{blue}{\frac{y}{\frac{x + z}{x \cdot x - z \cdot z}}} \cdot t \]
      2. difference-of-squares73.3%

        \[\leadsto \frac{y}{\frac{x + z}{\color{blue}{\left(x + z\right) \cdot \left(x - z\right)}}} \cdot t \]
      3. associate-/r*94.6%

        \[\leadsto \frac{y}{\color{blue}{\frac{\frac{x + z}{x + z}}{x - z}}} \cdot t \]
      4. *-inverses94.6%

        \[\leadsto \frac{y}{\frac{\color{blue}{1}}{x - z}} \cdot t \]
    5. Simplified94.6%

      \[\leadsto \color{blue}{\frac{y}{\frac{1}{x - z}}} \cdot t \]
    6. Step-by-step derivation
      1. associate-*l/92.5%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{\frac{1}{x - z}}{t}}} \]
      3. clear-num94.4%

        \[\leadsto \frac{y}{\color{blue}{\frac{1}{\frac{t}{\frac{1}{x - z}}}}} \]
      4. associate-/r/94.5%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{\frac{t}{1} \cdot \left(x - z\right)}}} \]
      5. /-rgt-identity94.5%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{t} \cdot \left(x - z\right)}} \]
      6. *-commutative94.5%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{\left(x - z\right) \cdot t}}} \]
      7. sub-neg94.5%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{\left(x + \left(-z\right)\right)} \cdot t}} \]
      8. add-sqr-sqrt55.5%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}\right) \cdot t}} \]
      9. sqrt-unprod88.7%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right) \cdot t}} \]
      10. sqr-neg88.7%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \sqrt{\color{blue}{z \cdot z}}\right) \cdot t}} \]
      11. sqrt-unprod34.6%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{\sqrt{z} \cdot \sqrt{z}}\right) \cdot t}} \]
      12. add-sqr-sqrt81.4%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{z}\right) \cdot t}} \]
    7. Applied egg-rr81.4%

      \[\leadsto \color{blue}{\frac{y}{\frac{1}{\left(x + z\right) \cdot t}}} \]
    8. Taylor expanded in x around inf 81.8%

      \[\leadsto \frac{y}{\color{blue}{\frac{1}{t \cdot x}}} \]
    9. Step-by-step derivation
      1. *-commutative81.8%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{x \cdot t}}} \]
    10. Simplified81.8%

      \[\leadsto \frac{y}{\color{blue}{\frac{1}{x \cdot t}}} \]
    11. Step-by-step derivation
      1. associate-/r/81.7%

        \[\leadsto \color{blue}{\frac{y}{1} \cdot \left(x \cdot t\right)} \]
      2. /-rgt-identity81.7%

        \[\leadsto \color{blue}{y} \cdot \left(x \cdot t\right) \]
      3. *-commutative81.7%

        \[\leadsto y \cdot \color{blue}{\left(t \cdot x\right)} \]
      4. associate-*r*81.9%

        \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot x} \]
    12. Applied egg-rr81.9%

      \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot x} \]

    if 8.50000000000000044e-53 < z < 2.8999999999999998e75

    1. Initial program 94.0%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Taylor expanded in x around inf 73.3%

      \[\leadsto \color{blue}{\left(y \cdot x\right)} \cdot t \]

    if 2.8999999999999998e75 < z

    1. Initial program 80.2%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Step-by-step derivation
      1. distribute-rgt-out--80.2%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(t \cdot z\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*77.5%

        \[\leadsto \color{blue}{\left(-1 \cdot y\right) \cdot \left(t \cdot z\right)} \]
      2. neg-mul-177.5%

        \[\leadsto \color{blue}{\left(-y\right)} \cdot \left(t \cdot z\right) \]
    6. Simplified77.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{-33}:\\ \;\;\;\;z \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-99}:\\ \;\;\;\;x \cdot \left(y \cdot t\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-53}:\\ \;\;\;\;z \cdot \left(y \cdot \left(-t\right)\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+75}:\\ \;\;\;\;\left(x \cdot y\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(t \cdot \left(-z\right)\right)\\ \end{array} \]

Alternative 5: 56.5% accurate, 1.3× speedup?

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

\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\


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

    1. Initial program 88.3%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Step-by-step derivation
      1. distribute-rgt-out--88.9%

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

        \[\leadsto \color{blue}{y \cdot \left(\left(x - z\right) \cdot t\right)} \]
    3. Simplified91.6%

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

      \[\leadsto \color{blue}{y \cdot \left(t \cdot x\right)} \]

    if 1.94999999999999991e-66 < t

    1. Initial program 94.2%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Step-by-step derivation
      1. distribute-rgt-out--96.6%

        \[\leadsto \color{blue}{\left(y \cdot \left(x - z\right)\right)} \cdot t \]
      2. flip--66.5%

        \[\leadsto \left(y \cdot \color{blue}{\frac{x \cdot x - z \cdot z}{x + z}}\right) \cdot t \]
      3. associate-*r/66.4%

        \[\leadsto \color{blue}{\frac{y \cdot \left(x \cdot x - z \cdot z\right)}{x + z}} \cdot t \]
    3. Applied egg-rr66.4%

      \[\leadsto \color{blue}{\frac{y \cdot \left(x \cdot x - z \cdot z\right)}{x + z}} \cdot t \]
    4. Step-by-step derivation
      1. associate-/l*66.3%

        \[\leadsto \color{blue}{\frac{y}{\frac{x + z}{x \cdot x - z \cdot z}}} \cdot t \]
      2. difference-of-squares71.2%

        \[\leadsto \frac{y}{\frac{x + z}{\color{blue}{\left(x + z\right) \cdot \left(x - z\right)}}} \cdot t \]
      3. associate-/r*96.5%

        \[\leadsto \frac{y}{\color{blue}{\frac{\frac{x + z}{x + z}}{x - z}}} \cdot t \]
      4. *-inverses96.5%

        \[\leadsto \frac{y}{\frac{\color{blue}{1}}{x - z}} \cdot t \]
    5. Simplified96.5%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{\frac{1}{x - z}}{t}}} \]
      3. clear-num91.9%

        \[\leadsto \frac{y}{\color{blue}{\frac{1}{\frac{t}{\frac{1}{x - z}}}}} \]
      4. associate-/r/92.0%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{\frac{t}{1} \cdot \left(x - z\right)}}} \]
      5. /-rgt-identity92.0%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{t} \cdot \left(x - z\right)}} \]
      6. *-commutative92.0%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{\left(x - z\right) \cdot t}}} \]
      7. sub-neg92.0%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{\left(x + \left(-z\right)\right)} \cdot t}} \]
      8. add-sqr-sqrt42.4%

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

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right) \cdot t}} \]
      10. sqr-neg57.3%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \sqrt{\color{blue}{z \cdot z}}\right) \cdot t}} \]
      11. sqrt-unprod24.5%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{\sqrt{z} \cdot \sqrt{z}}\right) \cdot t}} \]
      12. add-sqr-sqrt41.1%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{z}\right) \cdot t}} \]
    7. Applied egg-rr41.1%

      \[\leadsto \color{blue}{\frac{y}{\frac{1}{\left(x + z\right) \cdot t}}} \]
    8. Taylor expanded in x around inf 44.9%

      \[\leadsto \frac{y}{\color{blue}{\frac{1}{t \cdot x}}} \]
    9. Step-by-step derivation
      1. *-commutative44.9%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{x \cdot t}}} \]
    10. Simplified44.9%

      \[\leadsto \frac{y}{\color{blue}{\frac{1}{x \cdot t}}} \]
    11. Step-by-step derivation
      1. associate-/r/44.9%

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

        \[\leadsto \color{blue}{y} \cdot \left(x \cdot t\right) \]
      3. *-commutative44.9%

        \[\leadsto y \cdot \color{blue}{\left(t \cdot x\right)} \]
      4. associate-*r*52.7%

        \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot x} \]
    12. Applied egg-rr52.7%

      \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification50.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.95 \cdot 10^{-66}:\\ \;\;\;\;y \cdot \left(x \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(y \cdot t\right)\\ \end{array} \]

Alternative 6: 56.5% accurate, 1.3× speedup?

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

\mathbf{else}:\\
\;\;\;\;\left(x \cdot y\right) \cdot t\\


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

    1. Initial program 83.4%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Step-by-step derivation
      1. distribute-rgt-out--86.3%

        \[\leadsto \color{blue}{\left(y \cdot \left(x - z\right)\right)} \cdot t \]
      2. flip--72.2%

        \[\leadsto \left(y \cdot \color{blue}{\frac{x \cdot x - z \cdot z}{x + z}}\right) \cdot t \]
      3. associate-*r/65.9%

        \[\leadsto \color{blue}{\frac{y \cdot \left(x \cdot x - z \cdot z\right)}{x + z}} \cdot t \]
    3. Applied egg-rr65.9%

      \[\leadsto \color{blue}{\frac{y \cdot \left(x \cdot x - z \cdot z\right)}{x + z}} \cdot t \]
    4. Step-by-step derivation
      1. associate-/l*72.1%

        \[\leadsto \color{blue}{\frac{y}{\frac{x + z}{x \cdot x - z \cdot z}}} \cdot t \]
      2. difference-of-squares73.7%

        \[\leadsto \frac{y}{\frac{x + z}{\color{blue}{\left(x + z\right) \cdot \left(x - z\right)}}} \cdot t \]
      3. associate-/r*86.2%

        \[\leadsto \frac{y}{\color{blue}{\frac{\frac{x + z}{x + z}}{x - z}}} \cdot t \]
      4. *-inverses86.2%

        \[\leadsto \frac{y}{\frac{\color{blue}{1}}{x - z}} \cdot t \]
    5. Simplified86.2%

      \[\leadsto \color{blue}{\frac{y}{\frac{1}{x - z}}} \cdot t \]
    6. Step-by-step derivation
      1. associate-*l/98.4%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{\frac{1}{x - z}}{t}}} \]
      3. clear-num92.8%

        \[\leadsto \frac{y}{\color{blue}{\frac{1}{\frac{t}{\frac{1}{x - z}}}}} \]
      4. associate-/r/92.9%

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{\frac{t}{1} \cdot \left(x - z\right)}}} \]
      5. /-rgt-identity92.9%

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

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

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{\left(x + \left(-z\right)\right)} \cdot t}} \]
      8. add-sqr-sqrt43.6%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}\right) \cdot t}} \]
      9. sqrt-unprod55.6%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right) \cdot t}} \]
      10. sqr-neg55.6%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \sqrt{\color{blue}{z \cdot z}}\right) \cdot t}} \]
      11. sqrt-unprod19.1%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{\sqrt{z} \cdot \sqrt{z}}\right) \cdot t}} \]
      12. add-sqr-sqrt36.6%

        \[\leadsto \frac{y}{\frac{1}{\left(x + \color{blue}{z}\right) \cdot t}} \]
    7. Applied egg-rr36.6%

      \[\leadsto \color{blue}{\frac{y}{\frac{1}{\left(x + z\right) \cdot t}}} \]
    8. Taylor expanded in x around inf 39.7%

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

        \[\leadsto \frac{y}{\frac{1}{\color{blue}{x \cdot t}}} \]
    10. Simplified39.7%

      \[\leadsto \frac{y}{\color{blue}{\frac{1}{x \cdot t}}} \]
    11. Step-by-step derivation
      1. associate-/r/39.7%

        \[\leadsto \color{blue}{\frac{y}{1} \cdot \left(x \cdot t\right)} \]
      2. /-rgt-identity39.7%

        \[\leadsto \color{blue}{y} \cdot \left(x \cdot t\right) \]
      3. *-commutative39.7%

        \[\leadsto y \cdot \color{blue}{\left(t \cdot x\right)} \]
      4. associate-*r*48.0%

        \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot x} \]
    12. Applied egg-rr48.0%

      \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot x} \]

    if -3.0000000000000002e-36 < y

    1. Initial program 92.8%

      \[\left(x \cdot y - z \cdot y\right) \cdot t \]
    2. Taylor expanded in x around inf 52.2%

      \[\leadsto \color{blue}{\left(y \cdot x\right)} \cdot t \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \left(y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot t\\ \end{array} \]

Alternative 7: 92.3% accurate, 1.3× speedup?

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

    \[\left(x \cdot y - z \cdot y\right) \cdot t \]
  2. Step-by-step derivation
    1. distribute-rgt-out--91.4%

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

      \[\leadsto \color{blue}{y \cdot \left(\left(x - z\right) \cdot t\right)} \]
  3. Simplified91.7%

    \[\leadsto \color{blue}{y \cdot \left(\left(x - z\right) \cdot t\right)} \]
  4. Final simplification91.7%

    \[\leadsto y \cdot \left(t \cdot \left(x - z\right)\right) \]

Alternative 8: 53.2% accurate, 1.8× speedup?

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

    \[\left(x \cdot y - z \cdot y\right) \cdot t \]
  2. Step-by-step derivation
    1. distribute-rgt-out--91.4%

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

      \[\leadsto \color{blue}{y \cdot \left(\left(x - z\right) \cdot t\right)} \]
  3. Simplified91.7%

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

    \[\leadsto \color{blue}{y \cdot \left(t \cdot x\right)} \]
  5. Final simplification47.4%

    \[\leadsto y \cdot \left(x \cdot t\right) \]

Developer target: 96.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t < -9.231879582886777 \cdot 10^{-80}:\\ \;\;\;\;\left(y \cdot t\right) \cdot \left(x - z\right)\\ \mathbf{elif}\;t < 2.543067051564877 \cdot 10^{+83}:\\ \;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot \left(x - z\right)\right) \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (< t -9.231879582886777e-80)
   (* (* y t) (- x z))
   (if (< t 2.543067051564877e+83) (* y (* t (- x z))) (* (* y (- x z)) t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t < -9.231879582886777e-80) {
		tmp = (y * t) * (x - z);
	} else if (t < 2.543067051564877e+83) {
		tmp = y * (t * (x - z));
	} else {
		tmp = (y * (x - z)) * t;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t < (-9.231879582886777d-80)) then
        tmp = (y * t) * (x - z)
    else if (t < 2.543067051564877d+83) then
        tmp = y * (t * (x - z))
    else
        tmp = (y * (x - z)) * t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t < -9.231879582886777e-80) {
		tmp = (y * t) * (x - z);
	} else if (t < 2.543067051564877e+83) {
		tmp = y * (t * (x - z));
	} else {
		tmp = (y * (x - z)) * t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t < -9.231879582886777e-80:
		tmp = (y * t) * (x - z)
	elif t < 2.543067051564877e+83:
		tmp = y * (t * (x - z))
	else:
		tmp = (y * (x - z)) * t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t < -9.231879582886777e-80)
		tmp = Float64(Float64(y * t) * Float64(x - z));
	elseif (t < 2.543067051564877e+83)
		tmp = Float64(y * Float64(t * Float64(x - z)));
	else
		tmp = Float64(Float64(y * Float64(x - z)) * t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t < -9.231879582886777e-80)
		tmp = (y * t) * (x - z);
	elseif (t < 2.543067051564877e+83)
		tmp = y * (t * (x - z));
	else
		tmp = (y * (x - z)) * t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Less[t, -9.231879582886777e-80], N[(N[(y * t), $MachinePrecision] * N[(x - z), $MachinePrecision]), $MachinePrecision], If[Less[t, 2.543067051564877e+83], N[(y * N[(t * N[(x - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(x - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t < -9.231879582886777 \cdot 10^{-80}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(x - z\right)\\

\mathbf{elif}\;t < 2.543067051564877 \cdot 10^{+83}:\\
\;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023240 
(FPCore (x y z t)
  :name "Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3"
  :precision binary64

  :herbie-target
  (if (< t -9.231879582886777e-80) (* (* y t) (- x z)) (if (< t 2.543067051564877e+83) (* y (* t (- x z))) (* (* y (- x z)) t)))

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