Linear.Projection:infinitePerspective from linear-1.19.1.3, A

Percentage Accurate: 90.0% → 98.0%
Time: 9.3s
Alternatives: 13
Speedup: 1.2×

Specification

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

\\
\frac{x \cdot 2}{y \cdot z - t \cdot z}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 90.0% accurate, 1.0× speedup?

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

\\
\frac{x \cdot 2}{y \cdot z - t \cdot z}
\end{array}

Alternative 1: 98.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot z - z \cdot t\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{+296}:\\ \;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\ \mathbf{elif}\;t_1 \leq 10^{+151}:\\ \;\;\;\;\frac{2 \cdot x}{z \cdot \left(y - t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{2}{y - t}}{\frac{z}{x}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (* y z) (* z t))))
   (if (<= t_1 -5e+296)
     (* 2.0 (/ (/ x z) (- y t)))
     (if (<= t_1 1e+151)
       (/ (* 2.0 x) (* z (- y t)))
       (/ (/ 2.0 (- y t)) (/ z x))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y * z) - (z * t);
	double tmp;
	if (t_1 <= -5e+296) {
		tmp = 2.0 * ((x / z) / (y - t));
	} else if (t_1 <= 1e+151) {
		tmp = (2.0 * x) / (z * (y - t));
	} else {
		tmp = (2.0 / (y - t)) / (z / x);
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = (y * z) - (z * t)
    if (t_1 <= (-5d+296)) then
        tmp = 2.0d0 * ((x / z) / (y - t))
    else if (t_1 <= 1d+151) then
        tmp = (2.0d0 * x) / (z * (y - t))
    else
        tmp = (2.0d0 / (y - t)) / (z / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (y * z) - (z * t);
	double tmp;
	if (t_1 <= -5e+296) {
		tmp = 2.0 * ((x / z) / (y - t));
	} else if (t_1 <= 1e+151) {
		tmp = (2.0 * x) / (z * (y - t));
	} else {
		tmp = (2.0 / (y - t)) / (z / x);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y * z) - (z * t)
	tmp = 0
	if t_1 <= -5e+296:
		tmp = 2.0 * ((x / z) / (y - t))
	elif t_1 <= 1e+151:
		tmp = (2.0 * x) / (z * (y - t))
	else:
		tmp = (2.0 / (y - t)) / (z / x)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y * z) - Float64(z * t))
	tmp = 0.0
	if (t_1 <= -5e+296)
		tmp = Float64(2.0 * Float64(Float64(x / z) / Float64(y - t)));
	elseif (t_1 <= 1e+151)
		tmp = Float64(Float64(2.0 * x) / Float64(z * Float64(y - t)));
	else
		tmp = Float64(Float64(2.0 / Float64(y - t)) / Float64(z / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y * z) - (z * t);
	tmp = 0.0;
	if (t_1 <= -5e+296)
		tmp = 2.0 * ((x / z) / (y - t));
	elseif (t_1 <= 1e+151)
		tmp = (2.0 * x) / (z * (y - t));
	else
		tmp = (2.0 / (y - t)) / (z / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+296], N[(2.0 * N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+151], N[(N[(2.0 * x), $MachinePrecision] / N[(z * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(y - t), $MachinePrecision]), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot z - z \cdot t\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+296}:\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{y - t}}{\frac{z}{x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (*.f64 y z) (*.f64 t z)) < -5.0000000000000001e296

    1. Initial program 69.5%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*l/69.5%

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

        \[\leadsto \color{blue}{2 \cdot \frac{x}{y \cdot z - t \cdot z}} \]
      3. distribute-rgt-out--69.5%

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

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{x}{z}}{y - t}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{x}{z}}{y - t}} \]

    if -5.0000000000000001e296 < (-.f64 (*.f64 y z) (*.f64 t z)) < 1.00000000000000002e151

    1. Initial program 98.7%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. distribute-rgt-out--98.7%

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

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

    if 1.00000000000000002e151 < (-.f64 (*.f64 y z) (*.f64 t z))

    1. Initial program 78.7%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*l/78.7%

        \[\leadsto \color{blue}{\frac{x}{y \cdot z - t \cdot z} \cdot 2} \]
      2. *-commutative78.7%

        \[\leadsto \color{blue}{2 \cdot \frac{x}{y \cdot z - t \cdot z}} \]
      3. distribute-rgt-out--84.1%

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

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{x}{z}}{y - t}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{x}{z}}{y - t}} \]
    4. Step-by-step derivation
      1. associate-*r/99.8%

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

        \[\leadsto \color{blue}{\frac{2}{y - t} \cdot \frac{x}{z}} \]
      3. clear-num99.7%

        \[\leadsto \frac{2}{y - t} \cdot \color{blue}{\frac{1}{\frac{z}{x}}} \]
      4. un-div-inv99.9%

        \[\leadsto \color{blue}{\frac{\frac{2}{y - t}}{\frac{z}{x}}} \]
    5. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\frac{\frac{2}{y - t}}{\frac{z}{x}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.1%

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

Alternative 2: 96.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+22} \lor \neg \left(z \leq 6.8 \cdot 10^{+133}\right):\\ \;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{2}{z \cdot \left(y - t\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -4e+22) (not (<= z 6.8e+133)))
   (* 2.0 (/ (/ x z) (- y t)))
   (* x (/ 2.0 (* z (- y t))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -4e+22) || !(z <= 6.8e+133)) {
		tmp = 2.0 * ((x / z) / (y - t));
	} else {
		tmp = x * (2.0 / (z * (y - 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 ((z <= (-4d+22)) .or. (.not. (z <= 6.8d+133))) then
        tmp = 2.0d0 * ((x / z) / (y - t))
    else
        tmp = x * (2.0d0 / (z * (y - t)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -4e+22) || !(z <= 6.8e+133)) {
		tmp = 2.0 * ((x / z) / (y - t));
	} else {
		tmp = x * (2.0 / (z * (y - t)));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -4e+22) or not (z <= 6.8e+133):
		tmp = 2.0 * ((x / z) / (y - t))
	else:
		tmp = x * (2.0 / (z * (y - t)))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -4e+22) || !(z <= 6.8e+133))
		tmp = Float64(2.0 * Float64(Float64(x / z) / Float64(y - t)));
	else
		tmp = Float64(x * Float64(2.0 / Float64(z * Float64(y - t))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -4e+22) || ~((z <= 6.8e+133)))
		tmp = 2.0 * ((x / z) / (y - t));
	else
		tmp = x * (2.0 / (z * (y - t)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4e+22], N[Not[LessEqual[z, 6.8e+133]], $MachinePrecision]], N[(2.0 * N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(2.0 / N[(z * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+22} \lor \neg \left(z \leq 6.8 \cdot 10^{+133}\right):\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4e22 or 6.79999999999999975e133 < z

    1. Initial program 80.4%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*l/80.4%

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

        \[\leadsto \color{blue}{2 \cdot \frac{x}{y \cdot z - t \cdot z}} \]
      3. distribute-rgt-out--83.9%

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

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{x}{z}}{y - t}} \]
    3. Simplified96.6%

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{x}{z}}{y - t}} \]

    if -4e22 < z < 6.79999999999999975e133

    1. Initial program 98.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/97.9%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--98.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+22} \lor \neg \left(z \leq 6.8 \cdot 10^{+133}\right):\\ \;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{2}{z \cdot \left(y - t\right)}\\ \end{array} \]

