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

Percentage Accurate: 94.1% → 99.5%
Time: 8.9s
Alternatives: 12
Speedup: 0.2×

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 12 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.1% 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: 99.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x}{z}\\ t_2 := \frac{y}{z} - \frac{t}{1 - z}\\ t_3 := t_2 \cdot x\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{-181}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{-307}:\\ \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\ \mathbf{elif}\;t_2 \leq 10^{+306}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (/ x z))) (t_2 (- (/ y z) (/ t (- 1.0 z)))) (t_3 (* t_2 x)))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -1e-181)
       t_3
       (if (<= t_2 2e-307)
         (* (/ x z) (+ y t))
         (if (<= t_2 1e+306) t_3 t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (x / z);
	double t_2 = (y / z) - (t / (1.0 - z));
	double t_3 = t_2 * x;
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -1e-181) {
		tmp = t_3;
	} else if (t_2 <= 2e-307) {
		tmp = (x / z) * (y + t);
	} else if (t_2 <= 1e+306) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = y * (x / z);
	double t_2 = (y / z) - (t / (1.0 - z));
	double t_3 = t_2 * x;
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -1e-181) {
		tmp = t_3;
	} else if (t_2 <= 2e-307) {
		tmp = (x / z) * (y + t);
	} else if (t_2 <= 1e+306) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (x / z)
	t_2 = (y / z) - (t / (1.0 - z))
	t_3 = t_2 * x
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -1e-181:
		tmp = t_3
	elif t_2 <= 2e-307:
		tmp = (x / z) * (y + t)
	elif t_2 <= 1e+306:
		tmp = t_3
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(x / z))
	t_2 = Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))
	t_3 = Float64(t_2 * x)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -1e-181)
		tmp = t_3;
	elseif (t_2 <= 2e-307)
		tmp = Float64(Float64(x / z) * Float64(y + t));
	elseif (t_2 <= 1e+306)
		tmp = t_3;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (x / z);
	t_2 = (y / z) - (t / (1.0 - z));
	t_3 = t_2 * x;
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -1e-181)
		tmp = t_3;
	elseif (t_2 <= 2e-307)
		tmp = (x / z) * (y + t);
	elseif (t_2 <= 1e+306)
		tmp = t_3;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * x), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-181], t$95$3, If[LessEqual[t$95$2, 2e-307], N[(N[(x / z), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+306], t$95$3, t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
t_2 := \frac{y}{z} - \frac{t}{1 - z}\\
t_3 := t_2 \cdot x\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-181}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{-307}:\\
\;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\

\mathbf{elif}\;t_2 \leq 10^{+306}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -inf.0 or 1.00000000000000002e306 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))

    1. Initial program 66.0%

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

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

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

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

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

    if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -1.00000000000000005e-181 or 1.99999999999999982e-307 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 1.00000000000000002e306

    1. Initial program 99.7%

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

    if -1.00000000000000005e-181 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 1.99999999999999982e-307

    1. Initial program 74.7%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      3. cancel-sign-sub-inv99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} - \frac{t}{1 - z} \leq -\infty:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{y}{z} - \frac{t}{1 - z} \leq -1 \cdot 10^{-181}:\\ \;\;\;\;\left(\frac{y}{z} - \frac{t}{1 - z}\right) \cdot x\\ \mathbf{elif}\;\frac{y}{z} - \frac{t}{1 - z} \leq 2 \cdot 10^{-307}:\\ \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\ \mathbf{elif}\;\frac{y}{z} - \frac{t}{1 - z} \leq 10^{+306}:\\ \;\;\;\;\left(\frac{y}{z} - \frac{t}{1 - z}\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 2: 91.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - \left(t + z \cdot t\right)\right)\\
