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

Percentage Accurate: 94.6% → 94.0%
Time: 6.4s
Alternatives: 12
Speedup: N/A×

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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 94.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq 4 \cdot 10^{+258}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 4.00000000000000023e258

    1. Initial program 96.0%

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

    if 4.00000000000000023e258 < z

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 93.0% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;z \leq 3.1 \cdot 10^{+259}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -61000 or 1.42000000000000009e-4 < z < 3.1000000000000003e259

    1. Initial program 99.7%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - \left(-t\right)}}} \]
    5. Step-by-step derivation
      1. clear-num99.0%

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

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

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

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

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

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

    if -61000 < z < 1.42000000000000009e-4

    1. Initial program 93.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} - x \cdot t \]
      6. distribute-lft-out--90.6%

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

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

    if 3.1000000000000003e259 < z

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 93.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -61000:\\
\;\;\;\;x \cdot \frac{y + t}{z}\\

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

\mathbf{elif}\;z \leq 4 \cdot 10^{+258}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} + \frac{t}{z}\right)\\

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


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

    1. Initial program 99.7%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - \left(-t\right)}}} \]
    5. Step-by-step derivation
      1. clear-num98.9%

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

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

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

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

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

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

    if -61000 < z < 1.42000000000000009e-4

    1. Initial program 93.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} - x \cdot t \]
      6. distribute-lft-out--90.6%

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

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

    if 1.42000000000000009e-4 < z < 4.00000000000000023e258

    1. Initial program 99.7%

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

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

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

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

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

    if 4.00000000000000023e258 < z

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 93.3% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.09 \cdot 10^{+276}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -61000 or 1.42000000000000009e-4 < z < 1.09e276

    1. Initial program 99.7%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - \left(-t\right)}}} \]
    5. Step-by-step derivation
      1. clear-num99.0%

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

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

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

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

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

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

    if -61000 < z < 1.42000000000000009e-4

    1. Initial program 93.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} - x \cdot t \]
      6. distribute-lft-out--90.6%

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

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

    if 1.09e276 < z

    1. Initial program 53.1%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -61000:\\ \;\;\;\;x \cdot \frac{y + t}{z}\\ \mathbf{elif}\;z \leq 0.000142:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 1.09 \cdot 10^{+276}:\\ \;\;\;\;x \cdot \frac{y + t}{z}\\ \mathbf{else}:\\ \;\;\;\;\left(y + t\right) \cdot \frac{x}{z}\\ \end{array} \]

Alternative 5: 64.5% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.90000000000000001e33 or 1.4000000000000001e175 < t

    1. Initial program 95.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    7. Simplified53.3%

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

    if -1.90000000000000001e33 < t < -7.70000000000000001e-268

    1. Initial program 89.5%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
    4. Applied egg-rr87.1%

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

    if -7.70000000000000001e-268 < t < 1.4000000000000001e175

    1. Initial program 97.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+33}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;t \leq -7.7 \cdot 10^{-268}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+175}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \end{array} \]

Alternative 6: 67.3% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.9999999999999995e32 or 2.79999999999999982e173 < t

    1. Initial program 95.3%

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

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

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

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

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

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

    if -9.9999999999999995e32 < t < -8.1999999999999998e-268

    1. Initial program 89.5%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
    4. Applied egg-rr87.1%

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

    if -8.1999999999999998e-268 < t < 2.79999999999999982e173

    1. Initial program 97.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+33}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-268}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+173}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \end{array} \]

