Linear.Projection:infinitePerspective from linear-1.19.1.3, A

Percentage Accurate: 89.7% → 94.6%
Time: 11.4s
Alternatives: 14
Speedup: 1.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 89.7% 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: 94.6% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 89.6%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative89.6%

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

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

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

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

    if 0.0 < (/.f64 (*.f64 x 2) (-.f64 (*.f64 y z) (*.f64 t z)))

    1. Initial program 93.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot 2}{y \cdot z - z \cdot t} \leq 0:\\ \;\;\;\;\frac{2}{z} \cdot \frac{x}{y - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot 2}{z \cdot \left(y - t\right)}\\ \end{array} \]

Alternative 2: 95.6% accurate, 0.6× speedup?

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

    1. Initial program 87.7%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative87.7%

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

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

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

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

    if -5.0000000000000002e-169 < (*.f64 x 2) < 2.00000000000000011e-32

    1. Initial program 97.4%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative97.4%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 95.5% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 90.5%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative90.5%

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

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

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

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

    if -5.0000000000000002e-169 < (*.f64 x 2) < 1.00000000000000005e-4

    1. Initial program 96.5%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative96.5%

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

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

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

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

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

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

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

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

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

    if 1.00000000000000005e-4 < (*.f64 x 2)

    1. Initial program 83.2%

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

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

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

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

      \[\leadsto \color{blue}{\frac{2}{z} \cdot \frac{x}{y - t}} \]
    4. Step-by-step derivation
      1. clear-num97.9%

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

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

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

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

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

Alternative 4: 71.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{+47} \lor \neg \left(t \leq -1.22 \cdot 10^{-34}\right) \land \left(t \leq -9 \cdot 10^{-100} \lor \neg \left(t \leq 2.3 \cdot 10^{+54}\right)\right):\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{z} \cdot \frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= t -2.3e+47)
         (and (not (<= t -1.22e-34)) (or (<= t -9e-100) (not (<= t 2.3e+54)))))
   (* -2.0 (/ (/ x t) z))
   (* (/ 2.0 z) (/ x y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -2.3e+47) || (!(t <= -1.22e-34) && ((t <= -9e-100) || !(t <= 2.3e+54)))) {
		tmp = -2.0 * ((x / t) / z);
	} else {
		tmp = (2.0 / z) * (x / y);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((t <= (-2.3d+47)) .or. (.not. (t <= (-1.22d-34))) .and. (t <= (-9d-100)) .or. (.not. (t <= 2.3d+54))) then
        tmp = (-2.0d0) * ((x / t) / z)
    else
        tmp = (2.0d0 / z) * (x / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -2.3e+47) || (!(t <= -1.22e-34) && ((t <= -9e-100) || !(t <= 2.3e+54)))) {
		tmp = -2.0 * ((x / t) / z);
	} else {
		tmp = (2.0 / z) * (x / y);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (t <= -2.3e+47) or (not (t <= -1.22e-34) and ((t <= -9e-100) or not (t <= 2.3e+54))):
		tmp = -2.0 * ((x / t) / z)
	else:
		tmp = (2.0 / z) * (x / y)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -2.3e+47) || (!(t <= -1.22e-34) && ((t <= -9e-100) || !(t <= 2.3e+54))))
		tmp = Float64(-2.0 * Float64(Float64(x / t) / z));
	else
		tmp = Float64(Float64(2.0 / z) * Float64(x / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((t <= -2.3e+47) || (~((t <= -1.22e-34)) && ((t <= -9e-100) || ~((t <= 2.3e+54)))))
		tmp = -2.0 * ((x / t) / z);
	else
		tmp = (2.0 / z) * (x / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.3e+47], And[N[Not[LessEqual[t, -1.22e-34]], $MachinePrecision], Or[LessEqual[t, -9e-100], N[Not[LessEqual[t, 2.3e+54]], $MachinePrecision]]]], N[(-2.0 * N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / z), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+47} \lor \neg \left(t \leq -1.22 \cdot 10^{-34}\right) \land \left(t \leq -9 \cdot 10^{-100} \lor \neg \left(t \leq 2.3 \cdot 10^{+54}\right)\right):\\
\;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.2999999999999999e47 or -1.22e-34 < t < -9.0000000000000002e-100 or 2.29999999999999994e54 < t

    1. Initial program 86.5%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative86.5%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{x}{z \cdot \left(y - t\right)}} \]
    5. Step-by-step derivation
      1. *-commutative90.6%

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

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

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

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

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

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

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

    if -2.2999999999999999e47 < t < -1.22e-34 or -9.0000000000000002e-100 < t < 2.29999999999999994e54

    1. Initial program 94.7%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative94.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{+47} \lor \neg \left(t \leq -1.22 \cdot 10^{-34}\right) \land \left(t \leq -9 \cdot 10^{-100} \lor \neg \left(t \leq 2.3 \cdot 10^{+54}\right)\right):\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{z} \cdot \frac{x}{y}\\ \end{array} \]

