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

Percentage Accurate: 94.2% → 99.0%
Time: 8.4s
Alternatives: 11
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 11 alternatives:

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

Initial Program: 94.2% accurate, 1.0× speedup?

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

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

Alternative 1: 99.0% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_1 \leq -4 \cdot 10^{-197}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+290}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 59.9%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Step-by-step derivation
      1. sub-neg59.9%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \left(-\frac{t}{1 - z}\right) \cdot x\right)} \]
      4. distribute-neg-frac49.4%

        \[\leadsto \mathsf{fma}\left(\frac{y}{z}, x, \color{blue}{\frac{-t}{1 - z}} \cdot x\right) \]
    3. Applied egg-rr49.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \frac{-t}{1 - z} \cdot x\right)} \]
    4. Taylor expanded in y around inf 99.8%

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

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

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

    if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -3.9999999999999999e-197 or -0.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 2.00000000000000012e290

    1. Initial program 99.6%

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

    if -3.9999999999999999e-197 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -0.0

    1. Initial program 57.0%

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

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

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

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

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

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

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

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

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

    if 2.00000000000000012e290 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
  3. Recombined 4 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 -4 \cdot 10^{-197}:\\ \;\;\;\;\left(\frac{y}{z} - \frac{t}{1 - z}\right) \cdot x\\ \mathbf{elif}\;\frac{y}{z} - \frac{t}{1 - z} \leq 0:\\ \;\;\;\;\frac{x}{z} \cdot \left(y + t\right)\\ \mathbf{elif}\;\frac{y}{z} - \frac{t}{1 - z} \leq 2 \cdot 10^{+290}:\\ \;\;\;\;\left(\frac{y}{z} - \frac{t}{1 - z}\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \end{array} \]

Alternative 2: 71.9% 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 -2.1 \cdot 10^{+177}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2 \cdot 10^{+163}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+158}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-203}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-307}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+90}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \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 -2.1e+177)
     t_1
     (if (<= z -2e+163)
       (/ y (/ z x))
       (if (<= z -1.2e+158)
         t_1
         (if (<= z -7.5e-203)
           t_2
           (if (<= z -7.5e-307)
             (/ (* y x) z)
             (if (<= z 6.5e+90) t_2 (/ x (/ z t))))))))))
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 <= -2.1e+177) {
		tmp = t_1;
	} else if (z <= -2e+163) {
		tmp = y / (z / x);
	} else if (z <= -1.2e+158) {
		tmp = t_1;
	} else if (z <= -7.5e-203) {
		tmp = t_2;
	} else if (z <= -7.5e-307) {
		tmp = (y * x) / z;
	} else if (z <= 6.5e+90) {
		tmp = t_2;
	} else {
		tmp = x / (z / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (t / z)
    t_2 = x * ((y / z) - t)
    if (z <= (-2.1d+177)) then
        tmp = t_1
    else if (z <= (-2d+163)) then
        tmp = y / (z / x)
    else if (z <= (-1.2d+158)) then
        tmp = t_1
    else if (z <= (-7.5d-203)) then
        tmp = t_2
    else if (z <= (-7.5d-307)) then
        tmp = (y * x) / z
    else if (z <= 6.5d+90) then
        tmp = t_2
    else
        tmp = x / (z / 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 t_2 = x * ((y / z) - t);
	double tmp;
	if (z <= -2.1e+177) {
		tmp = t_1;
	} else if (z <= -2e+163) {
		tmp = y / (z / x);
	} else if (z <= -1.2e+158) {
		tmp = t_1;
	} else if (z <= -7.5e-203) {
		tmp = t_2;
	} else if (z <= -7.5e-307) {
		tmp = (y * x) / z;
	} else if (z <= 6.5e+90) {
		tmp = t_2;
	} else {
		tmp = x / (z / t);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / z)
	t_2 = x * ((y / z) - t)
	tmp = 0
	if z <= -2.1e+177:
		tmp = t_1
	elif z <= -2e+163:
		tmp = y / (z / x)
	elif z <= -1.2e+158:
		tmp = t_1
	elif z <= -7.5e-203:
		tmp = t_2
	elif z <= -7.5e-307:
		tmp = (y * x) / z
	elif z <= 6.5e+90:
		tmp = t_2
	else:
		tmp = x / (z / t)
	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 <= -2.1e+177)
		tmp = t_1;
	elseif (z <= -2e+163)
		tmp = Float64(y / Float64(z / x));
	elseif (z <= -1.2e+158)
		tmp = t_1;
	elseif (z <= -7.5e-203)
		tmp = t_2;
	elseif (z <= -7.5e-307)
		tmp = Float64(Float64(y * x) / z);
	elseif (z <= 6.5e+90)
		tmp = t_2;
	else
		tmp = Float64(x / Float64(z / t));
	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 <= -2.1e+177)
		tmp = t_1;
	elseif (z <= -2e+163)
		tmp = y / (z / x);
	elseif (z <= -1.2e+158)
		tmp = t_1;
	elseif (z <= -7.5e-203)
		tmp = t_2;
	elseif (z <= -7.5e-307)
		tmp = (y * x) / z;
	elseif (z <= 6.5e+90)
		tmp = t_2;
	else
		tmp = x / (z / t);
	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, -2.1e+177], t$95$1, If[LessEqual[z, -2e+163], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.2e+158], t$95$1, If[LessEqual[z, -7.5e-203], t$95$2, If[LessEqual[z, -7.5e-307], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 6.5e+90], t$95$2, N[(x / N[(z / t), $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 -2.1 \cdot 10^{+177}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -2 \cdot 10^{+163}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{+158}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -7.5 \cdot 10^{-203}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+90}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.10000000000000013e177 or -1.9999999999999999e163 < z < -1.20000000000000004e158

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.10000000000000013e177 < z < -1.9999999999999999e163

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

    if -1.20000000000000004e158 < z < -7.50000000000000027e-203 or -7.5000000000000006e-307 < z < 6.5000000000000001e90

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

    if -7.50000000000000027e-203 < z < -7.5000000000000006e-307

    1. Initial program 74.5%

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

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

    if 6.5000000000000001e90 < z

    1. Initial program 95.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+177}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{+163}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+158}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-203}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-307}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+90}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \end{array} \]

