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

Percentage Accurate: 94.9% → 95.8%
Time: 10.4s
Alternatives: 13
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 13 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.9% accurate, 1.0× speedup?

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

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

Alternative 1: 95.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} - \frac{t}{1 - z}\\ \mathbf{if}\;t_1 \leq 10^{+272}:\\ \;\;\;\;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 (- 1.0 z)))))
   (if (<= t_1 1e+272) (* t_1 x) (* y (/ x z)))))
double code(double x, double y, double z, double t) {
	double t_1 = (y / z) - (t / (1.0 - z));
	double tmp;
	if (t_1 <= 1e+272) {
		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 / (1.0d0 - z))
    if (t_1 <= 1d+272) 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 / (1.0 - z));
	double tmp;
	if (t_1 <= 1e+272) {
		tmp = t_1 * x;
	} else {
		tmp = y * (x / z);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y / z) - (t / (1.0 - z))
	tmp = 0
	if t_1 <= 1e+272:
		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(1.0 - z)))
	tmp = 0.0
	if (t_1 <= 1e+272)
		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 / (1.0 - z));
	tmp = 0.0;
	if (t_1 <= 1e+272)
		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[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+272], 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}{1 - z}\\
\mathbf{if}\;t_1 \leq 10^{+272}:\\
\;\;\;\;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 1 z))) < 1.0000000000000001e272

    1. Initial program 96.6%

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

    if 1.0000000000000001e272 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))

    1. Initial program 66.6%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
      2. associate-/r/100.0%

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

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

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

