Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C

Percentage Accurate: 94.2% → 94.2%
Time: 7.7s
Alternatives: 11
Speedup: 1.0×

Specification

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

\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\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: 94.2% accurate, 1.0× speedup?

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

\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\end{array}

Alternative 1: 94.2% accurate, 1.0× speedup?

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

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

    \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
  2. Final simplification94.6%

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

Alternative 2: 73.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z + -1}\\
\mathbf{if}\;t \leq -5 \cdot 10^{+107}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 0.00146 \lor \neg \left(t \leq 7.1 \cdot 10^{+105}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.0000000000000002e107 or 3.60000000000000012e-66 < t < 0.0014599999999999999 or 7.1000000000000003e105 < t

    1. Initial program 98.8%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around 0 80.7%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot x\right)}{1 - z}} \]
      2. mul-1-neg80.7%

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

        \[\leadsto \frac{-\color{blue}{x \cdot t}}{1 - z} \]
      4. distribute-rgt-neg-in80.7%

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

        \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
      6. neg-mul-186.8%

        \[\leadsto x \cdot \frac{\color{blue}{-1 \cdot t}}{1 - z} \]
      7. *-commutative86.8%

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

        \[\leadsto x \cdot \color{blue}{\left(t \cdot \frac{-1}{1 - z}\right)} \]
      9. metadata-eval86.8%

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

        \[\leadsto x \cdot \left(t \cdot \color{blue}{\frac{1}{-1 \cdot \left(1 - z\right)}}\right) \]
      11. neg-mul-186.8%

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

        \[\leadsto x \cdot \color{blue}{\frac{t \cdot 1}{-\left(1 - z\right)}} \]
      13. *-rgt-identity86.8%

        \[\leadsto x \cdot \frac{\color{blue}{t}}{-\left(1 - z\right)} \]
      14. neg-sub086.8%

        \[\leadsto x \cdot \frac{t}{\color{blue}{0 - \left(1 - z\right)}} \]
      15. associate--r-86.8%

        \[\leadsto x \cdot \frac{t}{\color{blue}{\left(0 - 1\right) + z}} \]
      16. metadata-eval86.8%

        \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + z} \]
    4. Simplified86.8%

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

    if -5.0000000000000002e107 < t < 3.60000000000000012e-66

    1. Initial program 92.3%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around inf 85.3%

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

    if 0.0014599999999999999 < t < 7.1000000000000003e105

    1. Initial program 91.7%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around inf 63.0%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    6. Applied egg-rr59.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{+107}:\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-66}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;t \leq 0.00146 \lor \neg \left(t \leq 7.1 \cdot 10^{+105}\right):\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 3: 67.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ \mathbf{if}\;t \leq -2.9 \cdot 10^{+174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.9 \cdot 10^{+114}:\\ \;\;\;\;-x \cdot t\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 5.7 \cdot 10^{+62}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ t z))))
   (if (<= t -2.9e+174)
     t_1
     (if (<= t -4.9e+114)
       (- (* x t))
       (if (<= t -1.9e+25)
         (* y (/ x z))
         (if (<= t 5.7e+62) (* x (/ y z)) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double tmp;
	if (t <= -2.9e+174) {
		tmp = t_1;
	} else if (t <= -4.9e+114) {
		tmp = -(x * t);
	} else if (t <= -1.9e+25) {
		tmp = y * (x / z);
	} else if (t <= 5.7e+62) {
		tmp = x * (y / z);
	} 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) :: tmp
    t_1 = x * (t / z)
    if (t <= (-2.9d+174)) then
        tmp = t_1
    else if (t <= (-4.9d+114)) then
        tmp = -(x * t)
    else if (t <= (-1.9d+25)) then
        tmp = y * (x / z)
    else if (t <= 5.7d+62) then
        tmp = x * (y / z)
    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 * (t / z);
	double tmp;
	if (t <= -2.9e+174) {
		tmp = t_1;
	} else if (t <= -4.9e+114) {
		tmp = -(x * t);
	} else if (t <= -1.9e+25) {
		tmp = y * (x / z);
	} else if (t <= 5.7e+62) {
		tmp = x * (y / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / z)
	tmp = 0
	if t <= -2.9e+174:
		tmp = t_1
	elif t <= -4.9e+114:
		tmp = -(x * t)
	elif t <= -1.9e+25:
		tmp = y * (x / z)
	elif t <= 5.7e+62:
		tmp = x * (y / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t / z))
	tmp = 0.0
	if (t <= -2.9e+174)
		tmp = t_1;
	elseif (t <= -4.9e+114)
		tmp = Float64(-Float64(x * t));
	elseif (t <= -1.9e+25)
		tmp = Float64(y * Float64(x / z));
	elseif (t <= 5.7e+62)
		tmp = Float64(x * Float64(y / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t / z);
	tmp = 0.0;
	if (t <= -2.9e+174)
		tmp = t_1;
	elseif (t <= -4.9e+114)
		tmp = -(x * t);
	elseif (t <= -1.9e+25)
		tmp = y * (x / z);
	elseif (t <= 5.7e+62)
		tmp = x * (y / z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e+174], t$95$1, If[LessEqual[t, -4.9e+114], (-N[(x * t), $MachinePrecision]), If[LessEqual[t, -1.9e+25], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.7e+62], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{+174}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4.9 \cdot 10^{+114}:\\
\;\;\;\;-x \cdot t\\

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

\mathbf{elif}\;t \leq 5.7 \cdot 10^{+62}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.9e174 or 5.69999999999999998e62 < t

    1. Initial program 97.4%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around inf 60.0%

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv60.0%

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

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      3. *-lft-identity60.0%

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
    4. Simplified60.0%

      \[\leadsto x \cdot \color{blue}{\frac{y + t}{z}} \]
    5. Taylor expanded in y around 0 47.6%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{t}{z}} \]
      4. /-rgt-identity56.1%

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

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

    if -2.9e174 < t < -4.9000000000000001e114

    1. Initial program 99.9%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around 0 99.7%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot x\right)}{1 - z}} \]
      2. mul-1-neg99.7%

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

        \[\leadsto \frac{-\color{blue}{x \cdot t}}{1 - z} \]
      4. distribute-rgt-neg-in99.7%

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

        \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
      6. neg-mul-199.5%

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

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

        \[\leadsto x \cdot \color{blue}{\left(t \cdot \frac{-1}{1 - z}\right)} \]
      9. metadata-eval99.5%

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

        \[\leadsto x \cdot \left(t \cdot \color{blue}{\frac{1}{-1 \cdot \left(1 - z\right)}}\right) \]
      11. neg-mul-199.5%

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

        \[\leadsto x \cdot \color{blue}{\frac{t \cdot 1}{-\left(1 - z\right)}} \]
      13. *-rgt-identity99.5%

        \[\leadsto x \cdot \frac{\color{blue}{t}}{-\left(1 - z\right)} \]
      14. neg-sub099.5%

        \[\leadsto x \cdot \frac{t}{\color{blue}{0 - \left(1 - z\right)}} \]
      15. associate--r-99.5%

        \[\leadsto x \cdot \frac{t}{\color{blue}{\left(0 - 1\right) + z}} \]
      16. metadata-eval99.5%

        \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + z} \]
    4. Simplified99.5%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{-1 + z}{t}}} \]
      3. +-commutative99.1%

        \[\leadsto \frac{x}{\frac{\color{blue}{z + -1}}{t}} \]
    6. Applied egg-rr99.1%

      \[\leadsto \color{blue}{\frac{x}{\frac{z + -1}{t}}} \]
    7. Taylor expanded in z around 0 73.6%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
    8. Step-by-step derivation
      1. associate-*r*73.6%

        \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      2. neg-mul-173.6%

        \[\leadsto \color{blue}{\left(-t\right)} \cdot x \]
    9. Simplified73.6%

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

    if -4.9000000000000001e114 < t < -1.9e25

    1. Initial program 88.1%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around inf 58.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    6. Applied egg-rr50.3%

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
    8. Simplified53.0%

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

    if -1.9e25 < t < 5.69999999999999998e62

    1. Initial program 93.6%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around inf 81.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+174}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq -4.9 \cdot 10^{+114}:\\ \;\;\;\;-x \cdot t\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 5.7 \cdot 10^{+62}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]