Alternative 3: 70.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z + -1}\\ \mathbf{if}\;y \leq -7.5 \cdot 10^{-78}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{-307}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{-232}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-128}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-72}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+46}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ t (+ z -1.0)))))
   (if (<= y -7.5e-78)
     (/ y (/ z x))
     (if (<= y 2.45e-307)
       t_1
       (if (<= y 9.8e-232)
         (* x (- (/ y z) t))
         (if (<= y 8.2e-128)
           t_1
           (if (<= y 2.6e-72)
             (* y (/ x z))
             (if (<= y 1.2e+46) t_1 (/ (* y x) z)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / (z + -1.0));
	double tmp;
	if (y <= -7.5e-78) {
		tmp = y / (z / x);
	} else if (y <= 2.45e-307) {
		tmp = t_1;
	} else if (y <= 9.8e-232) {
		tmp = x * ((y / z) - t);
	} else if (y <= 8.2e-128) {
		tmp = t_1;
	} else if (y <= 2.6e-72) {
		tmp = y * (x / z);
	} else if (y <= 1.2e+46) {
		tmp = t_1;
	} else {
		tmp = (y * x) / z;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (t / (z + (-1.0d0)))
    if (y <= (-7.5d-78)) then
        tmp = y / (z / x)
    else if (y <= 2.45d-307) then
        tmp = t_1
    else if (y <= 9.8d-232) then
        tmp = x * ((y / z) - t)
    else if (y <= 8.2d-128) then
        tmp = t_1
    else if (y <= 2.6d-72) then
        tmp = y * (x / z)
    else if (y <= 1.2d+46) then
        tmp = t_1
    else
        tmp = (y * x) / z
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (t / (z + -1.0));
	double tmp;
	if (y <= -7.5e-78) {
		tmp = y / (z / x);
	} else if (y <= 2.45e-307) {
		tmp = t_1;
	} else if (y <= 9.8e-232) {
		tmp = x * ((y / z) - t);
	} else if (y <= 8.2e-128) {
		tmp = t_1;
	} else if (y <= 2.6e-72) {
		tmp = y * (x / z);
	} else if (y <= 1.2e+46) {
		tmp = t_1;
	} else {
		tmp = (y * x) / z;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / (z + -1.0))
	tmp = 0
	if y <= -7.5e-78:
		tmp = y / (z / x)
	elif y <= 2.45e-307:
		tmp = t_1
	elif y <= 9.8e-232:
		tmp = x * ((y / z) - t)
	elif y <= 8.2e-128:
		tmp = t_1
	elif y <= 2.6e-72:
		tmp = y * (x / z)
	elif y <= 1.2e+46:
		tmp = t_1
	else:
		tmp = (y * x) / z
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t / Float64(z + -1.0)))
	tmp = 0.0
	if (y <= -7.5e-78)
		tmp = Float64(y / Float64(z / x));
	elseif (y <= 2.45e-307)
		tmp = t_1;
	elseif (y <= 9.8e-232)
		tmp = Float64(x * Float64(Float64(y / z) - t));
	elseif (y <= 8.2e-128)
		tmp = t_1;
	elseif (y <= 2.6e-72)
		tmp = Float64(y * Float64(x / z));
	elseif (y <= 1.2e+46)
		tmp = t_1;
	else
		tmp = Float64(Float64(y * x) / z);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t / (z + -1.0));
	tmp = 0.0;
	if (y <= -7.5e-78)
		tmp = y / (z / x);
	elseif (y <= 2.45e-307)
		tmp = t_1;
	elseif (y <= 9.8e-232)
		tmp = x * ((y / z) - t);
	elseif (y <= 8.2e-128)
		tmp = t_1;
	elseif (y <= 2.6e-72)
		tmp = y * (x / z);
	elseif (y <= 1.2e+46)
		tmp = t_1;
	else
		tmp = (y * x) / z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e-78], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.45e-307], t$95$1, If[LessEqual[y, 9.8e-232], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e-128], t$95$1, If[LessEqual[y, 2.6e-72], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+46], t$95$1, N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2.45 \cdot 10^{-307}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 9.8 \cdot 10^{-232}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\

\mathbf{elif}\;y \leq 8.2 \cdot 10^{-128}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+46}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -7.50000000000000041e-78

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

    if -7.50000000000000041e-78 < y < 2.4500000000000001e-307 or 9.8000000000000006e-232 < y < 8.1999999999999999e-128 or 2.59999999999999996e-72 < y < 1.20000000000000004e46

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4500000000000001e-307 < y < 9.8000000000000006e-232

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if 8.1999999999999999e-128 < y < 2.59999999999999996e-72

    1. Initial program 88.1%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Step-by-step derivation
      1. sub-neg88.1%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \left(-\frac{t}{1 - z}\right) \cdot x\right)} \]
      4. distribute-neg-frac88.1%

        \[\leadsto \mathsf{fma}\left(\frac{y}{z}, x, \color{blue}{\frac{-t}{1 - z}} \cdot x\right) \]
    3. Applied egg-rr88.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \frac{-t}{1 - z} \cdot x\right)} \]
    4. Taylor expanded in y around inf 72.7%

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

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

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

    if 1.20000000000000004e46 < y

    1. Initial program 82.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{-78}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{-307}:\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{-232}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-128}:\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{-72}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+46}:\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array} \]