Alternative 3: 96.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+22} \lor \neg \left(z \leq 6.8 \cdot 10^{+133}\right):\\ \;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t - y}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= z -4.5e+22) (not (<= z 6.8e+133)))
   (* 2.0 (/ (/ x z) (- y t)))
   (* x (/ (/ -2.0 (- t y)) z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -4.5e+22) || !(z <= 6.8e+133)) {
		tmp = 2.0 * ((x / z) / (y - t));
	} else {
		tmp = x * ((-2.0 / (t - y)) / z);
	}
	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 ((z <= (-4.5d+22)) .or. (.not. (z <= 6.8d+133))) then
        tmp = 2.0d0 * ((x / z) / (y - t))
    else
        tmp = x * (((-2.0d0) / (t - y)) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -4.5e+22) || !(z <= 6.8e+133)) {
		tmp = 2.0 * ((x / z) / (y - t));
	} else {
		tmp = x * ((-2.0 / (t - y)) / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -4.5e+22) or not (z <= 6.8e+133):
		tmp = 2.0 * ((x / z) / (y - t))
	else:
		tmp = x * ((-2.0 / (t - y)) / z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -4.5e+22) || !(z <= 6.8e+133))
		tmp = Float64(2.0 * Float64(Float64(x / z) / Float64(y - t)));
	else
		tmp = Float64(x * Float64(Float64(-2.0 / Float64(t - y)) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((z <= -4.5e+22) || ~((z <= 6.8e+133)))
		tmp = 2.0 * ((x / z) / (y - t));
	else
		tmp = x * ((-2.0 / (t - y)) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.5e+22], N[Not[LessEqual[z, 6.8e+133]], $MachinePrecision]], N[(2.0 * N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-2.0 / N[(t - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+22} \lor \neg \left(z \leq 6.8 \cdot 10^{+133}\right):\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t - y}}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4999999999999998e22 or 6.79999999999999975e133 < z

    1. Initial program 80.4%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*l/80.4%

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

        \[\leadsto \color{blue}{2 \cdot \frac{x}{y \cdot z - t \cdot z}} \]
      3. distribute-rgt-out--83.9%

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

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{x}{z}}{y - t}} \]
    3. Simplified96.6%

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{x}{z}}{y - t}} \]

    if -4.4999999999999998e22 < z < 6.79999999999999975e133

    1. Initial program 98.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/97.9%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--98.0%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg98.4%

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(-t\right) + y}}}{z} \]
      6. neg-sub098.4%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-98.4%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg98.4%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
      11. metadata-eval98.4%

        \[\leadsto x \cdot \frac{\frac{\color{blue}{-2}}{t - y}}{z} \]
    3. Simplified98.4%

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification97.7%

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

