Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3

Percentage Accurate: 90.7% → 97.1%
Time: 7.4s
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.7% 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: 97.1% accurate, 0.8× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 1.08 \cdot 10^{-17}:\\ \;\;\;\;y \cdot \left(t \cdot x - t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - z\right) \cdot \left(t \cdot y\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.08e-17) (* y (- (* t x) (* t z))) (* (- x z) (* t y))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 1.08e-17) {
		tmp = y * ((t * x) - (t * z));
	} else {
		tmp = (x - z) * (t * y);
	}
	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.08d-17) then
        tmp = y * ((t * x) - (t * z))
    else
        tmp = (x - z) * (t * y)
    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.08e-17) {
		tmp = y * ((t * x) - (t * z));
	} else {
		tmp = (x - z) * (t * y);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if t <= 1.08e-17:
		tmp = y * ((t * x) - (t * z))
	else:
		tmp = (x - z) * (t * y)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 1.08e-17)
		tmp = Float64(y * Float64(Float64(t * x) - Float64(t * z)));
	else
		tmp = Float64(Float64(x - z) * Float64(t * y));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= 1.08e-17)
		tmp = y * ((t * x) - (t * z));
	else
		tmp = (x - z) * (t * y);
	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.08e-17], N[(y * N[(N[(t * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - z), $MachinePrecision] * N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.08 \cdot 10^{-17}:\\
\;\;\;\;y \cdot \left(t \cdot x - t \cdot z\right)\\

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


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

    1. Initial program 86.1%

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

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

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

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

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

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

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

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

    if 1.07999999999999995e-17 < t

    1. Initial program 92.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{{x}^{2}} \cdot y}{x + z} \cdot t \]
    7. Step-by-step derivation
      1. unpow246.1%

        \[\leadsto \frac{\color{blue}{\left(x \cdot x\right)} \cdot y}{x + z} \cdot t \]
    8. Simplified46.1%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(t \cdot z\right)\right) + y \cdot \left(t \cdot x\right)} \]
    10. Step-by-step derivation
      1. +-commutative79.6%

        \[\leadsto \color{blue}{y \cdot \left(t \cdot x\right) + -1 \cdot \left(y \cdot \left(t \cdot z\right)\right)} \]
      2. associate-*r*82.2%

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

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

        \[\leadsto \left(y \cdot t\right) \cdot x + \left(-\color{blue}{\left(y \cdot t\right) \cdot z}\right) \]
      5. distribute-rgt-neg-in82.1%

        \[\leadsto \left(y \cdot t\right) \cdot x + \color{blue}{\left(y \cdot t\right) \cdot \left(-z\right)} \]
      6. distribute-lft-in98.4%

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

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

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

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

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