Alternative 4: 88.0% 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 -1:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-203}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-302}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-6}:\\ \;\;\;\;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 -1.0)
     t_2
     (if (<= z -7.5e-203)
       t_1
       (if (<= z 8.8e-302) (/ (* y x) z) (if (<= z 4.6e-6) 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 <= -1.0) {
		tmp = t_2;
	} else if (z <= -7.5e-203) {
		tmp = t_1;
	} else if (z <= 8.8e-302) {
		tmp = (y * x) / z;
	} else if (z <= 4.6e-6) {
		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 <= (-1.0d0)) then
        tmp = t_2
    else if (z <= (-7.5d-203)) then
        tmp = t_1
    else if (z <= 8.8d-302) then
        tmp = (y * x) / z
    else if (z <= 4.6d-6) 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 <= -1.0) {
		tmp = t_2;
	} else if (z <= -7.5e-203) {
		tmp = t_1;
	} else if (z <= 8.8e-302) {
		tmp = (y * x) / z;
	} else if (z <= 4.6e-6) {
		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 <= -1.0:
		tmp = t_2
	elif z <= -7.5e-203:
		tmp = t_1
	elif z <= 8.8e-302:
		tmp = (y * x) / z
	elif z <= 4.6e-6:
		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 <= -1.0)
		tmp = t_2;
	elseif (z <= -7.5e-203)
		tmp = t_1;
	elseif (z <= 8.8e-302)
		tmp = Float64(Float64(y * x) / z);
	elseif (z <= 4.6e-6)
		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 <= -1.0)
		tmp = t_2;
	elseif (z <= -7.5e-203)
		tmp = t_1;
	elseif (z <= 8.8e-302)
		tmp = (y * x) / z;
	elseif (z <= 4.6e-6)
		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, -1.0], t$95$2, If[LessEqual[z, -7.5e-203], t$95$1, If[LessEqual[z, 8.8e-302], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 4.6e-6], 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 -1:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;z \leq 4.6 \cdot 10^{-6}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

    if -1 < z < -7.50000000000000027e-203 or 8.8000000000000003e-302 < z < 4.6e-6

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

    if -7.50000000000000027e-203 < z < 8.8000000000000003e-302

    1. Initial program 74.5%

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

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

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

Alternative 5: 92.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\frac{y}{z} - t\right)\\ t_2 := x \cdot \frac{y + t}{z}\\ \mathbf{if}\;z \leq -1:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-203}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-305}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-6}:\\ \;\;\;\;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 (/ (+ y t) z))))
   (if (<= z -1.0)
     t_2
     (if (<= z -1.25e-203)
       t_1
       (if (<= z 1.35e-305) (/ (* y x) z) (if (<= z 4.6e-6) 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 * ((y + t) / z);
	double tmp;
	if (z <= -1.0) {
		tmp = t_2;
	} else if (z <= -1.25e-203) {
		tmp = t_1;
	} else if (z <= 1.35e-305) {
		tmp = (y * x) / z;
	} else if (z <= 4.6e-6) {
		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 * ((y + t) / z)
    if (z <= (-1.0d0)) then
        tmp = t_2
    else if (z <= (-1.25d-203)) then
        tmp = t_1
    else if (z <= 1.35d-305) then
        tmp = (y * x) / z
    else if (z <= 4.6d-6) 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 * ((y + t) / z);
	double tmp;
	if (z <= -1.0) {
		tmp = t_2;
	} else if (z <= -1.25e-203) {
		tmp = t_1;
	} else if (z <= 1.35e-305) {
		tmp = (y * x) / z;
	} else if (z <= 4.6e-6) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * ((y / z) - t)
	t_2 = x * ((y + t) / z)
	tmp = 0
	if z <= -1.0:
		tmp = t_2
	elif z <= -1.25e-203:
		tmp = t_1
	elif z <= 1.35e-305:
		tmp = (y * x) / z
	elif z <= 4.6e-6:
		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(Float64(y + t) / z))
	tmp = 0.0
	if (z <= -1.0)
		tmp = t_2;
	elseif (z <= -1.25e-203)
		tmp = t_1;
	elseif (z <= 1.35e-305)
		tmp = Float64(Float64(y * x) / z);
	elseif (z <= 4.6e-6)
		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 * ((y + t) / z);
	tmp = 0.0;
	if (z <= -1.0)
		tmp = t_2;
	elseif (z <= -1.25e-203)
		tmp = t_1;
	elseif (z <= 1.35e-305)
		tmp = (y * x) / z;
	elseif (z <= 4.6e-6)
		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[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.0], t$95$2, If[LessEqual[z, -1.25e-203], t$95$1, If[LessEqual[z, 1.35e-305], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 4.6e-6], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-203}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 4.6 \cdot 10^{-6}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

    if -1 < z < -1.25e-203 or 1.35e-305 < z < 4.6e-6

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

    if -1.25e-203 < z < 1.35e-305

    1. Initial program 74.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;x \cdot \frac{y + t}{z}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-203}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-305}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-6}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y + t}{z}\\ \end{array} \]

