Linear.Projection:infinitePerspective from linear-1.19.1.3, A

Percentage Accurate: 89.5% → 95.7%
Time: 9.2s
Alternatives: 15
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 15 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.5% 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: 95.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-253}:\\
\;\;\;\;\frac{x \cdot 2}{t_1}\\

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


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

    1. Initial program 78.4%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\frac{x}{\left(y - t\right) \cdot z}} \]
      2. *-un-lft-identity78.4%

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

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

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

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

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

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

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

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

    if -3.9999999999999999e208 < (-.f64 (*.f64 y z) (*.f64 t z)) < -1.0000000000000001e-253

    1. Initial program 99.7%

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

    if -1.0000000000000001e-253 < (-.f64 (*.f64 y z) (*.f64 t z))

    1. Initial program 83.6%

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

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

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

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

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

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

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

Alternative 2: 96.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x 2) < -4.0000000000000001e86 or 5e-31 < (*.f64 x 2)

    1. Initial program 80.3%

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

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

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

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\frac{x}{\left(y - t\right) \cdot z}} \]
      2. *-un-lft-identity81.3%

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

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

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

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

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

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

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

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

    if -4.0000000000000001e86 < (*.f64 x 2) < 5e-31

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 73.5% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -5.8e-21

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

    if -5.8e-21 < t < -1.05e-72

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\frac{z}{x}}}}{y} \]
    8. Applied egg-rr86.1%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{\frac{z}{2}}}}{y} \]
      4. *-un-lft-identity86.1%

        \[\leadsto \frac{\frac{\color{blue}{x}}{\frac{z}{2}}}{y} \]
      5. un-div-inv86.1%

        \[\leadsto \frac{\color{blue}{x \cdot \frac{1}{\frac{z}{2}}}}{y} \]
      6. clear-num86.1%

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot y}} \]
      9. times-frac86.1%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{2}{y}} \]
    10. Applied egg-rr86.1%

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

    if -1.05e-72 < t < -2.14999999999999991e-79

    1. Initial program 75.0%

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

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

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

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

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

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

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

    if -2.14999999999999991e-79 < t < 6.50000000000000012e-36

    1. Initial program 85.7%

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

        \[\leadsto \color{blue}{\frac{x}{y \cdot z - t \cdot z} \cdot 2} \]
      2. *-commutative85.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*92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{\frac{z}{2}}}}{y} \]
      4. *-un-lft-identity80.8%

        \[\leadsto \frac{\frac{\color{blue}{x}}{\frac{z}{2}}}{y} \]
      5. un-div-inv80.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{2}{y}} \]
    10. Applied egg-rr80.7%

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

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

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

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

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

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

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

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

    if 6.50000000000000012e-36 < t

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.8 \cdot 10^{-21}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{z}}{t}\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-72}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y}\\ \mathbf{elif}\;t \leq -2.15 \cdot 10^{-79}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-36}:\\ \;\;\;\;\frac{2}{z \cdot \frac{y}{x}}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \end{array} \]

Alternative 4: 73.8% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.50000000000000015e-19

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

    if -3.50000000000000015e-19 < t < -3.19999999999999999e-72

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\frac{z}{x}}}}{y} \]
    8. Applied egg-rr86.1%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{\frac{z}{2}}}}{y} \]
      4. *-un-lft-identity86.1%

        \[\leadsto \frac{\frac{\color{blue}{x}}{\frac{z}{2}}}{y} \]
      5. un-div-inv86.1%

        \[\leadsto \frac{\color{blue}{x \cdot \frac{1}{\frac{z}{2}}}}{y} \]
      6. clear-num86.1%

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot y}} \]
      9. times-frac86.1%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{2}{y}} \]
    10. Applied egg-rr86.1%

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

    if -3.19999999999999999e-72 < t < -1.3500000000000001e-79

    1. Initial program 75.0%

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

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

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

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

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

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

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

    if -1.3500000000000001e-79 < t < 2.4e-33

    1. Initial program 85.7%

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

        \[\leadsto \color{blue}{\frac{x}{y \cdot z - t \cdot z} \cdot 2} \]
      2. *-commutative85.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*92.0%

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

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

        \[\leadsto 2 \cdot \color{blue}{\frac{x}{\left(y - t\right) \cdot z}} \]
      2. *-un-lft-identity85.7%

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

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

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

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

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

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

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

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

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

    if 2.4e-33 < t

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{-19}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{z}}{t}\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{-72}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y}\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-79}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-33}:\\ \;\;\;\;\frac{2 \cdot \frac{x}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \end{array} \]