Alternative 4: 96.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+24}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y - t}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+133}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t - y}}{z}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -6.6e+24)
   (* (/ x z) (/ 2.0 (- y t)))
   (if (<= z 6.8e+133)
     (* x (/ (/ -2.0 (- t y)) z))
     (* 2.0 (/ (/ x z) (- y t))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -6.6e+24) {
		tmp = (x / z) * (2.0 / (y - t));
	} else if (z <= 6.8e+133) {
		tmp = x * ((-2.0 / (t - y)) / z);
	} else {
		tmp = 2.0 * ((x / z) / (y - 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 (z <= (-6.6d+24)) then
        tmp = (x / z) * (2.0d0 / (y - t))
    else if (z <= 6.8d+133) then
        tmp = x * (((-2.0d0) / (t - y)) / z)
    else
        tmp = 2.0d0 * ((x / z) / (y - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -6.6e+24) {
		tmp = (x / z) * (2.0 / (y - t));
	} else if (z <= 6.8e+133) {
		tmp = x * ((-2.0 / (t - y)) / z);
	} else {
		tmp = 2.0 * ((x / z) / (y - t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -6.6e+24:
		tmp = (x / z) * (2.0 / (y - t))
	elif z <= 6.8e+133:
		tmp = x * ((-2.0 / (t - y)) / z)
	else:
		tmp = 2.0 * ((x / z) / (y - t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -6.6e+24)
		tmp = Float64(Float64(x / z) * Float64(2.0 / Float64(y - t)));
	elseif (z <= 6.8e+133)
		tmp = Float64(x * Float64(Float64(-2.0 / Float64(t - y)) / z));
	else
		tmp = Float64(2.0 * Float64(Float64(x / z) / Float64(y - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -6.6e+24)
		tmp = (x / z) * (2.0 / (y - t));
	elseif (z <= 6.8e+133)
		tmp = x * ((-2.0 / (t - y)) / z);
	else
		tmp = 2.0 * ((x / z) / (y - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.6e+24], N[(N[(x / z), $MachinePrecision] * N[(2.0 / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+133], N[(x * N[(N[(-2.0 / N[(t - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x / z), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{+24}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{2}{y - t}\\

\mathbf{elif}\;z \leq 6.8 \cdot 10^{+133}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t - y}}{z}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.5999999999999998e24

    1. Initial program 81.4%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. distribute-rgt-out--84.9%

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{2}{y - t}} \]
    3. Simplified96.7%

      \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{2}{y - t}} \]

    if -6.5999999999999998e24 < z < 6.79999999999999975e133

    1. Initial program 98.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/97.9%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--98.0%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg98.4%

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(-t\right) + y}}}{z} \]
      6. neg-sub098.4%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-98.4%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg98.4%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
      11. metadata-eval98.4%

        \[\leadsto x \cdot \frac{\frac{\color{blue}{-2}}{t - y}}{z} \]
    3. Simplified98.4%

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]

    if 6.79999999999999975e133 < z

    1. Initial program 78.7%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*l/78.7%

        \[\leadsto \color{blue}{\frac{x}{y \cdot z - t \cdot z} \cdot 2} \]
      2. *-commutative78.7%

        \[\leadsto \color{blue}{2 \cdot \frac{x}{y \cdot z - t \cdot z}} \]
      3. distribute-rgt-out--82.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+24}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y - t}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+133}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t - y}}{z}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\ \end{array} \]

Alternative 5: 94.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot x \leq 2 \cdot 10^{-81}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t - y}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{2}{y - t}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= (* 2.0 x) 2e-81)
   (* x (/ (/ -2.0 (- t y)) z))
   (/ (* x (/ 2.0 (- y t))) z)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((2.0 * x) <= 2e-81) {
		tmp = x * ((-2.0 / (t - y)) / z);
	} else {
		tmp = (x * (2.0 / (y - t))) / z;
	}
	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 ((2.0d0 * x) <= 2d-81) then
        tmp = x * (((-2.0d0) / (t - y)) / z)
    else
        tmp = (x * (2.0d0 / (y - t))) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((2.0 * x) <= 2e-81) {
		tmp = x * ((-2.0 / (t - y)) / z);
	} else {
		tmp = (x * (2.0 / (y - t))) / z;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (2.0 * x) <= 2e-81:
		tmp = x * ((-2.0 / (t - y)) / z)
	else:
		tmp = (x * (2.0 / (y - t))) / z
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (Float64(2.0 * x) <= 2e-81)
		tmp = Float64(x * Float64(Float64(-2.0 / Float64(t - y)) / z));
	else
		tmp = Float64(Float64(x * Float64(2.0 / Float64(y - t))) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((2.0 * x) <= 2e-81)
		tmp = x * ((-2.0 / (t - y)) / z);
	else
		tmp = (x * (2.0 / (y - t))) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[N[(2.0 * x), $MachinePrecision], 2e-81], N[(x * N[(N[(-2.0 / N[(t - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(2.0 / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;2 \cdot x \leq 2 \cdot 10^{-81}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t - y}}{z}\\

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \frac{2}{y - t}}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x 2) < 1.9999999999999999e-81

    1. Initial program 95.2%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/95.1%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--95.7%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg96.1%

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

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-96.1%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg96.1%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
      11. metadata-eval96.1%

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

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]

    if 1.9999999999999999e-81 < (*.f64 x 2)

    1. Initial program 82.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*l/82.8%

        \[\leadsto \color{blue}{\frac{x}{y \cdot z - t \cdot z} \cdot 2} \]
      2. *-commutative82.8%

        \[\leadsto \color{blue}{2 \cdot \frac{x}{y \cdot z - t \cdot z}} \]
      3. distribute-rgt-out--85.7%

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{x}{z}}{y - t}} \]
    4. Step-by-step derivation
      1. associate-*r/93.1%

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

        \[\leadsto \color{blue}{\frac{2}{y - t} \cdot \frac{x}{z}} \]
      3. *-commutative93.1%

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

        \[\leadsto \color{blue}{\frac{x \cdot \frac{2}{y - t}}{z}} \]
    5. Applied egg-rr98.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;2 \cdot x \leq 2 \cdot 10^{-81}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t - y}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{2}{y - t}}{z}\\ \end{array} \]

Alternative 6: 72.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+22}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-107}:\\ \;\;\;\;x \cdot \frac{2}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t -2.4e+22)
   (* -2.0 (/ (/ x t) z))
   (if (<= t 1.5e-107) (* x (/ 2.0 (* y z))) (* -2.0 (/ x (* z t))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -2.4e+22) {
		tmp = -2.0 * ((x / t) / z);
	} else if (t <= 1.5e-107) {
		tmp = x * (2.0 / (y * z));
	} else {
		tmp = -2.0 * (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 <= (-2.4d+22)) then
        tmp = (-2.0d0) * ((x / t) / z)
    else if (t <= 1.5d-107) then
        tmp = x * (2.0d0 / (y * z))
    else
        tmp = (-2.0d0) * (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 <= -2.4e+22) {
		tmp = -2.0 * ((x / t) / z);
	} else if (t <= 1.5e-107) {
		tmp = x * (2.0 / (y * z));
	} else {
		tmp = -2.0 * (x / (z * t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= -2.4e+22:
		tmp = -2.0 * ((x / t) / z)
	elif t <= 1.5e-107:
		tmp = x * (2.0 / (y * z))
	else:
		tmp = -2.0 * (x / (z * t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -2.4e+22)
		tmp = Float64(-2.0 * Float64(Float64(x / t) / z));
	elseif (t <= 1.5e-107)
		tmp = Float64(x * Float64(2.0 / Float64(y * z)));
	else
		tmp = Float64(-2.0 * Float64(x / Float64(z * t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= -2.4e+22)
		tmp = -2.0 * ((x / t) / z);
	elseif (t <= 1.5e-107)
		tmp = x * (2.0 / (y * z));
	else
		tmp = -2.0 * (x / (z * t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, -2.4e+22], N[(-2.0 * N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e-107], N[(x * N[(2.0 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+22}:\\
\;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\

\mathbf{elif}\;t \leq 1.5 \cdot 10^{-107}:\\
\;\;\;\;x \cdot \frac{2}{y \cdot z}\\

\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.4e22

    1. Initial program 83.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*l/83.8%

        \[\leadsto \color{blue}{\frac{x}{y \cdot z - t \cdot z} \cdot 2} \]
      2. *-commutative83.8%

        \[\leadsto \color{blue}{2 \cdot \frac{x}{y \cdot z - t \cdot z}} \]
      3. distribute-rgt-out--87.2%

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

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{x}{z}}{y - t}} \]
    3. Simplified95.3%

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{x}{z}}{y - t}} \]
    4. Step-by-step derivation
      1. associate-/r*87.2%

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{-1 \cdot \frac{t \cdot z}{x}}} \]
    7. Step-by-step derivation
      1. mul-1-neg72.4%

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

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

        \[\leadsto \frac{2}{-\color{blue}{\frac{z}{\frac{x}{t}}}} \]
      4. distribute-neg-frac76.6%

        \[\leadsto \frac{2}{\color{blue}{\frac{-z}{\frac{x}{t}}}} \]
    8. Simplified76.6%

      \[\leadsto \frac{2}{\color{blue}{\frac{-z}{\frac{x}{t}}}} \]
    9. Step-by-step derivation
      1. frac-2neg76.6%

        \[\leadsto \color{blue}{\frac{-2}{-\frac{-z}{\frac{x}{t}}}} \]
      2. metadata-eval76.6%

        \[\leadsto \frac{\color{blue}{-2}}{-\frac{-z}{\frac{x}{t}}} \]
      3. div-inv76.6%

        \[\leadsto \color{blue}{-2 \cdot \frac{1}{-\frac{-z}{\frac{x}{t}}}} \]
      4. distribute-neg-frac76.6%

        \[\leadsto -2 \cdot \frac{1}{\color{blue}{\frac{-\left(-z\right)}{\frac{x}{t}}}} \]
      5. add-sqr-sqrt37.7%

        \[\leadsto -2 \cdot \frac{1}{\frac{-\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}{\frac{x}{t}}} \]
      6. sqrt-unprod52.4%

        \[\leadsto -2 \cdot \frac{1}{\frac{-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{\frac{x}{t}}} \]
      7. sqr-neg52.4%

        \[\leadsto -2 \cdot \frac{1}{\frac{-\sqrt{\color{blue}{z \cdot z}}}{\frac{x}{t}}} \]
      8. sqrt-unprod18.0%

        \[\leadsto -2 \cdot \frac{1}{\frac{-\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{\frac{x}{t}}} \]
      9. add-sqr-sqrt40.4%

        \[\leadsto -2 \cdot \frac{1}{\frac{-\color{blue}{z}}{\frac{x}{t}}} \]
      10. clear-num39.8%

        \[\leadsto -2 \cdot \color{blue}{\frac{\frac{x}{t}}{-z}} \]
      11. add-sqr-sqrt21.8%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      12. sqrt-unprod53.0%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      13. sqr-neg53.0%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\sqrt{\color{blue}{z \cdot z}}} \]
      14. sqrt-unprod38.8%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      15. add-sqr-sqrt76.8%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\color{blue}{z}} \]
    10. Applied egg-rr76.8%

      \[\leadsto \color{blue}{-2 \cdot \frac{\frac{x}{t}}{z}} \]

    if -2.4e22 < t < 1.4999999999999999e-107

    1. Initial program 96.2%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/96.1%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--96.1%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg96.1%

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

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-96.1%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg96.1%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
      11. metadata-eval96.1%

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

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]
    4. Taylor expanded in t around 0 79.3%

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

    if 1.4999999999999999e-107 < t

    1. Initial program 92.1%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/91.9%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--93.1%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg94.7%

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(-t\right) + y}}}{z} \]
      6. neg-sub094.7%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-94.7%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg94.7%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
      11. metadata-eval94.7%

        \[\leadsto x \cdot \frac{\frac{\color{blue}{-2}}{t - y}}{z} \]
    3. Simplified94.7%

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]
    4. Taylor expanded in t around inf 82.4%

      \[\leadsto \color{blue}{-2 \cdot \frac{x}{t \cdot z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+22}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-107}:\\ \;\;\;\;x \cdot \frac{2}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \end{array} \]