Alternative 2: 64.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x}{z}\\ t_2 := t \cdot \frac{x}{z}\\ t_3 := t \cdot \left(-x\right)\\ \mathbf{if}\;t \leq -7 \cdot 10^{+258}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{+205}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+134}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.15 \cdot 10^{+85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -2.25 \cdot 10^{-98}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+71}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;t \leq 10^{+241}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (/ x z))) (t_2 (* t (/ x z))) (t_3 (* t (- x))))
   (if (<= t -7e+258)
     t_2
     (if (<= t -3.7e+205)
       t_3
       (if (<= t -2.4e+134)
         t_2
         (if (<= t -2.15e+85)
           t_1
           (if (<= t -1.9e+45)
             t_2
             (if (<= t -2.25e-98)
               t_1
               (if (<= t 3.6e+71)
                 (* (/ y z) x)
                 (if (<= t 1e+241) t_3 t_2))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (x / z);
	double t_2 = t * (x / z);
	double t_3 = t * -x;
	double tmp;
	if (t <= -7e+258) {
		tmp = t_2;
	} else if (t <= -3.7e+205) {
		tmp = t_3;
	} else if (t <= -2.4e+134) {
		tmp = t_2;
	} else if (t <= -2.15e+85) {
		tmp = t_1;
	} else if (t <= -1.9e+45) {
		tmp = t_2;
	} else if (t <= -2.25e-98) {
		tmp = t_1;
	} else if (t <= 3.6e+71) {
		tmp = (y / z) * x;
	} else if (t <= 1e+241) {
		tmp = t_3;
	} 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) :: t_3
    real(8) :: tmp
    t_1 = y * (x / z)
    t_2 = t * (x / z)
    t_3 = t * -x
    if (t <= (-7d+258)) then
        tmp = t_2
    else if (t <= (-3.7d+205)) then
        tmp = t_3
    else if (t <= (-2.4d+134)) then
        tmp = t_2
    else if (t <= (-2.15d+85)) then
        tmp = t_1
    else if (t <= (-1.9d+45)) then
        tmp = t_2
    else if (t <= (-2.25d-98)) then
        tmp = t_1
    else if (t <= 3.6d+71) then
        tmp = (y / z) * x
    else if (t <= 1d+241) then
        tmp = t_3
    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 = y * (x / z);
	double t_2 = t * (x / z);
	double t_3 = t * -x;
	double tmp;
	if (t <= -7e+258) {
		tmp = t_2;
	} else if (t <= -3.7e+205) {
		tmp = t_3;
	} else if (t <= -2.4e+134) {
		tmp = t_2;
	} else if (t <= -2.15e+85) {
		tmp = t_1;
	} else if (t <= -1.9e+45) {
		tmp = t_2;
	} else if (t <= -2.25e-98) {
		tmp = t_1;
	} else if (t <= 3.6e+71) {
		tmp = (y / z) * x;
	} else if (t <= 1e+241) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (x / z)
	t_2 = t * (x / z)
	t_3 = t * -x
	tmp = 0
	if t <= -7e+258:
		tmp = t_2
	elif t <= -3.7e+205:
		tmp = t_3
	elif t <= -2.4e+134:
		tmp = t_2
	elif t <= -2.15e+85:
		tmp = t_1
	elif t <= -1.9e+45:
		tmp = t_2
	elif t <= -2.25e-98:
		tmp = t_1
	elif t <= 3.6e+71:
		tmp = (y / z) * x
	elif t <= 1e+241:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(x / z))
	t_2 = Float64(t * Float64(x / z))
	t_3 = Float64(t * Float64(-x))
	tmp = 0.0
	if (t <= -7e+258)
		tmp = t_2;
	elseif (t <= -3.7e+205)
		tmp = t_3;
	elseif (t <= -2.4e+134)
		tmp = t_2;
	elseif (t <= -2.15e+85)
		tmp = t_1;
	elseif (t <= -1.9e+45)
		tmp = t_2;
	elseif (t <= -2.25e-98)
		tmp = t_1;
	elseif (t <= 3.6e+71)
		tmp = Float64(Float64(y / z) * x);
	elseif (t <= 1e+241)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (x / z);
	t_2 = t * (x / z);
	t_3 = t * -x;
	tmp = 0.0;
	if (t <= -7e+258)
		tmp = t_2;
	elseif (t <= -3.7e+205)
		tmp = t_3;
	elseif (t <= -2.4e+134)
		tmp = t_2;
	elseif (t <= -2.15e+85)
		tmp = t_1;
	elseif (t <= -1.9e+45)
		tmp = t_2;
	elseif (t <= -2.25e-98)
		tmp = t_1;
	elseif (t <= 3.6e+71)
		tmp = (y / z) * x;
	elseif (t <= 1e+241)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * (-x)), $MachinePrecision]}, If[LessEqual[t, -7e+258], t$95$2, If[LessEqual[t, -3.7e+205], t$95$3, If[LessEqual[t, -2.4e+134], t$95$2, If[LessEqual[t, -2.15e+85], t$95$1, If[LessEqual[t, -1.9e+45], t$95$2, If[LessEqual[t, -2.25e-98], t$95$1, If[LessEqual[t, 3.6e+71], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 1e+241], t$95$3, t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3.7 \cdot 10^{+205}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -2.4 \cdot 10^{+134}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -2.15 \cdot 10^{+85}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.9 \cdot 10^{+45}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -2.25 \cdot 10^{-98}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 10^{+241}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.0000000000000002e258 or -3.69999999999999981e205 < t < -2.40000000000000005e134 or -2.15e85 < t < -1.9000000000000001e45 or 1.0000000000000001e241 < t

    1. Initial program 97.9%

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      5. +-commutative81.8%

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

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

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

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

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

    if -7.0000000000000002e258 < t < -3.69999999999999981e205 or 3.6e71 < t < 1.0000000000000001e241

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

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

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

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

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

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

        \[\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 54.8%

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

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

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

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

    if -2.40000000000000005e134 < t < -2.15e85 or -1.9000000000000001e45 < t < -2.24999999999999998e-98

    1. Initial program 78.8%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
      2. associate-/r/82.1%

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

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

    if -2.24999999999999998e-98 < t < 3.6e71

    1. Initial program 95.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{+258}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{+205}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+134}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -2.15 \cdot 10^{+85}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+45}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -2.25 \cdot 10^{-98}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+71}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;t \leq 10^{+241}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 64.6% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x}{z}\\ t_2 := \frac{t}{\frac{z}{x}}\\ t_3 := t \cdot \frac{x}{z}\\ t_4 := t \cdot \left(-x\right)\\ \mathbf{if}\;t \leq -5 \cdot 10^{+258}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{+205}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{+134}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{+85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{+44}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-102}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+71}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+241}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (/ x z)))
        (t_2 (/ t (/ z x)))
        (t_3 (* t (/ x z)))
        (t_4 (* t (- x))))
   (if (<= t -5e+258)
     t_2
     (if (<= t -3.3e+205)
       t_4
       (if (<= t -2.2e+134)
         t_2
         (if (<= t -1.8e+85)
           t_1
           (if (<= t -1.5e+44)
             t_3
             (if (<= t -8.2e-102)
               t_1
               (if (<= t 3.6e+71)
                 (* (/ y z) x)
                 (if (<= t 1.6e+241) t_4 t_3))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (x / z);
	double t_2 = t / (z / x);
	double t_3 = t * (x / z);
	double t_4 = t * -x;
	double tmp;
	if (t <= -5e+258) {
		tmp = t_2;
	} else if (t <= -3.3e+205) {
		tmp = t_4;
	} else if (t <= -2.2e+134) {
		tmp = t_2;
	} else if (t <= -1.8e+85) {
		tmp = t_1;
	} else if (t <= -1.5e+44) {
		tmp = t_3;
	} else if (t <= -8.2e-102) {
		tmp = t_1;
	} else if (t <= 3.6e+71) {
		tmp = (y / z) * x;
	} else if (t <= 1.6e+241) {
		tmp = t_4;
	} else {
		tmp = t_3;
	}
	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) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_1 = y * (x / z)
    t_2 = t / (z / x)
    t_3 = t * (x / z)
    t_4 = t * -x
    if (t <= (-5d+258)) then
        tmp = t_2
    else if (t <= (-3.3d+205)) then
        tmp = t_4
    else if (t <= (-2.2d+134)) then
        tmp = t_2
    else if (t <= (-1.8d+85)) then
        tmp = t_1
    else if (t <= (-1.5d+44)) then
        tmp = t_3
    else if (t <= (-8.2d-102)) then
        tmp = t_1
    else if (t <= 3.6d+71) then
        tmp = (y / z) * x
    else if (t <= 1.6d+241) then
        tmp = t_4
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = y * (x / z);
	double t_2 = t / (z / x);
	double t_3 = t * (x / z);
	double t_4 = t * -x;
	double tmp;
	if (t <= -5e+258) {
		tmp = t_2;
	} else if (t <= -3.3e+205) {
		tmp = t_4;
	} else if (t <= -2.2e+134) {
		tmp = t_2;
	} else if (t <= -1.8e+85) {
		tmp = t_1;
	} else if (t <= -1.5e+44) {
		tmp = t_3;
	} else if (t <= -8.2e-102) {
		tmp = t_1;
	} else if (t <= 3.6e+71) {
		tmp = (y / z) * x;
	} else if (t <= 1.6e+241) {
		tmp = t_4;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (x / z)
	t_2 = t / (z / x)
	t_3 = t * (x / z)
	t_4 = t * -x
	tmp = 0
	if t <= -5e+258:
		tmp = t_2
	elif t <= -3.3e+205:
		tmp = t_4
	elif t <= -2.2e+134:
		tmp = t_2
	elif t <= -1.8e+85:
		tmp = t_1
	elif t <= -1.5e+44:
		tmp = t_3
	elif t <= -8.2e-102:
		tmp = t_1
	elif t <= 3.6e+71:
		tmp = (y / z) * x
	elif t <= 1.6e+241:
		tmp = t_4
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(x / z))
	t_2 = Float64(t / Float64(z / x))
	t_3 = Float64(t * Float64(x / z))
	t_4 = Float64(t * Float64(-x))
	tmp = 0.0
	if (t <= -5e+258)
		tmp = t_2;
	elseif (t <= -3.3e+205)
		tmp = t_4;
	elseif (t <= -2.2e+134)
		tmp = t_2;
	elseif (t <= -1.8e+85)
		tmp = t_1;
	elseif (t <= -1.5e+44)
		tmp = t_3;
	elseif (t <= -8.2e-102)
		tmp = t_1;
	elseif (t <= 3.6e+71)
		tmp = Float64(Float64(y / z) * x);
	elseif (t <= 1.6e+241)
		tmp = t_4;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (x / z);
	t_2 = t / (z / x);
	t_3 = t * (x / z);
	t_4 = t * -x;
	tmp = 0.0;
	if (t <= -5e+258)
		tmp = t_2;
	elseif (t <= -3.3e+205)
		tmp = t_4;
	elseif (t <= -2.2e+134)
		tmp = t_2;
	elseif (t <= -1.8e+85)
		tmp = t_1;
	elseif (t <= -1.5e+44)
		tmp = t_3;
	elseif (t <= -8.2e-102)
		tmp = t_1;
	elseif (t <= 3.6e+71)
		tmp = (y / z) * x;
	elseif (t <= 1.6e+241)
		tmp = t_4;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t * (-x)), $MachinePrecision]}, If[LessEqual[t, -5e+258], t$95$2, If[LessEqual[t, -3.3e+205], t$95$4, If[LessEqual[t, -2.2e+134], t$95$2, If[LessEqual[t, -1.8e+85], t$95$1, If[LessEqual[t, -1.5e+44], t$95$3, If[LessEqual[t, -8.2e-102], t$95$1, If[LessEqual[t, 3.6e+71], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 1.6e+241], t$95$4, t$95$3]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3.3 \cdot 10^{+205}:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t \leq -2.2 \cdot 10^{+134}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -1.8 \cdot 10^{+85}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.5 \cdot 10^{+44}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -8.2 \cdot 10^{-102}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.6 \cdot 10^{+241}:\\
\;\;\;\;t_4\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -5e258 or -3.3000000000000002e205 < t < -2.2e134

    1. Initial program 99.7%

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      5. +-commutative80.7%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    5. Simplified80.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{z}{x}}} \]
    10. Applied egg-rr65.7%

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

    if -5e258 < t < -3.3000000000000002e205 or 3.6e71 < t < 1.60000000000000002e241

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

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

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

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

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

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

        \[\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 54.8%

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

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

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

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

    if -2.2e134 < t < -1.7999999999999999e85 or -1.49999999999999993e44 < t < -8.2000000000000005e-102

    1. Initial program 78.8%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
      2. associate-/r/82.1%

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

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

    if -1.7999999999999999e85 < t < -1.49999999999999993e44 or 1.60000000000000002e241 < t

    1. Initial program 96.2%

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      5. +-commutative82.9%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    5. Simplified82.9%

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

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

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

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

    if -8.2000000000000005e-102 < t < 3.6e71

    1. Initial program 95.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{+258}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{+205}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{+134}:\\ \;\;\;\;\frac{t}{\frac{z}{x}}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{+85}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{+44}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-102}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+71}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+241}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 65.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} \cdot x\\ t_2 := t \cdot \frac{x}{z}\\ t_3 := t \cdot \left(-x\right)\\ \mathbf{if}\;t \leq -9.8 \cdot 10^{+256}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -6.8 \cdot 10^{+203}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t \leq -9 \cdot 10^{+133}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -6.3 \cdot 10^{+84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{+27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+71}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+241}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* (/ y z) x)) (t_2 (* t (/ x z))) (t_3 (* t (- x))))
   (if (<= t -9.8e+256)
     t_2
     (if (<= t -6.8e+203)
       t_3
       (if (<= t -9e+133)
         t_2
         (if (<= t -6.3e+84)
           t_1
           (if (<= t -4.4e+27)
             t_2
             (if (<= t 3.6e+71) t_1 (if (<= t 1.25e+241) t_3 t_2)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y / z) * x;
	double t_2 = t * (x / z);
	double t_3 = t * -x;
	double tmp;
	if (t <= -9.8e+256) {
		tmp = t_2;
	} else if (t <= -6.8e+203) {
		tmp = t_3;
	} else if (t <= -9e+133) {
		tmp = t_2;
	} else if (t <= -6.3e+84) {
		tmp = t_1;
	} else if (t <= -4.4e+27) {
		tmp = t_2;
	} else if (t <= 3.6e+71) {
		tmp = t_1;
	} else if (t <= 1.25e+241) {
		tmp = t_3;
	} 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) :: t_3
    real(8) :: tmp
    t_1 = (y / z) * x
    t_2 = t * (x / z)
    t_3 = t * -x
    if (t <= (-9.8d+256)) then
        tmp = t_2
    else if (t <= (-6.8d+203)) then
        tmp = t_3
    else if (t <= (-9d+133)) then
        tmp = t_2
    else if (t <= (-6.3d+84)) then
        tmp = t_1
    else if (t <= (-4.4d+27)) then
        tmp = t_2
    else if (t <= 3.6d+71) then
        tmp = t_1
    else if (t <= 1.25d+241) then
        tmp = t_3
    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 = (y / z) * x;
	double t_2 = t * (x / z);
	double t_3 = t * -x;
	double tmp;
	if (t <= -9.8e+256) {
		tmp = t_2;
	} else if (t <= -6.8e+203) {
		tmp = t_3;
	} else if (t <= -9e+133) {
		tmp = t_2;
	} else if (t <= -6.3e+84) {
		tmp = t_1;
	} else if (t <= -4.4e+27) {
		tmp = t_2;
	} else if (t <= 3.6e+71) {
		tmp = t_1;
	} else if (t <= 1.25e+241) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y / z) * x
	t_2 = t * (x / z)
	t_3 = t * -x
	tmp = 0
	if t <= -9.8e+256:
		tmp = t_2
	elif t <= -6.8e+203:
		tmp = t_3
	elif t <= -9e+133:
		tmp = t_2
	elif t <= -6.3e+84:
		tmp = t_1
	elif t <= -4.4e+27:
		tmp = t_2
	elif t <= 3.6e+71:
		tmp = t_1
	elif t <= 1.25e+241:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y / z) * x)
	t_2 = Float64(t * Float64(x / z))
	t_3 = Float64(t * Float64(-x))
	tmp = 0.0
	if (t <= -9.8e+256)
		tmp = t_2;
	elseif (t <= -6.8e+203)
		tmp = t_3;
	elseif (t <= -9e+133)
		tmp = t_2;
	elseif (t <= -6.3e+84)
		tmp = t_1;
	elseif (t <= -4.4e+27)
		tmp = t_2;
	elseif (t <= 3.6e+71)
		tmp = t_1;
	elseif (t <= 1.25e+241)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y / z) * x;
	t_2 = t * (x / z);
	t_3 = t * -x;
	tmp = 0.0;
	if (t <= -9.8e+256)
		tmp = t_2;
	elseif (t <= -6.8e+203)
		tmp = t_3;
	elseif (t <= -9e+133)
		tmp = t_2;
	elseif (t <= -6.3e+84)
		tmp = t_1;
	elseif (t <= -4.4e+27)
		tmp = t_2;
	elseif (t <= 3.6e+71)
		tmp = t_1;
	elseif (t <= 1.25e+241)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * (-x)), $MachinePrecision]}, If[LessEqual[t, -9.8e+256], t$95$2, If[LessEqual[t, -6.8e+203], t$95$3, If[LessEqual[t, -9e+133], t$95$2, If[LessEqual[t, -6.3e+84], t$95$1, If[LessEqual[t, -4.4e+27], t$95$2, If[LessEqual[t, 3.6e+71], t$95$1, If[LessEqual[t, 1.25e+241], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -6.8 \cdot 10^{+203}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq -9 \cdot 10^{+133}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -6.3 \cdot 10^{+84}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4.4 \cdot 10^{+27}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq 3.6 \cdot 10^{+71}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 1.25 \cdot 10^{+241}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.8000000000000004e256 or -6.8000000000000002e203 < t < -8.9999999999999997e133 or -6.30000000000000013e84 < t < -4.3999999999999997e27 or 1.25000000000000006e241 < t

    1. Initial program 98.0%

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      5. +-commutative82.2%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    5. Simplified82.2%

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

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

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

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

    if -9.8000000000000004e256 < t < -6.8000000000000002e203 or 3.6e71 < t < 1.25000000000000006e241

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

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

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

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

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

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

        \[\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 54.8%

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

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

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

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

    if -8.9999999999999997e133 < t < -6.30000000000000013e84 or -4.3999999999999997e27 < t < 3.6e71

    1. Initial program 92.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.8 \cdot 10^{+256}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -6.8 \cdot 10^{+203}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;t \leq -9 \cdot 10^{+133}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -6.3 \cdot 10^{+84}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{+27}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+71}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+241}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 68.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x}{z}\\ t_2 := \frac{x}{\frac{z}{t}}\\ \mathbf{if}\;t \leq -2.65 \cdot 10^{+244}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -1.16 \cdot 10^{+206}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{+133}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq -6.1 \cdot 10^{+85}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+45}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-103}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+71}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (/ x z))) (t_2 (/ x (/ z t))))
   (if (<= t -2.65e+244)
     t_2
     (if (<= t -1.16e+206)
       (* t (- x))
       (if (<= t -2.3e+133)
         t_2
         (if (<= t -6.1e+85)
           t_1
           (if (<= t -1.9e+45)
             (* t (/ x z))
             (if (<= t -5.5e-103)
               t_1
               (if (<= t 3.4e+71) (* (/ y z) x) t_2)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (x / z);
	double t_2 = x / (z / t);
	double tmp;
	if (t <= -2.65e+244) {
		tmp = t_2;
	} else if (t <= -1.16e+206) {
		tmp = t * -x;
	} else if (t <= -2.3e+133) {
		tmp = t_2;
	} else if (t <= -6.1e+85) {
		tmp = t_1;
	} else if (t <= -1.9e+45) {
		tmp = t * (x / z);
	} else if (t <= -5.5e-103) {
		tmp = t_1;
	} else if (t <= 3.4e+71) {
		tmp = (y / z) * 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 = y * (x / z)
    t_2 = x / (z / t)
    if (t <= (-2.65d+244)) then
        tmp = t_2
    else if (t <= (-1.16d+206)) then
        tmp = t * -x
    else if (t <= (-2.3d+133)) then
        tmp = t_2
    else if (t <= (-6.1d+85)) then
        tmp = t_1
    else if (t <= (-1.9d+45)) then
        tmp = t * (x / z)
    else if (t <= (-5.5d-103)) then
        tmp = t_1
    else if (t <= 3.4d+71) then
        tmp = (y / z) * 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 = y * (x / z);
	double t_2 = x / (z / t);
	double tmp;
	if (t <= -2.65e+244) {
		tmp = t_2;
	} else if (t <= -1.16e+206) {
		tmp = t * -x;
	} else if (t <= -2.3e+133) {
		tmp = t_2;
	} else if (t <= -6.1e+85) {
		tmp = t_1;
	} else if (t <= -1.9e+45) {
		tmp = t * (x / z);
	} else if (t <= -5.5e-103) {
		tmp = t_1;
	} else if (t <= 3.4e+71) {
		tmp = (y / z) * x;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (x / z)
	t_2 = x / (z / t)
	tmp = 0
	if t <= -2.65e+244:
		tmp = t_2
	elif t <= -1.16e+206:
		tmp = t * -x
	elif t <= -2.3e+133:
		tmp = t_2
	elif t <= -6.1e+85:
		tmp = t_1
	elif t <= -1.9e+45:
		tmp = t * (x / z)
	elif t <= -5.5e-103:
		tmp = t_1
	elif t <= 3.4e+71:
		tmp = (y / z) * x
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(x / z))
	t_2 = Float64(x / Float64(z / t))
	tmp = 0.0
	if (t <= -2.65e+244)
		tmp = t_2;
	elseif (t <= -1.16e+206)
		tmp = Float64(t * Float64(-x));
	elseif (t <= -2.3e+133)
		tmp = t_2;
	elseif (t <= -6.1e+85)
		tmp = t_1;
	elseif (t <= -1.9e+45)
		tmp = Float64(t * Float64(x / z));
	elseif (t <= -5.5e-103)
		tmp = t_1;
	elseif (t <= 3.4e+71)
		tmp = Float64(Float64(y / z) * x);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (x / z);
	t_2 = x / (z / t);
	tmp = 0.0;
	if (t <= -2.65e+244)
		tmp = t_2;
	elseif (t <= -1.16e+206)
		tmp = t * -x;
	elseif (t <= -2.3e+133)
		tmp = t_2;
	elseif (t <= -6.1e+85)
		tmp = t_1;
	elseif (t <= -1.9e+45)
		tmp = t * (x / z);
	elseif (t <= -5.5e-103)
		tmp = t_1;
	elseif (t <= 3.4e+71)
		tmp = (y / z) * x;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.65e+244], t$95$2, If[LessEqual[t, -1.16e+206], N[(t * (-x)), $MachinePrecision], If[LessEqual[t, -2.3e+133], t$95$2, If[LessEqual[t, -6.1e+85], t$95$1, If[LessEqual[t, -1.9e+45], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.5e-103], t$95$1, If[LessEqual[t, 3.4e+71], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -2.3 \cdot 10^{+133}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t \leq -6.1 \cdot 10^{+85}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.9 \cdot 10^{+45}:\\
\;\;\;\;t \cdot \frac{x}{z}\\

\mathbf{elif}\;t \leq -5.5 \cdot 10^{-103}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.6499999999999999e244 or -1.1600000000000001e206 < t < -2.2999999999999999e133 or 3.3999999999999998e71 < t

    1. Initial program 98.4%

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      5. +-commutative68.7%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    5. Simplified68.7%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    8. Simplified62.6%

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

    if -2.6499999999999999e244 < t < -1.1600000000000001e206

    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 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/90.5%

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

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

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

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

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

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

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

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

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

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

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

    if -2.2999999999999999e133 < t < -6.09999999999999981e85 or -1.9000000000000001e45 < t < -5.50000000000000032e-103

    1. Initial program 78.8%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
      2. associate-/r/82.1%

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

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

    if -6.09999999999999981e85 < t < -1.9000000000000001e45

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

    if -5.50000000000000032e-103 < t < 3.3999999999999998e71

    1. Initial program 95.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.65 \cdot 10^{+244}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq -1.16 \cdot 10^{+206}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;t \leq -2.3 \cdot 10^{+133}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq -6.1 \cdot 10^{+85}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+45}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-103}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{+71}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 68.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\frac{z}{t}}\\ \mathbf{if}\;t \leq -7 \cdot 10^{+241}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{+208}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;t \leq -2 \cdot 10^{+136}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{+84}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{+44}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-99}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+71}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (/ z t))))
   (if (<= t -7e+241)
     t_1
     (if (<= t -5.2e+208)
       (* t (- x))
       (if (<= t -2e+136)
         t_1
         (if (<= t -6.6e+84)
           (/ y (/ z x))
           (if (<= t -1.5e+44)
             (* t (/ x z))
             (if (<= t -4.2e-99)
               (* y (/ x z))
               (if (<= t 1.95e+71) (* (/ y z) x) t_1)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / (z / t);
	double tmp;
	if (t <= -7e+241) {
		tmp = t_1;
	} else if (t <= -5.2e+208) {
		tmp = t * -x;
	} else if (t <= -2e+136) {
		tmp = t_1;
	} else if (t <= -6.6e+84) {
		tmp = y / (z / x);
	} else if (t <= -1.5e+44) {
		tmp = t * (x / z);
	} else if (t <= -4.2e-99) {
		tmp = y * (x / z);
	} else if (t <= 1.95e+71) {
		tmp = (y / z) * 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 / (z / t)
    if (t <= (-7d+241)) then
        tmp = t_1
    else if (t <= (-5.2d+208)) then
        tmp = t * -x
    else if (t <= (-2d+136)) then
        tmp = t_1
    else if (t <= (-6.6d+84)) then
        tmp = y / (z / x)
    else if (t <= (-1.5d+44)) then
        tmp = t * (x / z)
    else if (t <= (-4.2d-99)) then
        tmp = y * (x / z)
    else if (t <= 1.95d+71) then
        tmp = (y / z) * 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 / (z / t);
	double tmp;
	if (t <= -7e+241) {
		tmp = t_1;
	} else if (t <= -5.2e+208) {
		tmp = t * -x;
	} else if (t <= -2e+136) {
		tmp = t_1;
	} else if (t <= -6.6e+84) {
		tmp = y / (z / x);
	} else if (t <= -1.5e+44) {
		tmp = t * (x / z);
	} else if (t <= -4.2e-99) {
		tmp = y * (x / z);
	} else if (t <= 1.95e+71) {
		tmp = (y / z) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / (z / t)
	tmp = 0
	if t <= -7e+241:
		tmp = t_1
	elif t <= -5.2e+208:
		tmp = t * -x
	elif t <= -2e+136:
		tmp = t_1
	elif t <= -6.6e+84:
		tmp = y / (z / x)
	elif t <= -1.5e+44:
		tmp = t * (x / z)
	elif t <= -4.2e-99:
		tmp = y * (x / z)
	elif t <= 1.95e+71:
		tmp = (y / z) * x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(z / t))
	tmp = 0.0
	if (t <= -7e+241)
		tmp = t_1;
	elseif (t <= -5.2e+208)
		tmp = Float64(t * Float64(-x));
	elseif (t <= -2e+136)
		tmp = t_1;
	elseif (t <= -6.6e+84)
		tmp = Float64(y / Float64(z / x));
	elseif (t <= -1.5e+44)
		tmp = Float64(t * Float64(x / z));
	elseif (t <= -4.2e-99)
		tmp = Float64(y * Float64(x / z));
	elseif (t <= 1.95e+71)
		tmp = Float64(Float64(y / z) * x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / (z / t);
	tmp = 0.0;
	if (t <= -7e+241)
		tmp = t_1;
	elseif (t <= -5.2e+208)
		tmp = t * -x;
	elseif (t <= -2e+136)
		tmp = t_1;
	elseif (t <= -6.6e+84)
		tmp = y / (z / x);
	elseif (t <= -1.5e+44)
		tmp = t * (x / z);
	elseif (t <= -4.2e-99)
		tmp = y * (x / z);
	elseif (t <= 1.95e+71)
		tmp = (y / z) * x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e+241], t$95$1, If[LessEqual[t, -5.2e+208], N[(t * (-x)), $MachinePrecision], If[LessEqual[t, -2e+136], t$95$1, If[LessEqual[t, -6.6e+84], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.5e+44], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.2e-99], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+71], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -2 \cdot 10^{+136}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq -1.5 \cdot 10^{+44}:\\
\;\;\;\;t \cdot \frac{x}{z}\\

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -7e241 or -5.2000000000000001e208 < t < -2.00000000000000012e136 or 1.9500000000000001e71 < t

    1. Initial program 98.4%

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      5. +-commutative68.7%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    5. Simplified68.7%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    8. Simplified62.6%

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

    if -7e241 < t < -5.2000000000000001e208

    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 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/90.5%

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000012e136 < t < -6.60000000000000034e84

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if -6.60000000000000034e84 < t < -1.49999999999999993e44

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

    if -1.49999999999999993e44 < t < -4.19999999999999968e-99

    1. Initial program 74.0%

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
      2. associate-/r/78.1%

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

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

    if -4.19999999999999968e-99 < t < 1.9500000000000001e71

    1. Initial program 95.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{+241}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{+208}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;t \leq -2 \cdot 10^{+136}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{+84}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{+44}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-99}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{+71}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 68.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\frac{z}{t}}\\ \mathbf{if}\;t \leq -2 \cdot 10^{+243}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -7.3 \cdot 10^{+208}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{+136}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -6.3 \cdot 10^{+84}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{+27}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-99}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+71}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (/ x (/ z t))))
   (if (<= t -2e+243)
     t_1
     (if (<= t -7.3e+208)
       (* t (- x))
       (if (<= t -1.3e+136)
         t_1
         (if (<= t -6.3e+84)
           (/ y (/ z x))
           (if (<= t -4.4e+27)
             (* t (/ x z))
             (if (<= t -3.5e-99)
               (/ (* y x) z)
               (if (<= t 2.6e+71) (* (/ y z) x) t_1)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x / (z / t);
	double tmp;
	if (t <= -2e+243) {
		tmp = t_1;
	} else if (t <= -7.3e+208) {
		tmp = t * -x;
	} else if (t <= -1.3e+136) {
		tmp = t_1;
	} else if (t <= -6.3e+84) {
		tmp = y / (z / x);
	} else if (t <= -4.4e+27) {
		tmp = t * (x / z);
	} else if (t <= -3.5e-99) {
		tmp = (y * x) / z;
	} else if (t <= 2.6e+71) {
		tmp = (y / z) * 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 / (z / t)
    if (t <= (-2d+243)) then
        tmp = t_1
    else if (t <= (-7.3d+208)) then
        tmp = t * -x
    else if (t <= (-1.3d+136)) then
        tmp = t_1
    else if (t <= (-6.3d+84)) then
        tmp = y / (z / x)
    else if (t <= (-4.4d+27)) then
        tmp = t * (x / z)
    else if (t <= (-3.5d-99)) then
        tmp = (y * x) / z
    else if (t <= 2.6d+71) then
        tmp = (y / z) * 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 / (z / t);
	double tmp;
	if (t <= -2e+243) {
		tmp = t_1;
	} else if (t <= -7.3e+208) {
		tmp = t * -x;
	} else if (t <= -1.3e+136) {
		tmp = t_1;
	} else if (t <= -6.3e+84) {
		tmp = y / (z / x);
	} else if (t <= -4.4e+27) {
		tmp = t * (x / z);
	} else if (t <= -3.5e-99) {
		tmp = (y * x) / z;
	} else if (t <= 2.6e+71) {
		tmp = (y / z) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x / (z / t)
	tmp = 0
	if t <= -2e+243:
		tmp = t_1
	elif t <= -7.3e+208:
		tmp = t * -x
	elif t <= -1.3e+136:
		tmp = t_1
	elif t <= -6.3e+84:
		tmp = y / (z / x)
	elif t <= -4.4e+27:
		tmp = t * (x / z)
	elif t <= -3.5e-99:
		tmp = (y * x) / z
	elif t <= 2.6e+71:
		tmp = (y / z) * x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x / Float64(z / t))
	tmp = 0.0
	if (t <= -2e+243)
		tmp = t_1;
	elseif (t <= -7.3e+208)
		tmp = Float64(t * Float64(-x));
	elseif (t <= -1.3e+136)
		tmp = t_1;
	elseif (t <= -6.3e+84)
		tmp = Float64(y / Float64(z / x));
	elseif (t <= -4.4e+27)
		tmp = Float64(t * Float64(x / z));
	elseif (t <= -3.5e-99)
		tmp = Float64(Float64(y * x) / z);
	elseif (t <= 2.6e+71)
		tmp = Float64(Float64(y / z) * x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x / (z / t);
	tmp = 0.0;
	if (t <= -2e+243)
		tmp = t_1;
	elseif (t <= -7.3e+208)
		tmp = t * -x;
	elseif (t <= -1.3e+136)
		tmp = t_1;
	elseif (t <= -6.3e+84)
		tmp = y / (z / x);
	elseif (t <= -4.4e+27)
		tmp = t * (x / z);
	elseif (t <= -3.5e-99)
		tmp = (y * x) / z;
	elseif (t <= 2.6e+71)
		tmp = (y / z) * x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e+243], t$95$1, If[LessEqual[t, -7.3e+208], N[(t * (-x)), $MachinePrecision], If[LessEqual[t, -1.3e+136], t$95$1, If[LessEqual[t, -6.3e+84], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.4e+27], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.5e-99], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 2.6e+71], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -1.3 \cdot 10^{+136}:\\
\;\;\;\;t_1\\

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -2.0000000000000001e243 or -7.29999999999999991e208 < t < -1.3000000000000001e136 or 2.59999999999999991e71 < t

    1. Initial program 98.4%

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      5. +-commutative68.7%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    5. Simplified68.7%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    8. Simplified62.6%

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

    if -2.0000000000000001e243 < t < -7.29999999999999991e208

    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 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/90.5%

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

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

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

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

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

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

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

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

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

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

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

    if -1.3000000000000001e136 < t < -6.30000000000000013e84

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if -6.30000000000000013e84 < t < -4.3999999999999997e27

    1. Initial program 99.7%

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      5. +-commutative88.9%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    5. Simplified88.9%

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

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

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

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

    if -4.3999999999999997e27 < t < -3.4999999999999999e-99

    1. Initial program 72.8%

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

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

    if -3.4999999999999999e-99 < t < 2.59999999999999991e71

    1. Initial program 95.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{+243}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq -7.3 \cdot 10^{+208}:\\ \;\;\;\;t \cdot \left(-x\right)\\ \mathbf{elif}\;t \leq -1.3 \cdot 10^{+136}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;t \leq -6.3 \cdot 10^{+84}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{+27}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-99}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+71}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 74.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -8.2 \cdot 10^{+78}:\\
\;\;\;\;\frac{t \cdot x}{z}\\

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

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

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


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

    1. Initial program 93.6%

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      5. +-commutative93.8%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    5. Simplified93.8%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{t}}} \]
    8. Simplified72.9%

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

    if -3.3000000000000002e142 < z < -4.59999999999999997e92

    1. Initial program 99.3%

      \[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}} \]

    if -4.59999999999999997e92 < z < -8.1999999999999994e78

    1. Initial program 99.6%

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

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

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

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

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

        \[\leadsto \frac{x}{\frac{z}{y + \color{blue}{t}}} \]
      5. +-commutative100.0%

        \[\leadsto \frac{x}{\frac{z}{\color{blue}{t + y}}} \]
    5. Simplified100.0%

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

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

    if -8.1999999999999994e78 < z < 4.60000000000000021e33

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

    if 4.60000000000000021e33 < z < 4.7e143

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

    if 4.7e143 < z

    1. Initial program 97.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+142}:\\ \;\;\;\;\frac{x}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -4.6 \cdot 10^{+92}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{+78}:\\ \;\;\;\;\frac{t \cdot x}{z}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+33}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{+143}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 76.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z + -1}\\
