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

Percentage Accurate: 94.3% → 94.9%
Time: 9.7s
Alternatives: 11
Speedup: 0.3×

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.3% 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.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} + \frac{t}{z + -1}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+266} \lor \neg \left(t\_1 \leq \infty\right):\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ (/ y z) (/ t (+ z -1.0)))))
   (if (or (<= t_1 -5e+266) (not (<= t_1 INFINITY))) (* y (/ x z)) (* t_1 x))))
double code(double x, double y, double z, double t) {
	double t_1 = (y / z) + (t / (z + -1.0));
	double tmp;
	if ((t_1 <= -5e+266) || !(t_1 <= ((double) INFINITY))) {
		tmp = y * (x / z);
	} else {
		tmp = t_1 * x;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (y / z) + (t / (z + -1.0));
	double tmp;
	if ((t_1 <= -5e+266) || !(t_1 <= Double.POSITIVE_INFINITY)) {
		tmp = y * (x / z);
	} else {
		tmp = t_1 * x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y / z) + (t / (z + -1.0))
	tmp = 0
	if (t_1 <= -5e+266) or not (t_1 <= math.inf):
		tmp = y * (x / z)
	else:
		tmp = t_1 * x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y / z) + Float64(t / Float64(z + -1.0)))
	tmp = 0.0
	if ((t_1 <= -5e+266) || !(t_1 <= Inf))
		tmp = Float64(y * Float64(x / z));
	else
		tmp = Float64(t_1 * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y / z) + (t / (z + -1.0));
	tmp = 0.0;
	if ((t_1 <= -5e+266) || ~((t_1 <= Inf)))
		tmp = y * (x / z);
	else
		tmp = t_1 * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+266], N[Not[LessEqual[t$95$1, Infinity]], $MachinePrecision]], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y}{z} + \frac{t}{z + -1}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+266} \lor \neg \left(t\_1 \leq \infty\right):\\
\;\;\;\;y \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -4.9999999999999999e266 or +inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z)))

    1. Initial program 76.5%

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. clear-num76.6%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
    9. Applied egg-rr100.0%

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

    if -4.9999999999999999e266 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < +inf.0

    1. Initial program 95.4%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification95.8%

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

Alternative 2: 93.4% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

    if -14600 < z < 1

    1. Initial program 90.3%

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

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

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

Alternative 3: 75.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+117} \lor \neg \left(t \leq 5 \cdot 10^{+52}\right):\\
\;\;\;\;x \cdot \frac{t}{z + -1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.60000000000000002e117 or 5e52 < t

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

    if -1.60000000000000002e117 < t < 5e52

    1. Initial program 93.7%

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. clear-num84.1%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv84.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+117} \lor \neg \left(t \leq 5 \cdot 10^{+52}\right):\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 72.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{+171} \lor \neg \left(t \leq 1.4 \cdot 10^{+56}\right):\\
\;\;\;\;t \cdot \frac{x}{z + -1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.69999999999999998e171 or 1.40000000000000004e56 < t

    1. Initial program 95.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot x}{1 - z}} \]
    4. Step-by-step derivation
      1. mul-1-neg73.3%

        \[\leadsto \color{blue}{-\frac{t \cdot x}{1 - z}} \]
      2. associate-/l*73.3%

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

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

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

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

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

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

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

    if -3.69999999999999998e171 < t < 1.40000000000000004e56

    1. Initial program 92.9%

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. clear-num81.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{+171} \lor \neg \left(t \leq 1.4 \cdot 10^{+56}\right):\\ \;\;\;\;t \cdot \frac{x}{z + -1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.6% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 94.9%

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

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

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

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

    if -1.19999999999999994e109 < z < 6.4999999999999998e37

    1. Initial program 92.6%

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

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

    if 6.4999999999999998e37 < z

    1. Initial program 97.8%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num97.7%

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv90.7%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t}}{z} \]
      2. associate-/l*69.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+109}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+37}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 42.2% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 97.6%

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

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

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

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

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

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

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

    if -1.44999999999999996e-9 < z < 1

    1. Initial program 90.1%

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

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

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

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

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

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

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

Alternative 7: 66.3% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 96.7%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num96.7%

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv62.2%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y + t}{z}} \]
    7. Simplified65.3%

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

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

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

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

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

    if -3.5000000000000001e174 < t < 7.60000000000000025e182

    1. Initial program 93.3%

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    6. Step-by-step derivation
      1. clear-num75.1%

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

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

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

    if 7.60000000000000025e182 < t

    1. Initial program 95.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{+174}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{+182}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 66.1% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 96.7%

      \[x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num96.7%

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv62.2%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y + t}{z}} \]
    7. Simplified65.3%

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

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

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

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

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

    if -1.9999999999999999e175 < t < 9.99999999999999947e182

    1. Initial program 93.3%

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

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

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

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

    if 9.99999999999999947e182 < t

    1. Initial program 95.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{+175}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq 10^{+183}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 43.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{-9}:\\