Alternative 5: 73.8% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.4e-21

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-2\right)} \cdot x}{t \cdot z} \]
      3. distribute-lft-neg-in71.8%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{-x \cdot 2}{z}}{t}} \]
      7. distribute-rgt-neg-in79.3%

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

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

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

    if -3.4e-21 < t < -1.14999999999999997e-72

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\frac{z}{x}}}}{y} \]
    8. Applied egg-rr86.1%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{\frac{z}{2}}}}{y} \]
      4. *-un-lft-identity86.1%

        \[\leadsto \frac{\frac{\color{blue}{x}}{\frac{z}{2}}}{y} \]
      5. un-div-inv86.1%

        \[\leadsto \frac{\color{blue}{x \cdot \frac{1}{\frac{z}{2}}}}{y} \]
      6. clear-num86.1%

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot y}} \]
      9. times-frac86.1%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{2}{y}} \]
    10. Applied egg-rr86.1%

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

    if -1.14999999999999997e-72 < t < -1.3599999999999999e-80

    1. Initial program 75.0%

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

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

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

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

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

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

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

    if -1.3599999999999999e-80 < t < 4.79999999999999982e-34

    1. Initial program 85.7%

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

        \[\leadsto \color{blue}{\frac{x}{y \cdot z - t \cdot z} \cdot 2} \]
      2. *-commutative85.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*92.0%

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

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

        \[\leadsto 2 \cdot \color{blue}{\frac{x}{\left(y - t\right) \cdot z}} \]
      2. *-un-lft-identity85.7%

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

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

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

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

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

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

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

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

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

    if 4.79999999999999982e-34 < t

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.4 \cdot 10^{-21}:\\ \;\;\;\;\frac{\frac{x \cdot -2}{z}}{t}\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-72}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y}\\ \mathbf{elif}\;t \leq -1.36 \cdot 10^{-80}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-34}:\\ \;\;\;\;\frac{2 \cdot \frac{x}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \end{array} \]

Alternative 6: 73.8% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.99999999999999963e-21

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-2\right)} \cdot x}{t \cdot z} \]
      3. distribute-lft-neg-in71.8%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{-x \cdot 2}{z}}{t}} \]
      7. distribute-rgt-neg-in79.3%

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

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

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

    if -3.99999999999999963e-21 < t < -1.26000000000000001e-73

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\frac{z}{x}}}}{y} \]
    8. Applied egg-rr86.1%

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{\frac{z}{2}}}}{y} \]
      4. *-un-lft-identity86.1%

        \[\leadsto \frac{\frac{\color{blue}{x}}{\frac{z}{2}}}{y} \]
      5. un-div-inv86.1%

        \[\leadsto \frac{\color{blue}{x \cdot \frac{1}{\frac{z}{2}}}}{y} \]
      6. clear-num86.1%

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot y}} \]
      9. times-frac86.1%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \frac{2}{y}} \]
    10. Applied egg-rr86.1%

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

    if -1.26000000000000001e-73 < t < -7.2e-80

    1. Initial program 75.0%

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

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

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

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

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

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

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

    if -7.2e-80 < t < 1.80000000000000004e-34

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.80000000000000004e-34 < t

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{-21}:\\ \;\;\;\;\frac{\frac{x \cdot -2}{z}}{t}\\ \mathbf{elif}\;t \leq -1.26 \cdot 10^{-73}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y}\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{-80}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-34}:\\ \;\;\;\;\frac{\frac{x \cdot 2}{y}}{z}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \end{array} \]

