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

Percentage Accurate: 94.6% → 95.5%
Time: 10.3s
Alternatives: 12
Speedup: 0.5×

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: 95.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} + \frac{t}{z + -1}\\ \mathbf{if}\;t\_1 \leq 4 \cdot 10^{+273}:\\ \;\;\;\;t\_1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ (/ y z) (/ t (+ z -1.0)))))
   (if (<= t_1 4e+273) (* t_1 x) (* y (/ x z)))))
double code(double x, double y, double z, double t) {
	double t_1 = (y / z) + (t / (z + -1.0));
	double tmp;
	if (t_1 <= 4e+273) {
		tmp = t_1 * x;
	} else {
		tmp = y * (x / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y / z) + (t / (z + (-1.0d0)))
    if (t_1 <= 4d+273) then
        tmp = t_1 * x
    else
        tmp = y * (x / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = (y / z) + (t / (z + -1.0));
	double tmp;
	if (t_1 <= 4e+273) {
		tmp = t_1 * x;
	} else {
		tmp = y * (x / z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y / z) + (t / (z + -1.0))
	tmp = 0
	if t_1 <= 4e+273:
		tmp = t_1 * x
	else:
		tmp = y * (x / z)
	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 <= 4e+273)
		tmp = Float64(t_1 * x);
	else
		tmp = Float64(y * Float64(x / z));
	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 <= 4e+273)
		tmp = t_1 * x;
	else
		tmp = y * (x / z);
	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[LessEqual[t$95$1, 4e+273], N[(t$95$1 * x), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


\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))) < 3.99999999999999978e273

    1. Initial program 98.2%

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

    if 3.99999999999999978e273 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z)))

    1. Initial program 74.3%

      \[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}{y \cdot \left(-1 \cdot \frac{t \cdot x}{y \cdot \left(1 - z\right)} + \frac{x}{z}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 93.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1.22 \cdot 10^{-8}\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 -1.0) (not (<= z 1.22e-8)))
   (* x (/ (+ y t) z))
   (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.0) || !(z <= 1.22e-8)) {
		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 <= (-1.0d0)) .or. (.not. (z <= 1.22d-8))) 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 <= -1.0) || !(z <= 1.22e-8)) {
		tmp = x * ((y + t) / z);
	} else {
		tmp = x * ((y / z) - t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (z <= -1.0) or not (z <= 1.22e-8):
		tmp = x * ((y + t) / z)
	else:
		tmp = x * ((y / z) - t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((z <= -1.0) || !(z <= 1.22e-8))
		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 <= -1.0) || ~((z <= 1.22e-8)))
		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, -1.0], N[Not[LessEqual[z, 1.22e-8]], $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 -1 \lor \neg \left(z \leq 1.22 \cdot 10^{-8}\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 < -1 or 1.22e-8 < z

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

    if -1 < z < 1.22e-8

    1. Initial program 93.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1.22 \cdot 10^{-8}\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.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{+65} \lor \neg \left(t \leq 900\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 -5.6e+65) (not (<= t 900.0)))
   (* x (/ t (+ z -1.0)))
   (/ x (/ z y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -5.6e+65) || !(t <= 900.0)) {
		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 <= (-5.6d+65)) .or. (.not. (t <= 900.0d0))) 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 <= -5.6e+65) || !(t <= 900.0)) {
		tmp = x * (t / (z + -1.0));
	} else {
		tmp = x / (z / y);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (t <= -5.6e+65) or not (t <= 900.0):
		tmp = x * (t / (z + -1.0))
	else:
		tmp = x / (z / y)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -5.6e+65) || !(t <= 900.0))
		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 <= -5.6e+65) || ~((t <= 900.0)))
		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, -5.6e+65], N[Not[LessEqual[t, 900.0]], $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 -5.6 \cdot 10^{+65} \lor \neg \left(t \leq 900\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 < -5.5999999999999998e65 or 900 < t

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

    if -5.5999999999999998e65 < t < 900

    1. Initial program 95.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    7. Applied egg-rr85.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 -5.6 \cdot 10^{+65} \lor \neg \left(t \leq 900\right):\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 72.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+77} \lor \neg \left(t \leq 1000\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 -4.5e+77) (not (<= t 1000.0)))
   (* t (/ x (+ z -1.0)))
   (/ x (/ z y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((t <= -4.5e+77) || !(t <= 1000.0)) {
		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 <= (-4.5d+77)) .or. (.not. (t <= 1000.0d0))) 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 <= -4.5e+77) || !(t <= 1000.0)) {
		tmp = t * (x / (z + -1.0));
	} else {
		tmp = x / (z / y);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (t <= -4.5e+77) or not (t <= 1000.0):
		tmp = t * (x / (z + -1.0))
	else:
		tmp = x / (z / y)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((t <= -4.5e+77) || !(t <= 1000.0))
		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 <= -4.5e+77) || ~((t <= 1000.0)))
		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, -4.5e+77], N[Not[LessEqual[t, 1000.0]], $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 -4.5 \cdot 10^{+77} \lor \neg \left(t \leq 1000\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 < -4.50000000000000024e77 or 1e3 < t

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000024e77 < t < 1e3

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

Alternative 5: 75.3% accurate, 0.6× speedup?

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

\mathbf{elif}\;z \leq 24000000:\\
\;\;\;\;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 < -4.5999999999999997e75

    1. Initial program 98.1%

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

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

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

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

    if -4.5999999999999997e75 < z < 2.4e7

    1. Initial program 94.5%

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

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

    if 2.4e7 < z

    1. Initial program 98.1%

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\frac{t}{-1 + z}} \]
    6. Taylor expanded in z around inf 63.0%

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

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

