Linear.Projection:infinitePerspective from linear-1.19.1.3, A

Percentage Accurate: 89.8% → 96.3%
Time: 10.0s
Alternatives: 16
Speedup: 1.0×

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 16 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: 89.8% 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: 96.3% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x \cdot 2}{y \cdot z - z \cdot t}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-268} \lor \neg \left(t_1 \leq 10^{+135}\right):\\
\;\;\;\;\frac{x \cdot 2}{z \cdot \left(y - t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 x 2) (-.f64 (*.f64 y z) (*.f64 t z))) < -1.99999999999999992e-268 or 9.99999999999999962e134 < (/.f64 (*.f64 x 2) (-.f64 (*.f64 y z) (*.f64 t z)))

    1. Initial program 94.1%

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

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

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

    if -1.99999999999999992e-268 < (/.f64 (*.f64 x 2) (-.f64 (*.f64 y z) (*.f64 t z))) < 9.99999999999999962e134

    1. Initial program 87.2%

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

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

        \[\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*99.8%

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

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

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

Alternative 2: 72.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+76} \lor \neg \left(y \leq -0.00033 \lor \neg \left(y \leq -2.9 \cdot 10^{-52}\right) \land y \leq 8 \cdot 10^{-78}\right):\\ \;\;\;\;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 (or (<= y -1.7e+76)
         (not (or (<= y -0.00033) (and (not (<= y -2.9e-52)) (<= y 8e-78)))))
   (* x (/ 2.0 (* y z)))
   (* -2.0 (/ x (* z t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((y <= -1.7e+76) || !((y <= -0.00033) || (!(y <= -2.9e-52) && (y <= 8e-78)))) {
		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 ((y <= (-1.7d+76)) .or. (.not. (y <= (-0.00033d0)) .or. (.not. (y <= (-2.9d-52))) .and. (y <= 8d-78))) 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 ((y <= -1.7e+76) || !((y <= -0.00033) || (!(y <= -2.9e-52) && (y <= 8e-78)))) {
		tmp = x * (2.0 / (y * z));
	} else {
		tmp = -2.0 * (x / (z * t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (y <= -1.7e+76) or not ((y <= -0.00033) or (not (y <= -2.9e-52) and (y <= 8e-78))):
		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 ((y <= -1.7e+76) || !((y <= -0.00033) || (!(y <= -2.9e-52) && (y <= 8e-78))))
		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 ((y <= -1.7e+76) || ~(((y <= -0.00033) || (~((y <= -2.9e-52)) && (y <= 8e-78)))))
		tmp = x * (2.0 / (y * z));
	else
		tmp = -2.0 * (x / (z * t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.7e+76], N[Not[Or[LessEqual[y, -0.00033], And[N[Not[LessEqual[y, -2.9e-52]], $MachinePrecision], LessEqual[y, 8e-78]]]], $MachinePrecision]], 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}\;y \leq -1.7 \cdot 10^{+76} \lor \neg \left(y \leq -0.00033 \lor \neg \left(y \leq -2.9 \cdot 10^{-52}\right) \land y \leq 8 \cdot 10^{-78}\right):\\
\;\;\;\;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 2 regimes
  2. if y < -1.6999999999999999e76 or -3.3e-4 < y < -2.9000000000000002e-52 or 7.99999999999999999e-78 < y

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6999999999999999e76 < y < -3.3e-4 or -2.9000000000000002e-52 < y < 7.99999999999999999e-78

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+76} \lor \neg \left(y \leq -0.00033 \lor \neg \left(y \leq -2.9 \cdot 10^{-52}\right) \land y \leq 8 \cdot 10^{-78}\right):\\ \;\;\;\;x \cdot \frac{2}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \end{array} \]

Alternative 3: 72.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{2}{y \cdot z}\\ \mathbf{if}\;y \leq -1.55 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-9}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{-53} \lor \neg \left(y \leq 7.2 \cdot 10^{-78}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ 2.0 (* y z)))))
   (if (<= y -1.55e+76)
     t_1
     (if (<= y -4.2e-9)
       (* x (/ (/ -2.0 t) z))
       (if (or (<= y -3.8e-53) (not (<= y 7.2e-78)))
         t_1
         (* -2.0 (/ x (* z t))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (2.0 / (y * z));
	double tmp;
	if (y <= -1.55e+76) {
		tmp = t_1;
	} else if (y <= -4.2e-9) {
		tmp = x * ((-2.0 / t) / z);
	} else if ((y <= -3.8e-53) || !(y <= 7.2e-78)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x * (2.0d0 / (y * z))
    if (y <= (-1.55d+76)) then
        tmp = t_1
    else if (y <= (-4.2d-9)) then
        tmp = x * (((-2.0d0) / t) / z)
    else if ((y <= (-3.8d-53)) .or. (.not. (y <= 7.2d-78))) then
        tmp = t_1
    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 t_1 = x * (2.0 / (y * z));
	double tmp;
	if (y <= -1.55e+76) {
		tmp = t_1;
	} else if (y <= -4.2e-9) {
		tmp = x * ((-2.0 / t) / z);
	} else if ((y <= -3.8e-53) || !(y <= 7.2e-78)) {
		tmp = t_1;
	} else {
		tmp = -2.0 * (x / (z * t));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (2.0 / (y * z))
	tmp = 0
	if y <= -1.55e+76:
		tmp = t_1
	elif y <= -4.2e-9:
		tmp = x * ((-2.0 / t) / z)
	elif (y <= -3.8e-53) or not (y <= 7.2e-78):
		tmp = t_1
	else:
		tmp = -2.0 * (x / (z * t))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(2.0 / Float64(y * z)))
	tmp = 0.0
	if (y <= -1.55e+76)
		tmp = t_1;
	elseif (y <= -4.2e-9)
		tmp = Float64(x * Float64(Float64(-2.0 / t) / z));
	elseif ((y <= -3.8e-53) || !(y <= 7.2e-78))
		tmp = t_1;
	else
		tmp = Float64(-2.0 * Float64(x / Float64(z * t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (2.0 / (y * z));
	tmp = 0.0;
	if (y <= -1.55e+76)
		tmp = t_1;
	elseif (y <= -4.2e-9)
		tmp = x * ((-2.0 / t) / z);
	elseif ((y <= -3.8e-53) || ~((y <= 7.2e-78)))
		tmp = t_1;
	else
		tmp = -2.0 * (x / (z * t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(2.0 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.55e+76], t$95$1, If[LessEqual[y, -4.2e-9], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.8e-53], N[Not[LessEqual[y, 7.2e-78]], $MachinePrecision]], t$95$1, N[(-2.0 * N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -3.8 \cdot 10^{-53} \lor \neg \left(y \leq 7.2 \cdot 10^{-78}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.55000000000000006e76 or -4.20000000000000039e-9 < y < -3.7999999999999998e-53 or 7.2000000000000005e-78 < y

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55000000000000006e76 < y < -4.20000000000000039e-9

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7999999999999998e-53 < y < 7.2000000000000005e-78

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+76}:\\ \;\;\;\;x \cdot \frac{2}{y \cdot z}\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-9}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{-53} \lor \neg \left(y \leq 7.2 \cdot 10^{-78}\right):\\ \;\;\;\;x \cdot \frac{2}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \end{array} \]

Alternative 4: 72.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+76}:\\ \;\;\;\;x \cdot \frac{\frac{2}{y}}{z}\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{-10}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-52} \lor \neg \left(y \leq 6 \cdot 10^{-78}\right):\\ \;\;\;\;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 (<= y -1.35e+76)
   (* x (/ (/ 2.0 y) z))
   (if (<= y -7.8e-10)
     (* x (/ (/ -2.0 t) z))
     (if (or (<= y -1.8e-52) (not (<= y 6e-78)))
       (* x (/ 2.0 (* y z)))
       (* -2.0 (/ x (* z t)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= -1.35e+76) {
		tmp = x * ((2.0 / y) / z);
	} else if (y <= -7.8e-10) {
		tmp = x * ((-2.0 / t) / z);
	} else if ((y <= -1.8e-52) || !(y <= 6e-78)) {
		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 (y <= (-1.35d+76)) then
        tmp = x * ((2.0d0 / y) / z)
    else if (y <= (-7.8d-10)) then
        tmp = x * (((-2.0d0) / t) / z)
    else if ((y <= (-1.8d-52)) .or. (.not. (y <= 6d-78))) 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 (y <= -1.35e+76) {
		tmp = x * ((2.0 / y) / z);
	} else if (y <= -7.8e-10) {
		tmp = x * ((-2.0 / t) / z);
	} else if ((y <= -1.8e-52) || !(y <= 6e-78)) {
		tmp = x * (2.0 / (y * z));
	} else {
		tmp = -2.0 * (x / (z * t));
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= -1.35e+76:
		tmp = x * ((2.0 / y) / z)
	elif y <= -7.8e-10:
		tmp = x * ((-2.0 / t) / z)
	elif (y <= -1.8e-52) or not (y <= 6e-78):
		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 (y <= -1.35e+76)
		tmp = Float64(x * Float64(Float64(2.0 / y) / z));
	elseif (y <= -7.8e-10)
		tmp = Float64(x * Float64(Float64(-2.0 / t) / z));
	elseif ((y <= -1.8e-52) || !(y <= 6e-78))
		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 (y <= -1.35e+76)
		tmp = x * ((2.0 / y) / z);
	elseif (y <= -7.8e-10)
		tmp = x * ((-2.0 / t) / z);
	elseif ((y <= -1.8e-52) || ~((y <= 6e-78)))
		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[y, -1.35e+76], N[(x * N[(N[(2.0 / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.8e-10], N[(x * N[(N[(-2.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.8e-52], N[Not[LessEqual[y, 6e-78]], $MachinePrecision]], 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}\;y \leq -1.35 \cdot 10^{+76}:\\
\;\;\;\;x \cdot \frac{\frac{2}{y}}{z}\\

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

\mathbf{elif}\;y \leq -1.8 \cdot 10^{-52} \lor \neg \left(y \leq 6 \cdot 10^{-78}\right):\\
\;\;\;\;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 4 regimes
  2. if y < -1.34999999999999995e76

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.34999999999999995e76 < y < -7.7999999999999999e-10

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.7999999999999999e-10 < y < -1.79999999999999994e-52 or 5.99999999999999975e-78 < y

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.79999999999999994e-52 < y < 5.99999999999999975e-78

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+76}:\\ \;\;\;\;x \cdot \frac{\frac{2}{y}}{z}\\ \mathbf{elif}\;y \leq -7.8 \cdot 10^{-10}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \mathbf{elif}\;y \leq -1.8 \cdot 10^{-52} \lor \neg \left(y \leq 6 \cdot 10^{-78}\right):\\ \;\;\;\;x \cdot \frac{2}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \end{array} \]

Alternative 5: 73.9% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq -4.8 \cdot 10^{-54} \lor \neg \left(y \leq 1.65 \cdot 10^{-40}\right):\\
\;\;\;\;x \cdot \frac{2}{y \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.34999999999999995e76

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.34999999999999995e76 < y < -7.2e-10

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.2e-10 < y < -4.80000000000000026e-54 or 1.64999999999999996e-40 < y

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.80000000000000026e-54 < y < 1.64999999999999996e-40

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-2}{\color{blue}{\frac{z}{\frac{x}{t}}}} \]
    6. Applied egg-rr77.3%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot -2}}{z \cdot t} \]
      4. times-frac80.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+76}:\\ \;\;\;\;x \cdot \frac{\frac{2}{y}}{z}\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{-10}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-54} \lor \neg \left(y \leq 1.65 \cdot 10^{-40}\right):\\ \;\;\;\;x \cdot \frac{2}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-2}{t}\\ \end{array} \]

Alternative 6: 73.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -0.78:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.25e81 or -0.78000000000000003 < y < -8.50000000000000044e-53

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.25e81 < y < -0.78000000000000003

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.50000000000000044e-53 < y < 1.76e-40

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-2}{\color{blue}{\frac{z}{\frac{x}{t}}}} \]
    6. Applied egg-rr77.3%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot -2}}{z \cdot t} \]
      4. times-frac80.8%

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

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

    if 1.76e-40 < y

    1. Initial program 90.4%

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

        \[\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/93.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+81}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y}\\ \mathbf{elif}\;y \leq -0.78:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{-53}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y}\\ \mathbf{elif}\;y \leq 1.76 \cdot 10^{-40}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-2}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{2}{y \cdot z}\\ \end{array} \]

Alternative 7: 73.8% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq -2.8 \cdot 10^{-53}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.7500000000000001e77 or -1.9e-6 < y < -2.79999999999999985e-53

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{y}{\frac{x}{z}}}} \]
    8. Simplified84.8%

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

    if -1.7500000000000001e77 < y < -1.9e-6

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.79999999999999985e-53 < y < 1.7500000000000001e-40

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-2}{\color{blue}{\frac{z}{\frac{x}{t}}}} \]
    6. Applied egg-rr77.3%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot -2}}{z \cdot t} \]
      4. times-frac80.8%

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

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

    if 1.7500000000000001e-40 < y

    1. Initial program 90.4%

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

        \[\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/93.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+77}:\\ \;\;\;\;\frac{2}{\frac{y}{\frac{x}{z}}}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-6}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{-53}:\\ \;\;\;\;\frac{2}{\frac{y}{\frac{x}{z}}}\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{-40}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-2}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{2}{y \cdot z}\\ \end{array} \]

