Linear.Projection:infinitePerspective from linear-1.19.1.3, A

Percentage Accurate: 90.2% → 96.6%
Time: 9.7s
Alternatives: 11
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 11 alternatives:

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

Initial Program: 90.2% accurate, 1.0× speedup?

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

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

Alternative 1: 96.6% accurate, 0.6× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 3.5 \cdot 10^{-59}:\\ \;\;\;\;\frac{x \cdot 2}{z\_m \cdot \left(y - t\right)}\\ \mathbf{elif}\;z\_m \leq 1.5 \cdot 10^{+135}:\\ \;\;\;\;2 \cdot \frac{\frac{x}{z\_m}}{y - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y - t}}{z\_m \cdot 0.5}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m t)
 :precision binary64
 (*
  z_s
  (if (<= z_m 3.5e-59)
    (/ (* x 2.0) (* z_m (- y t)))
    (if (<= z_m 1.5e+135)
      (* 2.0 (/ (/ x z_m) (- y t)))
      (/ (/ x (- y t)) (* z_m 0.5))))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
	double tmp;
	if (z_m <= 3.5e-59) {
		tmp = (x * 2.0) / (z_m * (y - t));
	} else if (z_m <= 1.5e+135) {
		tmp = 2.0 * ((x / z_m) / (y - t));
	} else {
		tmp = (x / (y - t)) / (z_m * 0.5);
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z_m <= 3.5d-59) then
        tmp = (x * 2.0d0) / (z_m * (y - t))
    else if (z_m <= 1.5d+135) then
        tmp = 2.0d0 * ((x / z_m) / (y - t))
    else
        tmp = (x / (y - t)) / (z_m * 0.5d0)
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
	double tmp;
	if (z_m <= 3.5e-59) {
		tmp = (x * 2.0) / (z_m * (y - t));
	} else if (z_m <= 1.5e+135) {
		tmp = 2.0 * ((x / z_m) / (y - t));
	} else {
		tmp = (x / (y - t)) / (z_m * 0.5);
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m, t):
	tmp = 0
	if z_m <= 3.5e-59:
		tmp = (x * 2.0) / (z_m * (y - t))
	elif z_m <= 1.5e+135:
		tmp = 2.0 * ((x / z_m) / (y - t))
	else:
		tmp = (x / (y - t)) / (z_m * 0.5)
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m, t)
	tmp = 0.0
	if (z_m <= 3.5e-59)
		tmp = Float64(Float64(x * 2.0) / Float64(z_m * Float64(y - t)));
	elseif (z_m <= 1.5e+135)
		tmp = Float64(2.0 * Float64(Float64(x / z_m) / Float64(y - t)));
	else
		tmp = Float64(Float64(x / Float64(y - t)) / Float64(z_m * 0.5));
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m, t)
	tmp = 0.0;
	if (z_m <= 3.5e-59)
		tmp = (x * 2.0) / (z_m * (y - t));
	elseif (z_m <= 1.5e+135)
		tmp = 2.0 * ((x / z_m) / (y - t));
	else
		tmp = (x / (y - t)) / (z_m * 0.5);
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * If[LessEqual[z$95$m, 3.5e-59], N[(N[(x * 2.0), $MachinePrecision] / N[(z$95$m * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 1.5e+135], N[(2.0 * N[(N[(x / z$95$m), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] / N[(z$95$m * 0.5), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 3.5 \cdot 10^{-59}:\\
\;\;\;\;\frac{x \cdot 2}{z\_m \cdot \left(y - t\right)}\\

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

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


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

    1. Initial program 89.3%

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

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

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

    if 3.5000000000000001e-59 < z < 1.5e135

    1. Initial program 92.2%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 92.4%

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

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

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

    if 1.5e135 < z

    1. Initial program 78.3%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{\color{blue}{\left(z \cdot \frac{1}{2}\right)} \cdot \left(y - t\right)} \]
      13. metadata-eval83.7%

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

      \[\leadsto \color{blue}{\frac{x}{\left(z \cdot 0.5\right) \cdot \left(y - t\right)}} \]
    10. Step-by-step derivation
      1. associate-/l/97.3%

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

      \[\leadsto \color{blue}{\frac{\frac{x}{y - t}}{z \cdot 0.5}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 2: 73.5% accurate, 0.2× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ \begin{array}{l} t_1 := \frac{x}{z\_m} \cdot \frac{2}{y}\\ t_2 := -2 \cdot \frac{x}{z\_m \cdot t}\\ z\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -9.6 \cdot 10^{+20}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-190}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-190}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+80}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+95}:\\ \;\;\;\;\frac{-2}{z\_m \cdot \frac{t}{x}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+96}:\\ \;\;\;\;x \cdot \frac{2}{z\_m \cdot y}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+207} \lor \neg \left(t \leq 4.7 \cdot 10^{+253}\right):\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{-2}{z\_m}}{t}\\ \end{array} \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m t)
 :precision binary64
 (let* ((t_1 (* (/ x z_m) (/ 2.0 y))) (t_2 (* -2.0 (/ x (* z_m t)))))
   (*
    z_s
    (if (<= t -9.6e+20)
      t_2
      (if (<= t -1.85e-190)
        t_1
        (if (<= t -1.8e-190)
          t_2
          (if (<= t 4.6e+80)
            t_1
            (if (<= t 4.7e+95)
              (/ -2.0 (* z_m (/ t x)))
              (if (<= t 3.5e+96)
                (* x (/ 2.0 (* z_m y)))
                (if (or (<= t 4.2e+207) (not (<= t 4.7e+253)))
                  (* -2.0 (/ (/ x t) z_m))
                  (/ (* x (/ -2.0 z_m)) t)))))))))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
	double t_1 = (x / z_m) * (2.0 / y);
	double t_2 = -2.0 * (x / (z_m * t));
	double tmp;
	if (t <= -9.6e+20) {
		tmp = t_2;
	} else if (t <= -1.85e-190) {
		tmp = t_1;
	} else if (t <= -1.8e-190) {
		tmp = t_2;
	} else if (t <= 4.6e+80) {
		tmp = t_1;
	} else if (t <= 4.7e+95) {
		tmp = -2.0 / (z_m * (t / x));
	} else if (t <= 3.5e+96) {
		tmp = x * (2.0 / (z_m * y));
	} else if ((t <= 4.2e+207) || !(t <= 4.7e+253)) {
		tmp = -2.0 * ((x / t) / z_m);
	} else {
		tmp = (x * (-2.0 / z_m)) / t;
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x / z_m) * (2.0d0 / y)
    t_2 = (-2.0d0) * (x / (z_m * t))
    if (t <= (-9.6d+20)) then
        tmp = t_2
    else if (t <= (-1.85d-190)) then
        tmp = t_1
    else if (t <= (-1.8d-190)) then
        tmp = t_2
    else if (t <= 4.6d+80) then
        tmp = t_1
    else if (t <= 4.7d+95) then
        tmp = (-2.0d0) / (z_m * (t / x))
    else if (t <= 3.5d+96) then
        tmp = x * (2.0d0 / (z_m * y))
    else if ((t <= 4.2d+207) .or. (.not. (t <= 4.7d+253))) then
        tmp = (-2.0d0) * ((x / t) / z_m)
    else
        tmp = (x * ((-2.0d0) / z_m)) / t
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
	double t_1 = (x / z_m) * (2.0 / y);
	double t_2 = -2.0 * (x / (z_m * t));
	double tmp;
	if (t <= -9.6e+20) {
		tmp = t_2;
	} else if (t <= -1.85e-190) {
		tmp = t_1;
	} else if (t <= -1.8e-190) {
		tmp = t_2;
	} else if (t <= 4.6e+80) {
		tmp = t_1;
	} else if (t <= 4.7e+95) {
		tmp = -2.0 / (z_m * (t / x));
	} else if (t <= 3.5e+96) {
		tmp = x * (2.0 / (z_m * y));
	} else if ((t <= 4.2e+207) || !(t <= 4.7e+253)) {
		tmp = -2.0 * ((x / t) / z_m);
	} else {
		tmp = (x * (-2.0 / z_m)) / t;
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m, t):
	t_1 = (x / z_m) * (2.0 / y)
	t_2 = -2.0 * (x / (z_m * t))
	tmp = 0
	if t <= -9.6e+20:
		tmp = t_2
	elif t <= -1.85e-190:
		tmp = t_1
	elif t <= -1.8e-190:
		tmp = t_2
	elif t <= 4.6e+80:
		tmp = t_1
	elif t <= 4.7e+95:
		tmp = -2.0 / (z_m * (t / x))
	elif t <= 3.5e+96:
		tmp = x * (2.0 / (z_m * y))
	elif (t <= 4.2e+207) or not (t <= 4.7e+253):
		tmp = -2.0 * ((x / t) / z_m)
	else:
		tmp = (x * (-2.0 / z_m)) / t
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m, t)
	t_1 = Float64(Float64(x / z_m) * Float64(2.0 / y))
	t_2 = Float64(-2.0 * Float64(x / Float64(z_m * t)))
	tmp = 0.0
	if (t <= -9.6e+20)
		tmp = t_2;
	elseif (t <= -1.85e-190)
		tmp = t_1;
	elseif (t <= -1.8e-190)
		tmp = t_2;
	elseif (t <= 4.6e+80)
		tmp = t_1;
	elseif (t <= 4.7e+95)
		tmp = Float64(-2.0 / Float64(z_m * Float64(t / x)));
	elseif (t <= 3.5e+96)
		tmp = Float64(x * Float64(2.0 / Float64(z_m * y)));
	elseif ((t <= 4.2e+207) || !(t <= 4.7e+253))
		tmp = Float64(-2.0 * Float64(Float64(x / t) / z_m));
	else
		tmp = Float64(Float64(x * Float64(-2.0 / z_m)) / t);
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m, t)
	t_1 = (x / z_m) * (2.0 / y);
	t_2 = -2.0 * (x / (z_m * t));
	tmp = 0.0;
	if (t <= -9.6e+20)
		tmp = t_2;
	elseif (t <= -1.85e-190)
		tmp = t_1;
	elseif (t <= -1.8e-190)
		tmp = t_2;
	elseif (t <= 4.6e+80)
		tmp = t_1;
	elseif (t <= 4.7e+95)
		tmp = -2.0 / (z_m * (t / x));
	elseif (t <= 3.5e+96)
		tmp = x * (2.0 / (z_m * y));
	elseif ((t <= 4.2e+207) || ~((t <= 4.7e+253)))
		tmp = -2.0 * ((x / t) / z_m);
	else
		tmp = (x * (-2.0 / z_m)) / t;
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := Block[{t$95$1 = N[(N[(x / z$95$m), $MachinePrecision] * N[(2.0 / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(x / N[(z$95$m * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * If[LessEqual[t, -9.6e+20], t$95$2, If[LessEqual[t, -1.85e-190], t$95$1, If[LessEqual[t, -1.8e-190], t$95$2, If[LessEqual[t, 4.6e+80], t$95$1, If[LessEqual[t, 4.7e+95], N[(-2.0 / N[(z$95$m * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e+96], N[(x * N[(2.0 / N[(z$95$m * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 4.2e+207], N[Not[LessEqual[t, 4.7e+253]], $MachinePrecision]], N[(-2.0 * N[(N[(x / t), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-2.0 / z$95$m), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]]]]]]), $MachinePrecision]]]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
\begin{array}{l}
t_1 := \frac{x}{z\_m} \cdot \frac{2}{y}\\
t_2 := -2 \cdot \frac{x}{z\_m \cdot t}\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -9.6 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -1.85 \cdot 10^{-190}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.8 \cdot 10^{-190}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 4.6 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 4.7 \cdot 10^{+95}:\\
\;\;\;\;\frac{-2}{z\_m \cdot \frac{t}{x}}\\

\mathbf{elif}\;t \leq 3.5 \cdot 10^{+96}:\\
\;\;\;\;x \cdot \frac{2}{z\_m \cdot y}\\

\mathbf{elif}\;t \leq 4.2 \cdot 10^{+207} \lor \neg \left(t \leq 4.7 \cdot 10^{+253}\right):\\
\;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z\_m}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -9.6e20 or -1.8500000000000001e-190 < t < -1.80000000000000003e-190

    1. Initial program 83.1%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 81.2%

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

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

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

    if -9.6e20 < t < -1.8500000000000001e-190 or -1.80000000000000003e-190 < t < 4.60000000000000008e80

    1. Initial program 89.1%

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

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

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

      \[\leadsto \frac{x \cdot 2}{\color{blue}{y \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative69.8%

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

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

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

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

    if 4.60000000000000008e80 < t < 4.69999999999999972e95

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

    if 4.69999999999999972e95 < t < 3.4999999999999999e96

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 100.0%

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

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

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

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

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

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

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

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

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

    if 3.4999999999999999e96 < t < 4.1999999999999999e207 or 4.70000000000000022e253 < t

    1. Initial program 90.1%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 78.0%

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

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

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

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

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

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

    if 4.1999999999999999e207 < t < 4.70000000000000022e253

    1. Initial program 88.0%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{x \cdot \frac{2}{z}}}{t} \]
      11. distribute-rgt-neg-in88.4%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-\frac{2}{z}\right)}}{t} \]
      12. distribute-neg-frac88.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.6 \cdot 10^{+20}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-190}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-190}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+80}:\\ \;\;\;\;\frac{x}{z} \cdot \frac{2}{y}\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+95}:\\ \;\;\;\;\frac{-2}{z \cdot \frac{t}{x}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+96}:\\ \;\;\;\;x \cdot \frac{2}{z \cdot y}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+207} \lor \neg \left(t \leq 4.7 \cdot 10^{+253}\right):\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{-2}{z}}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 73.7% accurate, 0.3× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ \begin{array}{l} t_1 := -2 \cdot \frac{x}{z\_m \cdot t}\\ z\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -3.25 \cdot 10^{+21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-190}:\\ \;\;\;\;\frac{x}{z\_m} \cdot \frac{2}{y}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-190}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+80}:\\ \;\;\;\;\frac{\frac{2}{y}}{\frac{z\_m}{x}}\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+95}:\\ \;\;\;\;\frac{-2}{z\_m \cdot \frac{t}{x}}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \frac{2}{z\_m \cdot y}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z\_m}\\ \end{array} \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m t)
 :precision binary64
 (let* ((t_1 (* -2.0 (/ x (* z_m t)))))
   (*
    z_s
    (if (<= t -3.25e+21)
      t_1
      (if (<= t -1.85e-190)
        (* (/ x z_m) (/ 2.0 y))
        (if (<= t -1.8e-190)
          t_1
          (if (<= t 5.2e+80)
            (/ (/ 2.0 y) (/ z_m x))
            (if (<= t 4.7e+95)
              (/ -2.0 (* z_m (/ t x)))
              (if (<= t 4.8e+95)
                (* x (/ 2.0 (* z_m y)))
                (* -2.0 (/ (/ x t) z_m)))))))))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
	double t_1 = -2.0 * (x / (z_m * t));
	double tmp;
	if (t <= -3.25e+21) {
		tmp = t_1;
	} else if (t <= -1.85e-190) {
		tmp = (x / z_m) * (2.0 / y);
	} else if (t <= -1.8e-190) {
		tmp = t_1;
	} else if (t <= 5.2e+80) {
		tmp = (2.0 / y) / (z_m / x);
	} else if (t <= 4.7e+95) {
		tmp = -2.0 / (z_m * (t / x));
	} else if (t <= 4.8e+95) {
		tmp = x * (2.0 / (z_m * y));
	} else {
		tmp = -2.0 * ((x / t) / z_m);
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (-2.0d0) * (x / (z_m * t))
    if (t <= (-3.25d+21)) then
        tmp = t_1
    else if (t <= (-1.85d-190)) then
        tmp = (x / z_m) * (2.0d0 / y)
    else if (t <= (-1.8d-190)) then
        tmp = t_1
    else if (t <= 5.2d+80) then
        tmp = (2.0d0 / y) / (z_m / x)
    else if (t <= 4.7d+95) then
        tmp = (-2.0d0) / (z_m * (t / x))
    else if (t <= 4.8d+95) then
        tmp = x * (2.0d0 / (z_m * y))
    else
        tmp = (-2.0d0) * ((x / t) / z_m)
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
	double t_1 = -2.0 * (x / (z_m * t));
	double tmp;
	if (t <= -3.25e+21) {
		tmp = t_1;
	} else if (t <= -1.85e-190) {
		tmp = (x / z_m) * (2.0 / y);
	} else if (t <= -1.8e-190) {
		tmp = t_1;
	} else if (t <= 5.2e+80) {
		tmp = (2.0 / y) / (z_m / x);
	} else if (t <= 4.7e+95) {
		tmp = -2.0 / (z_m * (t / x));
	} else if (t <= 4.8e+95) {
		tmp = x * (2.0 / (z_m * y));
	} else {
		tmp = -2.0 * ((x / t) / z_m);
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m, t):
	t_1 = -2.0 * (x / (z_m * t))
	tmp = 0
	if t <= -3.25e+21:
		tmp = t_1
	elif t <= -1.85e-190:
		tmp = (x / z_m) * (2.0 / y)
	elif t <= -1.8e-190:
		tmp = t_1
	elif t <= 5.2e+80:
		tmp = (2.0 / y) / (z_m / x)
	elif t <= 4.7e+95:
		tmp = -2.0 / (z_m * (t / x))
	elif t <= 4.8e+95:
		tmp = x * (2.0 / (z_m * y))
	else:
		tmp = -2.0 * ((x / t) / z_m)
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m, t)
	t_1 = Float64(-2.0 * Float64(x / Float64(z_m * t)))
	tmp = 0.0
	if (t <= -3.25e+21)
		tmp = t_1;
	elseif (t <= -1.85e-190)
		tmp = Float64(Float64(x / z_m) * Float64(2.0 / y));
	elseif (t <= -1.8e-190)
		tmp = t_1;
	elseif (t <= 5.2e+80)
		tmp = Float64(Float64(2.0 / y) / Float64(z_m / x));
	elseif (t <= 4.7e+95)
		tmp = Float64(-2.0 / Float64(z_m * Float64(t / x)));
	elseif (t <= 4.8e+95)
		tmp = Float64(x * Float64(2.0 / Float64(z_m * y)));
	else
		tmp = Float64(-2.0 * Float64(Float64(x / t) / z_m));
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m, t)
	t_1 = -2.0 * (x / (z_m * t));
	tmp = 0.0;
	if (t <= -3.25e+21)
		tmp = t_1;
	elseif (t <= -1.85e-190)
		tmp = (x / z_m) * (2.0 / y);
	elseif (t <= -1.8e-190)
		tmp = t_1;
	elseif (t <= 5.2e+80)
		tmp = (2.0 / y) / (z_m / x);
	elseif (t <= 4.7e+95)
		tmp = -2.0 / (z_m * (t / x));
	elseif (t <= 4.8e+95)
		tmp = x * (2.0 / (z_m * y));
	else
		tmp = -2.0 * ((x / t) / z_m);
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := Block[{t$95$1 = N[(-2.0 * N[(x / N[(z$95$m * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * If[LessEqual[t, -3.25e+21], t$95$1, If[LessEqual[t, -1.85e-190], N[(N[(x / z$95$m), $MachinePrecision] * N[(2.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.8e-190], t$95$1, If[LessEqual[t, 5.2e+80], N[(N[(2.0 / y), $MachinePrecision] / N[(z$95$m / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.7e+95], N[(-2.0 / N[(z$95$m * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e+95], N[(x * N[(2.0 / N[(z$95$m * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[(x / t), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]]]]]]), $MachinePrecision]]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
\begin{array}{l}
t_1 := -2 \cdot \frac{x}{z\_m \cdot t}\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -3.25 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq -1.8 \cdot 10^{-190}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 5.2 \cdot 10^{+80}:\\
\;\;\;\;\frac{\frac{2}{y}}{\frac{z\_m}{x}}\\

\mathbf{elif}\;t \leq 4.7 \cdot 10^{+95}:\\
\;\;\;\;\frac{-2}{z\_m \cdot \frac{t}{x}}\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \frac{2}{z\_m \cdot y}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -3.25e21 or -1.8500000000000001e-190 < t < -1.80000000000000003e-190

    1. Initial program 83.1%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 81.2%

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

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

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

    if -3.25e21 < t < -1.8500000000000001e-190

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

    if -1.80000000000000003e-190 < t < 5.19999999999999963e80

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.19999999999999963e80 < t < 4.69999999999999972e95

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

    if 4.69999999999999972e95 < t < 4.8000000000000001e95

    1. Initial program 100.0%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 100.0%

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

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

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

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

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

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

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

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

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

    if 4.8000000000000001e95 < t

    1. Initial program 89.6%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 77.7%

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

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

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

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

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

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

Alternative 4: 74.7% accurate, 0.4× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ \begin{array}{l} t_1 := \frac{x}{z\_m} \cdot \frac{2}{y}\\ t_2 := -2 \cdot \frac{x}{z\_m \cdot t}\\ z\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+20}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-190}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{-190}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-8}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z\_m}\\ \end{array} \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m t)
 :precision binary64
 (let* ((t_1 (* (/ x z_m) (/ 2.0 y))) (t_2 (* -2.0 (/ x (* z_m t)))))
   (*
    z_s
    (if (<= t -6.5e+20)
      t_2
      (if (<= t -1.85e-190)
        t_1
        (if (<= t -1.8e-190)
          t_2
          (if (<= t 4.8e-8) t_1 (* -2.0 (/ (/ x t) z_m)))))))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
	double t_1 = (x / z_m) * (2.0 / y);
	double t_2 = -2.0 * (x / (z_m * t));
	double tmp;
	if (t <= -6.5e+20) {
		tmp = t_2;
	} else if (t <= -1.85e-190) {
		tmp = t_1;
	} else if (t <= -1.8e-190) {
		tmp = t_2;
	} else if (t <= 4.8e-8) {
		tmp = t_1;
	} else {
		tmp = -2.0 * ((x / t) / z_m);
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x / z_m) * (2.0d0 / y)
    t_2 = (-2.0d0) * (x / (z_m * t))
    if (t <= (-6.5d+20)) then
        tmp = t_2
    else if (t <= (-1.85d-190)) then
        tmp = t_1
    else if (t <= (-1.8d-190)) then
        tmp = t_2
    else if (t <= 4.8d-8) then
        tmp = t_1
    else
        tmp = (-2.0d0) * ((x / t) / z_m)
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
	double t_1 = (x / z_m) * (2.0 / y);
	double t_2 = -2.0 * (x / (z_m * t));
	double tmp;
	if (t <= -6.5e+20) {
		tmp = t_2;
	} else if (t <= -1.85e-190) {
		tmp = t_1;
	} else if (t <= -1.8e-190) {
		tmp = t_2;
	} else if (t <= 4.8e-8) {
		tmp = t_1;
	} else {
		tmp = -2.0 * ((x / t) / z_m);
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m, t):
	t_1 = (x / z_m) * (2.0 / y)
	t_2 = -2.0 * (x / (z_m * t))
	tmp = 0
	if t <= -6.5e+20:
		tmp = t_2
	elif t <= -1.85e-190:
		tmp = t_1
	elif t <= -1.8e-190:
		tmp = t_2
	elif t <= 4.8e-8:
		tmp = t_1
	else:
		tmp = -2.0 * ((x / t) / z_m)
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m, t)
	t_1 = Float64(Float64(x / z_m) * Float64(2.0 / y))
	t_2 = Float64(-2.0 * Float64(x / Float64(z_m * t)))
	tmp = 0.0
	if (t <= -6.5e+20)
		tmp = t_2;
	elseif (t <= -1.85e-190)
		tmp = t_1;
	elseif (t <= -1.8e-190)
		tmp = t_2;
	elseif (t <= 4.8e-8)
		tmp = t_1;
	else
		tmp = Float64(-2.0 * Float64(Float64(x / t) / z_m));
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m, t)
	t_1 = (x / z_m) * (2.0 / y);
	t_2 = -2.0 * (x / (z_m * t));
	tmp = 0.0;
	if (t <= -6.5e+20)
		tmp = t_2;
	elseif (t <= -1.85e-190)
		tmp = t_1;
	elseif (t <= -1.8e-190)
		tmp = t_2;
	elseif (t <= 4.8e-8)
		tmp = t_1;
	else
		tmp = -2.0 * ((x / t) / z_m);
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := Block[{t$95$1 = N[(N[(x / z$95$m), $MachinePrecision] * N[(2.0 / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * N[(x / N[(z$95$m * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(z$95$s * If[LessEqual[t, -6.5e+20], t$95$2, If[LessEqual[t, -1.85e-190], t$95$1, If[LessEqual[t, -1.8e-190], t$95$2, If[LessEqual[t, 4.8e-8], t$95$1, N[(-2.0 * N[(N[(x / t), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
\begin{array}{l}
t_1 := \frac{x}{z\_m} \cdot \frac{2}{y}\\
t_2 := -2 \cdot \frac{x}{z\_m \cdot t}\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -1.85 \cdot 10^{-190}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.8 \cdot 10^{-190}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.5e20 or -1.8500000000000001e-190 < t < -1.80000000000000003e-190

    1. Initial program 83.1%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 81.2%

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

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

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

    if -6.5e20 < t < -1.8500000000000001e-190 or -1.80000000000000003e-190 < t < 4.79999999999999997e-8

    1. Initial program 87.4%

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

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

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

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

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

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

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

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

    if 4.79999999999999997e-8 < t

    1. Initial program 94.0%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 72.8%

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

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

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

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

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

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

Alternative 5: 92.9% accurate, 0.5× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;x \cdot 2 \leq 5 \cdot 10^{-132} \lor \neg \left(x \cdot 2 \leq 10^{+259}\right):\\ \;\;\;\;2 \cdot \frac{\frac{x}{z\_m}}{y - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y - t} \cdot \frac{2}{z\_m}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m t)
 :precision binary64
 (*
  z_s
  (if (or (<= (* x 2.0) 5e-132) (not (<= (* x 2.0) 1e+259)))
    (* 2.0 (/ (/ x z_m) (- y t)))
    (* (/ x (- y t)) (/ 2.0 z_m)))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
	double tmp;
	if (((x * 2.0) <= 5e-132) || !((x * 2.0) <= 1e+259)) {
		tmp = 2.0 * ((x / z_m) / (y - t));
	} else {
		tmp = (x / (y - t)) * (2.0 / z_m);
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8) :: tmp
    if (((x * 2.0d0) <= 5d-132) .or. (.not. ((x * 2.0d0) <= 1d+259))) then
        tmp = 2.0d0 * ((x / z_m) / (y - t))
    else
        tmp = (x / (y - t)) * (2.0d0 / z_m)
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
	double tmp;
	if (((x * 2.0) <= 5e-132) || !((x * 2.0) <= 1e+259)) {
		tmp = 2.0 * ((x / z_m) / (y - t));
	} else {
		tmp = (x / (y - t)) * (2.0 / z_m);
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m, t):
	tmp = 0
	if ((x * 2.0) <= 5e-132) or not ((x * 2.0) <= 1e+259):
		tmp = 2.0 * ((x / z_m) / (y - t))
	else:
		tmp = (x / (y - t)) * (2.0 / z_m)
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m, t)
	tmp = 0.0
	if ((Float64(x * 2.0) <= 5e-132) || !(Float64(x * 2.0) <= 1e+259))
		tmp = Float64(2.0 * Float64(Float64(x / z_m) / Float64(y - t)));
	else
		tmp = Float64(Float64(x / Float64(y - t)) * Float64(2.0 / z_m));
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m, t)
	tmp = 0.0;
	if (((x * 2.0) <= 5e-132) || ~(((x * 2.0) <= 1e+259)))
		tmp = 2.0 * ((x / z_m) / (y - t));
	else
		tmp = (x / (y - t)) * (2.0 / z_m);
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * If[Or[LessEqual[N[(x * 2.0), $MachinePrecision], 5e-132], N[Not[LessEqual[N[(x * 2.0), $MachinePrecision], 1e+259]], $MachinePrecision]], N[(2.0 * N[(N[(x / z$95$m), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] * N[(2.0 / z$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x #s(literal 2 binary64)) < 4.9999999999999999e-132 or 9.999999999999999e258 < (*.f64 x #s(literal 2 binary64))

    1. Initial program 90.8%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 91.4%

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

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

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

    if 4.9999999999999999e-132 < (*.f64 x #s(literal 2 binary64)) < 9.999999999999999e258

    1. Initial program 82.4%

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

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

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

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

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

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

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

Alternative 6: 74.7% accurate, 0.5× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{-34}:\\ \;\;\;\;-2 \cdot \frac{x}{z\_m \cdot t}\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-131}:\\ \;\;\;\;\frac{2}{z\_m} \cdot \frac{x}{y}\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{-27}:\\ \;\;\;\;x \cdot \frac{2}{z\_m \cdot y}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z\_m}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m t)
 :precision binary64
 (*
  z_s
  (if (<= t -3.7e-34)
    (* -2.0 (/ x (* z_m t)))
    (if (<= t -4e-131)
      (* (/ 2.0 z_m) (/ x y))
      (if (<= t 2.35e-27) (* x (/ 2.0 (* z_m y))) (* -2.0 (/ (/ x t) z_m)))))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
	double tmp;
	if (t <= -3.7e-34) {
		tmp = -2.0 * (x / (z_m * t));
	} else if (t <= -4e-131) {
		tmp = (2.0 / z_m) * (x / y);
	} else if (t <= 2.35e-27) {
		tmp = x * (2.0 / (z_m * y));
	} else {
		tmp = -2.0 * ((x / t) / z_m);
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-3.7d-34)) then
        tmp = (-2.0d0) * (x / (z_m * t))
    else if (t <= (-4d-131)) then
        tmp = (2.0d0 / z_m) * (x / y)
    else if (t <= 2.35d-27) then
        tmp = x * (2.0d0 / (z_m * y))
    else
        tmp = (-2.0d0) * ((x / t) / z_m)
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
	double tmp;
	if (t <= -3.7e-34) {
		tmp = -2.0 * (x / (z_m * t));
	} else if (t <= -4e-131) {
		tmp = (2.0 / z_m) * (x / y);
	} else if (t <= 2.35e-27) {
		tmp = x * (2.0 / (z_m * y));
	} else {
		tmp = -2.0 * ((x / t) / z_m);
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m, t):
	tmp = 0
	if t <= -3.7e-34:
		tmp = -2.0 * (x / (z_m * t))
	elif t <= -4e-131:
		tmp = (2.0 / z_m) * (x / y)
	elif t <= 2.35e-27:
		tmp = x * (2.0 / (z_m * y))
	else:
		tmp = -2.0 * ((x / t) / z_m)
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m, t)
	tmp = 0.0
	if (t <= -3.7e-34)
		tmp = Float64(-2.0 * Float64(x / Float64(z_m * t)));
	elseif (t <= -4e-131)
		tmp = Float64(Float64(2.0 / z_m) * Float64(x / y));
	elseif (t <= 2.35e-27)
		tmp = Float64(x * Float64(2.0 / Float64(z_m * y)));
	else
		tmp = Float64(-2.0 * Float64(Float64(x / t) / z_m));
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m, t)
	tmp = 0.0;
	if (t <= -3.7e-34)
		tmp = -2.0 * (x / (z_m * t));
	elseif (t <= -4e-131)
		tmp = (2.0 / z_m) * (x / y);
	elseif (t <= 2.35e-27)
		tmp = x * (2.0 / (z_m * y));
	else
		tmp = -2.0 * ((x / t) / z_m);
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * If[LessEqual[t, -3.7e-34], N[(-2.0 * N[(x / N[(z$95$m * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4e-131], N[(N[(2.0 / z$95$m), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.35e-27], N[(x * N[(2.0 / N[(z$95$m * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[(x / t), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{-34}:\\
\;\;\;\;-2 \cdot \frac{x}{z\_m \cdot t}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.69999999999999988e-34

    1. Initial program 82.3%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 76.0%

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

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

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

    if -3.69999999999999988e-34 < t < -3.9999999999999999e-131

    1. Initial program 90.7%

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

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

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

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

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

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

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

    if -3.9999999999999999e-131 < t < 2.35000000000000016e-27

    1. Initial program 87.1%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 91.3%

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

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

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

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

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

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

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

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

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

    if 2.35000000000000016e-27 < t

    1. Initial program 94.2%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 70.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{-34}:\\ \;\;\;\;-2 \cdot \frac{x}{z \cdot t}\\ \mathbf{elif}\;t \leq -4 \cdot 10^{-131}:\\ \;\;\;\;\frac{2}{z} \cdot \frac{x}{y}\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{-27}:\\ \;\;\;\;x \cdot \frac{2}{z \cdot y}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 96.6% accurate, 0.6× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;z\_m \leq 3.5 \cdot 10^{-59}:\\ \;\;\;\;\frac{x \cdot 2}{z\_m \cdot \left(y - t\right)}\\ \mathbf{elif}\;z\_m \leq 1.2 \cdot 10^{+135}:\\ \;\;\;\;2 \cdot \frac{\frac{x}{z\_m}}{y - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y - t} \cdot \frac{2}{z\_m}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m t)
 :precision binary64
 (*
  z_s
  (if (<= z_m 3.5e-59)
    (/ (* x 2.0) (* z_m (- y t)))
    (if (<= z_m 1.2e+135)
      (* 2.0 (/ (/ x z_m) (- y t)))
      (* (/ x (- y t)) (/ 2.0 z_m))))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
	double tmp;
	if (z_m <= 3.5e-59) {
		tmp = (x * 2.0) / (z_m * (y - t));
	} else if (z_m <= 1.2e+135) {
		tmp = 2.0 * ((x / z_m) / (y - t));
	} else {
		tmp = (x / (y - t)) * (2.0 / z_m);
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z_m <= 3.5d-59) then
        tmp = (x * 2.0d0) / (z_m * (y - t))
    else if (z_m <= 1.2d+135) then
        tmp = 2.0d0 * ((x / z_m) / (y - t))
    else
        tmp = (x / (y - t)) * (2.0d0 / z_m)
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
	double tmp;
	if (z_m <= 3.5e-59) {
		tmp = (x * 2.0) / (z_m * (y - t));
	} else if (z_m <= 1.2e+135) {
		tmp = 2.0 * ((x / z_m) / (y - t));
	} else {
		tmp = (x / (y - t)) * (2.0 / z_m);
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m, t):
	tmp = 0
	if z_m <= 3.5e-59:
		tmp = (x * 2.0) / (z_m * (y - t))
	elif z_m <= 1.2e+135:
		tmp = 2.0 * ((x / z_m) / (y - t))
	else:
		tmp = (x / (y - t)) * (2.0 / z_m)
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m, t)
	tmp = 0.0
	if (z_m <= 3.5e-59)
		tmp = Float64(Float64(x * 2.0) / Float64(z_m * Float64(y - t)));
	elseif (z_m <= 1.2e+135)
		tmp = Float64(2.0 * Float64(Float64(x / z_m) / Float64(y - t)));
	else
		tmp = Float64(Float64(x / Float64(y - t)) * Float64(2.0 / z_m));
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m, t)
	tmp = 0.0;
	if (z_m <= 3.5e-59)
		tmp = (x * 2.0) / (z_m * (y - t));
	elseif (z_m <= 1.2e+135)
		tmp = 2.0 * ((x / z_m) / (y - t));
	else
		tmp = (x / (y - t)) * (2.0 / z_m);
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * If[LessEqual[z$95$m, 3.5e-59], N[(N[(x * 2.0), $MachinePrecision] / N[(z$95$m * N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z$95$m, 1.2e+135], N[(2.0 * N[(N[(x / z$95$m), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y - t), $MachinePrecision]), $MachinePrecision] * N[(2.0 / z$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;z\_m \leq 3.5 \cdot 10^{-59}:\\
\;\;\;\;\frac{x \cdot 2}{z\_m \cdot \left(y - t\right)}\\

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

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


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

    1. Initial program 89.3%

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

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

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

    if 3.5000000000000001e-59 < z < 1.19999999999999999e135

    1. Initial program 92.2%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 92.4%

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

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

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

    if 1.19999999999999999e135 < z

    1. Initial program 78.3%

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

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

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

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

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

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

Alternative 8: 74.7% accurate, 0.6× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{-34}:\\ \;\;\;\;-2 \cdot \frac{x}{z\_m \cdot t}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-25}:\\ \;\;\;\;x \cdot \frac{2}{z\_m \cdot y}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{\frac{x}{t}}{z\_m}\\ \end{array} \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m t)
 :precision binary64
 (*
  z_s
  (if (<= t -4.4e-34)
    (* -2.0 (/ x (* z_m t)))
    (if (<= t 1.15e-25) (* x (/ 2.0 (* z_m y))) (* -2.0 (/ (/ x t) z_m))))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
	double tmp;
	if (t <= -4.4e-34) {
		tmp = -2.0 * (x / (z_m * t));
	} else if (t <= 1.15e-25) {
		tmp = x * (2.0 / (z_m * y));
	} else {
		tmp = -2.0 * ((x / t) / z_m);
	}
	return z_s * tmp;
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-4.4d-34)) then
        tmp = (-2.0d0) * (x / (z_m * t))
    else if (t <= 1.15d-25) then
        tmp = x * (2.0d0 / (z_m * y))
    else
        tmp = (-2.0d0) * ((x / t) / z_m)
    end if
    code = z_s * tmp
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
	double tmp;
	if (t <= -4.4e-34) {
		tmp = -2.0 * (x / (z_m * t));
	} else if (t <= 1.15e-25) {
		tmp = x * (2.0 / (z_m * y));
	} else {
		tmp = -2.0 * ((x / t) / z_m);
	}
	return z_s * tmp;
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m, t):
	tmp = 0
	if t <= -4.4e-34:
		tmp = -2.0 * (x / (z_m * t))
	elif t <= 1.15e-25:
		tmp = x * (2.0 / (z_m * y))
	else:
		tmp = -2.0 * ((x / t) / z_m)
	return z_s * tmp
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m, t)
	tmp = 0.0
	if (t <= -4.4e-34)
		tmp = Float64(-2.0 * Float64(x / Float64(z_m * t)));
	elseif (t <= 1.15e-25)
		tmp = Float64(x * Float64(2.0 / Float64(z_m * y)));
	else
		tmp = Float64(-2.0 * Float64(Float64(x / t) / z_m));
	end
	return Float64(z_s * tmp)
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp_2 = code(z_s, x, y, z_m, t)
	tmp = 0.0;
	if (t <= -4.4e-34)
		tmp = -2.0 * (x / (z_m * t));
	elseif (t <= 1.15e-25)
		tmp = x * (2.0 / (z_m * y));
	else
		tmp = -2.0 * ((x / t) / z_m);
	end
	tmp_2 = z_s * tmp;
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * If[LessEqual[t, -4.4e-34], N[(-2.0 * N[(x / N[(z$95$m * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e-25], N[(x * N[(2.0 / N[(z$95$m * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(N[(x / t), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{-34}:\\
\;\;\;\;-2 \cdot \frac{x}{z\_m \cdot t}\\

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

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


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

    1. Initial program 82.3%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 76.0%

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

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

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

    if -4.3999999999999998e-34 < t < 1.15e-25

    1. Initial program 87.9%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 91.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{2}{z \cdot y}} \]
    10. Simplified71.5%

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

    if 1.15e-25 < t

    1. Initial program 94.2%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 70.9%

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

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

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

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

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

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

Alternative 9: 91.6% accurate, 1.2× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(2 \cdot \frac{\frac{x}{z\_m}}{y - t}\right) \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m t)
 :precision binary64
 (* z_s (* 2.0 (/ (/ x z_m) (- y t)))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
	return z_s * (2.0 * ((x / z_m) / (y - t)));
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    code = z_s * (2.0d0 * ((x / z_m) / (y - t)))
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
	return z_s * (2.0 * ((x / z_m) / (y - t)));
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m, t):
	return z_s * (2.0 * ((x / z_m) / (y - t)))
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m, t)
	return Float64(z_s * Float64(2.0 * Float64(Float64(x / z_m) / Float64(y - t))))
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp = code(z_s, x, y, z_m, t)
	tmp = z_s * (2.0 * ((x / z_m) / (y - t)));
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * N[(2.0 * N[(N[(x / z$95$m), $MachinePrecision] / N[(y - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(2 \cdot \frac{\frac{x}{z\_m}}{y - t}\right)
\end{array}
Derivation
  1. Initial program 88.2%

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

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

    \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
  4. Add Preprocessing
  5. Taylor expanded in x around 0 91.0%

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

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

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

Alternative 10: 53.7% accurate, 1.6× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(-2 \cdot \frac{\frac{x}{t}}{z\_m}\right) \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m t) :precision binary64 (* z_s (* -2.0 (/ (/ x t) z_m))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
	return z_s * (-2.0 * ((x / t) / z_m));
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    code = z_s * ((-2.0d0) * ((x / t) / z_m))
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
	return z_s * (-2.0 * ((x / t) / z_m));
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m, t):
	return z_s * (-2.0 * ((x / t) / z_m))
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m, t)
	return Float64(z_s * Float64(-2.0 * Float64(Float64(x / t) / z_m)))
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp = code(z_s, x, y, z_m, t)
	tmp = z_s * (-2.0 * ((x / t) / z_m));
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * N[(-2.0 * N[(N[(x / t), $MachinePrecision] / z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(-2 \cdot \frac{\frac{x}{t}}{z\_m}\right)
\end{array}
Derivation
  1. Initial program 88.2%

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

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

    \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
  4. Add Preprocessing
  5. Taylor expanded in y around 0 50.1%

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

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

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

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

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

    \[\leadsto -2 \cdot \color{blue}{\frac{\frac{x}{t}}{z}} \]
  11. Add Preprocessing

Alternative 11: 53.6% accurate, 1.6× speedup?

\[\begin{array}{l} z\_m = \left|z\right| \\ z\_s = \mathsf{copysign}\left(1, z\right) \\ z\_s \cdot \left(-2 \cdot \frac{x}{z\_m \cdot t}\right) \end{array} \]
z\_m = (fabs.f64 z)
z\_s = (copysign.f64 #s(literal 1 binary64) z)
(FPCore (z_s x y z_m t) :precision binary64 (* z_s (* -2.0 (/ x (* z_m t)))))
z\_m = fabs(z);
z\_s = copysign(1.0, z);
double code(double z_s, double x, double y, double z_m, double t) {
	return z_s * (-2.0 * (x / (z_m * t)));
}
z\_m = abs(z)
z\_s = copysign(1.0d0, z)
real(8) function code(z_s, x, y, z_m, t)
    real(8), intent (in) :: z_s
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    code = z_s * ((-2.0d0) * (x / (z_m * t)))
end function
z\_m = Math.abs(z);
z\_s = Math.copySign(1.0, z);
public static double code(double z_s, double x, double y, double z_m, double t) {
	return z_s * (-2.0 * (x / (z_m * t)));
}
z\_m = math.fabs(z)
z\_s = math.copysign(1.0, z)
def code(z_s, x, y, z_m, t):
	return z_s * (-2.0 * (x / (z_m * t)))
z\_m = abs(z)
z\_s = copysign(1.0, z)
function code(z_s, x, y, z_m, t)
	return Float64(z_s * Float64(-2.0 * Float64(x / Float64(z_m * t))))
end
z\_m = abs(z);
z\_s = sign(z) * abs(1.0);
function tmp = code(z_s, x, y, z_m, t)
	tmp = z_s * (-2.0 * (x / (z_m * t)));
end
z\_m = N[Abs[z], $MachinePrecision]
z\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[z$95$s_, x_, y_, z$95$m_, t_] := N[(z$95$s * N[(-2.0 * N[(x / N[(z$95$m * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
z\_m = \left|z\right|
\\
z\_s = \mathsf{copysign}\left(1, z\right)

\\
z\_s \cdot \left(-2 \cdot \frac{x}{z\_m \cdot t}\right)
\end{array}
Derivation
  1. Initial program 88.2%

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

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

    \[\leadsto \color{blue}{\frac{x \cdot 2}{z \cdot \left(y - t\right)}} \]
  4. Add Preprocessing
  5. Taylor expanded in y around 0 50.1%

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

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

    \[\leadsto \color{blue}{-2 \cdot \frac{x}{z \cdot t}} \]
  8. Add Preprocessing

Developer target: 97.2% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

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

  :alt
  (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))))