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

Percentage Accurate: 94.5% → 98.9%
Time: 11.8s
Alternatives: 13
Speedup: 0.2×

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.5% 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: 98.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} + \frac{t}{z + -1}\\ t_2 := t\_1 \cdot x\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-206}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{-308}:\\ \;\;\;\;\frac{y + t}{\frac{z}{x}}\\ \mathbf{elif}\;t\_1 \leq 10^{+280}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(\frac{x}{z} + \frac{t \cdot x}{y \cdot \left(z + -1\right)}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (+ (/ y z) (/ t (+ z -1.0)))) (t_2 (* t_1 x)))
   (if (<= t_1 (- INFINITY))
     (* y (/ x z))
     (if (<= t_1 -1e-206)
       t_2
       (if (<= t_1 1e-308)
         (/ (+ y t) (/ z x))
         (if (<= t_1 1e+280)
           t_2
           (* y (+ (/ x z) (/ (* t x) (* y (+ z -1.0)))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = (y / z) + (t / (z + -1.0));
	double t_2 = t_1 * x;
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = y * (x / z);
	} else if (t_1 <= -1e-206) {
		tmp = t_2;
	} else if (t_1 <= 1e-308) {
		tmp = (y + t) / (z / x);
	} else if (t_1 <= 1e+280) {
		tmp = t_2;
	} else {
		tmp = y * ((x / z) + ((t * x) / (y * (z + -1.0))));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = (y / z) + (t / (z + -1.0));
	double t_2 = t_1 * x;
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = y * (x / z);
	} else if (t_1 <= -1e-206) {
		tmp = t_2;
	} else if (t_1 <= 1e-308) {
		tmp = (y + t) / (z / x);
	} else if (t_1 <= 1e+280) {
		tmp = t_2;
	} else {
		tmp = y * ((x / z) + ((t * x) / (y * (z + -1.0))));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = (y / z) + (t / (z + -1.0))
	t_2 = t_1 * x
	tmp = 0
	if t_1 <= -math.inf:
		tmp = y * (x / z)
	elif t_1 <= -1e-206:
		tmp = t_2
	elif t_1 <= 1e-308:
		tmp = (y + t) / (z / x)
	elif t_1 <= 1e+280:
		tmp = t_2
	else:
		tmp = y * ((x / z) + ((t * x) / (y * (z + -1.0))))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(Float64(y / z) + Float64(t / Float64(z + -1.0)))
	t_2 = Float64(t_1 * x)
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(y * Float64(x / z));
	elseif (t_1 <= -1e-206)
		tmp = t_2;
	elseif (t_1 <= 1e-308)
		tmp = Float64(Float64(y + t) / Float64(z / x));
	elseif (t_1 <= 1e+280)
		tmp = t_2;
	else
		tmp = Float64(y * Float64(Float64(x / z) + Float64(Float64(t * x) / Float64(y * Float64(z + -1.0)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = (y / z) + (t / (z + -1.0));
	t_2 = t_1 * x;
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = y * (x / z);
	elseif (t_1 <= -1e-206)
		tmp = t_2;
	elseif (t_1 <= 1e-308)
		tmp = (y + t) / (z / x);
	elseif (t_1 <= 1e+280)
		tmp = t_2;
	else
		tmp = y * ((x / z) + ((t * x) / (y * (z + -1.0))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * x), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-206], t$95$2, If[LessEqual[t$95$1, 1e-308], N[(N[(y + t), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+280], t$95$2, N[(y * N[(N[(x / z), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-206}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 10^{-308}:\\
\;\;\;\;\frac{y + t}{\frac{z}{x}}\\

\mathbf{elif}\;t\_1 \leq 10^{+280}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -inf.0

    1. Initial program 42.0%

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -1.00000000000000003e-206 or 9.9999999999999991e-309 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 1e280

    1. Initial program 99.7%

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

    if -1.00000000000000003e-206 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 9.9999999999999991e-309

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x}{z}\\ t_2 := \frac{y}{z} + \frac{t}{z + -1}\\ t_3 := t\_2 \cdot x\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-206}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 10^{-308}:\\ \;\;\;\;\frac{y + t}{\frac{z}{x}}\\ \mathbf{elif}\;t\_2 \leq 10^{+293}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (/ x z))) (t_2 (+ (/ y z) (/ t (+ z -1.0)))) (t_3 (* t_2 x)))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -1e-206)
       t_3
       (if (<= t_2 1e-308)
         (/ (+ y t) (/ z x))
         (if (<= t_2 1e+293) t_3 t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (x / z);
	double t_2 = (y / z) + (t / (z + -1.0));
	double t_3 = t_2 * x;
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -1e-206) {
		tmp = t_3;
	} else if (t_2 <= 1e-308) {
		tmp = (y + t) / (z / x);
	} else if (t_2 <= 1e+293) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t) {
	double t_1 = y * (x / z);
	double t_2 = (y / z) + (t / (z + -1.0));
	double t_3 = t_2 * x;
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -1e-206) {
		tmp = t_3;
	} else if (t_2 <= 1e-308) {
		tmp = (y + t) / (z / x);
	} else if (t_2 <= 1e+293) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (x / z)
	t_2 = (y / z) + (t / (z + -1.0))
	t_3 = t_2 * x
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -1e-206:
		tmp = t_3
	elif t_2 <= 1e-308:
		tmp = (y + t) / (z / x)
	elif t_2 <= 1e+293:
		tmp = t_3
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(x / z))
	t_2 = Float64(Float64(y / z) + Float64(t / Float64(z + -1.0)))
	t_3 = Float64(t_2 * x)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -1e-206)
		tmp = t_3;
	elseif (t_2 <= 1e-308)
		tmp = Float64(Float64(y + t) / Float64(z / x));
	elseif (t_2 <= 1e+293)
		tmp = t_3;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * (x / z);
	t_2 = (y / z) + (t / (z + -1.0));
	t_3 = t_2 * x;
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -1e-206)
		tmp = t_3;
	elseif (t_2 <= 1e-308)
		tmp = (y + t) / (z / x);
	elseif (t_2 <= 1e+293)
		tmp = t_3;
	else
		tmp = t_1;
	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[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * x), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-206], t$95$3, If[LessEqual[t$95$2, 1e-308], N[(N[(y + t), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+293], t$95$3, t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
t_2 := \frac{y}{z} + \frac{t}{z + -1}\\
t_3 := t\_2 \cdot x\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-206}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq 10^{-308}:\\
\;\;\;\;\frac{y + t}{\frac{z}{x}}\\

\mathbf{elif}\;t\_2 \leq 10^{+293}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -inf.0 or 9.9999999999999992e292 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))

    1. Initial program 56.2%

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -1.00000000000000003e-206 or 9.9999999999999991e-309 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 9.9999999999999992e292

    1. Initial program 99.7%

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

    if -1.00000000000000003e-206 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 9.9999999999999991e-309

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 73.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{x}{z}\\ t_2 := \frac{y}{z} \cdot x\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{+73}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 1650:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.25 \cdot 10^{+71}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+131}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+260}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+283}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* t (/ x z))) (t_2 (* (/ y z) x)))
   (if (<= z -1.9e+73)
     (/ (* y x) z)
     (if (<= z 1650.0)
       (* x (- (/ y z) t))
       (if (<= z 2.1e+41)
         t_1
         (if (<= z 4.25e+71)
           t_2
           (if (<= z 3.5e+131)
             (* x (/ t z))
             (if (<= z 5.2e+260)
               t_2
               (if (<= z 9e+283) t_1 (/ x (/ z y)))))))))))