Alternative 2: 73.3% accurate, 0.7× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} t_1 := t \cdot \left(y \cdot x\right)\\ \mathbf{if}\;x \leq -4.3 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-289}:\\ \;\;\;\;y \cdot \left(t \cdot \left(-z\right)\right)\\ \mathbf{elif}\;x \leq 3200000000000:\\ \;\;\;\;t \cdot \left(y \cdot \left(-z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \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 (* t (* y x))))
   (if (<= x -4.3e+83)
     t_1
     (if (<= x 5.2e-289)
       (* y (* t (- z)))
       (if (<= x 3200000000000.0) (* t (* y (- z))) t_1)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double t_1 = t * (y * x);
	double tmp;
	if (x <= -4.3e+83) {
		tmp = t_1;
	} else if (x <= 5.2e-289) {
		tmp = y * (t * -z);
	} else if (x <= 3200000000000.0) {
		tmp = t * (y * -z);
	} else {
		tmp = t_1;
	}
	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 = t * (y * x)
    if (x <= (-4.3d+83)) then
        tmp = t_1
    else if (x <= 5.2d-289) then
        tmp = y * (t * -z)
    else if (x <= 3200000000000.0d0) then
        tmp = t * (y * -z)
    else
        tmp = t_1
    end if
    code = tmp
end function
assert y < t;
public static double code(double x, double y, double z, double t) {
	double t_1 = t * (y * x);
	double tmp;
	if (x <= -4.3e+83) {
		tmp = t_1;
	} else if (x <= 5.2e-289) {
		tmp = y * (t * -z);
	} else if (x <= 3200000000000.0) {
		tmp = t * (y * -z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	t_1 = t * (y * x)
	tmp = 0
	if x <= -4.3e+83:
		tmp = t_1
	elif x <= 5.2e-289:
		tmp = y * (t * -z)
	elif x <= 3200000000000.0:
		tmp = t * (y * -z)
	else:
		tmp = t_1
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	t_1 = Float64(t * Float64(y * x))
	tmp = 0.0
	if (x <= -4.3e+83)
		tmp = t_1;
	elseif (x <= 5.2e-289)
		tmp = Float64(y * Float64(t * Float64(-z)));
	elseif (x <= 3200000000000.0)
		tmp = Float64(t * Float64(y * Float64(-z)));
	else
		tmp = t_1;
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	t_1 = t * (y * x);
	tmp = 0.0;
	if (x <= -4.3e+83)
		tmp = t_1;
	elseif (x <= 5.2e-289)
		tmp = y * (t * -z);
	elseif (x <= 3200000000000.0)
		tmp = t * (y * -z);
	else
		tmp = t_1;
	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[(t * N[(y * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.3e+83], t$95$1, If[LessEqual[x, 5.2e-289], N[(y * N[(t * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3200000000000.0], N[(t * N[(y * (-z)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(y \cdot x\right)\\
\mathbf{if}\;x \leq -4.3 \cdot 10^{+83}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.3e83 or 3.2e12 < x

    1. Initial program 82.5%

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

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

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

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

    if -4.3e83 < x < 5.1999999999999998e-289

    1. Initial program 94.3%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(t \cdot z\right) \cdot y} \]
      3. distribute-rgt-neg-in80.2%

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

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

    if 5.1999999999999998e-289 < x < 3.2e12

    1. Initial program 90.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.3 \cdot 10^{+83}:\\ \;\;\;\;t \cdot \left(y \cdot x\right)\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-289}:\\ \;\;\;\;y \cdot \left(t \cdot \left(-z\right)\right)\\ \mathbf{elif}\;x \leq 3200000000000:\\ \;\;\;\;t \cdot \left(y \cdot \left(-z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \cdot x\right)\\ \end{array} \]

Alternative 3: 73.5% accurate, 0.9× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1.6 \cdot 10^{+82} \lor \neg \left(x \leq 2500000000000\right):\\ \;\;\;\;t \cdot \left(y \cdot x\right)\\ \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
 (if (or (<= x -1.6e+82) (not (<= x 2500000000000.0)))
   (* t (* y x))
   (* y (* t (- z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x <= -1.6e+82) || !(x <= 2500000000000.0)) {
		tmp = t * (y * x);
	} 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) :: tmp
    if ((x <= (-1.6d+82)) .or. (.not. (x <= 2500000000000.0d0))) then
        tmp = t * (y * x)
    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 tmp;
	if ((x <= -1.6e+82) || !(x <= 2500000000000.0)) {
		tmp = t * (y * x);
	} else {
		tmp = y * (t * -z);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if (x <= -1.6e+82) or not (x <= 2500000000000.0):
		tmp = t * (y * x)
	else:
		tmp = y * (t * -z)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if ((x <= -1.6e+82) || !(x <= 2500000000000.0))
		tmp = Float64(t * Float64(y * x));
	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)
	tmp = 0.0;
	if ((x <= -1.6e+82) || ~((x <= 2500000000000.0)))
		tmp = t * (y * x);
	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_] := If[Or[LessEqual[x, -1.6e+82], N[Not[LessEqual[x, 2500000000000.0]], $MachinePrecision]], N[(t * N[(y * x), $MachinePrecision]), $MachinePrecision], N[(y * N[(t * (-z)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.6 \cdot 10^{+82} \lor \neg \left(x \leq 2500000000000\right):\\
\;\;\;\;t \cdot \left(y \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.59999999999999987e82 or 2.5e12 < x

    1. Initial program 82.5%

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

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

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

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

    if -1.59999999999999987e82 < x < 2.5e12

    1. Initial program 92.5%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(t \cdot z\right) \cdot y} \]
      3. distribute-rgt-neg-in78.2%

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

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

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

Alternative 4: 97.1% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{-65}:\\ \;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(y \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 (<= y -4.4e-65) (* y (* t (- x z))) (* t (* y (- x z)))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -4.4e-65) {
		tmp = y * (t * (x - z));
	} else {
		tmp = t * (y * (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 (y <= (-4.4d-65)) then
        tmp = y * (t * (x - z))
    else
        tmp = t * (y * (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 (y <= -4.4e-65) {
		tmp = y * (t * (x - z));
	} else {
		tmp = t * (y * (x - z));
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if y <= -4.4e-65:
		tmp = y * (t * (x - z))
	else:
		tmp = t * (y * (x - z))
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (y <= -4.4e-65)
		tmp = Float64(y * Float64(t * Float64(x - z)));
	else
		tmp = Float64(t * Float64(y * 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 (y <= -4.4e-65)
		tmp = y * (t * (x - z));
	else
		tmp = t * (y * (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[y, -4.4e-65], N[(y * N[(t * N[(x - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(x - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{-65}:\\
\;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\

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


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

    1. Initial program 86.4%

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

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

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

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

    if -4.40000000000000042e-65 < y

    1. Initial program 88.1%

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

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

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

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

Alternative 5: 97.3% accurate, 1.0× speedup?

\[\begin{array}{l} [y, t] = \mathsf{sort}([y, t])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq 1.18 \cdot 10^{-17}:\\ \;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x - z\right) \cdot \left(t \cdot y\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.18e-17) (* y (* t (- x z))) (* (- x z) (* t y))))
assert(y < t);
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= 1.18e-17) {
		tmp = y * (t * (x - z));
	} else {
		tmp = (x - z) * (t * y);
	}
	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.18d-17) then
        tmp = y * (t * (x - z))
    else
        tmp = (x - z) * (t * y)
    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.18e-17) {
		tmp = y * (t * (x - z));
	} else {
		tmp = (x - z) * (t * y);
	}
	return tmp;
}
[y, t] = sort([y, t])
def code(x, y, z, t):
	tmp = 0
	if t <= 1.18e-17:
		tmp = y * (t * (x - z))
	else:
		tmp = (x - z) * (t * y)
	return tmp
y, t = sort([y, t])
function code(x, y, z, t)
	tmp = 0.0
	if (t <= 1.18e-17)
		tmp = Float64(y * Float64(t * Float64(x - z)));
	else
		tmp = Float64(Float64(x - z) * Float64(t * y));
	end
	return tmp
end
y, t = num2cell(sort([y, t])){:}
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= 1.18e-17)
		tmp = y * (t * (x - z));
	else
		tmp = (x - z) * (t * y);
	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.18e-17], N[(y * N[(t * N[(x - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - z), $MachinePrecision] * N[(t * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, t] = \mathsf{sort}([y, t])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.18 \cdot 10^{-17}:\\
\;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\

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


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

    1. Initial program 86.1%

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

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

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

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

    if 1.18000000000000004e-17 < t

    1. Initial program 92.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\color{blue}{{x}^{2}} \cdot y}{x + z} \cdot t \]
    7. Step-by-step derivation
      1. unpow246.1%

        \[\leadsto \frac{\color{blue}{\left(x \cdot x\right)} \cdot y}{x + z} \cdot t \]
    8. Simplified46.1%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(t \cdot z\right)\right) + y \cdot \left(t \cdot x\right)} \]
    10. Step-by-step derivation
      1. +-commutative79.6%

        \[\leadsto \color{blue}{y \cdot \left(t \cdot x\right) + -1 \cdot \left(y \cdot \left(t \cdot z\right)\right)} \]
      2. associate-*r*82.2%

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

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

        \[\leadsto \left(y \cdot t\right) \cdot x + \left(-\color{blue}{\left(y \cdot t\right) \cdot z}\right) \]
      5. distribute-rgt-neg-in82.1%

        \[\leadsto \left(y \cdot t\right) \cdot x + \color{blue}{\left(y \cdot t\right) \cdot \left(-z\right)} \]
      6. distribute-lft-in98.4%

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

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

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

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

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

Alternative 6: 56.0% accurate, 1.3× speedup?

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

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


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

    1. Initial program 86.2%

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

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

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

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

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

    if 9.99999999999999939e-12 < t

    1. Initial program 91.9%

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

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

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

      \[\leadsto \color{blue}{y \cdot \left(\left(x - z\right) \cdot t\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt90.2%

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

        \[\leadsto \color{blue}{{\left(\sqrt[3]{y \cdot \left(\left(x - z\right) \cdot t\right)}\right)}^{3}} \]
    5. Applied egg-rr90.2%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{y \cdot \left(\left(x - z\right) \cdot t\right)}\right)}^{3}} \]
    6. Taylor expanded in z around 0 54.4%

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \left(y \cdot \left(t \cdot x\right)\right)} \]
    7. Step-by-step derivation
      1. pow-base-154.4%

        \[\leadsto \color{blue}{1} \cdot \left(y \cdot \left(t \cdot x\right)\right) \]
      2. *-lft-identity54.4%

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

        \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot x} \]
    8. Simplified64.4%

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

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

Alternative 7: 92.4% 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 87.7%

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

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

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

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

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

Alternative 8: 52.8% accurate, 1.8× speedup?

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

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

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

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

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

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

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

Developer target: 96.5% 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 2023182 
(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))