Alternative 5: 71.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+47}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{elif}\;t \leq -3.05 \cdot 10^{-34} \lor \neg \left(t \leq -2.3 \cdot 10^{-100}\right) \land t \leq 1.08 \cdot 10^{+55}:\\ \;\;\;\;\frac{2}{z} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{-2}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t -1.35e+47)
   (* -2.0 (/ (/ x t) z))
   (if (or (<= t -3.05e-34) (and (not (<= t -2.3e-100)) (<= t 1.08e+55)))
     (* (/ 2.0 z) (/ x y))
     (* (/ x t) (/ -2.0 z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -1.35e+47) {
		tmp = -2.0 * ((x / t) / z);
	} else if ((t <= -3.05e-34) || (!(t <= -2.3e-100) && (t <= 1.08e+55))) {
		tmp = (2.0 / z) * (x / y);
	} else {
		tmp = (x / t) * (-2.0 / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-1.35d+47)) then
        tmp = (-2.0d0) * ((x / t) / z)
    else if ((t <= (-3.05d-34)) .or. (.not. (t <= (-2.3d-100))) .and. (t <= 1.08d+55)) then
        tmp = (2.0d0 / z) * (x / y)
    else
        tmp = (x / t) * ((-2.0d0) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -1.35e+47) {
		tmp = -2.0 * ((x / t) / z);
	} else if ((t <= -3.05e-34) || (!(t <= -2.3e-100) && (t <= 1.08e+55))) {
		tmp = (2.0 / z) * (x / y);
	} else {
		tmp = (x / t) * (-2.0 / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= -1.35e+47:
		tmp = -2.0 * ((x / t) / z)
	elif (t <= -3.05e-34) or (not (t <= -2.3e-100) and (t <= 1.08e+55)):
		tmp = (2.0 / z) * (x / y)
	else:
		tmp = (x / t) * (-2.0 / z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -1.35e+47)
		tmp = Float64(-2.0 * Float64(Float64(x / t) / z));
	elseif ((t <= -3.05e-34) || (!(t <= -2.3e-100) && (t <= 1.08e+55)))
		tmp = Float64(Float64(2.0 / z) * Float64(x / y));
	else
		tmp = Float64(Float64(x / t) * Float64(-2.0 / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= -1.35e+47)
		tmp = -2.0 * ((x / t) / z);
	elseif ((t <= -3.05e-34) || (~((t <= -2.3e-100)) && (t <= 1.08e+55)))
		tmp = (2.0 / z) * (x / y);
	else
		tmp = (x / t) * (-2.0 / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.35e+47], N[(-2.0 * N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -3.05e-34], And[N[Not[LessEqual[t, -2.3e-100]], $MachinePrecision], LessEqual[t, 1.08e+55]]], N[(N[(2.0 / z), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * N[(-2.0 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3.05 \cdot 10^{-34} \lor \neg \left(t \leq -2.3 \cdot 10^{-100}\right) \land t \leq 1.08 \cdot 10^{+55}:\\
\;\;\;\;\frac{2}{z} \cdot \frac{x}{y}\\

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


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

    1. Initial program 88.6%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative88.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.34999999999999998e47 < t < -3.0499999999999999e-34 or -2.29999999999999994e-100 < t < 1.08000000000000004e55

    1. Initial program 94.7%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative94.7%

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

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

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

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

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

    if -3.0499999999999999e-34 < t < -2.29999999999999994e-100 or 1.08000000000000004e55 < t

    1. Initial program 83.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative83.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-2 \cdot \frac{\frac{x}{t}}{z}} \]
    10. Step-by-step derivation
      1. *-commutative88.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot \frac{-2}{t}}{z}} \]
    11. Applied egg-rr88.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+47}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{elif}\;t \leq -3.05 \cdot 10^{-34} \lor \neg \left(t \leq -2.3 \cdot 10^{-100}\right) \land t \leq 1.08 \cdot 10^{+55}:\\ \;\;\;\;\frac{2}{z} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{-2}{z}\\ \end{array} \]

Alternative 6: 71.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -1.3 \cdot 10^{-29}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.08 \cdot 10^{+55}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.5000000000000001e47

    1. Initial program 88.6%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative88.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5000000000000001e47 < t < -1.3000000000000001e-29 or -4.5000000000000001e-100 < t < 1.08000000000000004e55

    1. Initial program 94.7%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative94.7%

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

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

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

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

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

    if -1.3000000000000001e-29 < t < -4.5000000000000001e-100

    1. Initial program 99.6%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative99.6%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{x}{z \cdot \left(y - t\right)}} \]
    5. Step-by-step derivation
      1. *-commutative99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.08000000000000004e55 < t

    1. Initial program 79.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative79.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+47}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{-29}:\\ \;\;\;\;\frac{2}{z} \cdot \frac{x}{y}\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-100}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{-2}{z}\\ \mathbf{elif}\;t \leq 1.08 \cdot 10^{+55}:\\ \;\;\;\;\frac{2}{z} \cdot \frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-2}{t}\\ \end{array} \]