Alternative 4: 67.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\frac{z}{t}}\\ \mathbf{if}\;t \leq -1.1 \cdot 10^{+174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.9 \cdot 10^{+114}:\\ \;\;\;\;-x \cdot t\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{+26}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+62}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (/ z t))))
   (if (<= t -1.1e+174)
     t_1
     (if (<= t -4.9e+114)
       (- (* x t))
       (if (<= t -1.3e+26)
         (* y (/ x z))
         (if (<= t 2.7e+62) (* x (/ y z)) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / (z / t);
	double tmp;
	if (t <= -1.1e+174) {
		tmp = t_1;
	} else if (t <= -4.9e+114) {
		tmp = -(x * t);
	} else if (t <= -1.3e+26) {
		tmp = y * (x / z);
	} else if (t <= 2.7e+62) {
		tmp = x * (y / z);
	} 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) :: tmp
    t_1 = x / (z / t)
    if (t <= (-1.1d+174)) then
        tmp = t_1
    else if (t <= (-4.9d+114)) then
        tmp = -(x * t)
    else if (t <= (-1.3d+26)) then
        tmp = y * (x / z)
    else if (t <= 2.7d+62) then
        tmp = x * (y / z)
    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 / (z / t);
	double tmp;
	if (t <= -1.1e+174) {
		tmp = t_1;
	} else if (t <= -4.9e+114) {
		tmp = -(x * t);
	} else if (t <= -1.3e+26) {
		tmp = y * (x / z);
	} else if (t <= 2.7e+62) {
		tmp = x * (y / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / (z / t)
	tmp = 0
	if t <= -1.1e+174:
		tmp = t_1
	elif t <= -4.9e+114:
		tmp = -(x * t)
	elif t <= -1.3e+26:
		tmp = y * (x / z)
	elif t <= 2.7e+62:
		tmp = x * (y / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(z / t))
	tmp = 0.0
	if (t <= -1.1e+174)
		tmp = t_1;
	elseif (t <= -4.9e+114)
		tmp = Float64(-Float64(x * t));
	elseif (t <= -1.3e+26)
		tmp = Float64(y * Float64(x / z));
	elseif (t <= 2.7e+62)
		tmp = Float64(x * Float64(y / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / (z / t);
	tmp = 0.0;
	if (t <= -1.1e+174)
		tmp = t_1;
	elseif (t <= -4.9e+114)
		tmp = -(x * t);
	elseif (t <= -1.3e+26)
		tmp = y * (x / z);
	elseif (t <= 2.7e+62)
		tmp = x * (y / z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+174], t$95$1, If[LessEqual[t, -4.9e+114], (-N[(x * t), $MachinePrecision]), If[LessEqual[t, -1.3e+26], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+62], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{t}}\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+174}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4.9 \cdot 10^{+114}:\\
\;\;\;\;-x \cdot t\\

\mathbf{elif}\;t \leq -1.3 \cdot 10^{+26}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{elif}\;t \leq 2.7 \cdot 10^{+62}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.1000000000000001e174 or 2.7e62 < t

    1. Initial program 97.4%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around inf 54.0%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. neg-mul-160.3%

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

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

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

    if -1.1000000000000001e174 < t < -4.9000000000000001e114

    1. Initial program 99.9%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around 0 99.7%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot x\right)}{1 - z}} \]
      2. mul-1-neg99.7%

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

        \[\leadsto \frac{-\color{blue}{x \cdot t}}{1 - z} \]
      4. distribute-rgt-neg-in99.7%

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

        \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
      6. neg-mul-199.5%

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

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

        \[\leadsto x \cdot \color{blue}{\left(t \cdot \frac{-1}{1 - z}\right)} \]
      9. metadata-eval99.5%

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

        \[\leadsto x \cdot \left(t \cdot \color{blue}{\frac{1}{-1 \cdot \left(1 - z\right)}}\right) \]
      11. neg-mul-199.5%

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

        \[\leadsto x \cdot \color{blue}{\frac{t \cdot 1}{-\left(1 - z\right)}} \]
      13. *-rgt-identity99.5%

        \[\leadsto x \cdot \frac{\color{blue}{t}}{-\left(1 - z\right)} \]
      14. neg-sub099.5%

        \[\leadsto x \cdot \frac{t}{\color{blue}{0 - \left(1 - z\right)}} \]
      15. associate--r-99.5%

        \[\leadsto x \cdot \frac{t}{\color{blue}{\left(0 - 1\right) + z}} \]
      16. metadata-eval99.5%

        \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + z} \]
    4. Simplified99.5%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{-1 + z}{t}}} \]
      3. +-commutative99.1%

        \[\leadsto \frac{x}{\frac{\color{blue}{z + -1}}{t}} \]
    6. Applied egg-rr99.1%

      \[\leadsto \color{blue}{\frac{x}{\frac{z + -1}{t}}} \]
    7. Taylor expanded in z around 0 73.6%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
    8. Step-by-step derivation
      1. associate-*r*73.6%

        \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      2. neg-mul-173.6%

        \[\leadsto \color{blue}{\left(-t\right)} \cdot x \]
    9. Simplified73.6%

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

    if -4.9000000000000001e114 < t < -1.30000000000000001e26

    1. Initial program 88.1%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around inf 58.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    6. Applied egg-rr50.3%

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
    8. Simplified53.0%

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

    if -1.30000000000000001e26 < t < 2.7e62

    1. Initial program 93.6%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around inf 81.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+174}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq -4.9 \cdot 10^{+114}:\\ \;\;\;\;-x \cdot t\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{+26}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+62}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \end{array} \]