Alternative 7: 72.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{+19}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-107}:\\ \;\;\;\;x \cdot \frac{2}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t -2e+19)
   (* -2.0 (/ (/ x t) z))
   (if (<= t 1.5e-107) (* x (/ 2.0 (* y z))) (* x (/ (/ -2.0 t) z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -2e+19) {
		tmp = -2.0 * ((x / t) / z);
	} else if (t <= 1.5e-107) {
		tmp = x * (2.0 / (y * z));
	} else {
		tmp = x * ((-2.0 / t) / z);
	}
	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 <= (-2d+19)) then
        tmp = (-2.0d0) * ((x / t) / z)
    else if (t <= 1.5d-107) then
        tmp = x * (2.0d0 / (y * z))
    else
        tmp = x * (((-2.0d0) / t) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -2e+19) {
		tmp = -2.0 * ((x / t) / z);
	} else if (t <= 1.5e-107) {
		tmp = x * (2.0 / (y * z));
	} else {
		tmp = x * ((-2.0 / t) / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= -2e+19:
		tmp = -2.0 * ((x / t) / z)
	elif t <= 1.5e-107:
		tmp = x * (2.0 / (y * z))
	else:
		tmp = x * ((-2.0 / t) / z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -2e+19)
		tmp = Float64(-2.0 * Float64(Float64(x / t) / z));
	elseif (t <= 1.5e-107)
		tmp = Float64(x * Float64(2.0 / Float64(y * z)));
	else
		tmp = Float64(x * Float64(Float64(-2.0 / t) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= -2e+19)
		tmp = -2.0 * ((x / t) / z);
	elseif (t <= 1.5e-107)
		tmp = x * (2.0 / (y * z));
	else
		tmp = x * ((-2.0 / t) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, -2e+19], N[(-2.0 * N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e-107], N[(x * N[(2.0 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+19}:\\
\;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\

\mathbf{elif}\;t \leq 1.5 \cdot 10^{-107}:\\
\;\;\;\;x \cdot \frac{2}{y \cdot z}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\


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

    1. Initial program 83.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*l/83.8%

        \[\leadsto \color{blue}{\frac{x}{y \cdot z - t \cdot z} \cdot 2} \]
      2. *-commutative83.8%

        \[\leadsto \color{blue}{2 \cdot \frac{x}{y \cdot z - t \cdot z}} \]
      3. distribute-rgt-out--87.2%

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

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{x}{z}}{y - t}} \]
    3. Simplified95.3%

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{x}{z}}{y - t}} \]
    4. Step-by-step derivation
      1. associate-/r*87.2%

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{-1 \cdot \frac{t \cdot z}{x}}} \]
    7. Step-by-step derivation
      1. mul-1-neg72.4%

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

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

        \[\leadsto \frac{2}{-\color{blue}{\frac{z}{\frac{x}{t}}}} \]
      4. distribute-neg-frac76.6%

        \[\leadsto \frac{2}{\color{blue}{\frac{-z}{\frac{x}{t}}}} \]
    8. Simplified76.6%

      \[\leadsto \frac{2}{\color{blue}{\frac{-z}{\frac{x}{t}}}} \]
    9. Step-by-step derivation
      1. frac-2neg76.6%

        \[\leadsto \color{blue}{\frac{-2}{-\frac{-z}{\frac{x}{t}}}} \]
      2. metadata-eval76.6%

        \[\leadsto \frac{\color{blue}{-2}}{-\frac{-z}{\frac{x}{t}}} \]
      3. div-inv76.6%

        \[\leadsto \color{blue}{-2 \cdot \frac{1}{-\frac{-z}{\frac{x}{t}}}} \]
      4. distribute-neg-frac76.6%

        \[\leadsto -2 \cdot \frac{1}{\color{blue}{\frac{-\left(-z\right)}{\frac{x}{t}}}} \]
      5. add-sqr-sqrt37.7%

        \[\leadsto -2 \cdot \frac{1}{\frac{-\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}{\frac{x}{t}}} \]
      6. sqrt-unprod52.4%

        \[\leadsto -2 \cdot \frac{1}{\frac{-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{\frac{x}{t}}} \]
      7. sqr-neg52.4%

        \[\leadsto -2 \cdot \frac{1}{\frac{-\sqrt{\color{blue}{z \cdot z}}}{\frac{x}{t}}} \]
      8. sqrt-unprod18.0%

        \[\leadsto -2 \cdot \frac{1}{\frac{-\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{\frac{x}{t}}} \]
      9. add-sqr-sqrt40.4%

        \[\leadsto -2 \cdot \frac{1}{\frac{-\color{blue}{z}}{\frac{x}{t}}} \]
      10. clear-num39.8%

        \[\leadsto -2 \cdot \color{blue}{\frac{\frac{x}{t}}{-z}} \]
      11. add-sqr-sqrt21.8%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      12. sqrt-unprod53.0%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      13. sqr-neg53.0%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\sqrt{\color{blue}{z \cdot z}}} \]
      14. sqrt-unprod38.8%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      15. add-sqr-sqrt76.8%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\color{blue}{z}} \]
    10. Applied egg-rr76.8%

      \[\leadsto \color{blue}{-2 \cdot \frac{\frac{x}{t}}{z}} \]

    if -2e19 < t < 1.4999999999999999e-107

    1. Initial program 96.2%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/96.1%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--96.1%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg96.1%

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

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-96.1%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg96.1%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
      11. metadata-eval96.1%

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

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]
    4. Taylor expanded in t around 0 79.3%

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

    if 1.4999999999999999e-107 < t

    1. Initial program 92.1%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/91.9%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--93.1%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg94.7%

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(-t\right) + y}}}{z} \]
      6. neg-sub094.7%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-94.7%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg94.7%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
      11. metadata-eval94.7%

        \[\leadsto x \cdot \frac{\frac{\color{blue}{-2}}{t - y}}{z} \]
    3. Simplified94.7%

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]
    4. Taylor expanded in t around inf 82.8%

      \[\leadsto x \cdot \frac{\color{blue}{\frac{-2}{t}}}{z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{+19}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-107}:\\ \;\;\;\;x \cdot \frac{2}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \end{array} \]

