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

Percentage Accurate: 94.4% → 96.3%
Time: 10.4s
Alternatives: 12
Speedup: 0.6×

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.4% 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: 96.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} + \frac{t}{z + -1}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+303}:\\ \;\;\;\;\frac{x \cdot \left(z \cdot t + y \cdot \left(z + -1\right)\right)}{z \cdot \left(z + -1\right)}\\ \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 (<= t_1 -5e+303)
     (/ (* x (+ (* z t) (* y (+ z -1.0)))) (* z (+ z -1.0)))
     (* 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+303) {
		tmp = (x * ((z * t) + (y * (z + -1.0)))) / (z * (z + -1.0));
	} else {
		tmp = t_1 * x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y / z) + (t / (z + (-1.0d0)))
    if (t_1 <= (-5d+303)) then
        tmp = (x * ((z * t) + (y * (z + (-1.0d0))))) / (z * (z + (-1.0d0)))
    else
        tmp = t_1 * x
    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 <= -5e+303) {
		tmp = (x * ((z * t) + (y * (z + -1.0)))) / (z * (z + -1.0));
	} 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+303:
		tmp = (x * ((z * t) + (y * (z + -1.0)))) / (z * (z + -1.0))
	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+303)
		tmp = Float64(Float64(x * Float64(Float64(z * t) + Float64(y * Float64(z + -1.0)))) / Float64(z * Float64(z + -1.0)));
	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+303)
		tmp = (x * ((z * t) + (y * (z + -1.0)))) / (z * (z + -1.0));
	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[LessEqual[t$95$1, -5e+303], N[(N[(x * N[(N[(z * t), $MachinePrecision] + N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(z + -1.0), $MachinePrecision]), $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^{+303}:\\
\;\;\;\;\frac{x \cdot \left(z \cdot t + y \cdot \left(z + -1\right)\right)}{z \cdot \left(z + -1\right)}\\

\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.9999999999999997e303

    1. Initial program 66.7%

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

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

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

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

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

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

    1. Initial program 96.9%

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

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

Alternative 2: 61.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(-x\right)\\ t_2 := \frac{y \cdot x}{z}\\ \mathbf{if}\;y \leq -1.55 \cdot 10^{+40}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-122}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-150}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-276}:\\ \;\;\;\;\frac{t \cdot x}{z}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-127}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (- x))) (t_2 (/ (* y x) z)))
   (if (<= y -1.55e+40)
     t_2
     (if (<= y -1.75e-122)
       (* x (/ t z))
       (if (<= y -1.15e-150)
         t_1
         (if (<= y 4.8e-276) (/ (* t x) z) (if (<= y 1.1e-127) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * -x;
	double t_2 = (y * x) / z;
	double tmp;
	if (y <= -1.55e+40) {
		tmp = t_2;
	} else if (y <= -1.75e-122) {
		tmp = x * (t / z);
	} else if (y <= -1.15e-150) {
		tmp = t_1;
	} else if (y <= 4.8e-276) {
		tmp = (t * x) / z;
	} else if (y <= 1.1e-127) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * -x
    t_2 = (y * x) / z
    if (y <= (-1.55d+40)) then
        tmp = t_2
    else if (y <= (-1.75d-122)) then
        tmp = x * (t / z)
    else if (y <= (-1.15d-150)) then
        tmp = t_1
    else if (y <= 4.8d-276) then
        tmp = (t * x) / z
    else if (y <= 1.1d-127) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t * -x;
	double t_2 = (y * x) / z;
	double tmp;
	if (y <= -1.55e+40) {
		tmp = t_2;
	} else if (y <= -1.75e-122) {
		tmp = x * (t / z);
	} else if (y <= -1.15e-150) {
		tmp = t_1;
	} else if (y <= 4.8e-276) {
		tmp = (t * x) / z;
	} else if (y <= 1.1e-127) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * -x
	t_2 = (y * x) / z
	tmp = 0
	if y <= -1.55e+40:
		tmp = t_2
	elif y <= -1.75e-122:
		tmp = x * (t / z)
	elif y <= -1.15e-150:
		tmp = t_1
	elif y <= 4.8e-276:
		tmp = (t * x) / z
	elif y <= 1.1e-127:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(-x))
	t_2 = Float64(Float64(y * x) / z)
	tmp = 0.0
	if (y <= -1.55e+40)
		tmp = t_2;
	elseif (y <= -1.75e-122)
		tmp = Float64(x * Float64(t / z));
	elseif (y <= -1.15e-150)
		tmp = t_1;
	elseif (y <= 4.8e-276)
		tmp = Float64(Float64(t * x) / z);
	elseif (y <= 1.1e-127)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * -x;
	t_2 = (y * x) / z;
	tmp = 0.0;
	if (y <= -1.55e+40)
		tmp = t_2;
	elseif (y <= -1.75e-122)
		tmp = x * (t / z);
	elseif (y <= -1.15e-150)
		tmp = t_1;
	elseif (y <= 4.8e-276)
		tmp = (t * x) / z;
	elseif (y <= 1.1e-127)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-x)), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[y, -1.55e+40], t$95$2, If[LessEqual[y, -1.75e-122], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.15e-150], t$95$1, If[LessEqual[y, 4.8e-276], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.1e-127], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -1.15 \cdot 10^{-150}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 1.1 \cdot 10^{-127}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.5499999999999999e40 or 1.1000000000000001e-127 < y

    1. Initial program 91.2%

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

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

    if -1.5499999999999999e40 < y < -1.7500000000000001e-122

    1. Initial program 99.7%

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

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

        \[\leadsto \frac{\color{blue}{\left(y - -1 \cdot t\right) \cdot x}}{z} \]
      2. remove-double-neg72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7500000000000001e-122 < y < -1.15000000000000001e-150 or 4.79999999999999965e-276 < y < 1.1000000000000001e-127

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15000000000000001e-150 < y < 4.79999999999999965e-276

    1. Initial program 94.3%

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

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

        \[\leadsto \frac{\color{blue}{\left(y - -1 \cdot t\right) \cdot x}}{z} \]
      2. remove-double-neg69.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{-1 \cdot y - t}{z}} \]
      13. distribute-rgt-neg-in69.5%

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{x}{z}} + \frac{x \cdot y}{z} \]
      2. *-commutative60.9%

        \[\leadsto t \cdot \frac{x}{z} + \frac{\color{blue}{y \cdot x}}{z} \]
      3. associate-/l*63.7%

        \[\leadsto t \cdot \frac{x}{z} + \color{blue}{y \cdot \frac{x}{z}} \]
      4. distribute-rgt-out63.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+40}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-122}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{-150}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-276}:\\ \;\;\;\;\frac{t \cdot x}{z}\\ \mathbf{elif}\;y \leq 1.1 \cdot 10^{-127}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 66.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ \mathbf{if}\;t \leq -2.85 \cdot 10^{+147}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+146}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+250} \lor \neg \left(t \leq 5.6 \cdot 10^{+298}\right):\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ t z))))
   (if (<= t -2.85e+147)
     t_1
     (if (<= t 9.2e+146)
       (* (/ y z) x)
       (if (or (<= t 1.15e+250) (not (<= t 5.6e+298))) (* t (- x)) t_1)))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double tmp;
	if (t <= -2.85e+147) {
		tmp = t_1;
	} else if (t <= 9.2e+146) {
		tmp = (y / z) * x;
	} else if ((t <= 1.15e+250) || !(t <= 5.6e+298)) {
		tmp = t * -x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (t / z)
    if (t <= (-2.85d+147)) then
        tmp = t_1
    else if (t <= 9.2d+146) then
        tmp = (y / z) * x
    else if ((t <= 1.15d+250) .or. (.not. (t <= 5.6d+298))) then
        tmp = t * -x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double tmp;
	if (t <= -2.85e+147) {
		tmp = t_1;
	} else if (t <= 9.2e+146) {
		tmp = (y / z) * x;
	} else if ((t <= 1.15e+250) || !(t <= 5.6e+298)) {
		tmp = t * -x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / z)
	tmp = 0
	if t <= -2.85e+147:
		tmp = t_1
	elif t <= 9.2e+146:
		tmp = (y / z) * x
	elif (t <= 1.15e+250) or not (t <= 5.6e+298):
		tmp = t * -x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t / z))
	tmp = 0.0
	if (t <= -2.85e+147)
		tmp = t_1;
	elseif (t <= 9.2e+146)
		tmp = Float64(Float64(y / z) * x);
	elseif ((t <= 1.15e+250) || !(t <= 5.6e+298))
		tmp = Float64(t * Float64(-x));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t / z);
	tmp = 0.0;
	if (t <= -2.85e+147)
		tmp = t_1;
	elseif (t <= 9.2e+146)
		tmp = (y / z) * x;
	elseif ((t <= 1.15e+250) || ~((t <= 5.6e+298)))
		tmp = t * -x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.85e+147], t$95$1, If[LessEqual[t, 9.2e+146], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[Or[LessEqual[t, 1.15e+250], N[Not[LessEqual[t, 5.6e+298]], $MachinePrecision]], N[(t * (-x)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+250} \lor \neg \left(t \leq 5.6 \cdot 10^{+298}\right):\\
\;\;\;\;t \cdot \left(-x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.84999999999999996e147 or 1.1500000000000001e250 < t < 5.60000000000000033e298

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.84999999999999996e147 < t < 9.20000000000000001e146

    1. Initial program 92.7%

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

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

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

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

    if 9.20000000000000001e146 < t < 1.1500000000000001e250 or 5.60000000000000033e298 < t

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.85 \cdot 10^{+147}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+146}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+250} \lor \neg \left(t \leq 5.6 \cdot 10^{+298}\right):\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 66.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+249}:\\
\;\;\;\;t \cdot \left(-x\right)\\

\mathbf{elif}\;t \leq 6.5 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.1000000000000002e146 or 2.1999999999999998e249 < t < 6.5e298

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1000000000000002e146 < t < 4.40000000000000028e143

    1. Initial program 92.7%

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

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

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

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

    if 4.40000000000000028e143 < t < 2.1999999999999998e249

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.5e298 < t

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
      2. *-commutative48.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.1 \cdot 10^{+146}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+143}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{+249}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+298}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 96.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} + \frac{t}{z + -1}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \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 (<= t_1 (- INFINITY)) (/ y (/ z x)) (* 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 <= -((double) INFINITY)) {
		tmp = y / (z / x);
	} 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 <= -Double.POSITIVE_INFINITY) {
		tmp = y / (z / x);
	} 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 <= -math.inf:
		tmp = y / (z / x)
	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 <= Float64(-Inf))
		tmp = Float64(y / Float64(z / x));
	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 <= -Inf)
		tmp = y / (z / x);
	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[LessEqual[t$95$1, (-Infinity)], N[(y / N[(z / x), $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 -\infty:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\

\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))) < -inf.0

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
      2. *-commutative99.8%

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

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

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

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

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

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

    1. Initial program 97.0%

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

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

Alternative 6: 72.0% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.29999999999999978e226 or 4.80000000000000042e155 < z

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999978e226 < z < -6.50000000000000022e26

    1. Initial program 99.8%

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

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

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

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

    if -6.50000000000000022e26 < z < 4.80000000000000042e155

    1. Initial program 92.0%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
      3. div-sub87.1%

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

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

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

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

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

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

Alternative 7: 95.0% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1 < z < 1

    1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 93.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \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 -1.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 <= -1.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 <= (-1.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 <= -1.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 <= -1.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 <= -1.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 <= -1.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, -1.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 -1 \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 < -1 or 1 < z

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1 < z < 1

    1. Initial program 90.2%

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{y - t \cdot z}}{z} \]
      3. div-sub89.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \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 9: 43.9% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.2000000000000003e-10 or 9.49999999999999927e-37 < z

    1. Initial program 97.0%

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

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

        \[\leadsto \frac{\color{blue}{\left(y - -1 \cdot t\right) \cdot x}}{z} \]
      2. remove-double-neg87.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{-1 \cdot y - t}{z}} \]
      13. distribute-rgt-neg-in95.8%

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

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

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

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

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

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

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

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

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

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

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

    if -6.2000000000000003e-10 < z < 9.49999999999999927e-37

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 41.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-10} \lor \neg \left(z \leq 9.5 \cdot 10^{-37}\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 < -6.2000000000000003e-10 or 9.49999999999999927e-37 < z

    1. Initial program 97.0%

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

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

        \[\leadsto \frac{\color{blue}{\left(y - -1 \cdot t\right) \cdot x}}{z} \]
      2. remove-double-neg87.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{-1 \cdot y - t}{z}} \]
      13. distribute-rgt-neg-in95.8%

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{x}{z}} + \frac{x \cdot y}{z} \]
      2. *-commutative84.8%

        \[\leadsto t \cdot \frac{x}{z} + \frac{\color{blue}{y \cdot x}}{z} \]
      3. associate-/l*82.0%

        \[\leadsto t \cdot \frac{x}{z} + \color{blue}{y \cdot \frac{x}{z}} \]
      4. distribute-rgt-out83.5%

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

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

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

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

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

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

    if -6.2000000000000003e-10 < z < 9.49999999999999927e-37

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 22.5% accurate, 2.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto t \cdot \left(-x\right) \]
  12. Add Preprocessing