Alternative 7: 72.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -1.25 \cdot 10^{-35}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{+53}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.50000000000000011e47

    1. Initial program 88.6%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative88.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.50000000000000011e47 < t < -1.24999999999999991e-35 or -8.50000000000000017e-100 < t < 8.5000000000000002e53

    1. Initial program 94.7%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Taylor expanded in y around inf 80.4%

      \[\leadsto \frac{x \cdot 2}{\color{blue}{y \cdot z}} \]
    3. Step-by-step derivation
      1. *-commutative80.4%

        \[\leadsto \frac{x \cdot 2}{\color{blue}{z \cdot y}} \]
    4. Simplified80.4%

      \[\leadsto \frac{x \cdot 2}{\color{blue}{z \cdot y}} \]
    5. Step-by-step derivation
      1. times-frac78.8%

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

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

    if -1.24999999999999991e-35 < t < -8.50000000000000017e-100

    1. Initial program 99.6%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative99.6%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{x}{z \cdot \left(y - t\right)}} \]
    5. Step-by-step derivation
      1. *-commutative99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.5000000000000002e53 < t

    1. Initial program 79.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative79.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+47}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{-35}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y}\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-100}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{-2}{z}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+53}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{-2}{t}\\ \end{array} \]

Alternative 8: 72.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{z} \cdot \frac{2}{y}\\ \mathbf{if}\;t \leq -4.2 \cdot 10^{+48}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{elif}\;t \leq -4.9 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-100}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{-2}{z}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{-2}{t \cdot \frac{z}{x}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ x z) (/ 2.0 y))))
   (if (<= t -4.2e+48)
     (* -2.0 (/ (/ x t) z))
     (if (<= t -4.9e-26)
       t_1
       (if (<= t -9e-100)
         (* (/ x t) (/ -2.0 z))
         (if (<= t 1.12e+54) t_1 (/ -2.0 (* t (/ z x)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (x / z) * (2.0 / y);
	double tmp;
	if (t <= -4.2e+48) {
		tmp = -2.0 * ((x / t) / z);
	} else if (t <= -4.9e-26) {
		tmp = t_1;
	} else if (t <= -9e-100) {
		tmp = (x / t) * (-2.0 / z);
	} else if (t <= 1.12e+54) {
		tmp = t_1;
	} else {
		tmp = -2.0 / (t * (z / x));
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x / z) * (2.0d0 / y)
    if (t <= (-4.2d+48)) then
        tmp = (-2.0d0) * ((x / t) / z)
    else if (t <= (-4.9d-26)) then
        tmp = t_1
    else if (t <= (-9d-100)) then
        tmp = (x / t) * ((-2.0d0) / z)
    else if (t <= 1.12d+54) then
        tmp = t_1
    else
        tmp = (-2.0d0) / (t * (z / x))
    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 (t <= -4.2e+48) {
		tmp = -2.0 * ((x / t) / z);
	} else if (t <= -4.9e-26) {
		tmp = t_1;
	} else if (t <= -9e-100) {
		tmp = (x / t) * (-2.0 / z);
	} else if (t <= 1.12e+54) {
		tmp = t_1;
	} else {
		tmp = -2.0 / (t * (z / x));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (x / z) * (2.0 / y)
	tmp = 0
	if t <= -4.2e+48:
		tmp = -2.0 * ((x / t) / z)
	elif t <= -4.9e-26:
		tmp = t_1
	elif t <= -9e-100:
		tmp = (x / t) * (-2.0 / z)
	elif t <= 1.12e+54:
		tmp = t_1
	else:
		tmp = -2.0 / (t * (z / x))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(x / z) * Float64(2.0 / y))
	tmp = 0.0
	if (t <= -4.2e+48)
		tmp = Float64(-2.0 * Float64(Float64(x / t) / z));
	elseif (t <= -4.9e-26)
		tmp = t_1;
	elseif (t <= -9e-100)
		tmp = Float64(Float64(x / t) * Float64(-2.0 / z));
	elseif (t <= 1.12e+54)
		tmp = t_1;
	else
		tmp = Float64(-2.0 / Float64(t * Float64(z / x)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (x / z) * (2.0 / y);
	tmp = 0.0;
	if (t <= -4.2e+48)
		tmp = -2.0 * ((x / t) / z);
	elseif (t <= -4.9e-26)
		tmp = t_1;
	elseif (t <= -9e-100)
		tmp = (x / t) * (-2.0 / z);
	elseif (t <= 1.12e+54)
		tmp = t_1;
	else
		tmp = -2.0 / (t * (z / x));
	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[t, -4.2e+48], N[(-2.0 * N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.9e-26], t$95$1, If[LessEqual[t, -9e-100], N[(N[(x / t), $MachinePrecision] * N[(-2.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.12e+54], t$95$1, N[(-2.0 / N[(t * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4.9 \cdot 10^{-26}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.12 \cdot 10^{+54}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.1999999999999997e48

    1. Initial program 88.6%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative88.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999997e48 < t < -4.8999999999999999e-26 or -9.0000000000000002e-100 < t < 1.12e54

    1. Initial program 94.7%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Taylor expanded in y around inf 80.4%

      \[\leadsto \frac{x \cdot 2}{\color{blue}{y \cdot z}} \]
    3. Step-by-step derivation
      1. *-commutative80.4%

        \[\leadsto \frac{x \cdot 2}{\color{blue}{z \cdot y}} \]
    4. Simplified80.4%

      \[\leadsto \frac{x \cdot 2}{\color{blue}{z \cdot y}} \]
    5. Step-by-step derivation
      1. times-frac78.8%

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

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

    if -4.8999999999999999e-26 < t < -9.0000000000000002e-100

    1. Initial program 99.6%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative99.6%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{x}{z \cdot \left(y - t\right)}} \]
    5. Step-by-step derivation
      1. *-commutative99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.12e54 < t

    1. Initial program 79.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative79.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{-2}{t}} \]
    9. Step-by-step derivation
      1. *-commutative85.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+48}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{elif}\;t \leq -4.9 \cdot 10^{-26}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-100}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{-2}{z}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+54}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{-2}{t \cdot \frac{z}{x}}\\ \end{array} \]

Alternative 9: 72.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -1.02 \cdot 10^{-35}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 9 \cdot 10^{+53}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.2000000000000001e48

    1. Initial program 88.6%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative88.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2000000000000001e48 < t < -1.01999999999999995e-35 or -2.4000000000000003e-100 < t < 9.0000000000000004e53

    1. Initial program 94.7%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Taylor expanded in y around inf 80.4%

      \[\leadsto \frac{x \cdot 2}{\color{blue}{y \cdot z}} \]
    3. Step-by-step derivation
      1. *-commutative80.4%

        \[\leadsto \frac{x \cdot 2}{\color{blue}{z \cdot y}} \]
    4. Simplified80.4%

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

    if -1.01999999999999995e-35 < t < -2.4000000000000003e-100

    1. Initial program 99.6%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative99.6%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{x}{z \cdot \left(y - t\right)}} \]
    5. Step-by-step derivation
      1. *-commutative99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.0000000000000004e53 < t

    1. Initial program 79.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative79.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{-2}{t}} \]
    9. Step-by-step derivation
      1. *-commutative85.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{+48}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{elif}\;t \leq -1.02 \cdot 10^{-35}:\\ \;\;\;\;\frac{x \cdot 2}{y \cdot z}\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-100}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{-2}{z}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+53}:\\ \;\;\;\;\frac{x \cdot 2}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{-2}{t \cdot \frac{z}{x}}\\ \end{array} \]

Alternative 10: 71.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -5.9 \cdot 10^{-25}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 8 \cdot 10^{+53}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.3599999999999999e47

    1. Initial program 88.6%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative88.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-2 \cdot \frac{\frac{x}{t}}{z}} \]
    10. Step-by-step derivation
      1. *-commutative85.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot \frac{-2}{t}}{z}} \]
    11. Applied egg-rr85.3%

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

    if -1.3599999999999999e47 < t < -5.8999999999999998e-25 or -9.0000000000000002e-100 < t < 7.9999999999999999e53

    1. Initial program 94.7%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Taylor expanded in y around inf 80.4%

      \[\leadsto \frac{x \cdot 2}{\color{blue}{y \cdot z}} \]
    3. Step-by-step derivation
      1. *-commutative80.4%

        \[\leadsto \frac{x \cdot 2}{\color{blue}{z \cdot y}} \]
    4. Simplified80.4%

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

    if -5.8999999999999998e-25 < t < -9.0000000000000002e-100

    1. Initial program 99.6%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative99.6%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{x}{z \cdot \left(y - t\right)}} \]
    5. Step-by-step derivation
      1. *-commutative99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.9999999999999999e53 < t

    1. Initial program 79.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative79.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{-2}{t}} \]
    9. Step-by-step derivation
      1. *-commutative85.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.36 \cdot 10^{+47}:\\ \;\;\;\;\frac{x \cdot \frac{-2}{t}}{z}\\ \mathbf{elif}\;t \leq -5.9 \cdot 10^{-25}:\\ \;\;\;\;\frac{x \cdot 2}{y \cdot z}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-100}:\\ \;\;\;\;\frac{x}{t} \cdot \frac{-2}{z}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+53}:\\ \;\;\;\;\frac{x \cdot 2}{y \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{-2}{t \cdot \frac{z}{x}}\\ \end{array} \]