Alternative 5: 67.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\frac{z}{t}}\\ \mathbf{if}\;t \leq -4 \cdot 10^{+174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{+114}:\\ \;\;\;\;-x \cdot t\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{+107}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+63}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (/ z t))))
   (if (<= t -4e+174)
     t_1
     (if (<= t -5.2e+114)
       (- (* x t))
       (if (<= t -5.2e+107)
         (* x (/ t z))
         (if (<= t 9.5e+63) (/ x (/ z y)) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / (z / t);
	double tmp;
	if (t <= -4e+174) {
		tmp = t_1;
	} else if (t <= -5.2e+114) {
		tmp = -(x * t);
	} else if (t <= -5.2e+107) {
		tmp = x * (t / z);
	} else if (t <= 9.5e+63) {
		tmp = x / (z / y);
	} 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) :: tmp
    t_1 = x / (z / t)
    if (t <= (-4d+174)) then
        tmp = t_1
    else if (t <= (-5.2d+114)) then
        tmp = -(x * t)
    else if (t <= (-5.2d+107)) then
        tmp = x * (t / z)
    else if (t <= 9.5d+63) then
        tmp = x / (z / y)
    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 / (z / t);
	double tmp;
	if (t <= -4e+174) {
		tmp = t_1;
	} else if (t <= -5.2e+114) {
		tmp = -(x * t);
	} else if (t <= -5.2e+107) {
		tmp = x * (t / z);
	} else if (t <= 9.5e+63) {
		tmp = x / (z / y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / (z / t)
	tmp = 0
	if t <= -4e+174:
		tmp = t_1
	elif t <= -5.2e+114:
		tmp = -(x * t)
	elif t <= -5.2e+107:
		tmp = x * (t / z)
	elif t <= 9.5e+63:
		tmp = x / (z / y)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(z / t))
	tmp = 0.0
	if (t <= -4e+174)
		tmp = t_1;
	elseif (t <= -5.2e+114)
		tmp = Float64(-Float64(x * t));
	elseif (t <= -5.2e+107)
		tmp = Float64(x * Float64(t / z));
	elseif (t <= 9.5e+63)
		tmp = Float64(x / Float64(z / y));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / (z / t);
	tmp = 0.0;
	if (t <= -4e+174)
		tmp = t_1;
	elseif (t <= -5.2e+114)
		tmp = -(x * t);
	elseif (t <= -5.2e+107)
		tmp = x * (t / z);
	elseif (t <= 9.5e+63)
		tmp = x / (z / y);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e+174], t$95$1, If[LessEqual[t, -5.2e+114], (-N[(x * t), $MachinePrecision]), If[LessEqual[t, -5.2e+107], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+63], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -5.2 \cdot 10^{+114}:\\
\;\;\;\;-x \cdot t\\

\mathbf{elif}\;t \leq -5.2 \cdot 10^{+107}:\\
\;\;\;\;x \cdot \frac{t}{z}\\

\mathbf{elif}\;t \leq 9.5 \cdot 10^{+63}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.00000000000000028e174 or 9.5000000000000003e63 < t

    1. Initial program 97.4%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around inf 54.0%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. neg-mul-160.3%

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

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

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

    if -4.00000000000000028e174 < t < -5.2000000000000001e114

    1. Initial program 99.9%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around 0 99.7%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot x\right)}{1 - z}} \]
      2. mul-1-neg99.7%

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

        \[\leadsto \frac{-\color{blue}{x \cdot t}}{1 - z} \]
      4. distribute-rgt-neg-in99.7%

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

        \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
      6. neg-mul-199.5%

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

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

        \[\leadsto x \cdot \color{blue}{\left(t \cdot \frac{-1}{1 - z}\right)} \]
      9. metadata-eval99.5%

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

        \[\leadsto x \cdot \left(t \cdot \color{blue}{\frac{1}{-1 \cdot \left(1 - z\right)}}\right) \]
      11. neg-mul-199.5%

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

        \[\leadsto x \cdot \color{blue}{\frac{t \cdot 1}{-\left(1 - z\right)}} \]
      13. *-rgt-identity99.5%

        \[\leadsto x \cdot \frac{\color{blue}{t}}{-\left(1 - z\right)} \]
      14. neg-sub099.5%

        \[\leadsto x \cdot \frac{t}{\color{blue}{0 - \left(1 - z\right)}} \]
      15. associate--r-99.5%

        \[\leadsto x \cdot \frac{t}{\color{blue}{\left(0 - 1\right) + z}} \]
      16. metadata-eval99.5%

        \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + z} \]
    4. Simplified99.5%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{-1 + z}{t}}} \]
      3. +-commutative99.1%

        \[\leadsto \frac{x}{\frac{\color{blue}{z + -1}}{t}} \]
    6. Applied egg-rr99.1%

      \[\leadsto \color{blue}{\frac{x}{\frac{z + -1}{t}}} \]
    7. Taylor expanded in z around 0 73.6%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
    8. Step-by-step derivation
      1. associate-*r*73.6%

        \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      2. neg-mul-173.6%

        \[\leadsto \color{blue}{\left(-t\right)} \cdot x \]
    9. Simplified73.6%

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

    if -5.2000000000000001e114 < t < -5.2000000000000002e107

    1. Initial program 100.0%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around inf 100.0%

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv100.0%

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

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      3. *-lft-identity100.0%

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
    4. Simplified100.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{t}{z}} \]
      4. /-rgt-identity100.0%

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

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

    if -5.2000000000000002e107 < t < 9.5000000000000003e63

    1. Initial program 93.0%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around inf 86.7%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. neg-mul-181.7%

        \[\leadsto \frac{x}{\frac{z}{y - \color{blue}{\left(-t\right)}}} \]
    4. Simplified81.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+174}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{+114}:\\ \;\;\;\;-x \cdot t\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{+107}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+63}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \end{array} \]