\;\;\;\;t \cdot \frac{x}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.44999999999999996e-9

    1. Initial program 97.1%

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

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

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

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

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

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

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

    if -1.44999999999999996e-9 < z < 1.1000000000000001

    1. Initial program 90.1%

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

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

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

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

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

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

    if 1.1000000000000001 < z

    1. Initial program 98.2%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - -1 \cdot t\right)}{z}} \]
    6. Step-by-step derivation
      1. cancel-sign-sub-inv92.2%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t}}{z} \]
      2. associate-/l*63.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{-9}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.1:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 24.6% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 92.6%

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

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

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

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

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

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

    if 1 < z

    1. Initial program 98.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\sqrt[3]{\left(-t\right) \cdot x} \cdot \sqrt[3]{\left(-t\right) \cdot x}\right) \cdot \sqrt[3]{\left(-t\right) \cdot x}} \]
      2. pow312.6%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\left(-t\right) \cdot x}\right)}^{3}} \]
      3. add-sqr-sqrt9.4%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)} \cdot x}\right)}^{3} \]
      4. sqrt-unprod17.5%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}} \cdot x}\right)}^{3} \]
      5. sqr-neg17.5%

        \[\leadsto {\left(\sqrt[3]{\sqrt{\color{blue}{t \cdot t}} \cdot x}\right)}^{3} \]
      6. sqrt-unprod8.4%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)} \cdot x}\right)}^{3} \]
      7. add-sqr-sqrt20.1%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{t} \cdot x}\right)}^{3} \]
      8. *-commutative20.1%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{x \cdot t}}\right)}^{3} \]
    8. Applied egg-rr20.1%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{x \cdot t}\right)}^{3}} \]
    9. Step-by-step derivation
      1. rem-cube-cbrt20.1%

        \[\leadsto \color{blue}{x \cdot t} \]
    10. Simplified20.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 1:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 9.2% accurate, 3.7× speedup?

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left(-t\right) \cdot x} \]
  7. Step-by-step derivation
    1. add-cube-cbrt25.5%

      \[\leadsto \color{blue}{\left(\sqrt[3]{\left(-t\right) \cdot x} \cdot \sqrt[3]{\left(-t\right) \cdot x}\right) \cdot \sqrt[3]{\left(-t\right) \cdot x}} \]
    2. pow325.5%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\left(-t\right) \cdot x}\right)}^{3}} \]
    3. add-sqr-sqrt12.7%

      \[\leadsto {\left(\sqrt[3]{\color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)} \cdot x}\right)}^{3} \]
    4. sqrt-unprod14.0%

      \[\leadsto {\left(\sqrt[3]{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}} \cdot x}\right)}^{3} \]
    5. sqr-neg14.0%

      \[\leadsto {\left(\sqrt[3]{\sqrt{\color{blue}{t \cdot t}} \cdot x}\right)}^{3} \]
    6. sqrt-unprod4.5%

      \[\leadsto {\left(\sqrt[3]{\color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)} \cdot x}\right)}^{3} \]
    7. add-sqr-sqrt9.9%

      \[\leadsto {\left(\sqrt[3]{\color{blue}{t} \cdot x}\right)}^{3} \]
    8. *-commutative9.9%

      \[\leadsto {\left(\sqrt[3]{\color{blue}{x \cdot t}}\right)}^{3} \]
  8. Applied egg-rr9.9%

    \[\leadsto \color{blue}{{\left(\sqrt[3]{x \cdot t}\right)}^{3}} \]
  9. Step-by-step derivation
    1. rem-cube-cbrt9.9%

      \[\leadsto \color{blue}{x \cdot t} \]
  10. Simplified9.9%

    \[\leadsto \color{blue}{x \cdot t} \]
  11. Final simplification9.9%

    \[\leadsto t \cdot x \]
  12. Add Preprocessing

Developer Target 1: 95.2% accurate, 0.2× 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 2024118 
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< (* x (- (/ y z) (/ t (- 1 z)))) -3811613151656021/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* x (- (/ y z) (* t (/ 1 (- 1 z))))) (if (< (* x (- (/ y z) (/ t (- 1 z)))) 7066972463851151/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (/ (* y x) z) (- (/ (* t x) (- 1 z)))) (* x (- (/ y z) (* t (/ 1 (- 1 z))))))))

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