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

Percentage Accurate: 94.7% → 94.7%
Time: 12.0s
Alternatives: 11
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 11 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 94.7% accurate, 1.0× speedup?

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

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

Alternative 1: 94.7% accurate, 1.0× speedup?

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

\\
x \cdot \left(\frac{y}{z} + \frac{t}{z + -1}\right)
\end{array}
Derivation
  1. Initial program 94.5%

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

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

Alternative 2: 62.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
t_2 := t \cdot \frac{x}{z}\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{-24}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{elif}\;t \leq 3.5 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.95 \cdot 10^{+198}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 1.6 \cdot 10^{+218}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.4999999999999996e-24

    1. Initial program 94.4%

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    4. Step-by-step derivation
      1. *-commutative43.2%

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

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

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

    if -3.4999999999999996e-24 < t < 3.5e28 or 1.95e198 < t < 1.59999999999999994e218

    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 83.0%

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

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

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

    if 3.5e28 < t < 1.95e198 or 3.30000000000000001e247 < t

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    10. Applied egg-rr54.8%

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

    if 1.59999999999999994e218 < t < 3.30000000000000001e247

    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 0 71.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{-24}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+28}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+198}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+218}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{+247}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 72.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq 4.1 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 2.65 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.5e13

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
      2. clear-num80.4%

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

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

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

    if -3.5e13 < y < 4.09999999999999994e-79 or 4.50000000000000001e-60 < y < 2.6499999999999998e-25

    1. Initial program 96.3%

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

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

        \[\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-identity61.0%

        \[\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-rr61.0%

      \[\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-sub61.0%

        \[\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. times-frac68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot x}{z - 1}} \]
    8. Step-by-step derivation
      1. sub-neg71.3%

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

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

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

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

    if 4.09999999999999994e-79 < y < 4.50000000000000001e-60

    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 87.1%

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

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

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

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

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

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

    if 2.6499999999999998e-25 < y

    1. Initial program 94.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -35000000000000:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq 4.1 \cdot 10^{-79}:\\ \;\;\;\;t \cdot \frac{x}{z + -1}\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-60}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;y \leq 2.65 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \frac{x}{z + -1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 66.9% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq -2.7 \cdot 10^{+90} \lor \neg \left(t \leq 3.7 \cdot 10^{+28}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.3499999999999999e206 or -1.55000000000000002e141 < t < -2.7e90 or 3.6999999999999999e28 < t

    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 0 65.6%

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot x}{\color{blue}{z \cdot 1}} \]
      2. times-frac60.4%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \frac{x}{1}} \]
      3. /-rgt-identity60.4%

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

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

    if -2.3499999999999999e206 < t < -1.55000000000000002e141

    1. Initial program 95.0%

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    4. Step-by-step derivation
      1. *-commutative43.0%

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

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

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

    if -2.7e90 < t < 3.6999999999999999e28

    1. Initial program 94.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.35 \cdot 10^{+206}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{+141}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{+90} \lor \neg \left(t \leq 3.7 \cdot 10^{+28}\right):\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 63.7% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2e-121 or 8.4999999999999996e-153 < y

    1. Initial program 94.6%

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

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

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

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

    if -2e-121 < y < 3.0500000000000001e-227

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    10. Applied egg-rr56.9%

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

    if 3.0500000000000001e-227 < y < 8.4999999999999996e-153

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 75.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.40000000000000002e51 or 2.60000000000000009e27 < t

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.40000000000000002e51 < t < 2.60000000000000009e27

    1. Initial program 94.3%

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

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

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

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

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

Alternative 7: 89.2% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

    if -0.880000000000000004 < z < 1

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 74.2% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 97.0%

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

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

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

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

    if -2.1e128 < z < 1.3e19

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

    if 1.3e19 < z

    1. Initial program 94.6%

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

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot x}{\color{blue}{z \cdot 1}} \]
      2. times-frac65.4%

        \[\leadsto \color{blue}{\frac{t}{z} \cdot \frac{x}{1}} \]
      3. /-rgt-identity65.4%

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

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

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

Alternative 9: 89.0% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 98.0%

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

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

        \[\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-identity57.9%

        \[\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-rr57.9%

      \[\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-sub57.9%

        \[\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. times-frac64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.92000000000000004 < z < 1

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

    if 1 < z

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 42.5% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{x}{z}} \]
    10. Applied egg-rr49.3%

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

    if -1 < z < 1

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 23.0% accurate, 2.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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