Alternative 6: 67.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\frac{z}{t}}\\ \mathbf{if}\;t \leq -1.7 \cdot 10^{+174}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.25 \cdot 10^{+111}:\\ \;\;\;\;-x \cdot t\\ \mathbf{elif}\;t \leq -8 \cdot 10^{+107}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+106}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (/ z t))))
   (if (<= t -1.7e+174)
     t_1
     (if (<= t -2.25e+111)
       (- (* x t))
       (if (<= t -8e+107)
         (* x (/ t z))
         (if (<= t 7.5e+106) (/ (* x y) z) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / (z / t);
	double tmp;
	if (t <= -1.7e+174) {
		tmp = t_1;
	} else if (t <= -2.25e+111) {
		tmp = -(x * t);
	} else if (t <= -8e+107) {
		tmp = x * (t / z);
	} else if (t <= 7.5e+106) {
		tmp = (x * y) / z;
	} 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) :: tmp
    t_1 = x / (z / t)
    if (t <= (-1.7d+174)) then
        tmp = t_1
    else if (t <= (-2.25d+111)) then
        tmp = -(x * t)
    else if (t <= (-8d+107)) then
        tmp = x * (t / z)
    else if (t <= 7.5d+106) then
        tmp = (x * y) / z
    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 / (z / t);
	double tmp;
	if (t <= -1.7e+174) {
		tmp = t_1;
	} else if (t <= -2.25e+111) {
		tmp = -(x * t);
	} else if (t <= -8e+107) {
		tmp = x * (t / z);
	} else if (t <= 7.5e+106) {
		tmp = (x * y) / z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / (z / t)
	tmp = 0
	if t <= -1.7e+174:
		tmp = t_1
	elif t <= -2.25e+111:
		tmp = -(x * t)
	elif t <= -8e+107:
		tmp = x * (t / z)
	elif t <= 7.5e+106:
		tmp = (x * y) / z
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(z / t))
	tmp = 0.0
	if (t <= -1.7e+174)
		tmp = t_1;
	elseif (t <= -2.25e+111)
		tmp = Float64(-Float64(x * t));
	elseif (t <= -8e+107)
		tmp = Float64(x * Float64(t / z));
	elseif (t <= 7.5e+106)
		tmp = Float64(Float64(x * y) / z);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / (z / t);
	tmp = 0.0;
	if (t <= -1.7e+174)
		tmp = t_1;
	elseif (t <= -2.25e+111)
		tmp = -(x * t);
	elseif (t <= -8e+107)
		tmp = x * (t / z);
	elseif (t <= 7.5e+106)
		tmp = (x * y) / z;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+174], t$95$1, If[LessEqual[t, -2.25e+111], (-N[(x * t), $MachinePrecision]), If[LessEqual[t, -8e+107], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+106], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{t}}\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+174}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -2.25 \cdot 10^{+111}:\\
\;\;\;\;-x \cdot t\\

\mathbf{elif}\;t \leq -8 \cdot 10^{+107}:\\
\;\;\;\;x \cdot \frac{t}{z}\\

\mathbf{elif}\;t \leq 7.5 \cdot 10^{+106}:\\
\;\;\;\;\frac{x \cdot y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.7000000000000001e174 or 7.50000000000000058e106 < t

    1. Initial program 98.4%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around inf 47.0%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. neg-mul-155.9%

        \[\leadsto \frac{x}{\frac{z}{y - \color{blue}{\left(-t\right)}}} \]
    4. Simplified55.9%

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

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

    if -1.7000000000000001e174 < t < -2.25e111

    1. Initial program 99.9%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around 0 99.7%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot x\right)}{1 - z}} \]
      2. mul-1-neg99.7%

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

        \[\leadsto \frac{-\color{blue}{x \cdot t}}{1 - z} \]
      4. distribute-rgt-neg-in99.7%

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

        \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
      6. neg-mul-199.5%

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

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

        \[\leadsto x \cdot \color{blue}{\left(t \cdot \frac{-1}{1 - z}\right)} \]
      9. metadata-eval99.5%

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

        \[\leadsto x \cdot \left(t \cdot \color{blue}{\frac{1}{-1 \cdot \left(1 - z\right)}}\right) \]
      11. neg-mul-199.5%

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

        \[\leadsto x \cdot \color{blue}{\frac{t \cdot 1}{-\left(1 - z\right)}} \]
      13. *-rgt-identity99.5%

        \[\leadsto x \cdot \frac{\color{blue}{t}}{-\left(1 - z\right)} \]
      14. neg-sub099.5%

        \[\leadsto x \cdot \frac{t}{\color{blue}{0 - \left(1 - z\right)}} \]
      15. associate--r-99.5%

        \[\leadsto x \cdot \frac{t}{\color{blue}{\left(0 - 1\right) + z}} \]
      16. metadata-eval99.5%

        \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + z} \]
    4. Simplified99.5%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{-1 + z}{t}}} \]
      3. +-commutative99.1%

        \[\leadsto \frac{x}{\frac{\color{blue}{z + -1}}{t}} \]
    6. Applied egg-rr99.1%

      \[\leadsto \color{blue}{\frac{x}{\frac{z + -1}{t}}} \]
    7. Taylor expanded in z around 0 73.6%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
    8. Step-by-step derivation
      1. associate-*r*73.6%

        \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      2. neg-mul-173.6%

        \[\leadsto \color{blue}{\left(-t\right)} \cdot x \]
    9. Simplified73.6%

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

    if -2.25e111 < t < -7.9999999999999998e107

    1. Initial program 100.0%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around inf 100.0%

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv100.0%

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

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      3. *-lft-identity100.0%

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
    4. Simplified100.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{t}{z}} \]
      4. /-rgt-identity100.0%

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

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

    if -7.9999999999999998e107 < t < 7.50000000000000058e106

    1. Initial program 93.0%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around inf 78.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+174}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq -2.25 \cdot 10^{+111}:\\ \;\;\;\;-x \cdot t\\ \mathbf{elif}\;t \leq -8 \cdot 10^{+107}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+106}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \end{array} \]