Alternative 8: 74.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -1.25:\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\

\mathbf{elif}\;y \leq -8.2 \cdot 10^{-53}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.5500000000000001e76 or -1.25 < y < -8.2000000000000001e-53

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{y}{\frac{x}{z}}}} \]
    8. Simplified84.8%

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

    if -2.5500000000000001e76 < y < -1.25

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.2000000000000001e-53 < y < 1.19999999999999996e-40

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-2}{\color{blue}{\frac{z}{\frac{x}{t}}}} \]
    6. Applied egg-rr77.3%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot -2}}{z \cdot t} \]
      4. times-frac80.8%

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

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

    if 1.19999999999999996e-40 < y

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.55 \cdot 10^{+76}:\\ \;\;\;\;\frac{2}{\frac{y}{\frac{x}{z}}}\\ \mathbf{elif}\;y \leq -1.25:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-53}:\\ \;\;\;\;\frac{2}{\frac{y}{\frac{x}{z}}}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-40}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-2}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{y \cdot z}{x}}\\ \end{array} \]

Alternative 9: 73.9% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq -3.8 \cdot 10^{-53}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.6999999999999999e76 or -8.00000000000000065e-5 < y < -3.7999999999999998e-53

    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{y}{\frac{x}{z}}}} \]
    8. Simplified84.8%

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

    if -2.6999999999999999e76 < y < -8.00000000000000065e-5

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7999999999999998e-53 < y < 1.22e-40

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.22e-40 < y

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+76}:\\ \;\;\;\;\frac{2}{\frac{y}{\frac{x}{z}}}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-5}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{-53}:\\ \;\;\;\;\frac{2}{\frac{y}{\frac{x}{z}}}\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{-40}:\\ \;\;\;\;\frac{\frac{x \cdot -2}{z}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{y \cdot z}{x}}\\ \end{array} \]