t_2 := \frac{x}{\frac{z}{y + t}}\\
\mathbf{if}\;z \leq -0.76:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -5.6 \cdot 10^{-163}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 3.5 \cdot 10^{-255}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -0.76000000000000001 or 1 < z

    1. Initial program 95.6%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      2. cancel-sign-sub-inv93.5%

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      5. +-commutative93.5%

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

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

    if -0.76000000000000001 < z < -5.5999999999999999e-163 or 3.49999999999999979e-255 < z < 1

    1. Initial program 97.4%

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

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

    if -5.5999999999999999e-163 < z < 3.49999999999999979e-255

    1. Initial program 79.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.76:\\ \;\;\;\;\frac{x}{\frac{z}{y + t}}\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-163}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - \left(t + z \cdot t\right)\right)\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-255}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - \left(t + z \cdot t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y + t}}\\ \end{array} \]

Alternative 3: 72.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ t_2 := x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{if}\;z \leq -1050:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-163}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-256}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+29}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+116}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+212}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ t z))) (t_2 (* x (- (/ y z) t))))
   (if (<= z -1050.0)
     t_1
     (if (<= z -9.2e-163)
       t_2
       (if (<= z 1.25e-256)
         (* y (/ x z))
         (if (<= z 4.3e+29)
           t_2
           (if (<= z 2.6e+116)
             t_1
             (if (<= z 2.5e+212) (* (/ y z) x) (/ t (/ z x))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double t_2 = x * ((y / z) - t);
	double tmp;
	if (z <= -1050.0) {
		tmp = t_1;
	} else if (z <= -9.2e-163) {
		tmp = t_2;
	} else if (z <= 1.25e-256) {
		tmp = y * (x / z);
	} else if (z <= 4.3e+29) {
		tmp = t_2;
	} else if (z <= 2.6e+116) {
		tmp = t_1;
	} else if (z <= 2.5e+212) {
		tmp = (y / z) * x;
	} else {
		tmp = t / (z / x);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (t / z)
    t_2 = x * ((y / z) - t)
    if (z <= (-1050.0d0)) then
        tmp = t_1
    else if (z <= (-9.2d-163)) then
        tmp = t_2
    else if (z <= 1.25d-256) then
        tmp = y * (x / z)
    else if (z <= 4.3d+29) then
        tmp = t_2
    else if (z <= 2.6d+116) then
        tmp = t_1
    else if (z <= 2.5d+212) then
        tmp = (y / z) * x
    else
        tmp = t / (z / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double t_2 = x * ((y / z) - t);
	double tmp;
	if (z <= -1050.0) {
		tmp = t_1;
	} else if (z <= -9.2e-163) {
		tmp = t_2;
	} else if (z <= 1.25e-256) {
		tmp = y * (x / z);
	} else if (z <= 4.3e+29) {
		tmp = t_2;
	} else if (z <= 2.6e+116) {
		tmp = t_1;
	} else if (z <= 2.5e+212) {
		tmp = (y / z) * x;
	} else {
		tmp = t / (z / x);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / z)
	t_2 = x * ((y / z) - t)
	tmp = 0
	if z <= -1050.0:
		tmp = t_1
	elif z <= -9.2e-163:
		tmp = t_2
	elif z <= 1.25e-256:
		tmp = y * (x / z)
	elif z <= 4.3e+29:
		tmp = t_2
	elif z <= 2.6e+116:
		tmp = t_1
	elif z <= 2.5e+212:
		tmp = (y / z) * x
	else:
		tmp = t / (z / x)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t / z))
	t_2 = Float64(x * Float64(Float64(y / z) - t))
	tmp = 0.0
	if (z <= -1050.0)
		tmp = t_1;
	elseif (z <= -9.2e-163)
		tmp = t_2;
	elseif (z <= 1.25e-256)
		tmp = Float64(y * Float64(x / z));
	elseif (z <= 4.3e+29)
		tmp = t_2;
	elseif (z <= 2.6e+116)
		tmp = t_1;
	elseif (z <= 2.5e+212)
		tmp = Float64(Float64(y / z) * x);
	else
		tmp = Float64(t / Float64(z / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t / z);
	t_2 = x * ((y / z) - t);
	tmp = 0.0;
	if (z <= -1050.0)
		tmp = t_1;
	elseif (z <= -9.2e-163)
		tmp = t_2;
	elseif (z <= 1.25e-256)
		tmp = y * (x / z);
	elseif (z <= 4.3e+29)
		tmp = t_2;
	elseif (z <= 2.6e+116)
		tmp = t_1;
	elseif (z <= 2.5e+212)
		tmp = (y / z) * x;
	else
		tmp = t / (z / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1050.0], t$95$1, If[LessEqual[z, -9.2e-163], t$95$2, If[LessEqual[z, 1.25e-256], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e+29], t$95$2, If[LessEqual[z, 2.6e+116], t$95$1, If[LessEqual[z, 2.5e+212], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
t_2 := x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{if}\;z \leq -1050:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -9.2 \cdot 10^{-163}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.25 \cdot 10^{-256}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{elif}\;z \leq 4.3 \cdot 10^{+29}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+116}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{+212}:\\
\;\;\;\;\frac{y}{z} \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1050 or 4.3000000000000003e29 < z < 2.59999999999999987e116

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t + y}{\frac{z}{x}}} \]
    7. Taylor expanded in t around inf 64.5%

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

        \[\leadsto \color{blue}{\frac{t}{z} \cdot x} \]
    9. Simplified68.5%

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

    if -1050 < z < -9.1999999999999997e-163 or 1.25e-256 < z < 4.3000000000000003e29

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

    if -9.1999999999999997e-163 < z < 1.25e-256

    1. Initial program 79.5%

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

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

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

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

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

    if 2.59999999999999987e116 < z < 2.49999999999999996e212

    1. Initial program 99.9%

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

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

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

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

    if 2.49999999999999996e212 < z

    1. Initial program 88.3%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      3. cancel-sign-sub-inv82.1%

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{1} \cdot t\right) \]
      5. *-lft-identity82.1%

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

        \[\leadsto \frac{x}{z} \cdot \color{blue}{\left(t + y\right)} \]
    4. Simplified82.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1050:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-163}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-256}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+29}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+116}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+212}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \end{array} \]