Alternative 11: 96.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+42} \lor \neg \left(z \leq 7 \cdot 10^{+93}\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 -6e+42) (not (<= z 7e+93)))
   (* 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 <= -6e+42) || !(z <= 7e+93)) {
		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 <= (-6d+42)) .or. (.not. (z <= 7d+93))) 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 <= -6e+42) || !(z <= 7e+93)) {
		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 <= -6e+42) or not (z <= 7e+93):
		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 <= -6e+42) || !(z <= 7e+93))
		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 <= -6e+42) || ~((z <= 7e+93)))
		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, -6e+42], N[Not[LessEqual[z, 7e+93]], $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 -6 \cdot 10^{+42} \lor \neg \left(z \leq 7 \cdot 10^{+93}\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 < -6.00000000000000058e42 or 6.99999999999999996e93 < z

    1. Initial program 79.7%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative79.7%

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

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

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

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

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

    if -6.00000000000000058e42 < z < 6.99999999999999996e93

    1. Initial program 97.9%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative97.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+42} \lor \neg \left(z \leq 7 \cdot 10^{+93}\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: 55.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+213} \lor \neg \left(y \leq 1.36 \cdot 10^{+143}\right):\\
\;\;\;\;-2 \cdot \frac{\frac{x}{z}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.29999999999999999e213 or 1.3599999999999999e143 < y

    1. Initial program 90.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative90.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-x \cdot 2}{-z \cdot y}} \]
      4. distribute-lft-neg-in95.7%

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

        \[\leadsto \frac{\color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \cdot 2}{-z \cdot y} \]
      6. sqrt-unprod75.9%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}} \cdot 2}{-z \cdot y} \]
      7. sqr-neg75.9%

        \[\leadsto \frac{\sqrt{\color{blue}{x \cdot x}} \cdot 2}{-z \cdot y} \]
      8. sqrt-unprod24.1%

        \[\leadsto \frac{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot 2}{-z \cdot y} \]
      9. add-sqr-sqrt60.8%

        \[\leadsto \frac{\color{blue}{x} \cdot 2}{-z \cdot y} \]
      10. distribute-rgt-neg-in60.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{2 \cdot \frac{x}{z}}}{-y} \]
      4. neg-mul-160.7%

        \[\leadsto \frac{2 \cdot \frac{x}{z}}{\color{blue}{-1 \cdot y}} \]
      5. times-frac60.7%

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

        \[\leadsto \color{blue}{-2} \cdot \frac{\frac{x}{z}}{y} \]
    8. Simplified60.7%

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

    if -1.29999999999999999e213 < y < 1.3599999999999999e143

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 92.0% accurate, 1.2× speedup?

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

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

    \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
  2. Step-by-step derivation
    1. *-commutative90.8%

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

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

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

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

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

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

Alternative 14: 52.5% accurate, 1.6× speedup?

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

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

    \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
  2. Step-by-step derivation
    1. *-commutative90.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-2 \cdot \frac{\frac{x}{t}}{z}} \]
  10. Final simplification54.9%

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

Developer target: 97.0% accurate, 0.3× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023318 
(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))))