double code(double x, double y, double z, double t) {
	double t_1 = t * (x / z);
	double t_2 = (y / z) * x;
	double tmp;
	if (z <= -1.9e+73) {
		tmp = (y * x) / z;
	} else if (z <= 1650.0) {
		tmp = x * ((y / z) - t);
	} else if (z <= 2.1e+41) {
		tmp = t_1;
	} else if (z <= 4.25e+71) {
		tmp = t_2;
	} else if (z <= 3.5e+131) {
		tmp = x * (t / z);
	} else if (z <= 5.2e+260) {
		tmp = t_2;
	} else if (z <= 9e+283) {
		tmp = t_1;
	} else {
		tmp = x / (z / y);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * (x / z)
    t_2 = (y / z) * x
    if (z <= (-1.9d+73)) then
        tmp = (y * x) / z
    else if (z <= 1650.0d0) then
        tmp = x * ((y / z) - t)
    else if (z <= 2.1d+41) then
        tmp = t_1
    else if (z <= 4.25d+71) then
        tmp = t_2
    else if (z <= 3.5d+131) then
        tmp = x * (t / z)
    else if (z <= 5.2d+260) then
        tmp = t_2
    else if (z <= 9d+283) then
        tmp = t_1
    else
        tmp = x / (z / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = t * (x / z);
	double t_2 = (y / z) * x;
	double tmp;
	if (z <= -1.9e+73) {
		tmp = (y * x) / z;
	} else if (z <= 1650.0) {
		tmp = x * ((y / z) - t);
	} else if (z <= 2.1e+41) {
		tmp = t_1;
	} else if (z <= 4.25e+71) {
		tmp = t_2;
	} else if (z <= 3.5e+131) {
		tmp = x * (t / z);
	} else if (z <= 5.2e+260) {
		tmp = t_2;
	} else if (z <= 9e+283) {
		tmp = t_1;
	} else {
		tmp = x / (z / y);
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = t * (x / z)
	t_2 = (y / z) * x
	tmp = 0
	if z <= -1.9e+73:
		tmp = (y * x) / z
	elif z <= 1650.0:
		tmp = x * ((y / z) - t)
	elif z <= 2.1e+41:
		tmp = t_1
	elif z <= 4.25e+71:
		tmp = t_2
	elif z <= 3.5e+131:
		tmp = x * (t / z)
	elif z <= 5.2e+260:
		tmp = t_2
	elif z <= 9e+283:
		tmp = t_1
	else:
		tmp = x / (z / y)
	return tmp
function code(x, y, z, t)
	t_1 = Float64(t * Float64(x / z))
	t_2 = Float64(Float64(y / z) * x)
	tmp = 0.0
	if (z <= -1.9e+73)
		tmp = Float64(Float64(y * x) / z);
	elseif (z <= 1650.0)
		tmp = Float64(x * Float64(Float64(y / z) - t));
	elseif (z <= 2.1e+41)
		tmp = t_1;
	elseif (z <= 4.25e+71)
		tmp = t_2;
	elseif (z <= 3.5e+131)
		tmp = Float64(x * Float64(t / z));
	elseif (z <= 5.2e+260)
		tmp = t_2;
	elseif (z <= 9e+283)
		tmp = t_1;
	else
		tmp = Float64(x / Float64(z / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = t * (x / z);
	t_2 = (y / z) * x;
	tmp = 0.0;
	if (z <= -1.9e+73)
		tmp = (y * x) / z;
	elseif (z <= 1650.0)
		tmp = x * ((y / z) - t);
	elseif (z <= 2.1e+41)
		tmp = t_1;
	elseif (z <= 4.25e+71)
		tmp = t_2;
	elseif (z <= 3.5e+131)
		tmp = x * (t / z);
	elseif (z <= 5.2e+260)
		tmp = t_2;
	elseif (z <= 9e+283)
		tmp = t_1;
	else
		tmp = x / (z / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -1.9e+73], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1650.0], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+41], t$95$1, If[LessEqual[z, 4.25e+71], t$95$2, If[LessEqual[z, 3.5e+131], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+260], t$95$2, If[LessEqual[z, 9e+283], t$95$1, N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.25 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 5.2 \cdot 10^{+260}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 9 \cdot 10^{+283}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 95.2%

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

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

    if -1.90000000000000011e73 < z < 1650

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

    if 1650 < z < 2.1e41 or 5.1999999999999996e260 < z < 9.0000000000000002e283

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

    if 2.1e41 < z < 4.2499999999999998e71 or 3.4999999999999999e131 < z < 5.1999999999999996e260

    1. Initial program 97.2%

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

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

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

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

    if 4.2499999999999998e71 < z < 3.4999999999999999e131

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

    if 9.0000000000000002e283 < z

    1. Initial program 99.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+73}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;z \leq 1650:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+41}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 4.25 \cdot 10^{+71}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+131}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+260}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+283}:\\ \;\;\;\;t \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 67.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x}{z}\\ t_2 := x \cdot \frac{t}{z}\\ t_3 := \frac{y}{z} \cdot x\\ \mathbf{if}\;t \leq -6.8 \cdot 10^{+202}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3 \cdot 10^{+145}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{+84}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-284}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{-160}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+62}:\\ \;\;\;\;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 (* x (/ t z))) (t_3 (* (/ y z) x)))
   (if (<= t -6.8e+202)
     t_2
     (if (<= t -3e+145)
       t_1
       (if (<= t -1.2e+84)
         t_2
         (if (<= t -2e-284)
           t_3
           (if (<= t 2.35e-160) t_1 (if (<= t 6.2e+62) t_3 t_2))))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * (x / z);
	double t_2 = x * (t / z);
	double t_3 = (y / z) * x;
	double tmp;
	if (t <= -6.8e+202) {
		tmp = t_2;
	} else if (t <= -3e+145) {
		tmp = t_1;
	} else if (t <= -1.2e+84) {
		tmp = t_2;
	} else if (t <= -2e-284) {
		tmp = t_3;
	} else if (t <= 2.35e-160) {
		tmp = t_1;
	} else if (t <= 6.2e+62) {
		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 = x * (t / z)
    t_3 = (y / z) * x
    if (t <= (-6.8d+202)) then
        tmp = t_2
    else if (t <= (-3d+145)) then
        tmp = t_1
    else if (t <= (-1.2d+84)) then
        tmp = t_2
    else if (t <= (-2d-284)) then
        tmp = t_3
    else if (t <= 2.35d-160) then
        tmp = t_1
    else if (t <= 6.2d+62) 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 = x * (t / z);
	double t_3 = (y / z) * x;
	double tmp;
	if (t <= -6.8e+202) {
		tmp = t_2;
	} else if (t <= -3e+145) {
		tmp = t_1;
	} else if (t <= -1.2e+84) {
		tmp = t_2;
	} else if (t <= -2e-284) {
		tmp = t_3;
	} else if (t <= 2.35e-160) {
		tmp = t_1;
	} else if (t <= 6.2e+62) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * (x / z)
	t_2 = x * (t / z)
	t_3 = (y / z) * x
	tmp = 0
	if t <= -6.8e+202:
		tmp = t_2
	elif t <= -3e+145:
		tmp = t_1
	elif t <= -1.2e+84:
		tmp = t_2
	elif t <= -2e-284:
		tmp = t_3
	elif t <= 2.35e-160:
		tmp = t_1
	elif t <= 6.2e+62:
		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(x * Float64(t / z))
	t_3 = Float64(Float64(y / z) * x)
	tmp = 0.0
	if (t <= -6.8e+202)
		tmp = t_2;
	elseif (t <= -3e+145)
		tmp = t_1;
	elseif (t <= -1.2e+84)
		tmp = t_2;
	elseif (t <= -2e-284)
		tmp = t_3;
	elseif (t <= 2.35e-160)
		tmp = t_1;
	elseif (t <= 6.2e+62)
		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 = x * (t / z);
	t_3 = (y / z) * x;
	tmp = 0.0;
	if (t <= -6.8e+202)
		tmp = t_2;
	elseif (t <= -3e+145)
		tmp = t_1;
	elseif (t <= -1.2e+84)
		tmp = t_2;
	elseif (t <= -2e-284)
		tmp = t_3;
	elseif (t <= 2.35e-160)
		tmp = t_1;
	elseif (t <= 6.2e+62)
		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[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t, -6.8e+202], t$95$2, If[LessEqual[t, -3e+145], t$95$1, If[LessEqual[t, -1.2e+84], t$95$2, If[LessEqual[t, -2e-284], t$95$3, If[LessEqual[t, 2.35e-160], t$95$1, If[LessEqual[t, 6.2e+62], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.2 \cdot 10^{+84}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -2 \cdot 10^{-284}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 2.35 \cdot 10^{-160}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 6.2 \cdot 10^{+62}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.8e202 or -3.0000000000000002e145 < t < -1.2e84 or 6.20000000000000029e62 < t

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

    if -6.8e202 < t < -3.0000000000000002e145 or -2.00000000000000007e-284 < t < 2.3499999999999999e-160

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

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

    if -1.2e84 < t < -2.00000000000000007e-284 or 2.3499999999999999e-160 < t < 6.20000000000000029e62

    1. Initial program 94.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+202}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq -3 \cdot 10^{+145}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{+84}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-284}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{-160}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+62}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 67.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ t_2 := y \cdot \frac{x}{z}\\ \mathbf{if}\;t \leq -5.6 \cdot 10^{+202}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{+146}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.06 \cdot 10^{+85}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -8.8 \cdot 10^{-279}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-155}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+59}:\\ \;\;\;\;\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))) (t_2 (* y (/ x z))))
   (if (<= t -5.6e+202)
     t_1
     (if (<= t -1.2e+146)
       t_2
       (if (<= t -1.06e+85)
         t_1
         (if (<= t -8.8e-279)
           (/ x (/ z y))
           (if (<= t 2.8e-155) t_2 (if (<= t 3.6e+59) (* (/ y z) x) t_1))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double t_2 = y * (x / z);
	double tmp;
	if (t <= -5.6e+202) {
		tmp = t_1;
	} else if (t <= -1.2e+146) {
		tmp = t_2;
	} else if (t <= -1.06e+85) {
		tmp = t_1;
	} else if (t <= -8.8e-279) {
		tmp = x / (z / y);
	} else if (t <= 2.8e-155) {
		tmp = t_2;
	} else if (t <= 3.6e+59) {
		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) :: t_2
    real(8) :: tmp
    t_1 = x * (t / z)
    t_2 = y * (x / z)
    if (t <= (-5.6d+202)) then
        tmp = t_1
    else if (t <= (-1.2d+146)) then
        tmp = t_2
    else if (t <= (-1.06d+85)) then
        tmp = t_1
    else if (t <= (-8.8d-279)) then
        tmp = x / (z / y)
    else if (t <= 2.8d-155) then
        tmp = t_2
    else if (t <= 3.6d+59) 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);
	double t_2 = y * (x / z);
	double tmp;
	if (t <= -5.6e+202) {
		tmp = t_1;
	} else if (t <= -1.2e+146) {
		tmp = t_2;
	} else if (t <= -1.06e+85) {
		tmp = t_1;
	} else if (t <= -8.8e-279) {
		tmp = x / (z / y);
	} else if (t <= 2.8e-155) {
		tmp = t_2;
	} else if (t <= 3.6e+59) {
		tmp = (y / z) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / z)
	t_2 = y * (x / z)
	tmp = 0
	if t <= -5.6e+202:
		tmp = t_1
	elif t <= -1.2e+146:
		tmp = t_2
	elif t <= -1.06e+85:
		tmp = t_1
	elif t <= -8.8e-279:
		tmp = x / (z / y)
	elif t <= 2.8e-155:
		tmp = t_2
	elif t <= 3.6e+59:
		tmp = (y / z) * x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t / z))
	t_2 = Float64(y * Float64(x / z))
	tmp = 0.0
	if (t <= -5.6e+202)
		tmp = t_1;
	elseif (t <= -1.2e+146)
		tmp = t_2;
	elseif (t <= -1.06e+85)
		tmp = t_1;
	elseif (t <= -8.8e-279)
		tmp = Float64(x / Float64(z / y));
	elseif (t <= 2.8e-155)
		tmp = t_2;
	elseif (t <= 3.6e+59)
		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);
	t_2 = y * (x / z);
	tmp = 0.0;
	if (t <= -5.6e+202)
		tmp = t_1;
	elseif (t <= -1.2e+146)
		tmp = t_2;
	elseif (t <= -1.06e+85)
		tmp = t_1;
	elseif (t <= -8.8e-279)
		tmp = x / (z / y);
	elseif (t <= 2.8e-155)
		tmp = t_2;
	elseif (t <= 3.6e+59)
		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 / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e+202], t$95$1, If[LessEqual[t, -1.2e+146], t$95$2, If[LessEqual[t, -1.06e+85], t$95$1, If[LessEqual[t, -8.8e-279], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-155], t$95$2, If[LessEqual[t, 3.6e+59], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.2 \cdot 10^{+146}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -1.06 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.8 \cdot 10^{-155}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.60000000000000032e202 or -1.2000000000000001e146 < t < -1.0600000000000001e85 or 3.5999999999999999e59 < t

    1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

    if -5.60000000000000032e202 < t < -1.2000000000000001e146 or -8.80000000000000002e-279 < t < 2.8e-155

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

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

    if -1.0600000000000001e85 < t < -8.80000000000000002e-279

    1. Initial program 94.9%

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

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

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

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

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

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

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

    if 2.8e-155 < t < 3.5999999999999999e59

    1. Initial program 94.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{+202}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{+146}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -1.06 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq -8.8 \cdot 10^{-279}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-155}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+59}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 67.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ t_2 := y \cdot \frac{x}{z}\\ \mathbf{if}\;t \leq -6.8 \cdot 10^{+202}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{+145}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{+87}:\\ \;\;\;\;\frac{t \cdot x}{z}\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-282}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-160}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+61}:\\ \;\;\;\;\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))) (t_2 (* y (/ x z))))
   (if (<= t -6.8e+202)
     t_1
     (if (<= t -3.2e+145)
       t_2
       (if (<= t -7.5e+87)
         (/ (* t x) z)
         (if (<= t -6.5e-282)
           (/ x (/ z y))
           (if (<= t 9e-160) t_2 (if (<= t 3e+61) (* (/ y z) x) t_1))))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double t_2 = y * (x / z);
	double tmp;
	if (t <= -6.8e+202) {
		tmp = t_1;
	} else if (t <= -3.2e+145) {
		tmp = t_2;
	} else if (t <= -7.5e+87) {
		tmp = (t * x) / z;
	} else if (t <= -6.5e-282) {
		tmp = x / (z / y);
	} else if (t <= 9e-160) {
		tmp = t_2;
	} else if (t <= 3e+61) {
		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) :: t_2
    real(8) :: tmp
    t_1 = x * (t / z)
    t_2 = y * (x / z)
    if (t <= (-6.8d+202)) then
        tmp = t_1
    else if (t <= (-3.2d+145)) then
        tmp = t_2
    else if (t <= (-7.5d+87)) then
        tmp = (t * x) / z
    else if (t <= (-6.5d-282)) then
        tmp = x / (z / y)
    else if (t <= 9d-160) then
        tmp = t_2
    else if (t <= 3d+61) 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);
	double t_2 = y * (x / z);
	double tmp;
	if (t <= -6.8e+202) {
		tmp = t_1;
	} else if (t <= -3.2e+145) {
		tmp = t_2;
	} else if (t <= -7.5e+87) {
		tmp = (t * x) / z;
	} else if (t <= -6.5e-282) {
		tmp = x / (z / y);
	} else if (t <= 9e-160) {
		tmp = t_2;
	} else if (t <= 3e+61) {
		tmp = (y / z) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / z)
	t_2 = y * (x / z)
	tmp = 0
	if t <= -6.8e+202:
		tmp = t_1
	elif t <= -3.2e+145:
		tmp = t_2
	elif t <= -7.5e+87:
		tmp = (t * x) / z
	elif t <= -6.5e-282:
		tmp = x / (z / y)
	elif t <= 9e-160:
		tmp = t_2
	elif t <= 3e+61:
		tmp = (y / z) * x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t / z))
	t_2 = Float64(y * Float64(x / z))
	tmp = 0.0
	if (t <= -6.8e+202)
		tmp = t_1;
	elseif (t <= -3.2e+145)
		tmp = t_2;
	elseif (t <= -7.5e+87)
		tmp = Float64(Float64(t * x) / z);
	elseif (t <= -6.5e-282)
		tmp = Float64(x / Float64(z / y));
	elseif (t <= 9e-160)
		tmp = t_2;
	elseif (t <= 3e+61)
		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);
	t_2 = y * (x / z);
	tmp = 0.0;
	if (t <= -6.8e+202)
		tmp = t_1;
	elseif (t <= -3.2e+145)
		tmp = t_2;
	elseif (t <= -7.5e+87)
		tmp = (t * x) / z;
	elseif (t <= -6.5e-282)
		tmp = x / (z / y);
	elseif (t <= 9e-160)
		tmp = t_2;
	elseif (t <= 3e+61)
		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 / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e+202], t$95$1, If[LessEqual[t, -3.2e+145], t$95$2, If[LessEqual[t, -7.5e+87], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, -6.5e-282], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e-160], t$95$2, If[LessEqual[t, 3e+61], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3.2 \cdot 10^{+145}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;t \leq 9 \cdot 10^{-160}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -6.8e202 or 3e61 < t

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

    if -6.8e202 < t < -3.20000000000000008e145 or -6.50000000000000012e-282 < t < 9.00000000000000053e-160

    1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000008e145 < t < -7.50000000000000014e87

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    if -7.50000000000000014e87 < t < -6.50000000000000012e-282

    1. Initial program 94.9%

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

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

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

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

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

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

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

    if 9.00000000000000053e-160 < t < 3e61

    1. Initial program 94.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+202}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{+145}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{+87}:\\ \;\;\;\;\frac{t \cdot x}{z}\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-282}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-160}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+61}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 66.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{t}{z}\\ \mathbf{if}\;t \leq -5.4 \cdot 10^{+202}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{+142}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+90}:\\ \;\;\;\;\frac{t \cdot x}{z}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+64}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* x (/ t z))))
   (if (<= t -5.4e+202)
     t_1
     (if (<= t -2.05e+142)
       (* y (/ x z))
       (if (<= t -2.4e+90)
         (/ (* t x) z)
         (if (<= t 1.55e+64) (/ (* y x) z) t_1))))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t / z);
	double tmp;
	if (t <= -5.4e+202) {
		tmp = t_1;
	} else if (t <= -2.05e+142) {
		tmp = y * (x / z);
	} else if (t <= -2.4e+90) {
		tmp = (t * x) / z;
	} else if (t <= 1.55e+64) {
		tmp = (y * x) / 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) :: tmp
    t_1 = x * (t / z)
    if (t <= (-5.4d+202)) then
        tmp = t_1
    else if (t <= (-2.05d+142)) then
        tmp = y * (x / z)
    else if (t <= (-2.4d+90)) then
        tmp = (t * x) / z
    else if (t <= 1.55d+64) then
        tmp = (y * x) / 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 * (t / z);
	double tmp;
	if (t <= -5.4e+202) {
		tmp = t_1;
	} else if (t <= -2.05e+142) {
		tmp = y * (x / z);
	} else if (t <= -2.4e+90) {
		tmp = (t * x) / z;
	} else if (t <= 1.55e+64) {
		tmp = (y * x) / z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t / z)
	tmp = 0
	if t <= -5.4e+202:
		tmp = t_1
	elif t <= -2.05e+142:
		tmp = y * (x / z)
	elif t <= -2.4e+90:
		tmp = (t * x) / z
	elif t <= 1.55e+64:
		tmp = (y * x) / z
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t / z))
	tmp = 0.0
	if (t <= -5.4e+202)
		tmp = t_1;
	elseif (t <= -2.05e+142)
		tmp = Float64(y * Float64(x / z));
	elseif (t <= -2.4e+90)
		tmp = Float64(Float64(t * x) / z);
	elseif (t <= 1.55e+64)
		tmp = Float64(Float64(y * x) / z);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t / z);
	tmp = 0.0;
	if (t <= -5.4e+202)
		tmp = t_1;
	elseif (t <= -2.05e+142)
		tmp = y * (x / z);
	elseif (t <= -2.4e+90)
		tmp = (t * x) / z;
	elseif (t <= 1.55e+64)
		tmp = (y * x) / z;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.4e+202], t$95$1, If[LessEqual[t, -2.05e+142], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.4e+90], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 1.55e+64], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.3999999999999999e202 or 1.55e64 < t

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

    if -5.3999999999999999e202 < t < -2.04999999999999991e142

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

    if -2.04999999999999991e142 < t < -2.4000000000000001e90

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    if -2.4000000000000001e90 < t < 1.55e64

    1. Initial program 91.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.4 \cdot 10^{+202}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{+142}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+90}:\\ \;\;\;\;\frac{t \cdot x}{z}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+64}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 74.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-96} \lor \neg \left(y \leq 10^{-30}\right):\\
\;\;\;\;\frac{y \cdot x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.9999999999999998e-96 or 1e-30 < y

    1. Initial program 89.4%

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

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

    if -1.9999999999999998e-96 < y < 1e-30

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

Alternative 9: 93.2% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.7e26 < z < 0.048000000000000001

    1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 41.8% accurate, 0.7× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -3.79999999999999975e23 < z < 0.048000000000000001

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 44.1% accurate, 0.7× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

    if -3.79999999999999975e23 < z < 0.048000000000000001

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 67.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+202} \lor \neg \left(t \leq 7.2 \cdot 10^{+61}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.0000000000000003e202 or 7.20000000000000021e61 < t

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

    if -6.0000000000000003e202 < t < 7.20000000000000021e61

    1. Initial program 91.9%

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

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

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

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

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

Alternative 13: 23.0% accurate, 2.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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