Alternative 4: 72.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{if}\;z \leq -1.3:\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-163}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{-257}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.3 \cdot 10^{+127}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+194}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (- (/ y z) t))))
   (if (<= z -1.3)
     (* x (/ t (+ z -1.0)))
     (if (<= z -5.6e-163)
       t_1
       (if (<= z 5.9e-257)
         (* y (/ x z))
         (if (<= z 5.2e+30)
           t_1
           (if (<= z 8.3e+127)
             (* x (/ t z))
             (if (<= z 5.2e+194) (* (/ y z) x) (/ t (/ z x))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * ((y / z) - t);
	double tmp;
	if (z <= -1.3) {
		tmp = x * (t / (z + -1.0));
	} else if (z <= -5.6e-163) {
		tmp = t_1;
	} else if (z <= 5.9e-257) {
		tmp = y * (x / z);
	} else if (z <= 5.2e+30) {
		tmp = t_1;
	} else if (z <= 8.3e+127) {
		tmp = x * (t / z);
	} else if (z <= 5.2e+194) {
		tmp = (y / z) * x;
	} else {
		tmp = t / (z / x);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * ((y / z) - t)
    if (z <= (-1.3d0)) then
        tmp = x * (t / (z + (-1.0d0)))
    else if (z <= (-5.6d-163)) then
        tmp = t_1
    else if (z <= 5.9d-257) then
        tmp = y * (x / z)
    else if (z <= 5.2d+30) then
        tmp = t_1
    else if (z <= 8.3d+127) then
        tmp = x * (t / z)
    else if (z <= 5.2d+194) then
        tmp = (y / z) * x
    else
        tmp = t / (z / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * ((y / z) - t);
	double tmp;
	if (z <= -1.3) {
		tmp = x * (t / (z + -1.0));
	} else if (z <= -5.6e-163) {
		tmp = t_1;
	} else if (z <= 5.9e-257) {
		tmp = y * (x / z);
	} else if (z <= 5.2e+30) {
		tmp = t_1;
	} else if (z <= 8.3e+127) {
		tmp = x * (t / z);
	} else if (z <= 5.2e+194) {
		tmp = (y / z) * x;
	} else {
		tmp = t / (z / x);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * ((y / z) - t)
	tmp = 0
	if z <= -1.3:
		tmp = x * (t / (z + -1.0))
	elif z <= -5.6e-163:
		tmp = t_1
	elif z <= 5.9e-257:
		tmp = y * (x / z)
	elif z <= 5.2e+30:
		tmp = t_1
	elif z <= 8.3e+127:
		tmp = x * (t / z)
	elif z <= 5.2e+194:
		tmp = (y / z) * x
	else:
		tmp = t / (z / x)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(Float64(y / z) - t))
	tmp = 0.0
	if (z <= -1.3)
		tmp = Float64(x * Float64(t / Float64(z + -1.0)));
	elseif (z <= -5.6e-163)
		tmp = t_1;
	elseif (z <= 5.9e-257)
		tmp = Float64(y * Float64(x / z));
	elseif (z <= 5.2e+30)
		tmp = t_1;
	elseif (z <= 8.3e+127)
		tmp = Float64(x * Float64(t / z));
	elseif (z <= 5.2e+194)
		tmp = Float64(Float64(y / z) * x);
	else
		tmp = Float64(t / Float64(z / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * ((y / z) - t);
	tmp = 0.0;
	if (z <= -1.3)
		tmp = x * (t / (z + -1.0));
	elseif (z <= -5.6e-163)
		tmp = t_1;
	elseif (z <= 5.9e-257)
		tmp = y * (x / z);
	elseif (z <= 5.2e+30)
		tmp = t_1;
	elseif (z <= 8.3e+127)
		tmp = x * (t / z);
	elseif (z <= 5.2e+194)
		tmp = (y / z) * x;
	else
		tmp = t / (z / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3], N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.6e-163], t$95$1, If[LessEqual[z, 5.9e-257], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+30], t$95$1, If[LessEqual[z, 8.3e+127], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+194], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{if}\;z \leq -1.3:\\
\;\;\;\;x \cdot \frac{t}{z + -1}\\

\mathbf{elif}\;z \leq -5.6 \cdot 10^{-163}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 5.9 \cdot 10^{-257}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{+30}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 5.2 \cdot 10^{+194}:\\
\;\;\;\;\frac{y}{z} \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.30000000000000004

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.30000000000000004 < z < -5.5999999999999999e-163 or 5.9e-257 < z < 5.19999999999999977e30

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

    if -5.5999999999999999e-163 < z < 5.9e-257

    1. Initial program 79.5%

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

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

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

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

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

    if 5.19999999999999977e30 < z < 8.2999999999999997e127

    1. Initial program 99.8%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      3. cancel-sign-sub-inv90.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t + y}{\frac{z}{x}}} \]
    7. Taylor expanded in t around inf 67.3%

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

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

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

    if 8.2999999999999997e127 < z < 5.1999999999999998e194

    1. Initial program 99.9%

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

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

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

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

    if 5.1999999999999998e194 < z

    1. Initial program 88.3%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      3. cancel-sign-sub-inv82.1%

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{1} \cdot t\right) \]
      5. *-lft-identity82.1%

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

        \[\leadsto \frac{x}{z} \cdot \color{blue}{\left(t + y\right)} \]
    4. Simplified82.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3:\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \mathbf{elif}\;z \leq -5.6 \cdot 10^{-163}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{-257}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+30}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 8.3 \cdot 10^{+127}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+194}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \end{array} \]

Alternative 5: 87.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t\right)\\
t_2 := \frac{x}{z} \cdot \left(y + t\right)\\
\mathbf{if}\;z \leq -0.165:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -7.5 \cdot 10^{-163}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.25 \cdot 10^{-255}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -0.165000000000000008 or 1 < z

    1. Initial program 95.7%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      3. cancel-sign-sub-inv85.0%

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{1} \cdot t\right) \]
      5. *-lft-identity85.0%

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

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

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

    if -0.165000000000000008 < z < -7.49999999999999996e-163 or 1.2499999999999999e-255 < z < 1

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

    if -7.49999999999999996e-163 < z < 1.2499999999999999e-255

    1. Initial program 79.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.165:\\ \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-163}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-255}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\ \end{array} \]

