Linear.Projection:infinitePerspective from linear-1.19.1.3, A

Percentage Accurate: 89.5% → 96.3%
Time: 13.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: 96.3% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 92.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]

    if 2e-78 < (*.f64 x #s(literal 2 binary64))

    1. Initial program 86.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 74.0% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-168}:\\
\;\;\;\;\frac{\frac{\frac{x\_m}{t}}{-0.5}}{z}\\

\mathbf{elif}\;t \leq 13500000:\\
\;\;\;\;\frac{x\_m \cdot 2}{y \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.08e20

    1. Initial program 90.6%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]

    if -1.08e20 < t < 4e-185

    1. Initial program 93.0%

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

      \[\leadsto expr\]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]

    if 4e-185 < t < 8.4999999999999994e-168

    1. Initial program 84.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]
    6. Applied egg-rr0

      \[\leadsto expr\]

    if 8.4999999999999994e-168 < t < 1.35e7

    1. Initial program 98.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 0

      \[\leadsto expr\]
    4. Simplified0

      \[\leadsto expr\]

    if 1.35e7 < t

    1. Initial program 83.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]
    6. Applied egg-rr0

      \[\leadsto expr\]
    7. Applied egg-rr0

      \[\leadsto expr\]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 3: 74.0% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-168}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 66000000:\\
\;\;\;\;\frac{x\_m \cdot 2}{y \cdot z}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.4e18 or 4e-185 < t < 8.4999999999999994e-168

    1. Initial program 89.9%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]

    if -2.4e18 < t < 4e-185

    1. Initial program 93.0%

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

      \[\leadsto expr\]
    3. Add Preprocessing
    4. Taylor expanded in y around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]

    if 8.4999999999999994e-168 < t < 6.6e7

    1. Initial program 98.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 0

      \[\leadsto expr\]
    4. Simplified0

      \[\leadsto expr\]

    if 6.6e7 < t

    1. Initial program 83.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]
    6. Applied egg-rr0

      \[\leadsto expr\]
    7. Applied egg-rr0

      \[\leadsto expr\]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 4: 74.0% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-168}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 21000:\\
\;\;\;\;\frac{x\_m \cdot 2}{y \cdot z}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2e19 or 4e-185 < t < 8.4999999999999994e-168

    1. Initial program 89.9%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]

    if -2e19 < t < 4e-185

    1. Initial program 93.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 0

      \[\leadsto expr\]
    4. Simplified0

      \[\leadsto expr\]
    5. Applied egg-rr0

      \[\leadsto expr\]

    if 8.4999999999999994e-168 < t < 21000

    1. Initial program 98.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 0

      \[\leadsto expr\]
    4. Simplified0

      \[\leadsto expr\]

    if 21000 < t

    1. Initial program 83.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]
    6. Applied egg-rr0

      \[\leadsto expr\]
    7. Applied egg-rr0

      \[\leadsto expr\]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 5: 74.1% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-168}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 215000:\\
\;\;\;\;\frac{x\_m \cdot 2}{y \cdot z}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.15e20 or 4e-185 < t < 8.4999999999999994e-168 or 215000 < t

    1. Initial program 86.3%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]

    if -2.15e20 < t < 4e-185

    1. Initial program 93.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 0

      \[\leadsto expr\]
    4. Simplified0

      \[\leadsto expr\]
    5. Applied egg-rr0

      \[\leadsto expr\]

    if 8.4999999999999994e-168 < t < 215000

    1. Initial program 98.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 0

      \[\leadsto expr\]
    4. Simplified0

      \[\leadsto expr\]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 73.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 1200:\\
\;\;\;\;\frac{x\_m \cdot 2}{y \cdot z}\\

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


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

    1. Initial program 89.4%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]
    6. Applied egg-rr0

      \[\leadsto expr\]

    if -5e6 < t < 1200

    1. Initial program 94.4%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 0

      \[\leadsto expr\]
    4. Simplified0

      \[\leadsto expr\]

    if 1200 < t

    1. Initial program 83.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 7: 73.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 10500:\\
\;\;\;\;\frac{\frac{2}{z}}{y} \cdot x\_m\\

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


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

    1. Initial program 89.4%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]
    6. Applied egg-rr0

      \[\leadsto expr\]

    if -5e7 < t < 10500

    1. Initial program 94.4%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 0

      \[\leadsto expr\]
    4. Simplified0

      \[\leadsto expr\]
    5. Applied egg-rr0

      \[\leadsto expr\]

    if 10500 < t

    1. Initial program 83.8%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 8: 73.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x\_m}{z} \cdot \frac{-2}{t}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -0.9:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2050000:\\
\;\;\;\;\frac{\frac{2}{z}}{y} \cdot x\_m\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.900000000000000022 or 2.05e6 < t

    1. Initial program 86.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]

    if -0.900000000000000022 < t < 2.05e6

    1. Initial program 94.4%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 0

      \[\leadsto expr\]
    4. Simplified0

      \[\leadsto expr\]
    5. Applied egg-rr0

      \[\leadsto expr\]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 9: 73.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x\_m}{z} \cdot \frac{-2}{t}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -530000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 450000000:\\
\;\;\;\;\frac{2}{z \cdot y} \cdot x\_m\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.3e8 or 4.5e8 < t

    1. Initial program 86.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
    4. Taylor expanded in t around inf 0

      \[\leadsto expr\]
    5. Simplified0

      \[\leadsto expr\]

    if -5.3e8 < t < 4.5e8

    1. Initial program 94.4%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 0

      \[\leadsto expr\]
    4. Simplified0

      \[\leadsto expr\]
    5. Applied egg-rr0

      \[\leadsto expr\]
    6. Applied egg-rr0

      \[\leadsto expr\]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 96.7% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x #s(literal 2 binary64)) < 4.0000000000000001e-54

    1. Initial program 92.2%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]

    if 4.0000000000000001e-54 < (*.f64 x #s(literal 2 binary64))

    1. Initial program 84.9%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 11: 96.7% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x #s(literal 2 binary64)) < 1.00000000000000002e-46

    1. Initial program 92.3%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]

    if 1.00000000000000002e-46 < (*.f64 x #s(literal 2 binary64))

    1. Initial program 84.5%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 12: 96.2% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 91.9%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]

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

    1. Initial program 86.3%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 13: 94.0% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 90.0%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]

    if 7.50000000000000072e-21 < z

    1. Initial program 90.1%

      \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
    2. Add Preprocessing
    3. Applied egg-rr0

      \[\leadsto expr\]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 14: 91.0% accurate, 1.2× speedup?

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

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

    \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
  2. Add Preprocessing
  3. Applied egg-rr0

    \[\leadsto expr\]
  4. Add Preprocessing

Alternative 15: 53.5% accurate, 1.6× speedup?

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

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

    \[\frac{x \cdot 2}{y \cdot z - t \cdot z} \]
  2. Add Preprocessing
  3. Taylor expanded in y around inf 0

    \[\leadsto expr\]
  4. Simplified0

    \[\leadsto expr\]
  5. Applied egg-rr0

    \[\leadsto expr\]
  6. Applied egg-rr0

    \[\leadsto expr\]
  7. Add Preprocessing

Developer target: 97.1% 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 2024110 
(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))))