Alternative 8: 72.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{-9}:\\ \;\;\;\;\frac{-2}{t \cdot \frac{z}{x}}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-107}:\\ \;\;\;\;x \cdot \frac{2}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t -1.4e-9)
   (/ -2.0 (* t (/ z x)))
   (if (<= t 1.3e-107) (* x (/ 2.0 (* y z))) (* x (/ (/ -2.0 t) z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -1.4e-9) {
		tmp = -2.0 / (t * (z / x));
	} else if (t <= 1.3e-107) {
		tmp = x * (2.0 / (y * z));
	} else {
		tmp = x * ((-2.0 / t) / z);
	}
	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 <= (-1.4d-9)) then
        tmp = (-2.0d0) / (t * (z / x))
    else if (t <= 1.3d-107) then
        tmp = x * (2.0d0 / (y * z))
    else
        tmp = x * (((-2.0d0) / t) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -1.4e-9) {
		tmp = -2.0 / (t * (z / x));
	} else if (t <= 1.3e-107) {
		tmp = x * (2.0 / (y * z));
	} else {
		tmp = x * ((-2.0 / t) / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= -1.4e-9:
		tmp = -2.0 / (t * (z / x))
	elif t <= 1.3e-107:
		tmp = x * (2.0 / (y * z))
	else:
		tmp = x * ((-2.0 / t) / z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -1.4e-9)
		tmp = Float64(-2.0 / Float64(t * Float64(z / x)));
	elseif (t <= 1.3e-107)
		tmp = Float64(x * Float64(2.0 / Float64(y * z)));
	else
		tmp = Float64(x * Float64(Float64(-2.0 / t) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= -1.4e-9)
		tmp = -2.0 / (t * (z / x));
	elseif (t <= 1.3e-107)
		tmp = x * (2.0 / (y * z));
	else
		tmp = x * ((-2.0 / t) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.4e-9], N[(-2.0 / N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-107], N[(x * N[(2.0 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-9}:\\
\;\;\;\;\frac{-2}{t \cdot \frac{z}{x}}\\

\mathbf{elif}\;t \leq 1.3 \cdot 10^{-107}:\\
\;\;\;\;x \cdot \frac{2}{y \cdot z}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\


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

    1. Initial program 84.3%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/84.2%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--87.5%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg88.6%

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

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-88.6%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg88.6%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
      11. metadata-eval88.6%

        \[\leadsto x \cdot \frac{\frac{\color{blue}{-2}}{t - y}}{z} \]
    3. Simplified88.6%

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]
    4. Taylor expanded in t around inf 72.0%

      \[\leadsto \color{blue}{-2 \cdot \frac{x}{t \cdot z}} \]
    5. Step-by-step derivation
      1. clear-num71.7%

        \[\leadsto -2 \cdot \color{blue}{\frac{1}{\frac{t \cdot z}{x}}} \]
      2. un-div-inv71.7%

        \[\leadsto \color{blue}{\frac{-2}{\frac{t \cdot z}{x}}} \]
      3. *-commutative71.7%

        \[\leadsto \frac{-2}{\frac{\color{blue}{z \cdot t}}{x}} \]
    6. Applied egg-rr71.7%

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

        \[\leadsto \frac{-2}{\color{blue}{\frac{z}{\frac{x}{t}}}} \]
      2. associate-/r/76.0%

        \[\leadsto \frac{-2}{\color{blue}{\frac{z}{x} \cdot t}} \]
    8. Applied egg-rr76.0%

      \[\leadsto \frac{-2}{\color{blue}{\frac{z}{x} \cdot t}} \]

    if -1.39999999999999992e-9 < t < 1.3e-107

    1. Initial program 96.1%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/96.0%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--96.0%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg96.0%

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(-t\right) + y}}}{z} \]
      6. neg-sub096.0%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-96.0%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg96.0%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
      11. metadata-eval96.0%

        \[\leadsto x \cdot \frac{\frac{\color{blue}{-2}}{t - y}}{z} \]
    3. Simplified96.0%

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]
    4. Taylor expanded in t around 0 79.9%

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

    if 1.3e-107 < t

    1. Initial program 92.1%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/91.9%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--93.1%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg94.7%

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(-t\right) + y}}}{z} \]
      6. neg-sub094.7%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-94.7%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg94.7%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
      11. metadata-eval94.7%

        \[\leadsto x \cdot \frac{\frac{\color{blue}{-2}}{t - y}}{z} \]
    3. Simplified94.7%

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]
    4. Taylor expanded in t around inf 82.8%

      \[\leadsto x \cdot \frac{\color{blue}{\frac{-2}{t}}}{z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{-9}:\\ \;\;\;\;\frac{-2}{t \cdot \frac{z}{x}}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-107}:\\ \;\;\;\;x \cdot \frac{2}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \end{array} \]