Alternative 7: 73.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+201}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{+44}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 82:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+215}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -1.6e+201)
   (/ (* x y) z)
   (if (<= z -2.1e+44)
     (* x (/ t z))
     (if (<= z 82.0)
       (* x (- (/ y z) t))
       (if (<= z 3.4e+215) (/ x (/ z t)) (* x (/ y z)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.6e+201) {
		tmp = (x * y) / z;
	} else if (z <= -2.1e+44) {
		tmp = x * (t / z);
	} else if (z <= 82.0) {
		tmp = x * ((y / z) - t);
	} else if (z <= 3.4e+215) {
		tmp = x / (z / t);
	} else {
		tmp = x * (y / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-1.6d+201)) then
        tmp = (x * y) / z
    else if (z <= (-2.1d+44)) then
        tmp = x * (t / z)
    else if (z <= 82.0d0) then
        tmp = x * ((y / z) - t)
    else if (z <= 3.4d+215) then
        tmp = x / (z / t)
    else
        tmp = x * (y / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -1.6e+201) {
		tmp = (x * y) / z;
	} else if (z <= -2.1e+44) {
		tmp = x * (t / z);
	} else if (z <= 82.0) {
		tmp = x * ((y / z) - t);
	} else if (z <= 3.4e+215) {
		tmp = x / (z / t);
	} else {
		tmp = x * (y / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -1.6e+201:
		tmp = (x * y) / z
	elif z <= -2.1e+44:
		tmp = x * (t / z)
	elif z <= 82.0:
		tmp = x * ((y / z) - t)
	elif z <= 3.4e+215:
		tmp = x / (z / t)
	else:
		tmp = x * (y / z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -1.6e+201)
		tmp = Float64(Float64(x * y) / z);
	elseif (z <= -2.1e+44)
		tmp = Float64(x * Float64(t / z));
	elseif (z <= 82.0)
		tmp = Float64(x * Float64(Float64(y / z) - t));
	elseif (z <= 3.4e+215)
		tmp = Float64(x / Float64(z / t));
	else
		tmp = Float64(x * Float64(y / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -1.6e+201)
		tmp = (x * y) / z;
	elseif (z <= -2.1e+44)
		tmp = x * (t / z);
	elseif (z <= 82.0)
		tmp = x * ((y / z) - t);
	elseif (z <= 3.4e+215)
		tmp = x / (z / t);
	else
		tmp = x * (y / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.6e+201], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -2.1e+44], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 82.0], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e+215], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.1 \cdot 10^{+44}:\\
\;\;\;\;x \cdot \frac{t}{z}\\

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

\mathbf{elif}\;z \leq 3.4 \cdot 10^{+215}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.6e201

    1. Initial program 87.6%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around inf 72.3%

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

    if -1.6e201 < z < -2.09999999999999987e44

    1. Initial program 97.0%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around inf 97.0%

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv97.0%

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

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      3. *-lft-identity97.0%

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
    4. Simplified97.0%

      \[\leadsto x \cdot \color{blue}{\frac{y + t}{z}} \]
    5. Taylor expanded in y around 0 68.9%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{t}{z}} \]
      4. /-rgt-identity74.0%

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

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

    if -2.09999999999999987e44 < z < 82

    1. Initial program 94.3%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around 0 91.3%

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

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

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

        \[\leadsto \frac{y}{z} \cdot x + \color{blue}{\left(-t\right)} \cdot x \]
      4. distribute-rgt-out90.7%

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

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

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

    if 82 < z < 3.40000000000000018e215

    1. Initial program 97.4%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around inf 89.3%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      3. neg-mul-194.0%

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

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

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

    if 3.40000000000000018e215 < z

    1. Initial program 95.4%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around inf 77.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+201}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{+44}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 82:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+215}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]