Alternative 6: 67.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+138} \lor \neg \left(t \leq 45000000\right):\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.15000000000000004e138 or 4.5e7 < t

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z + -1}{t}}} \]
    8. Taylor expanded in z around inf 52.1%

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

    if -1.15000000000000004e138 < t < 4.5e7

    1. Initial program 95.6%

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

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

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

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

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

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

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

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

Alternative 7: 67.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+137} \lor \neg \left(t \leq 45000000\right):\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.0000000000000001e137 or 4.5e7 < t

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{\frac{z + -1}{t}}} \]
    8. Taylor expanded in z around inf 52.1%

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

    if -2.0000000000000001e137 < t < 4.5e7

    1. Initial program 95.6%

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

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

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

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

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

Alternative 8: 67.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+136} \lor \neg \left(t \leq 45000000\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.0999999999999999e136 or 4.5e7 < t

    1. Initial program 96.9%

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\frac{t}{-1 + z}} \]
    6. Taylor expanded in z around inf 52.1%

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

    if -2.0999999999999999e136 < t < 4.5e7

    1. Initial program 95.6%

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

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

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

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

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

Alternative 9: 45.7% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 98.3%

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\frac{t}{-1 + z}} \]
    6. Taylor expanded in z around inf 55.3%

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

    if -1 < z < 1.19999999999999996

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 43.4% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 98.3%

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

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

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

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

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

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

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

      \[\leadsto x \cdot \color{blue}{\frac{t}{-1 + z}} \]
    6. Taylor expanded in z around inf 47.7%

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

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

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

    if -1 < z < 1.19999999999999996

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 24.9% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.19999999999999996 < z

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(-t\right)} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt2.4%

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

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

        \[\leadsto x \cdot \sqrt{\color{blue}{t \cdot t}} \]
      4. sqrt-unprod12.9%

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

        \[\leadsto x \cdot \color{blue}{t} \]
      6. pow118.0%

        \[\leadsto \color{blue}{{\left(x \cdot t\right)}^{1}} \]
    10. Applied egg-rr18.0%

      \[\leadsto \color{blue}{{\left(x \cdot t\right)}^{1}} \]
    11. Step-by-step derivation
      1. unpow118.0%

        \[\leadsto \color{blue}{x \cdot t} \]
    12. Simplified18.0%

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

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

Alternative 12: 9.5% 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 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x \cdot \left(-t\right)} \]
  9. Step-by-step derivation
    1. add-sqr-sqrt10.2%

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

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

      \[\leadsto x \cdot \sqrt{\color{blue}{t \cdot t}} \]
    4. sqrt-unprod6.1%

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

      \[\leadsto x \cdot \color{blue}{t} \]
    6. pow19.7%

      \[\leadsto \color{blue}{{\left(x \cdot t\right)}^{1}} \]
  10. Applied egg-rr9.7%

    \[\leadsto \color{blue}{{\left(x \cdot t\right)}^{1}} \]
  11. Step-by-step derivation
    1. unpow19.7%

      \[\leadsto \color{blue}{x \cdot t} \]
  12. Simplified9.7%

    \[\leadsto \color{blue}{x \cdot t} \]
  13. Final simplification9.7%

    \[\leadsto t \cdot x \]
  14. 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 2024129 
(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)))))