Alternative 9: 72.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{-7}:\\ \;\;\;\;\frac{-2}{t \cdot \frac{z}{x}}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-107}:\\ \;\;\;\;\frac{2 \cdot x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t -5.8e-7)
   (/ -2.0 (* t (/ z x)))
   (if (<= t 1.5e-107) (/ (* 2.0 x) (* y z)) (* x (/ (/ -2.0 t) z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -5.8e-7) {
		tmp = -2.0 / (t * (z / x));
	} else if (t <= 1.5e-107) {
		tmp = (2.0 * x) / (y * z);
	} else {
		tmp = x * ((-2.0 / t) / z);
	}
	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 <= (-5.8d-7)) then
        tmp = (-2.0d0) / (t * (z / x))
    else if (t <= 1.5d-107) then
        tmp = (2.0d0 * x) / (y * z)
    else
        tmp = x * (((-2.0d0) / t) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -5.8e-7) {
		tmp = -2.0 / (t * (z / x));
	} else if (t <= 1.5e-107) {
		tmp = (2.0 * x) / (y * z);
	} else {
		tmp = x * ((-2.0 / t) / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= -5.8e-7:
		tmp = -2.0 / (t * (z / x))
	elif t <= 1.5e-107:
		tmp = (2.0 * x) / (y * z)
	else:
		tmp = x * ((-2.0 / t) / z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -5.8e-7)
		tmp = Float64(-2.0 / Float64(t * Float64(z / x)));
	elseif (t <= 1.5e-107)
		tmp = Float64(Float64(2.0 * x) / Float64(y * z));
	else
		tmp = Float64(x * Float64(Float64(-2.0 / t) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= -5.8e-7)
		tmp = -2.0 / (t * (z / x));
	elseif (t <= 1.5e-107)
		tmp = (2.0 * x) / (y * z);
	else
		tmp = x * ((-2.0 / t) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, -5.8e-7], N[(-2.0 / N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e-107], N[(N[(2.0 * x), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{-2}{t \cdot \frac{z}{x}}\\

\mathbf{elif}\;t \leq 1.5 \cdot 10^{-107}:\\
\;\;\;\;\frac{2 \cdot x}{y \cdot z}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\


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

    1. Initial program 84.3%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/84.2%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--87.5%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg88.6%

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

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-88.6%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg88.6%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
      11. metadata-eval88.6%

        \[\leadsto x \cdot \frac{\frac{\color{blue}{-2}}{t - y}}{z} \]
    3. Simplified88.6%

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]
    4. Taylor expanded in t around inf 72.0%

      \[\leadsto \color{blue}{-2 \cdot \frac{x}{t \cdot z}} \]
    5. Step-by-step derivation
      1. clear-num71.7%

        \[\leadsto -2 \cdot \color{blue}{\frac{1}{\frac{t \cdot z}{x}}} \]
      2. un-div-inv71.7%

        \[\leadsto \color{blue}{\frac{-2}{\frac{t \cdot z}{x}}} \]
      3. *-commutative71.7%

        \[\leadsto \frac{-2}{\frac{\color{blue}{z \cdot t}}{x}} \]
    6. Applied egg-rr71.7%

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

        \[\leadsto \frac{-2}{\color{blue}{\frac{z}{\frac{x}{t}}}} \]
      2. associate-/r/76.0%

        \[\leadsto \frac{-2}{\color{blue}{\frac{z}{x} \cdot t}} \]
    8. Applied egg-rr76.0%

      \[\leadsto \frac{-2}{\color{blue}{\frac{z}{x} \cdot t}} \]

    if -5.7999999999999995e-7 < t < 1.4999999999999999e-107

    1. Initial program 96.1%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. distribute-rgt-out--96.1%

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

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

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

    if 1.4999999999999999e-107 < t

    1. Initial program 92.1%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/91.9%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--93.1%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg94.7%

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(-t\right) + y}}}{z} \]
      6. neg-sub094.7%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-94.7%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg94.7%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
      11. metadata-eval94.7%

        \[\leadsto x \cdot \frac{\frac{\color{blue}{-2}}{t - y}}{z} \]
    3. Simplified94.7%

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]
    4. Taylor expanded in t around inf 82.8%

      \[\leadsto x \cdot \frac{\color{blue}{\frac{-2}{t}}}{z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{-7}:\\ \;\;\;\;\frac{-2}{t \cdot \frac{z}{x}}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-107}:\\ \;\;\;\;\frac{2 \cdot x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \end{array} \]

Alternative 10: 72.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{-11}:\\ \;\;\;\;\frac{\frac{x \cdot -2}{z}}{t}\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-108}:\\ \;\;\;\;\frac{2 \cdot x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t -1.35e-11)
   (/ (/ (* x -2.0) z) t)
   (if (<= t 6.5e-108) (/ (* 2.0 x) (* y z)) (* x (/ (/ -2.0 t) z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -1.35e-11) {
		tmp = ((x * -2.0) / z) / t;
	} else if (t <= 6.5e-108) {
		tmp = (2.0 * x) / (y * z);
	} else {
		tmp = x * ((-2.0 / t) / z);
	}
	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 <= (-1.35d-11)) then
        tmp = ((x * (-2.0d0)) / z) / t
    else if (t <= 6.5d-108) then
        tmp = (2.0d0 * x) / (y * z)
    else
        tmp = x * (((-2.0d0) / t) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -1.35e-11) {
		tmp = ((x * -2.0) / z) / t;
	} else if (t <= 6.5e-108) {
		tmp = (2.0 * x) / (y * z);
	} else {
		tmp = x * ((-2.0 / t) / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= -1.35e-11:
		tmp = ((x * -2.0) / z) / t
	elif t <= 6.5e-108:
		tmp = (2.0 * x) / (y * z)
	else:
		tmp = x * ((-2.0 / t) / z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -1.35e-11)
		tmp = Float64(Float64(Float64(x * -2.0) / z) / t);
	elseif (t <= 6.5e-108)
		tmp = Float64(Float64(2.0 * x) / Float64(y * z));
	else
		tmp = Float64(x * Float64(Float64(-2.0 / t) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= -1.35e-11)
		tmp = ((x * -2.0) / z) / t;
	elseif (t <= 6.5e-108)
		tmp = (2.0 * x) / (y * z);
	else
		tmp = x * ((-2.0 / t) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.35e-11], N[(N[(N[(x * -2.0), $MachinePrecision] / z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 6.5e-108], N[(N[(2.0 * x), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-11}:\\
\;\;\;\;\frac{\frac{x \cdot -2}{z}}{t}\\

\mathbf{elif}\;t \leq 6.5 \cdot 10^{-108}:\\
\;\;\;\;\frac{2 \cdot x}{y \cdot z}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\


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

    1. Initial program 84.3%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*l/84.3%

        \[\leadsto \color{blue}{\frac{x}{y \cdot z - t \cdot z} \cdot 2} \]
      2. *-commutative84.3%

        \[\leadsto \color{blue}{2 \cdot \frac{x}{y \cdot z - t \cdot z}} \]
      3. distribute-rgt-out--87.6%

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{x}{z}}{y - t}} \]
    4. Step-by-step derivation
      1. associate-/r*87.6%

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

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

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

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

      \[\leadsto \color{blue}{-2 \cdot \frac{x}{t \cdot z}} \]
    7. Step-by-step derivation
      1. associate-*r/72.0%

        \[\leadsto \color{blue}{\frac{-2 \cdot x}{t \cdot z}} \]
      2. *-commutative72.0%

        \[\leadsto \frac{\color{blue}{x \cdot -2}}{t \cdot z} \]
      3. associate-/l/76.9%

        \[\leadsto \color{blue}{\frac{\frac{x \cdot -2}{z}}{t}} \]
    8. Simplified76.9%

      \[\leadsto \color{blue}{\frac{\frac{x \cdot -2}{z}}{t}} \]

    if -1.35000000000000002e-11 < t < 6.5000000000000002e-108

    1. Initial program 96.1%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. distribute-rgt-out--96.1%

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

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

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

    if 6.5000000000000002e-108 < t

    1. Initial program 92.1%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/91.9%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--93.1%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg94.7%

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(-t\right) + y}}}{z} \]
      6. neg-sub094.7%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-94.7%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg94.7%

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

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

        \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
      11. metadata-eval94.7%

        \[\leadsto x \cdot \frac{\frac{\color{blue}{-2}}{t - y}}{z} \]
    3. Simplified94.7%

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]
    4. Taylor expanded in t around inf 82.8%

      \[\leadsto x \cdot \frac{\color{blue}{\frac{-2}{t}}}{z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification80.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{-11}:\\ \;\;\;\;\frac{\frac{x \cdot -2}{z}}{t}\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-108}:\\ \;\;\;\;\frac{2 \cdot x}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \end{array} \]

Alternative 11: 52.8% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{-30}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -4e-30) (* -2.0 (/ (/ x t) z)) (* -2.0 (/ x (* z t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -4e-30) {
		tmp = -2.0 * ((x / t) / z);
	} else {
		tmp = -2.0 * (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 (z <= (-4d-30)) then
        tmp = (-2.0d0) * ((x / t) / z)
    else
        tmp = (-2.0d0) * (x / (z * t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -4e-30) {
		tmp = -2.0 * ((x / t) / z);
	} else {
		tmp = -2.0 * (x / (z * t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -4e-30:
		tmp = -2.0 * ((x / t) / z)
	else:
		tmp = -2.0 * (x / (z * t))
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -4e-30)
		tmp = Float64(-2.0 * Float64(Float64(x / t) / z));
	else
		tmp = Float64(-2.0 * Float64(x / Float64(z * t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -4e-30)
		tmp = -2.0 * ((x / t) / z);
	else
		tmp = -2.0 * (x / (z * t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -4e-30], N[(-2.0 * N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-30}:\\
\;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\

\mathbf{else}:\\
\;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4e-30

    1. Initial program 84.5%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*l/84.5%

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

        \[\leadsto \color{blue}{2 \cdot \frac{x}{y \cdot z - t \cdot z}} \]
      3. distribute-rgt-out--87.4%

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

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{x}{z}}{y - t}} \]
    3. Simplified97.2%

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{x}{z}}{y - t}} \]
    4. Step-by-step derivation
      1. associate-/r*87.4%

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{-1 \cdot \frac{t \cdot z}{x}}} \]
    7. Step-by-step derivation
      1. mul-1-neg59.2%

        \[\leadsto \frac{2}{\color{blue}{-\frac{t \cdot z}{x}}} \]
      2. *-commutative59.2%

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

        \[\leadsto \frac{2}{-\color{blue}{\frac{z}{\frac{x}{t}}}} \]
      4. distribute-neg-frac69.5%

        \[\leadsto \frac{2}{\color{blue}{\frac{-z}{\frac{x}{t}}}} \]
    8. Simplified69.5%

      \[\leadsto \frac{2}{\color{blue}{\frac{-z}{\frac{x}{t}}}} \]
    9. Step-by-step derivation
      1. frac-2neg69.5%

        \[\leadsto \color{blue}{\frac{-2}{-\frac{-z}{\frac{x}{t}}}} \]
      2. metadata-eval69.5%

        \[\leadsto \frac{\color{blue}{-2}}{-\frac{-z}{\frac{x}{t}}} \]
      3. div-inv69.5%

        \[\leadsto \color{blue}{-2 \cdot \frac{1}{-\frac{-z}{\frac{x}{t}}}} \]
      4. distribute-neg-frac69.5%

        \[\leadsto -2 \cdot \frac{1}{\color{blue}{\frac{-\left(-z\right)}{\frac{x}{t}}}} \]
      5. add-sqr-sqrt69.4%

        \[\leadsto -2 \cdot \frac{1}{\frac{-\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}{\frac{x}{t}}} \]
      6. sqrt-unprod60.2%

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

        \[\leadsto -2 \cdot \frac{1}{\frac{-\sqrt{\color{blue}{z \cdot z}}}{\frac{x}{t}}} \]
      8. sqrt-unprod0.0%

        \[\leadsto -2 \cdot \frac{1}{\frac{-\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{\frac{x}{t}}} \]
      9. add-sqr-sqrt35.7%

        \[\leadsto -2 \cdot \frac{1}{\frac{-\color{blue}{z}}{\frac{x}{t}}} \]
      10. clear-num35.2%

        \[\leadsto -2 \cdot \color{blue}{\frac{\frac{x}{t}}{-z}} \]
      11. add-sqr-sqrt35.2%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      12. sqrt-unprod39.3%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      13. sqr-neg39.3%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\sqrt{\color{blue}{z \cdot z}}} \]
      14. sqrt-unprod0.0%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      15. add-sqr-sqrt69.6%

        \[\leadsto -2 \cdot \frac{\frac{x}{t}}{\color{blue}{z}} \]
    10. Applied egg-rr69.6%

      \[\leadsto \color{blue}{-2 \cdot \frac{\frac{x}{t}}{z}} \]

    if -4e-30 < z

    1. Initial program 94.5%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. associate-*r/94.4%

        \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
      2. distribute-rgt-out--95.0%

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

        \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
      4. sub-neg95.5%

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

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(-t\right) + y}}}{z} \]
      6. neg-sub095.5%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
      7. associate-+l-95.5%

        \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
      8. sub0-neg95.5%

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]
    4. Taylor expanded in t around inf 57.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{-30}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \end{array} \]