Alternative 6: 91.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t\right)\\
t_2 := \frac{x}{\frac{z}{y + t}}\\
\mathbf{if}\;z \leq -0.95:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -7.5 \cdot 10^{-163}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-257}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -0.94999999999999996 or 1 < z

    1. Initial program 95.6%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      2. cancel-sign-sub-inv93.5%

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      5. +-commutative93.5%

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

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

    if -0.94999999999999996 < z < -7.49999999999999996e-163 or 7.4999999999999995e-257 < z < 1

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

    if -7.49999999999999996e-163 < z < 7.4999999999999995e-257

    1. Initial program 79.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.95:\\ \;\;\;\;\frac{x}{\frac{z}{y + t}}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-163}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-257}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y + t}}\\ \end{array} \]

Alternative 7: 64.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{+230}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-24}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+266} \lor \neg \left(t \leq 1.35 \cdot 10^{+304}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ t z))))
   (if (<= t -2.8e+230)
     t_1
     (if (<= t 2.5e-24)
       (* (/ y z) x)
       (if (or (<= t 1.9e+266) (not (<= t 1.35e+304))) t_1 (* x (- t)))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double tmp;
	if (t <= -2.8e+230) {
		tmp = t_1;
	} else if (t <= 2.5e-24) {
		tmp = (y / z) * x;
	} else if ((t <= 1.9e+266) || !(t <= 1.35e+304)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x * (t / z)
    if (t <= (-2.8d+230)) then
        tmp = t_1
    else if (t <= 2.5d-24) then
        tmp = (y / z) * x
    else if ((t <= 1.9d+266) .or. (.not. (t <= 1.35d+304))) then
        tmp = t_1
    else
        tmp = x * -t
    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.8e+230) {
		tmp = t_1;
	} else if (t <= 2.5e-24) {
		tmp = (y / z) * x;
	} else if ((t <= 1.9e+266) || !(t <= 1.35e+304)) {
		tmp = t_1;
	} else {
		tmp = x * -t;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / z)
	tmp = 0
	if t <= -2.8e+230:
		tmp = t_1
	elif t <= 2.5e-24:
		tmp = (y / z) * x
	elif (t <= 1.9e+266) or not (t <= 1.35e+304):
		tmp = t_1
	else:
		tmp = x * -t
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t / z))
	tmp = 0.0
	if (t <= -2.8e+230)
		tmp = t_1;
	elseif (t <= 2.5e-24)
		tmp = Float64(Float64(y / z) * x);
	elseif ((t <= 1.9e+266) || !(t <= 1.35e+304))
		tmp = t_1;
	else
		tmp = Float64(x * Float64(-t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t / z);
	tmp = 0.0;
	if (t <= -2.8e+230)
		tmp = t_1;
	elseif (t <= 2.5e-24)
		tmp = (y / z) * x;
	elseif ((t <= 1.9e+266) || ~((t <= 1.35e+304)))
		tmp = t_1;
	else
		tmp = x * -t;
	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.8e+230], t$95$1, If[LessEqual[t, 2.5e-24], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[Or[LessEqual[t, 1.9e+266], N[Not[LessEqual[t, 1.35e+304]], $MachinePrecision]], t$95$1, N[(x * (-t)), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+266} \lor \neg \left(t \leq 1.35 \cdot 10^{+304}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.8000000000000002e230 or 2.4999999999999999e-24 < t < 1.8999999999999999e266 or 1.35e304 < t

    1. Initial program 95.4%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      3. cancel-sign-sub-inv63.6%

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{1} \cdot t\right) \]
      5. *-lft-identity63.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t + y}{\frac{z}{x}}} \]
    7. Taylor expanded in t around inf 52.7%

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

        \[\leadsto \color{blue}{\frac{t}{z} \cdot x} \]
    9. Simplified59.5%

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

    if -2.8000000000000002e230 < t < 2.4999999999999999e-24

    1. Initial program 92.6%

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

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

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

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

    if 1.8999999999999999e266 < t < 1.35e304

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      2. *-commutative80.8%

        \[\leadsto \color{blue}{x \cdot \left(-1 \cdot t\right)} \]
      3. mul-1-neg80.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+230}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-24}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+266} \lor \neg \left(t \leq 1.35 \cdot 10^{+304}\right):\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \end{array} \]