Alternative 8: 63.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+200} \lor \neg \left(z \leq -1150000\right) \land z \leq 92000:\\
\;\;\;\;y \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.02000000000000001e200 or -1.15e6 < z < 92000

    1. Initial program 92.9%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around inf 69.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    6. Applied egg-rr67.0%

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

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

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

    if -1.02000000000000001e200 < z < -1.15e6 or 92000 < z

    1. Initial program 97.1%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around inf 95.2%

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv95.2%

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

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

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

      \[\leadsto x \cdot \color{blue}{\frac{y + t}{z}} \]
    5. Taylor expanded in y around 0 59.8%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{t}{z}} \]
      4. /-rgt-identity63.1%

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

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

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

Alternative 9: 93.5% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3e3 or 9.00000000000000057e-5 < z

    1. Initial program 95.4%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around inf 93.9%

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv93.9%

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

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      3. *-lft-identity93.9%

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
    4. Simplified93.9%

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

    if -3e3 < z < 9.00000000000000057e-5

    1. Initial program 93.8%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around 0 94.1%

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

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

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

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

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

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

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

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

Alternative 10: 44.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{-12} \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\

\mathbf{else}:\\
\;\;\;\;-x \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.0599999999999999e-12 or 1 < z

    1. Initial program 95.5%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in z around inf 93.9%

      \[\leadsto x \cdot \color{blue}{\frac{y - -1 \cdot t}{z}} \]
    3. Step-by-step derivation
      1. cancel-sign-sub-inv93.9%

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

        \[\leadsto x \cdot \frac{y + \color{blue}{1} \cdot t}{z} \]
      3. *-lft-identity93.9%

        \[\leadsto x \cdot \frac{y + \color{blue}{t}}{z} \]
    4. Simplified93.9%

      \[\leadsto x \cdot \color{blue}{\frac{y + t}{z}} \]
    5. Taylor expanded in y around 0 56.1%

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

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

        \[\leadsto \frac{x \cdot t}{\color{blue}{1 \cdot z}} \]
      3. times-frac58.7%

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{t}{z}} \]
      4. /-rgt-identity58.7%

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

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

    if -1.0599999999999999e-12 < z < 1

    1. Initial program 93.7%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Taylor expanded in y around 0 37.0%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot x\right)}{1 - z}} \]
      2. mul-1-neg37.0%

        \[\leadsto \frac{\color{blue}{-t \cdot x}}{1 - z} \]
      3. *-commutative37.0%

        \[\leadsto \frac{-\color{blue}{x \cdot t}}{1 - z} \]
      4. distribute-rgt-neg-in37.0%

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

        \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
      6. neg-mul-137.1%

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

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

        \[\leadsto x \cdot \color{blue}{\left(t \cdot \frac{-1}{1 - z}\right)} \]
      9. metadata-eval37.1%

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

        \[\leadsto x \cdot \left(t \cdot \color{blue}{\frac{1}{-1 \cdot \left(1 - z\right)}}\right) \]
      11. neg-mul-137.1%

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

        \[\leadsto x \cdot \color{blue}{\frac{t \cdot 1}{-\left(1 - z\right)}} \]
      13. *-rgt-identity37.1%

        \[\leadsto x \cdot \frac{\color{blue}{t}}{-\left(1 - z\right)} \]
      14. neg-sub037.1%

        \[\leadsto x \cdot \frac{t}{\color{blue}{0 - \left(1 - z\right)}} \]
      15. associate--r-37.1%

        \[\leadsto x \cdot \frac{t}{\color{blue}{\left(0 - 1\right) + z}} \]
      16. metadata-eval37.1%

        \[\leadsto x \cdot \frac{t}{\color{blue}{-1} + z} \]
    4. Simplified37.1%

      \[\leadsto \color{blue}{x \cdot \frac{t}{-1 + z}} \]
    5. Step-by-step derivation
      1. clear-num37.0%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{-1 + z}{t}}} \]
      3. +-commutative36.9%

        \[\leadsto \frac{x}{\frac{\color{blue}{z + -1}}{t}} \]
    6. Applied egg-rr36.9%

      \[\leadsto \color{blue}{\frac{x}{\frac{z + -1}{t}}} \]
    7. Taylor expanded in z around 0 36.8%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
    8. Step-by-step derivation
      1. associate-*r*36.8%

        \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      2. neg-mul-136.8%

        \[\leadsto \color{blue}{\left(-t\right)} \cdot x \]
    9. Simplified36.8%

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

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