Alternative 12: 9.6% 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 93.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(\frac{z}{\color{blue}{\mathsf{fma}\left(y, x, \left(-t\right) \cdot \left(x \cdot z\right)\right)}}\right)}^{-1} \]
    6. add-sqr-sqrt37.6%

      \[\leadsto {\left(\frac{z}{\mathsf{fma}\left(y, x, \color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)} \cdot \left(x \cdot z\right)\right)}\right)}^{-1} \]
    7. sqrt-unprod54.1%

      \[\leadsto {\left(\frac{z}{\mathsf{fma}\left(y, x, \color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}} \cdot \left(x \cdot z\right)\right)}\right)}^{-1} \]
    8. sqr-neg54.1%

      \[\leadsto {\left(\frac{z}{\mathsf{fma}\left(y, x, \sqrt{\color{blue}{t \cdot t}} \cdot \left(x \cdot z\right)\right)}\right)}^{-1} \]
    9. sqrt-unprod23.8%

      \[\leadsto {\left(\frac{z}{\mathsf{fma}\left(y, x, \color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)} \cdot \left(x \cdot z\right)\right)}\right)}^{-1} \]
    10. add-sqr-sqrt54.6%

      \[\leadsto {\left(\frac{z}{\mathsf{fma}\left(y, x, \color{blue}{t} \cdot \left(x \cdot z\right)\right)}\right)}^{-1} \]
    11. *-commutative54.6%

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

    \[\leadsto \color{blue}{{\left(\frac{z}{\mathsf{fma}\left(y, x, t \cdot \left(z \cdot x\right)\right)}\right)}^{-1}} \]
  8. Step-by-step derivation
    1. unpow-154.6%

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{\mathsf{fma}\left(y, x, t \cdot \left(z \cdot x\right)\right)}}} \]
    2. fma-define54.6%

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

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

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

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

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

    \[\leadsto \color{blue}{t \cdot x} \]
  11. Add Preprocessing

Developer target: 94.9% 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 2024086 
(FPCore (x y z t)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
  :precision binary64

  :alt
  (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) -7.623226303312042e-196) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))) (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) 1.4133944927702302e-211) (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z)))) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z)))))))

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