Alternative 12: 91.7% accurate, 1.2× speedup?

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

\\
2 \cdot \frac{\frac{x}{z}}{y - t}
\end{array}
Derivation
  1. Initial program 91.7%

    \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
  2. Step-by-step derivation
    1. associate-*l/91.7%

      \[\leadsto \color{blue}{\frac{x}{y \cdot z - t \cdot z} \cdot 2} \]
    2. *-commutative91.7%

      \[\leadsto \color{blue}{2 \cdot \frac{x}{y \cdot z - t \cdot z}} \]
    3. distribute-rgt-out--92.9%

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

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

    \[\leadsto \color{blue}{2 \cdot \frac{\frac{x}{z}}{y - t}} \]
  4. Final simplification91.1%

    \[\leadsto 2 \cdot \frac{\frac{x}{z}}{y - t} \]

Alternative 13: 51.9% accurate, 1.6× speedup?

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

\\
-2 \cdot \frac{x}{z \cdot t}
\end{array}
Derivation
  1. Initial program 91.7%

    \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
  2. Step-by-step derivation
    1. associate-*r/91.6%

      \[\leadsto \color{blue}{x \cdot \frac{2}{y \cdot z - t \cdot z}} \]
    2. distribute-rgt-out--92.8%

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

      \[\leadsto x \cdot \color{blue}{\frac{\frac{2}{y - t}}{z}} \]
    4. sub-neg93.7%

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

      \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(-t\right) + y}}}{z} \]
    6. neg-sub093.7%

      \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{\left(0 - t\right)} + y}}{z} \]
    7. associate-+l-93.7%

      \[\leadsto x \cdot \frac{\frac{2}{\color{blue}{0 - \left(t - y\right)}}}{z} \]
    8. sub0-neg93.7%

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

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

      \[\leadsto x \cdot \frac{\color{blue}{\frac{\frac{2}{-1}}{t - y}}}{z} \]
    11. metadata-eval93.7%

      \[\leadsto x \cdot \frac{\frac{\color{blue}{-2}}{t - y}}{z} \]
  3. Simplified93.7%

    \[\leadsto \color{blue}{x \cdot \frac{\frac{-2}{t - y}}{z}} \]
  4. Taylor expanded in t around inf 57.6%

    \[\leadsto \color{blue}{-2 \cdot \frac{x}{t \cdot z}} \]
  5. Final simplification57.6%

    \[\leadsto -2 \cdot \frac{x}{z \cdot t} \]