Alternative 11: 22.4% accurate, 2.8× speedup?

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

\\
-x \cdot t
\end{array}
Derivation
  1. Initial program 94.6%

    \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
  2. Taylor expanded in y around 0 47.8%

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

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot x\right)}{1 - z}} \]
    2. mul-1-neg47.8%

      \[\leadsto \frac{\color{blue}{-t \cdot x}}{1 - z} \]
    3. *-commutative47.8%

      \[\leadsto \frac{-\color{blue}{x \cdot t}}{1 - z} \]
    4. distribute-rgt-neg-in47.8%

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

      \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
    6. neg-mul-149.2%

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

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

      \[\leadsto x \cdot \color{blue}{\left(t \cdot \frac{-1}{1 - z}\right)} \]
    9. metadata-eval49.1%

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

      \[\leadsto x \cdot \left(t \cdot \color{blue}{\frac{1}{-1 \cdot \left(1 - z\right)}}\right) \]
    11. neg-mul-149.1%

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

      \[\leadsto x \cdot \color{blue}{\frac{t \cdot 1}{-\left(1 - z\right)}} \]
    13. *-rgt-identity49.2%

      \[\leadsto x \cdot \frac{\color{blue}{t}}{-\left(1 - z\right)} \]
    14. neg-sub049.2%

      \[\leadsto x \cdot \frac{t}{\color{blue}{0 - \left(1 - z\right)}} \]
    15. associate--r-49.2%

      \[\leadsto x \cdot \frac{t}{\color{blue}{\left(0 - 1\right) + z}} \]
    16. metadata-eval49.2%

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{-1 + z}{t}}} \]
    3. +-commutative48.7%

      \[\leadsto \frac{x}{\frac{\color{blue}{z + -1}}{t}} \]
  6. Applied egg-rr48.7%

    \[\leadsto \color{blue}{\frac{x}{\frac{z + -1}{t}}} \]
  7. Taylor expanded in z around 0 24.3%

    \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
  8. Step-by-step derivation
    1. associate-*r*24.3%

      \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
    2. neg-mul-124.3%

      \[\leadsto \color{blue}{\left(-t\right)} \cdot x \]
  9. Simplified24.3%

    \[\leadsto \color{blue}{\left(-t\right) \cdot x} \]
  10. Final simplification24.3%

    \[\leadsto -x \cdot t \]