Alternative 6: 67.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{+107} \lor \neg \left(t \leq -2.2\right) \land \left(t \leq -1.85 \cdot 10^{-13} \lor \neg \left(t \leq 1.4 \cdot 10^{+172}\right)\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.35e107 or -2.2000000000000002 < t < -1.84999999999999994e-13 or 1.4e172 < t

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.35e107 < t < -2.2000000000000002 or -1.84999999999999994e-13 < t < 1.4e172

    1. Initial program 89.3%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Step-by-step derivation
      1. sub-neg89.3%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \left(-\frac{t}{1 - z}\right) \cdot x\right)} \]
      4. distribute-neg-frac89.3%

        \[\leadsto \mathsf{fma}\left(\frac{y}{z}, x, \color{blue}{\frac{-t}{1 - z}} \cdot x\right) \]
    3. Applied egg-rr89.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \frac{-t}{1 - z} \cdot x\right)} \]
    4. Taylor expanded in y around inf 73.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.35 \cdot 10^{+107} \lor \neg \left(t \leq -2.2\right) \land \left(t \leq -1.85 \cdot 10^{-13} \lor \neg \left(t \leq 1.4 \cdot 10^{+172}\right)\right):\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 7: 67.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
t_2 := y \cdot \frac{x}{z}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{+105}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.65:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.85 \cdot 10^{-13}:\\
\;\;\;\;t \cdot \frac{x}{z}\\