Developer target: 97.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\left(y - t\right) \cdot z} \cdot 2\\ t_2 := \frac{x \cdot 2}{y \cdot z - t \cdot z}\\ \mathbf{if}\;t_2 < -2.559141628295061 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 < 1.045027827330126 \cdot 10^{-269}:\\ \;\;\;\;\frac{\frac{x}{z} \cdot 2}{y - t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ x (* (- y t) z)) 2.0))
        (t_2 (/ (* x 2.0) (- (* y z) (* t z)))))
   (if (< t_2 -2.559141628295061e-13)
     t_1
     (if (< t_2 1.045027827330126e-269) (/ (* (/ x z) 2.0) (- y t)) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = (x / ((y - t) * z)) * 2.0;
	double t_2 = (x * 2.0) / ((y * z) - (t * z));
	double tmp;
	if (t_2 < -2.559141628295061e-13) {
		tmp = t_1;
	} else if (t_2 < 1.045027827330126e-269) {
		tmp = ((x / z) * 2.0) / (y - t);
	} else {
		tmp = t_1;
	}
	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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x / ((y - t) * z)) * 2.0d0
    t_2 = (x * 2.0d0) / ((y * z) - (t * z))
    if (t_2 < (-2.559141628295061d-13)) then
        tmp = t_1
    else if (t_2 < 1.045027827330126d-269) then
        tmp = ((x / z) * 2.0d0) / (y - t)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (x / ((y - t) * z)) * 2.0;
	double t_2 = (x * 2.0) / ((y * z) - (t * z));
	double tmp;
	if (t_2 < -2.559141628295061e-13) {
		tmp = t_1;
	} else if (t_2 < 1.045027827330126e-269) {
		tmp = ((x / z) * 2.0) / (y - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x / ((y - t) * z)) * 2.0
	t_2 = (x * 2.0) / ((y * z) - (t * z))
	tmp = 0
	if t_2 < -2.559141628295061e-13:
		tmp = t_1
	elif t_2 < 1.045027827330126e-269:
		tmp = ((x / z) * 2.0) / (y - t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x / Float64(Float64(y - t) * z)) * 2.0)
	t_2 = Float64(Float64(x * 2.0) / Float64(Float64(y * z) - Float64(t * z)))
	tmp = 0.0
	if (t_2 < -2.559141628295061e-13)
		tmp = t_1;
	elseif (t_2 < 1.045027827330126e-269)
		tmp = Float64(Float64(Float64(x / z) * 2.0) / Float64(y - t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x / ((y - t) * z)) * 2.0;
	t_2 = (x * 2.0) / ((y * z) - (t * z));
	tmp = 0.0;
	if (t_2 < -2.559141628295061e-13)
		tmp = t_1;
	elseif (t_2 < 1.045027827330126e-269)
		tmp = ((x / z) * 2.0) / (y - t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / N[(N[(y - t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 2.0), $MachinePrecision] / N[(N[(y * z), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -2.559141628295061e-13], t$95$1, If[Less[t$95$2, 1.045027827330126e-269], N[(N[(N[(x / z), $MachinePrecision] * 2.0), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{\left(y - t\right) \cdot z} \cdot 2\\
t_2 := \frac{x \cdot 2}{y \cdot z - t \cdot z}\\
\mathbf{if}\;t_2 < -2.559141628295061 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 < 1.045027827330126 \cdot 10^{-269}:\\
\;\;\;\;\frac{\frac{x}{z} \cdot 2}{y - t}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023192 
(FPCore (x y z t)
  :name "Linear.Projection:infinitePerspective from linear-1.19.1.3, A"
  :precision binary64

  :herbie-target
  (if (< (/ (* x 2.0) (- (* y z) (* t z))) -2.559141628295061e-13) (* (/ x (* (- y t) z)) 2.0) (if (< (/ (* x 2.0) (- (* y z) (* t z))) 1.045027827330126e-269) (/ (* (/ x z) 2.0) (- y t)) (* (/ x (* (- y t) z)) 2.0)))

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