Developer target: 94.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\ t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\ \mathbf{if}\;t_2 < -7.623226303312042 \cdot 10^{-196}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 < 1.4133944927702302 \cdot 10^{-211}:\\ \;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))))
        (t_2 (* x (- (/ y z) (/ t (- 1.0 z))))))
   (if (< t_2 -7.623226303312042e-196)
     t_1
     (if (< t_2 1.4133944927702302e-211)
       (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z))))
       t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
	double t_2 = x * ((y / z) - (t / (1.0 - z)));
	double tmp;
	if (t_2 < -7.623226303312042e-196) {
		tmp = t_1;
	} else if (t_2 < 1.4133944927702302e-211) {
		tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
	} 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 / z) - (t * (1.0d0 / (1.0d0 - z))))
    t_2 = x * ((y / z) - (t / (1.0d0 - z)))
    if (t_2 < (-7.623226303312042d-196)) then
        tmp = t_1
    else if (t_2 < 1.4133944927702302d-211) then
        tmp = ((y * x) / z) + -((t * x) / (1.0d0 - z))
    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 / z) - (t * (1.0 / (1.0 - z))));
	double t_2 = x * ((y / z) - (t / (1.0 - z)));
	double tmp;
	if (t_2 < -7.623226303312042e-196) {
		tmp = t_1;
	} else if (t_2 < 1.4133944927702302e-211) {
		tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))))
	t_2 = x * ((y / z) - (t / (1.0 - z)))
	tmp = 0
	if t_2 < -7.623226303312042e-196:
		tmp = t_1
	elif t_2 < 1.4133944927702302e-211:
		tmp = ((y * x) / z) + -((t * x) / (1.0 - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(Float64(y / z) - Float64(t * Float64(1.0 / Float64(1.0 - z)))))
	t_2 = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z))))
	tmp = 0.0
	if (t_2 < -7.623226303312042e-196)
		tmp = t_1;
	elseif (t_2 < 1.4133944927702302e-211)
		tmp = Float64(Float64(Float64(y * x) / z) + Float64(-Float64(Float64(t * x) / Float64(1.0 - z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
	t_2 = x * ((y / z) - (t / (1.0 - z)));
	tmp = 0.0;
	if (t_2 < -7.623226303312042e-196)
		tmp = t_1;
	elseif (t_2 < 1.4133944927702302e-211)
		tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -7.623226303312042e-196], t$95$1, If[Less[t$95$2, 1.4133944927702302e-211], N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] + (-N[(N[(t * x), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_2 < 1.4133944927702302 \cdot 10^{-211}:\\
\;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023240 
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
  :precision binary64

  :herbie-target
  (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) -7.623226303312042e-196) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))) (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) 1.4133944927702302e-211) (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z)))) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z)))))))

  (* x (- (/ y z) (/ t (- 1.0 z)))))