\mathbf{elif}\;t \leq 1.45 \cdot 10^{+172}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.45000000000000005e105 or 1.45e172 < t

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45000000000000005e105 < t < -1.6499999999999999 or -1.84999999999999994e-13 < t < 1.45e172

    1. Initial program 89.3%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Step-by-step derivation
      1. sub-neg89.3%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \left(-\frac{t}{1 - z}\right) \cdot x\right)} \]
      4. distribute-neg-frac89.3%

        \[\leadsto \mathsf{fma}\left(\frac{y}{z}, x, \color{blue}{\frac{-t}{1 - z}} \cdot x\right) \]
    3. Applied egg-rr89.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \frac{-t}{1 - z} \cdot x\right)} \]
    4. Taylor expanded in y around inf 73.0%

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

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

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

    if -1.6499999999999999 < t < -1.84999999999999994e-13

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{+105}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq -1.65:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-13}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{+172}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]

Alternative 8: 62.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -1.02 \cdot 10^{+55}:\\
\;\;\;\;\frac{y}{z} \cdot x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.10000000000000013e177 or 5.8000000000000003e90 < z

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.10000000000000013e177 < z < -1.02000000000000002e55

    1. Initial program 95.2%

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

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

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

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

    if -1.02000000000000002e55 < z < -1.15e15

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot t} \]
    7. Applied egg-rr75.7%

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

    if -1.15e15 < z < 5.8000000000000003e90

    1. Initial program 89.1%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Step-by-step derivation
      1. sub-neg89.1%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \left(-\frac{t}{1 - z}\right) \cdot x\right)} \]
      4. distribute-neg-frac84.8%

        \[\leadsto \mathsf{fma}\left(\frac{y}{z}, x, \color{blue}{\frac{-t}{1 - z}} \cdot x\right) \]
    3. Applied egg-rr84.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \frac{-t}{1 - z} \cdot x\right)} \]
    4. Taylor expanded in y around inf 70.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+177}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{+55}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+15}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+90}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]

