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

Percentage Accurate: 94.4% → 96.3%
Time: 8.1s
Alternatives: 10
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 10 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.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 2.00000000000000011e301

    1. Initial program 97.1%

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

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

    1. Initial program 62.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
  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 2 \cdot 10^{+301}:\\ \;\;\;\;\left(\frac{y}{z} + \frac{t}{z + -1}\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 74.9% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 9.6 \cdot 10^{+178}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.7499999999999999e78 or 3e111 < z < 9.599999999999999e178

    1. Initial program 96.0%

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

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

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

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

    if -2.7499999999999999e78 < z < 4.60000000000000005e58

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

    if 4.60000000000000005e58 < z < 3e111

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.599999999999999e178 < z < 1.15000000000000008e206

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15000000000000008e206 < z

    1. Initial program 95.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.75 \cdot 10^{+78}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+58}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+111}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{+178}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+206}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 63.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{z} \cdot x\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 7.2 \cdot 10^{-187} \lor \neg \left(y \leq 2.3 \cdot 10^{-157}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.15e-106 or 8.8e-249 < y < 7.19999999999999989e-187 or 2.29999999999999989e-157 < y

    1. Initial program 94.2%

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

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

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

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

    if -1.15e-106 < y < 8.8e-249

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.19999999999999989e-187 < y < 2.29999999999999989e-157

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{-106}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{-249}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{-187} \lor \neg \left(y \leq 2.3 \cdot 10^{-157}\right):\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 63.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq 1.15 \cdot 10^{-248}:\\
\;\;\;\;x \cdot \left(-t\right)\\

\mathbf{elif}\;y \leq 1.7 \cdot 10^{-187} \lor \neg \left(y \leq 7.5 \cdot 10^{-158}\right):\\
\;\;\;\;\frac{y}{z} \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.49999999999999991e-106

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.49999999999999991e-106 < y < 1.15e-248

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e-248 < y < 1.7000000000000001e-187 or 7.5e-158 < y

    1. Initial program 95.9%

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

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

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

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

    if 1.7000000000000001e-187 < y < 7.5e-158

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{-106}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-248}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-187} \lor \neg \left(y \leq 7.5 \cdot 10^{-158}\right):\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 63.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq 5.5 \cdot 10^{-251}:\\
\;\;\;\;x \cdot \left(-t\right)\\

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

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

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


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

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35000000000000011e-106 < y < 5.5e-251

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5e-251 < y < 7.9999999999999996e-188

    1. Initial program 99.6%

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

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

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

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

    if 7.9999999999999996e-188 < y < 8.6e-159

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.6e-159 < y

    1. Initial program 95.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{-106}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{-251}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-188}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;y \leq 8.6 \cdot 10^{-159}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 64.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq 1.7 \cdot 10^{-250}:\\
\;\;\;\;x \cdot \left(-t\right)\\

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

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

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


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

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.2000000000000001e-106 < y < 1.69999999999999997e-250

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.69999999999999997e-250 < y < 1.4e-187

    1. Initial program 99.6%

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

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

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

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

    if 1.4e-187 < y < 2.7e-157

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7e-157 < y

    1. Initial program 95.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{-106}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{-250}:\\ \;\;\;\;x \cdot \left(-t\right)\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-187}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-157}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 93.1% accurate, 0.6× speedup?

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

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -235000 < z < 8.8000000000000004e-14

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 40.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+35} \lor \neg \left(z \leq 8.8 \cdot 10^{-14}\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.79999999999999999e35 or 8.8000000000000004e-14 < z

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.79999999999999999e35 < z < 8.8000000000000004e-14

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 42.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+35} \lor \neg \left(z \leq 8.8 \cdot 10^{-14}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.79999999999999999e35 or 8.8000000000000004e-14 < z

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.79999999999999999e35 < z < 8.8000000000000004e-14

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 23.0% accurate, 2.8× speedup?

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

\\
x \cdot \left(-t\right)
\end{array}
Derivation
  1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x \cdot \left(-t\right) \]
  10. 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 2024072 
(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)))))