Alternative 10: 73.8% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq -2.2 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{x \cdot 2}{y}}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.34999999999999995e76

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{y}{\frac{x}{z}}}} \]
    8. Simplified87.3%

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

    if -1.34999999999999995e76 < y < -8.0000000000000005e-9

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000005e-9 < y < -2.20000000000000018e-53

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{x \cdot 2}{y}}{z}} \]
    6. Applied egg-rr74.4%

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

    if -2.20000000000000018e-53 < y < 1.8e-40

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e-40 < y

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+76}:\\ \;\;\;\;\frac{2}{\frac{y}{\frac{x}{z}}}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-9}:\\ \;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-53}:\\ \;\;\;\;\frac{\frac{x \cdot 2}{y}}{z}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-40}:\\ \;\;\;\;\frac{\frac{x \cdot -2}{z}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{y \cdot z}{x}}\\ \end{array} \]

Alternative 11: 96.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{-16} \lor \neg \left(z \leq 5.2 \cdot 10^{-45}\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 -1e-16) (not (<= z 5.2e-45)))
   (* 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 <= -1e-16) || !(z <= 5.2e-45)) {
		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 <= (-1d-16)) .or. (.not. (z <= 5.2d-45))) 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 <= -1e-16) || !(z <= 5.2e-45)) {
		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 <= -1e-16) or not (z <= 5.2e-45):
		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 <= -1e-16) || !(z <= 5.2e-45))
		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 <= -1e-16) || ~((z <= 5.2e-45)))
		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, -1e-16], N[Not[LessEqual[z, 5.2e-45]], $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 -1 \cdot 10^{-16} \lor \neg \left(z \leq 5.2 \cdot 10^{-45}\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 < -9.9999999999999998e-17 or 5.19999999999999973e-45 < z

    1. Initial program 84.6%

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

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

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

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

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

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

    if -9.9999999999999998e-17 < z < 5.19999999999999973e-45

    1. Initial program 97.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{-16} \lor \neg \left(z \leq 5.2 \cdot 10^{-45}\right):\\ \;\;\;\;2 \cdot \frac{\frac{x}{z}}{y - t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{2}{z \cdot \left(y - t\right)}\\ \end{array} \]

Alternative 12: 96.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.000165 \lor \neg \left(z \leq 4.1 \cdot 10^{-27}\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 -0.000165) (not (<= z 4.1e-27)))
   (* 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 <= -0.000165) || !(z <= 4.1e-27)) {
		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 <= (-0.000165d0)) .or. (.not. (z <= 4.1d-27))) 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 <= -0.000165) || !(z <= 4.1e-27)) {
		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 <= -0.000165) or not (z <= 4.1e-27):
		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 <= -0.000165) || !(z <= 4.1e-27))
		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 <= -0.000165) || ~((z <= 4.1e-27)))
		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, -0.000165], N[Not[LessEqual[z, 4.1e-27]], $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 -0.000165 \lor \neg \left(z \leq 4.1 \cdot 10^{-27}\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 < -1.65e-4 or 4.0999999999999999e-27 < z

    1. Initial program 83.7%

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

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

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

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

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

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

    if -1.65e-4 < z < 4.0999999999999999e-27

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 96.9% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 77.2%

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

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

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

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

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

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

    if -5.19999999999999954e-4 < z < 4.9999999999999999e-13

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999999e-13 < z

    1. Initial program 87.8%

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

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

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

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

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

Alternative 14: 96.6% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 69.3%

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

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

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

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

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

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

    if -3.49999999999999994e80 < z < 0.55000000000000004

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

    if 0.55000000000000004 < z

    1. Initial program 87.6%

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

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

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

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

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

Alternative 15: 92.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 6.000000000000001e225

    1. Initial program 90.1%

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

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

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

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

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

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

    if 6.000000000000001e225 < y

    1. Initial program 95.3%

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

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

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

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

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

Alternative 16: 53.3% 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 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer target: 97.2% 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 2023176 
(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))))