Alternative 9: 62.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+177}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{+55}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;z \leq -26000000000000:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+104}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.3e+177)
   (* x (/ t z))
   (if (<= z -3.9e+55)
     (* (/ y z) x)
     (if (<= z -26000000000000.0)
       (* t (/ x z))
       (if (<= z 1.15e+104) (* y (/ x z)) (/ x (/ z t)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.3e+177) {
		tmp = x * (t / z);
	} else if (z <= -3.9e+55) {
		tmp = (y / z) * x;
	} else if (z <= -26000000000000.0) {
		tmp = t * (x / z);
	} else if (z <= 1.15e+104) {
		tmp = y * (x / z);
	} else {
		tmp = x / (z / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-2.3d+177)) then
        tmp = x * (t / z)
    else if (z <= (-3.9d+55)) then
        tmp = (y / z) * x
    else if (z <= (-26000000000000.0d0)) then
        tmp = t * (x / z)
    else if (z <= 1.15d+104) then
        tmp = y * (x / z)
    else
        tmp = x / (z / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.3e+177) {
		tmp = x * (t / z);
	} else if (z <= -3.9e+55) {
		tmp = (y / z) * x;
	} else if (z <= -26000000000000.0) {
		tmp = t * (x / z);
	} else if (z <= 1.15e+104) {
		tmp = y * (x / z);
	} else {
		tmp = x / (z / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2.3e+177:
		tmp = x * (t / z)
	elif z <= -3.9e+55:
		tmp = (y / z) * x
	elif z <= -26000000000000.0:
		tmp = t * (x / z)
	elif z <= 1.15e+104:
		tmp = y * (x / z)
	else:
		tmp = x / (z / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.3e+177)
		tmp = Float64(x * Float64(t / z));
	elseif (z <= -3.9e+55)
		tmp = Float64(Float64(y / z) * x);
	elseif (z <= -26000000000000.0)
		tmp = Float64(t * Float64(x / z));
	elseif (z <= 1.15e+104)
		tmp = Float64(y * Float64(x / z));
	else
		tmp = Float64(x / Float64(z / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2.3e+177)
		tmp = x * (t / z);
	elseif (z <= -3.9e+55)
		tmp = (y / z) * x;
	elseif (z <= -26000000000000.0)
		tmp = t * (x / z);
	elseif (z <= 1.15e+104)
		tmp = y * (x / z);
	else
		tmp = x / (z / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.3e+177], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.9e+55], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, -26000000000000.0], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e+104], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+177}:\\
\;\;\;\;x \cdot \frac{t}{z}\\

\mathbf{elif}\;z \leq -3.9 \cdot 10^{+55}:\\
\;\;\;\;\frac{y}{z} \cdot x\\

\mathbf{elif}\;z \leq -26000000000000:\\
\;\;\;\;t \cdot \frac{x}{z}\\

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

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


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

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2999999999999999e177 < z < -3.90000000000000027e55

    1. Initial program 95.2%

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

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

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

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

    if -3.90000000000000027e55 < z < -2.6e13

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot t} \]
    7. Applied egg-rr75.7%

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

    if -2.6e13 < z < 1.14999999999999992e104

    1. Initial program 89.2%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Step-by-step derivation
      1. sub-neg89.2%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \left(-\frac{t}{1 - z}\right) \cdot x\right)} \]
      4. distribute-neg-frac85.0%

        \[\leadsto \mathsf{fma}\left(\frac{y}{z}, x, \color{blue}{\frac{-t}{1 - z}} \cdot x\right) \]
    3. Applied egg-rr85.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \frac{-t}{1 - z} \cdot x\right)} \]
    4. Taylor expanded in y around inf 70.4%

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

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

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

    if 1.14999999999999992e104 < z

    1. Initial program 95.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+177}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{+55}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;z \leq -26000000000000:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+104}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \end{array} \]