Alternative 8: 63.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq -370:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+29}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+117}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+205}:\\
\;\;\;\;\frac{y}{z} \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -370 or 3.19999999999999987e29 < z < 1.6499999999999999e117

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t + y}{\frac{z}{x}}} \]
    7. Taylor expanded in t around inf 64.5%

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

        \[\leadsto \color{blue}{\frac{t}{z} \cdot x} \]
    9. Simplified68.5%

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

    if -370 < z < 3.19999999999999987e29

    1. Initial program 91.6%

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

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

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

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

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

    if 1.6499999999999999e117 < z < 2.9999999999999999e205

    1. Initial program 99.9%

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

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

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

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

    if 2.9999999999999999e205 < z

    1. Initial program 88.3%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      3. cancel-sign-sub-inv82.1%

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{1} \cdot t\right) \]
      5. *-lft-identity82.1%

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

        \[\leadsto \frac{x}{z} \cdot \color{blue}{\left(t + y\right)} \]
    4. Simplified82.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -370:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+29}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+117}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+205}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \end{array} \]

Alternative 9: 63.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq -7:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.45 \cdot 10^{+115}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+198}:\\
\;\;\;\;\frac{y}{z} \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7 or 2.69999999999999986e31 < z < 2.44999999999999982e115

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t + y}{\frac{z}{x}}} \]
    7. Taylor expanded in t around inf 64.5%

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

        \[\leadsto \color{blue}{\frac{t}{z} \cdot x} \]
    9. Simplified68.5%

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

    if -7 < z < 2.69999999999999986e31

    1. Initial program 91.6%

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

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

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

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

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

    if 2.44999999999999982e115 < z < 1.2000000000000001e198

    1. Initial program 99.9%

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

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

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

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

    if 1.2000000000000001e198 < z

    1. Initial program 88.3%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      3. cancel-sign-sub-inv82.1%

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{1} \cdot t\right) \]
      5. *-lft-identity82.1%

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

        \[\leadsto \frac{x}{z} \cdot \color{blue}{\left(t + y\right)} \]
    4. Simplified82.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+31}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+115}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+198}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \end{array} \]