\mathbf{if}\;t \leq -1.06 \cdot 10^{+14}:\\
\;\;\;\;t_1\\

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.06e14 or 2.14999999999999992e71 < t

    1. Initial program 97.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{-t}{1 - z}} \]
      6. distribute-frac-neg80.0%

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot t}{1 - z}} \]
      9. *-commutative80.0%

        \[\leadsto x \cdot \frac{\color{blue}{t \cdot -1}}{1 - z} \]
      10. associate-*r/79.9%

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

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

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

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

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

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

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

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

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

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

    if -1.06e14 < t < -3.7999999999999997e-99

    1. Initial program 73.2%

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

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

    if -3.7999999999999997e-99 < t < 2.14999999999999992e71

    1. Initial program 95.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.06 \cdot 10^{+14}:\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-99}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{+71}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z + -1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 89.2% accurate, 0.6× speedup?

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

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

\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.859999999999999987 or 1.1000000000000001e-11 < 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 86.2%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - -1 \cdot t}}} \]
      2. associate-/r/88.8%

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

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

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

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

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

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

    if -0.859999999999999987 < z < 1.1000000000000001e-11

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 93.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1000000000000001 or 1.1000000000000001e-11 < 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 86.2%

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

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

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

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

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

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

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

    if -1.1000000000000001 < z < 1.1000000000000001e-11

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 41.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 500000000000\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 500000000000.0))) (* t (/ x z)) (* t (- x))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z <= -1.0) || !(z <= 500000000000.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 <= 500000000000.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 <= 500000000000.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 <= 500000000000.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 <= 500000000000.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 <= 500000000000.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, 500000000000.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 500000000000\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 5e11 < 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 86.0%

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

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

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

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

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

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

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

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

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

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

    if -1 < z < 5e11

    1. Initial program 93.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 23.1% 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.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Developer target: 95.3% 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 2024018 
(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)))))