Alternative 10: 62.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+177}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+55}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{+14}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 2.85 \cdot 10^{+103}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -2.2e+177)
   (* x (/ t z))
   (if (<= z -5.2e+55)
     (/ x (/ z y))
     (if (<= z -4.8e+14)
       (* t (/ x z))
       (if (<= z 2.85e+103) (* y (/ x z)) (/ x (/ z t)))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.2e+177) {
		tmp = x * (t / z);
	} else if (z <= -5.2e+55) {
		tmp = x / (z / y);
	} else if (z <= -4.8e+14) {
		tmp = t * (x / z);
	} else if (z <= 2.85e+103) {
		tmp = y * (x / z);
	} else {
		tmp = x / (z / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= (-2.2d+177)) then
        tmp = x * (t / z)
    else if (z <= (-5.2d+55)) then
        tmp = x / (z / y)
    else if (z <= (-4.8d+14)) then
        tmp = t * (x / z)
    else if (z <= 2.85d+103) then
        tmp = y * (x / z)
    else
        tmp = x / (z / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -2.2e+177) {
		tmp = x * (t / z);
	} else if (z <= -5.2e+55) {
		tmp = x / (z / y);
	} else if (z <= -4.8e+14) {
		tmp = t * (x / z);
	} else if (z <= 2.85e+103) {
		tmp = y * (x / z);
	} else {
		tmp = x / (z / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -2.2e+177:
		tmp = x * (t / z)
	elif z <= -5.2e+55:
		tmp = x / (z / y)
	elif z <= -4.8e+14:
		tmp = t * (x / z)
	elif z <= 2.85e+103:
		tmp = y * (x / z)
	else:
		tmp = x / (z / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -2.2e+177)
		tmp = Float64(x * Float64(t / z));
	elseif (z <= -5.2e+55)
		tmp = Float64(x / Float64(z / y));
	elseif (z <= -4.8e+14)
		tmp = Float64(t * Float64(x / z));
	elseif (z <= 2.85e+103)
		tmp = Float64(y * Float64(x / z));
	else
		tmp = Float64(x / Float64(z / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -2.2e+177)
		tmp = x * (t / z);
	elseif (z <= -5.2e+55)
		tmp = x / (z / y);
	elseif (z <= -4.8e+14)
		tmp = t * (x / z);
	elseif (z <= 2.85e+103)
		tmp = y * (x / z);
	else
		tmp = x / (z / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.2e+177], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.2e+55], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.8e+14], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.85e+103], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+177}:\\
\;\;\;\;x \cdot \frac{t}{z}\\

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

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

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

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


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

    1. Initial program 84.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1999999999999998e177 < z < -5.2e55

    1. Initial program 95.2%

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

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

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

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

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

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

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

    if -5.2e55 < z < -4.8e14

    1. Initial program 99.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot t} \]
    7. Applied egg-rr75.7%

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

    if -4.8e14 < z < 2.85000000000000016e103

    1. Initial program 89.2%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Step-by-step derivation
      1. sub-neg89.2%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \left(-\frac{t}{1 - z}\right) \cdot x\right)} \]
      4. distribute-neg-frac85.0%

        \[\leadsto \mathsf{fma}\left(\frac{y}{z}, x, \color{blue}{\frac{-t}{1 - z}} \cdot x\right) \]
    3. Applied egg-rr85.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \frac{-t}{1 - z} \cdot x\right)} \]
    4. Taylor expanded in y around inf 70.4%

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

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

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

    if 2.85000000000000016e103 < z

    1. Initial program 95.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+177}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+55}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{+14}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 2.85 \cdot 10^{+103}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \end{array} \]

Alternative 11: 61.4% accurate, 2.2× speedup?

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

\\
y \cdot \frac{x}{z}
\end{array}
Derivation
  1. Initial program 90.8%

    \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
  2. Step-by-step derivation
    1. sub-neg90.8%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \left(-\frac{t}{1 - z}\right) \cdot x\right)} \]
    4. distribute-neg-frac88.4%

      \[\leadsto \mathsf{fma}\left(\frac{y}{z}, x, \color{blue}{\frac{-t}{1 - z}} \cdot x\right) \]
  3. Applied egg-rr88.4%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{z}, x, \frac{-t}{1 - z} \cdot x\right)} \]
  4. Taylor expanded in y around inf 60.1%

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

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

    \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
  7. Final simplification60.9%

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

Developer target: 95.0% 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 2023216 
(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)))))