Alternative 10: 42.7% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 95.6%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      3. cancel-sign-sub-inv84.8%

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

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

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

        \[\leadsto \frac{x}{z} \cdot \color{blue}{\left(t + y\right)} \]
    4. Simplified84.8%

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

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

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

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

    if -1 < z < 1.1000000000000001

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
      2. *-commutative26.9%

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

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

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

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

Alternative 11: 63.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-89} \lor \neg \left(y \leq 3.1 \cdot 10^{-214}\right):\\
\;\;\;\;\frac{y}{z} \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.19999999999999998e-89 or 3.10000000000000004e-214 < y

    1. Initial program 93.5%

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

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

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

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

    if -3.19999999999999998e-89 < y < 3.10000000000000004e-214

    1. Initial program 92.7%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - -1 \cdot t\right)} \]
      3. cancel-sign-sub-inv64.1%

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

        \[\leadsto \frac{x}{z} \cdot \left(y + \color{blue}{1} \cdot t\right) \]
      5. *-lft-identity64.1%

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

        \[\leadsto \frac{x}{z} \cdot \color{blue}{\left(t + y\right)} \]
    4. Simplified64.1%

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

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

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

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

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

Alternative 12: 23.0% accurate, 2.8× speedup?

\[\begin{array}{l} \\ x \cdot \left(-t\right) \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(x * Float64(-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 \left(-t\right)
\end{array}
Derivation
  1. Initial program 93.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot t\right) \cdot x} \]
    2. *-commutative21.6%

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot t\right)} \]
    3. mul-1-neg21.6%

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

    \[\leadsto \color{blue}{x \cdot \left(-t\right)} \]
  8. Final simplification21.6%

    \[\leadsto x \cdot \left(-t\right) \]

Developer target: 94.6% 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 2023310 
(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)))))