Alternative 7: 73.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+92}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+244}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= z -9e+23)
   (* x (/ y z))
   (if (<= z 4.3e+92)
     (* x (- (/ y z) t))
     (if (<= z 6.8e+244) (/ x (/ z t)) (* y (/ x z))))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= -9e+23) {
		tmp = x * (y / z);
	} else if (z <= 4.3e+92) {
		tmp = x * ((y / z) - t);
	} else if (z <= 6.8e+244) {
		tmp = x / (z / t);
	} 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 (z <= (-9d+23)) then
        tmp = x * (y / z)
    else if (z <= 4.3d+92) then
        tmp = x * ((y / z) - t)
    else if (z <= 6.8d+244) then
        tmp = x / (z / t)
    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 (z <= -9e+23) {
		tmp = x * (y / z);
	} else if (z <= 4.3e+92) {
		tmp = x * ((y / z) - t);
	} else if (z <= 6.8e+244) {
		tmp = x / (z / t);
	} else {
		tmp = y * (x / z);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if z <= -9e+23:
		tmp = x * (y / z)
	elif z <= 4.3e+92:
		tmp = x * ((y / z) - t)
	elif z <= 6.8e+244:
		tmp = x / (z / t)
	else:
		tmp = y * (x / z)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (z <= -9e+23)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= 4.3e+92)
		tmp = Float64(x * Float64(Float64(y / z) - t));
	elseif (z <= 6.8e+244)
		tmp = Float64(x / Float64(z / t));
	else
		tmp = Float64(y * Float64(x / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= -9e+23)
		tmp = x * (y / z);
	elseif (z <= 4.3e+92)
		tmp = x * ((y / z) - t);
	elseif (z <= 6.8e+244)
		tmp = x / (z / t);
	else
		tmp = y * (x / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[z, -9e+23], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e+92], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+244], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.99999999999999958e23

    1. Initial program 99.7%

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

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

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

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

    if -8.99999999999999958e23 < z < 4.2999999999999998e92

    1. Initial program 94.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{z} - t \cdot x} \]
      4. *-commutative81.4%

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} - x \cdot t \]
      6. distribute-lft-out--85.8%

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

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

    if 4.2999999999999998e92 < z < 6.8000000000000002e244

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      2. 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 78.3%

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

    if 6.8000000000000002e244 < z

    1. Initial program 69.9%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
    4. Applied egg-rr83.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+92}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+244}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 8: 89.0% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

    if -61000 < z < 1

    1. Initial program 93.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} - x \cdot t \]
      6. distribute-lft-out--90.7%

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

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

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

Alternative 9: 71.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{-74}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{elif}\;y \leq 6.4 \cdot 10^{-190}:\\
\;\;\;\;x \cdot \frac{t}{z + -1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.10000000000000032e-74

    1. Initial program 93.7%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
    4. Applied egg-rr82.1%

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

    if -4.10000000000000032e-74 < y < 6.4000000000000001e-190

    1. Initial program 98.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
      6. distribute-frac-neg80.4%

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

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

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

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

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

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

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

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

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

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

    if 6.4000000000000001e-190 < y

    1. Initial program 91.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{-74}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{-190}:\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array} \]

Alternative 10: 63.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+152} \lor \neg \left(t \leq 2.05 \cdot 10^{+165}\right):\\
\;\;\;\;x \cdot \left(-t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.8000000000000002e152 or 2.0500000000000001e165 < t

    1. Initial program 95.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
      6. distribute-frac-neg78.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
    6. Step-by-step derivation
      1. mul-1-neg42.2%

        \[\leadsto \color{blue}{-t \cdot x} \]
      2. *-commutative42.2%

        \[\leadsto -\color{blue}{x \cdot t} \]
      3. distribute-rgt-neg-in42.2%

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

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

    if -2.8000000000000002e152 < t < 2.0500000000000001e165

    1. Initial program 94.4%

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

      \[\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}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.9%

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

Alternative 11: 62.2% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-268}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

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

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


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

    1. Initial program 91.4%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
    4. Applied egg-rr66.7%

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

    if -4.7999999999999998e-268 < t < 9.50000000000000053e163

    1. Initial program 97.1%

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

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

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

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

    if 9.50000000000000053e163 < t

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
      6. distribute-frac-neg84.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot x} \]
      2. *-commutative47.1%

        \[\leadsto -\color{blue}{x \cdot t} \]
      3. distribute-rgt-neg-in47.1%

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

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

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

Alternative 12: 23.1% 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 94.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
    6. distribute-frac-neg45.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-1 \cdot \left(t \cdot x\right)} \]
  6. Step-by-step derivation
    1. mul-1-neg25.3%

      \[\leadsto \color{blue}{-t \cdot x} \]
    2. *-commutative25.3%

      \[\leadsto -\color{blue}{x \cdot t} \]
    3. distribute-rgt-neg-in25.3%

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

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

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

Developer target: 95.2% 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 2023293 
(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)))))