Alternative 7: 72.9% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.00000000000000011e-22 or 2.1999999999999999e41 < t

    1. Initial program 88.7%

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

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

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

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

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

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

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

    if -7.00000000000000011e-22 < t < 2.1999999999999999e41

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 73.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{-20} \lor \neg \left(t \leq 2.8 \cdot 10^{+41}\right):\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.19999999999999991e-20 or 2.7999999999999999e41 < t

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.19999999999999991e-20 < t < 2.7999999999999999e41

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 73.3% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.4999999999999994e-22 or 2.3e42 < t

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.4999999999999994e-22 < t < 2.3e42

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 72.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{-20} \lor \neg \left(t \leq 9.2 \cdot 10^{+106}\right):\\
\;\;\;\;x \cdot \frac{\frac{-2}{t}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.1e-20 or 9.2000000000000008e106 < t

    1. Initial program 88.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1e-20 < t < 9.2000000000000008e106

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{z} \cdot x}}{y} \]
      2. clear-num76.6%

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{\frac{z}{2}}}}{y} \]
      4. *-un-lft-identity76.7%

        \[\leadsto \frac{\frac{\color{blue}{x}}{\frac{z}{2}}}{y} \]
      5. un-div-inv76.6%

        \[\leadsto \frac{\color{blue}{x \cdot \frac{1}{\frac{z}{2}}}}{y} \]
      6. clear-num76.6%

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot y}} \]
      9. times-frac77.2%

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

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

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

Alternative 11: 73.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{-21} \lor \neg \left(t \leq 1.4 \cdot 10^{-34}\right):\\
\;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.7000000000000002e-21 or 1.39999999999999998e-34 < t

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

    if -3.7000000000000002e-21 < t < 1.39999999999999998e-34

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{2 \cdot \frac{x}{z}}}{y} \]
    6. Simplified78.9%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{z} \cdot x}}{y} \]
      2. clear-num78.9%

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{\frac{z}{2}}}}{y} \]
      4. *-un-lft-identity78.9%

        \[\leadsto \frac{\frac{\color{blue}{x}}{\frac{z}{2}}}{y} \]
      5. un-div-inv78.9%

        \[\leadsto \frac{\color{blue}{x \cdot \frac{1}{\frac{z}{2}}}}{y} \]
      6. clear-num78.9%

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot y}} \]
      9. times-frac78.8%

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

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

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

Alternative 12: 73.6% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

    if -9.4999999999999995e-19 < t < 1.2000000000000001e-35

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{2 \cdot \frac{x}{z}}}{y} \]
    6. Simplified78.9%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{z} \cdot x}}{y} \]
      2. clear-num78.9%

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

        \[\leadsto \frac{\color{blue}{\frac{1 \cdot x}{\frac{z}{2}}}}{y} \]
      4. *-un-lft-identity78.9%

        \[\leadsto \frac{\frac{\color{blue}{x}}{\frac{z}{2}}}{y} \]
      5. un-div-inv78.9%

        \[\leadsto \frac{\color{blue}{x \cdot \frac{1}{\frac{z}{2}}}}{y} \]
      6. clear-num78.9%

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

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

        \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot y}} \]
      9. times-frac78.8%

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

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

    if 1.2000000000000001e-35 < t

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 91.6% 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 87.8%

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

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

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

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

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

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

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

Alternative 14: 92.0% accurate, 1.2× speedup?

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2 \cdot 1}{\color{blue}{\left(y - t\right) \cdot \frac{1}{\frac{x}{z}}}} \]
    4. clear-num92.9%

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

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

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

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

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

Alternative 15: 52.5% accurate, 1.6× speedup?

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

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

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

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

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

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

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

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

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

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

Developer target: 97.0% accurate, 0.3× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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