Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.9% → 89.5%
Time: 24.8s
Alternatives: 23
Speedup: 0.2×

Specification

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

\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\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 23 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: 79.9% accurate, 1.0× speedup?

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

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

Alternative 1: 89.5% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - x}{a - z}\\ t_2 := x + \left(y - z\right) \cdot t\_1\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{-68}:\\ \;\;\;\;\mathsf{fma}\left(y - z, t\_1, x\right)\\ \mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-122}:\\ \;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-284}:\\ \;\;\;\;x + \frac{z}{a - z} \cdot \left(x - t\right)\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- t x) (- a z))) (t_2 (+ x (* (- y z) t_1))))
   (if (<= t_2 -2e-68)
     (fma (- y z) t_1 x)
     (if (<= t_2 -4e-122)
       (- t (/ (* x (- a y)) z))
       (if (<= t_2 -1e-284)
         (+ x (* (/ z (- a z)) (- x t)))
         (if (<= t_2 0.0) (+ t (/ (- x t) (/ z (- y a)))) t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - x) / (a - z);
	double t_2 = x + ((y - z) * t_1);
	double tmp;
	if (t_2 <= -2e-68) {
		tmp = fma((y - z), t_1, x);
	} else if (t_2 <= -4e-122) {
		tmp = t - ((x * (a - y)) / z);
	} else if (t_2 <= -1e-284) {
		tmp = x + ((z / (a - z)) * (x - t));
	} else if (t_2 <= 0.0) {
		tmp = t + ((x - t) / (z / (y - a)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(t - x) / Float64(a - z))
	t_2 = Float64(x + Float64(Float64(y - z) * t_1))
	tmp = 0.0
	if (t_2 <= -2e-68)
		tmp = fma(Float64(y - z), t_1, x);
	elseif (t_2 <= -4e-122)
		tmp = Float64(t - Float64(Float64(x * Float64(a - y)) / z));
	elseif (t_2 <= -1e-284)
		tmp = Float64(x + Float64(Float64(z / Float64(a - z)) * Float64(x - t)));
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a))));
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-68], N[(N[(y - z), $MachinePrecision] * t$95$1 + x), $MachinePrecision], If[LessEqual[t$95$2, -4e-122], N[(t - N[(N[(x * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-284], N[(x + N[(N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t - x}{a - z}\\
t_2 := x + \left(y - z\right) \cdot t\_1\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-68}:\\
\;\;\;\;\mathsf{fma}\left(y - z, t\_1, x\right)\\

\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-122}:\\
\;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-284}:\\
\;\;\;\;x + \frac{z}{a - z} \cdot \left(x - t\right)\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.00000000000000013e-68

    1. Initial program 91.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative91.1%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. fma-def91.2%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)} \]
    3. Simplified91.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)} \]
    4. Add Preprocessing

    if -2.00000000000000013e-68 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.00000000000000024e-122

    1. Initial program 15.5%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--100.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 100.0%

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

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

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

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

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

        \[\leadsto t - \frac{\color{blue}{\left(0 - \left(y - a\right)\right)} \cdot x}{z} \]
      6. associate--r-100.0%

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

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

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

    if -4.00000000000000024e-122 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000004e-284

    1. Initial program 64.3%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a - z}{t - x}}} \]
      4. associate-/r/80.8%

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

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

    if -1.00000000000000004e-284 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0

    1. Initial program 3.8%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--83.8%

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

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

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

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

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

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

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

    if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 94.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -2 \cdot 10^{-68}:\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -4 \cdot 10^{-122}:\\ \;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-284}:\\ \;\;\;\;x + \frac{z}{a - z} \cdot \left(x - t\right)\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 0:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 89.5% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-68}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-122}:\\
\;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-284}:\\
\;\;\;\;x + \frac{z}{a - z} \cdot \left(x - t\right)\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.00000000000000013e-68 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 92.8%

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

    if -2.00000000000000013e-68 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.00000000000000024e-122

    1. Initial program 15.5%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--100.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 100.0%

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

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

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

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

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

        \[\leadsto t - \frac{\color{blue}{\left(0 - \left(y - a\right)\right)} \cdot x}{z} \]
      6. associate--r-100.0%

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

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

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

    if -4.00000000000000024e-122 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000004e-284

    1. Initial program 64.3%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a - z}{t - x}}} \]
      4. associate-/r/80.8%

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

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

    if -1.00000000000000004e-284 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0

    1. Initial program 3.8%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--83.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -2 \cdot 10^{-68}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -4 \cdot 10^{-122}:\\ \;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-284}:\\ \;\;\;\;x + \frac{z}{a - z} \cdot \left(x - t\right)\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 0:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 40.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{+32}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-67}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-217}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{-296}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-173}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+44}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.2e+106)
   t
   (if (<= z -2.4e+32)
     x
     (if (<= z -1.1e-67)
       (/ (* x (- y a)) z)
       (if (<= z -4.1e-217)
         (/ y (/ a (- t x)))
         (if (<= z 1.16e-296)
           x
           (if (<= z 1.6e-173)
             (* (- t x) (/ y a))
             (if (<= z 5.8e+44) x t))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.2e+106) {
		tmp = t;
	} else if (z <= -2.4e+32) {
		tmp = x;
	} else if (z <= -1.1e-67) {
		tmp = (x * (y - a)) / z;
	} else if (z <= -4.1e-217) {
		tmp = y / (a / (t - x));
	} else if (z <= 1.16e-296) {
		tmp = x;
	} else if (z <= 1.6e-173) {
		tmp = (t - x) * (y / a);
	} else if (z <= 5.8e+44) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-4.2d+106)) then
        tmp = t
    else if (z <= (-2.4d+32)) then
        tmp = x
    else if (z <= (-1.1d-67)) then
        tmp = (x * (y - a)) / z
    else if (z <= (-4.1d-217)) then
        tmp = y / (a / (t - x))
    else if (z <= 1.16d-296) then
        tmp = x
    else if (z <= 1.6d-173) then
        tmp = (t - x) * (y / a)
    else if (z <= 5.8d+44) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.2e+106) {
		tmp = t;
	} else if (z <= -2.4e+32) {
		tmp = x;
	} else if (z <= -1.1e-67) {
		tmp = (x * (y - a)) / z;
	} else if (z <= -4.1e-217) {
		tmp = y / (a / (t - x));
	} else if (z <= 1.16e-296) {
		tmp = x;
	} else if (z <= 1.6e-173) {
		tmp = (t - x) * (y / a);
	} else if (z <= 5.8e+44) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.2e+106:
		tmp = t
	elif z <= -2.4e+32:
		tmp = x
	elif z <= -1.1e-67:
		tmp = (x * (y - a)) / z
	elif z <= -4.1e-217:
		tmp = y / (a / (t - x))
	elif z <= 1.16e-296:
		tmp = x
	elif z <= 1.6e-173:
		tmp = (t - x) * (y / a)
	elif z <= 5.8e+44:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.2e+106)
		tmp = t;
	elseif (z <= -2.4e+32)
		tmp = x;
	elseif (z <= -1.1e-67)
		tmp = Float64(Float64(x * Float64(y - a)) / z);
	elseif (z <= -4.1e-217)
		tmp = Float64(y / Float64(a / Float64(t - x)));
	elseif (z <= 1.16e-296)
		tmp = x;
	elseif (z <= 1.6e-173)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (z <= 5.8e+44)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4.2e+106)
		tmp = t;
	elseif (z <= -2.4e+32)
		tmp = x;
	elseif (z <= -1.1e-67)
		tmp = (x * (y - a)) / z;
	elseif (z <= -4.1e-217)
		tmp = y / (a / (t - x));
	elseif (z <= 1.16e-296)
		tmp = x;
	elseif (z <= 1.6e-173)
		tmp = (t - x) * (y / a);
	elseif (z <= 5.8e+44)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.2e+106], t, If[LessEqual[z, -2.4e+32], x, If[LessEqual[z, -1.1e-67], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -4.1e-217], N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.16e-296], x, If[LessEqual[z, 1.6e-173], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+44], x, t]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+106}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;z \leq -1.1 \cdot 10^{-67}:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\

\mathbf{elif}\;z \leq -4.1 \cdot 10^{-217}:\\
\;\;\;\;\frac{y}{\frac{a}{t - x}}\\

\mathbf{elif}\;z \leq 1.16 \cdot 10^{-296}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-173}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{+44}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -4.2000000000000001e106 or 5.8000000000000004e44 < z

    1. Initial program 55.8%

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

      \[\leadsto \color{blue}{t} \]

    if -4.2000000000000001e106 < z < -2.39999999999999991e32 or -4.09999999999999975e-217 < z < 1.15999999999999996e-296 or 1.6e-173 < z < 5.8000000000000004e44

    1. Initial program 94.0%

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

      \[\leadsto \color{blue}{x} \]

    if -2.39999999999999991e32 < z < -1.1000000000000001e-67

    1. Initial program 77.5%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--52.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 45.2%

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

    if -1.1000000000000001e-67 < z < -4.09999999999999975e-217

    1. Initial program 90.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/57.6%

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a - z}} \]
      2. clear-num57.6%

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

        \[\leadsto \color{blue}{\frac{t - x}{\frac{a - z}{y}}} \]
    7. Applied egg-rr57.6%

      \[\leadsto \color{blue}{\frac{t - x}{\frac{a - z}{y}}} \]
    8. Taylor expanded in a around inf 48.6%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    10. Simplified54.8%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]

    if 1.15999999999999996e-296 < z < 1.6e-173

    1. Initial program 82.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/73.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{+32}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-67}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-217}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{-296}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-173}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+44}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 40.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{+32}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-67}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-218}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-296}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-173}:\\ \;\;\;\;\frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+46}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -9.2e+106)
   t
   (if (<= z -1.9e+32)
     x
     (if (<= z -2.6e-67)
       (/ (* x (- y a)) z)
       (if (<= z -1.12e-218)
         (/ y (/ a (- t x)))
         (if (<= z 9.2e-296)
           x
           (if (<= z 1.02e-173)
             (/ (- t x) (/ a y))
             (if (<= z 1.2e+46) x t))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9.2e+106) {
		tmp = t;
	} else if (z <= -1.9e+32) {
		tmp = x;
	} else if (z <= -2.6e-67) {
		tmp = (x * (y - a)) / z;
	} else if (z <= -1.12e-218) {
		tmp = y / (a / (t - x));
	} else if (z <= 9.2e-296) {
		tmp = x;
	} else if (z <= 1.02e-173) {
		tmp = (t - x) / (a / y);
	} else if (z <= 1.2e+46) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-9.2d+106)) then
        tmp = t
    else if (z <= (-1.9d+32)) then
        tmp = x
    else if (z <= (-2.6d-67)) then
        tmp = (x * (y - a)) / z
    else if (z <= (-1.12d-218)) then
        tmp = y / (a / (t - x))
    else if (z <= 9.2d-296) then
        tmp = x
    else if (z <= 1.02d-173) then
        tmp = (t - x) / (a / y)
    else if (z <= 1.2d+46) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9.2e+106) {
		tmp = t;
	} else if (z <= -1.9e+32) {
		tmp = x;
	} else if (z <= -2.6e-67) {
		tmp = (x * (y - a)) / z;
	} else if (z <= -1.12e-218) {
		tmp = y / (a / (t - x));
	} else if (z <= 9.2e-296) {
		tmp = x;
	} else if (z <= 1.02e-173) {
		tmp = (t - x) / (a / y);
	} else if (z <= 1.2e+46) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -9.2e+106:
		tmp = t
	elif z <= -1.9e+32:
		tmp = x
	elif z <= -2.6e-67:
		tmp = (x * (y - a)) / z
	elif z <= -1.12e-218:
		tmp = y / (a / (t - x))
	elif z <= 9.2e-296:
		tmp = x
	elif z <= 1.02e-173:
		tmp = (t - x) / (a / y)
	elif z <= 1.2e+46:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -9.2e+106)
		tmp = t;
	elseif (z <= -1.9e+32)
		tmp = x;
	elseif (z <= -2.6e-67)
		tmp = Float64(Float64(x * Float64(y - a)) / z);
	elseif (z <= -1.12e-218)
		tmp = Float64(y / Float64(a / Float64(t - x)));
	elseif (z <= 9.2e-296)
		tmp = x;
	elseif (z <= 1.02e-173)
		tmp = Float64(Float64(t - x) / Float64(a / y));
	elseif (z <= 1.2e+46)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -9.2e+106)
		tmp = t;
	elseif (z <= -1.9e+32)
		tmp = x;
	elseif (z <= -2.6e-67)
		tmp = (x * (y - a)) / z;
	elseif (z <= -1.12e-218)
		tmp = y / (a / (t - x));
	elseif (z <= 9.2e-296)
		tmp = x;
	elseif (z <= 1.02e-173)
		tmp = (t - x) / (a / y);
	elseif (z <= 1.2e+46)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e+106], t, If[LessEqual[z, -1.9e+32], x, If[LessEqual[z, -2.6e-67], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -1.12e-218], N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-296], x, If[LessEqual[z, 1.02e-173], N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+46], x, t]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+106}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-67}:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\

\mathbf{elif}\;z \leq -1.12 \cdot 10^{-218}:\\
\;\;\;\;\frac{y}{\frac{a}{t - x}}\\

\mathbf{elif}\;z \leq 9.2 \cdot 10^{-296}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.02 \cdot 10^{-173}:\\
\;\;\;\;\frac{t - x}{\frac{a}{y}}\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+46}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -9.2000000000000008e106 or 1.20000000000000004e46 < z

    1. Initial program 55.8%

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

      \[\leadsto \color{blue}{t} \]

    if -9.2000000000000008e106 < z < -1.9000000000000002e32 or -1.11999999999999996e-218 < z < 9.20000000000000016e-296 or 1.02000000000000006e-173 < z < 1.20000000000000004e46

    1. Initial program 94.0%

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

      \[\leadsto \color{blue}{x} \]

    if -1.9000000000000002e32 < z < -2.5999999999999999e-67

    1. Initial program 77.5%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--52.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 45.2%

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

    if -2.5999999999999999e-67 < z < -1.11999999999999996e-218

    1. Initial program 90.1%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/57.6%

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a - z}} \]
      2. clear-num57.6%

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

        \[\leadsto \color{blue}{\frac{t - x}{\frac{a - z}{y}}} \]
    7. Applied egg-rr57.6%

      \[\leadsto \color{blue}{\frac{t - x}{\frac{a - z}{y}}} \]
    8. Taylor expanded in a around inf 48.6%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    10. Simplified54.8%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]

    if 9.20000000000000016e-296 < z < 1.02000000000000006e-173

    1. Initial program 82.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/73.3%

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a - z}} \]
      2. clear-num73.4%

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

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

      \[\leadsto \color{blue}{\frac{t - x}{\frac{a - z}{y}}} \]
    8. Taylor expanded in a around inf 69.0%

      \[\leadsto \frac{t - x}{\color{blue}{\frac{a}{y}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification53.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{+32}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-67}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-218}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-296}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-173}:\\ \;\;\;\;\frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+46}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 49.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;z \leq -7.8 \cdot 10^{+138}:\\ \;\;\;\;\frac{-t}{\frac{a}{z} + -1}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-232}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-278}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-130}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+30}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) (- a z)))))
   (if (<= z -7.8e+138)
     (/ (- t) (+ (/ a z) -1.0))
     (if (<= z -2.8e-232)
       t_1
       (if (<= z -1.65e-278)
         x
         (if (<= z 1.7e-130)
           t_1
           (if (<= z 2.05e+30) x (* (- y z) (/ t (- a z))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / (a - z));
	double tmp;
	if (z <= -7.8e+138) {
		tmp = -t / ((a / z) + -1.0);
	} else if (z <= -2.8e-232) {
		tmp = t_1;
	} else if (z <= -1.65e-278) {
		tmp = x;
	} else if (z <= 1.7e-130) {
		tmp = t_1;
	} else if (z <= 2.05e+30) {
		tmp = x;
	} else {
		tmp = (y - z) * (t / (a - z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * ((t - x) / (a - z))
    if (z <= (-7.8d+138)) then
        tmp = -t / ((a / z) + (-1.0d0))
    else if (z <= (-2.8d-232)) then
        tmp = t_1
    else if (z <= (-1.65d-278)) then
        tmp = x
    else if (z <= 1.7d-130) then
        tmp = t_1
    else if (z <= 2.05d+30) then
        tmp = x
    else
        tmp = (y - z) * (t / (a - z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / (a - z));
	double tmp;
	if (z <= -7.8e+138) {
		tmp = -t / ((a / z) + -1.0);
	} else if (z <= -2.8e-232) {
		tmp = t_1;
	} else if (z <= -1.65e-278) {
		tmp = x;
	} else if (z <= 1.7e-130) {
		tmp = t_1;
	} else if (z <= 2.05e+30) {
		tmp = x;
	} else {
		tmp = (y - z) * (t / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / (a - z))
	tmp = 0
	if z <= -7.8e+138:
		tmp = -t / ((a / z) + -1.0)
	elif z <= -2.8e-232:
		tmp = t_1
	elif z <= -1.65e-278:
		tmp = x
	elif z <= 1.7e-130:
		tmp = t_1
	elif z <= 2.05e+30:
		tmp = x
	else:
		tmp = (y - z) * (t / (a - z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	tmp = 0.0
	if (z <= -7.8e+138)
		tmp = Float64(Float64(-t) / Float64(Float64(a / z) + -1.0));
	elseif (z <= -2.8e-232)
		tmp = t_1;
	elseif (z <= -1.65e-278)
		tmp = x;
	elseif (z <= 1.7e-130)
		tmp = t_1;
	elseif (z <= 2.05e+30)
		tmp = x;
	else
		tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / (a - z));
	tmp = 0.0;
	if (z <= -7.8e+138)
		tmp = -t / ((a / z) + -1.0);
	elseif (z <= -2.8e-232)
		tmp = t_1;
	elseif (z <= -1.65e-278)
		tmp = x;
	elseif (z <= 1.7e-130)
		tmp = t_1;
	elseif (z <= 2.05e+30)
		tmp = x;
	else
		tmp = (y - z) * (t / (a - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e+138], N[((-t) / N[(N[(a / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.8e-232], t$95$1, If[LessEqual[z, -1.65e-278], x, If[LessEqual[z, 1.7e-130], t$95$1, If[LessEqual[z, 2.05e+30], x, N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.8 \cdot 10^{-232}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.65 \cdot 10^{-278}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.05 \cdot 10^{+30}:\\
\;\;\;\;x\\

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


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

    1. Initial program 42.3%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a - z}{t - x}}} \]
      4. associate-/r/49.6%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg41.9%

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      3. div-sub64.1%

        \[\leadsto -\frac{t}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      4. sub-neg64.1%

        \[\leadsto -\frac{t}{\color{blue}{\frac{a}{z} + \left(-\frac{z}{z}\right)}} \]
      5. *-inverses64.1%

        \[\leadsto -\frac{t}{\frac{a}{z} + \left(-\color{blue}{1}\right)} \]
      6. metadata-eval64.1%

        \[\leadsto -\frac{t}{\frac{a}{z} + \color{blue}{-1}} \]
    8. Simplified64.1%

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

    if -7.7999999999999996e138 < z < -2.79999999999999993e-232 or -1.6499999999999999e-278 < z < 1.70000000000000003e-130

    1. Initial program 90.4%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      2. div-inv55.3%

        \[\leadsto \color{blue}{y \cdot \frac{1}{\frac{a - z}{t - x}}} \]
      3. clear-num55.3%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Applied egg-rr55.3%

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

    if -2.79999999999999993e-232 < z < -1.6499999999999999e-278 or 1.70000000000000003e-130 < z < 2.05000000000000003e30

    1. Initial program 89.2%

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

      \[\leadsto \color{blue}{x} \]

    if 2.05000000000000003e30 < z

    1. Initial program 61.8%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
      2. associate-/r/64.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+138}:\\ \;\;\;\;\frac{-t}{\frac{a}{z} + -1}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-232}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-278}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-130}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+30}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 43.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{-t}{\frac{a}{z} + -1}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.95 \cdot 10^{-214}:\\
\;\;\;\;\frac{y}{\frac{a}{t - x}}\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{-297}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3.3 \cdot 10^{-174}:\\
\;\;\;\;\frac{t - x}{\frac{a}{y}}\\

\mathbf{elif}\;z \leq 8 \cdot 10^{+41}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.20000000000000022e49 or 8.00000000000000005e41 < z

    1. Initial program 61.1%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a - z}{t - x}}} \]
      4. associate-/r/48.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg37.9%

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      3. div-sub58.0%

        \[\leadsto -\frac{t}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      4. sub-neg58.0%

        \[\leadsto -\frac{t}{\color{blue}{\frac{a}{z} + \left(-\frac{z}{z}\right)}} \]
      5. *-inverses58.0%

        \[\leadsto -\frac{t}{\frac{a}{z} + \left(-\color{blue}{1}\right)} \]
      6. metadata-eval58.0%

        \[\leadsto -\frac{t}{\frac{a}{z} + \color{blue}{-1}} \]
    8. Simplified58.0%

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

    if -4.20000000000000022e49 < z < -2.9499999999999999e-214

    1. Initial program 88.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/53.3%

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a - z}} \]
      2. clear-num53.3%

        \[\leadsto \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y}}} \]
      3. un-div-inv53.3%

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

      \[\leadsto \color{blue}{\frac{t - x}{\frac{a - z}{y}}} \]
    8. Taylor expanded in a around inf 39.2%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    10. Simplified44.9%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]

    if -2.9499999999999999e-214 < z < 1.3e-297 or 3.3000000000000001e-174 < z < 8.00000000000000005e41

    1. Initial program 91.7%

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

      \[\leadsto \color{blue}{x} \]

    if 1.3e-297 < z < 3.3000000000000001e-174

    1. Initial program 82.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/73.3%

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a - z}} \]
      2. clear-num73.4%

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

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

      \[\leadsto \color{blue}{\frac{t - x}{\frac{a - z}{y}}} \]
    8. Taylor expanded in a around inf 69.0%

      \[\leadsto \frac{t - x}{\color{blue}{\frac{a}{y}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification55.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+49}:\\ \;\;\;\;\frac{-t}{\frac{a}{z} + -1}\\ \mathbf{elif}\;z \leq -2.95 \cdot 10^{-214}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-297}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-174}:\\ \;\;\;\;\frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+41}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{a}{z} + -1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 48.7% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a - z}\\
t_2 := \frac{-t}{\frac{a}{z} + -1}\\
\mathbf{if}\;z \leq -5.7 \cdot 10^{+132}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -1.55 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-279}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-127}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.5 \cdot 10^{+41}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.6999999999999998e132 or 3.4999999999999999e41 < z

    1. Initial program 54.2%

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a - z}\right)} \]
      2. unsub-neg25.0%

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a - z}{t - x}}} \]
      4. associate-/r/46.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg40.2%

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      3. div-sub62.6%

        \[\leadsto -\frac{t}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      4. sub-neg62.6%

        \[\leadsto -\frac{t}{\color{blue}{\frac{a}{z} + \left(-\frac{z}{z}\right)}} \]
      5. *-inverses62.6%

        \[\leadsto -\frac{t}{\frac{a}{z} + \left(-\color{blue}{1}\right)} \]
      6. metadata-eval62.6%

        \[\leadsto -\frac{t}{\frac{a}{z} + \color{blue}{-1}} \]
    8. Simplified62.6%

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

    if -5.6999999999999998e132 < z < -1.54999999999999994e-231 or -1.19999999999999995e-279 < z < 2.1000000000000001e-127

    1. Initial program 90.4%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      2. div-inv55.3%

        \[\leadsto \color{blue}{y \cdot \frac{1}{\frac{a - z}{t - x}}} \]
      3. clear-num55.3%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Applied egg-rr55.3%

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

    if -1.54999999999999994e-231 < z < -1.19999999999999995e-279 or 2.1000000000000001e-127 < z < 3.4999999999999999e41

    1. Initial program 87.8%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.7 \cdot 10^{+132}:\\ \;\;\;\;\frac{-t}{\frac{a}{z} + -1}\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-231}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-279}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-127}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+41}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{a}{z} + -1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 37.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+107}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{+32}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-158}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-297}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-140}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+46}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1e+107)
   t
   (if (<= z -2.8e+32)
     x
     (if (<= z -5.5e-158)
       (* x (/ (- y a) z))
       (if (<= z 3.7e-297)
         x
         (if (<= z 5.8e-140) (* t (/ y (- a z))) (if (<= z 1.8e+46) x t)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1e+107) {
		tmp = t;
	} else if (z <= -2.8e+32) {
		tmp = x;
	} else if (z <= -5.5e-158) {
		tmp = x * ((y - a) / z);
	} else if (z <= 3.7e-297) {
		tmp = x;
	} else if (z <= 5.8e-140) {
		tmp = t * (y / (a - z));
	} else if (z <= 1.8e+46) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1d+107)) then
        tmp = t
    else if (z <= (-2.8d+32)) then
        tmp = x
    else if (z <= (-5.5d-158)) then
        tmp = x * ((y - a) / z)
    else if (z <= 3.7d-297) then
        tmp = x
    else if (z <= 5.8d-140) then
        tmp = t * (y / (a - z))
    else if (z <= 1.8d+46) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1e+107) {
		tmp = t;
	} else if (z <= -2.8e+32) {
		tmp = x;
	} else if (z <= -5.5e-158) {
		tmp = x * ((y - a) / z);
	} else if (z <= 3.7e-297) {
		tmp = x;
	} else if (z <= 5.8e-140) {
		tmp = t * (y / (a - z));
	} else if (z <= 1.8e+46) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1e+107:
		tmp = t
	elif z <= -2.8e+32:
		tmp = x
	elif z <= -5.5e-158:
		tmp = x * ((y - a) / z)
	elif z <= 3.7e-297:
		tmp = x
	elif z <= 5.8e-140:
		tmp = t * (y / (a - z))
	elif z <= 1.8e+46:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1e+107)
		tmp = t;
	elseif (z <= -2.8e+32)
		tmp = x;
	elseif (z <= -5.5e-158)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= 3.7e-297)
		tmp = x;
	elseif (z <= 5.8e-140)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= 1.8e+46)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1e+107)
		tmp = t;
	elseif (z <= -2.8e+32)
		tmp = x;
	elseif (z <= -5.5e-158)
		tmp = x * ((y - a) / z);
	elseif (z <= 3.7e-297)
		tmp = x;
	elseif (z <= 5.8e-140)
		tmp = t * (y / (a - z));
	elseif (z <= 1.8e+46)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e+107], t, If[LessEqual[z, -2.8e+32], x, If[LessEqual[z, -5.5e-158], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-297], x, If[LessEqual[z, 5.8e-140], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+46], x, t]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+107}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -2.8 \cdot 10^{+32}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -5.5 \cdot 10^{-158}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

\mathbf{elif}\;z \leq 3.7 \cdot 10^{-297}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-140}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\

\mathbf{elif}\;z \leq 1.8 \cdot 10^{+46}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.9999999999999997e106 or 1.7999999999999999e46 < z

    1. Initial program 55.8%

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

      \[\leadsto \color{blue}{t} \]

    if -9.9999999999999997e106 < z < -2.8e32 or -5.50000000000000025e-158 < z < 3.7e-297 or 5.79999999999999995e-140 < z < 1.7999999999999999e46

    1. Initial program 92.9%

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

      \[\leadsto \color{blue}{x} \]

    if -2.8e32 < z < -5.50000000000000025e-158

    1. Initial program 82.3%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--45.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 41.7%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/41.5%

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

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

    if 3.7e-297 < z < 5.79999999999999995e-140

    1. Initial program 85.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/67.6%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
    8. Simplified53.1%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification49.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+107}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{+32}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-158}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-297}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-140}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+46}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 41.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+44}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -9.5 \cdot 10^{-218}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 6.5 \cdot 10^{-295}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 8.4 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.35 \cdot 10^{+42}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.5e44 or 1.35e42 < z

    1. Initial program 61.1%

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

      \[\leadsto \color{blue}{t} \]

    if -4.5e44 < z < -9.49999999999999967e-218 or 6.4999999999999998e-295 < z < 8.39999999999999969e-176

    1. Initial program 86.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/59.4%

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

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

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

    if -9.49999999999999967e-218 < z < 6.4999999999999998e-295 or 8.39999999999999969e-176 < z < 1.35e42

    1. Initial program 91.7%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+44}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-218}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-295}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{-176}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 41.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+48}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-294}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.16 \cdot 10^{-173}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 8.2 \cdot 10^{+42}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.85e48 or 8.2000000000000001e42 < z

    1. Initial program 61.1%

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

      \[\leadsto \color{blue}{t} \]

    if -1.85e48 < z < -4.80000000000000007e-216

    1. Initial program 88.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/53.3%

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a - z}} \]
      2. clear-num53.3%

        \[\leadsto \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y}}} \]
      3. un-div-inv53.3%

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

      \[\leadsto \color{blue}{\frac{t - x}{\frac{a - z}{y}}} \]
    8. Taylor expanded in a around inf 39.2%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    10. Simplified44.9%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]

    if -4.80000000000000007e-216 < z < 1.04999999999999992e-294 or 1.16000000000000004e-173 < z < 8.2000000000000001e42

    1. Initial program 91.7%

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

      \[\leadsto \color{blue}{x} \]

    if 1.04999999999999992e-294 < z < 1.16000000000000004e-173

    1. Initial program 82.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/73.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+48}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-216}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-294}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.16 \cdot 10^{-173}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 56.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.85 \cdot 10^{-212}:\\
\;\;\;\;x \cdot \left(\frac{z}{a - z} + 1\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.79999999999999953e-100 or 1.30000000000000005e-38 < t

    1. Initial program 85.7%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
      2. associate-/r/67.3%

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

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

    if -6.79999999999999953e-100 < t < -1.84999999999999995e-212

    1. Initial program 57.5%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a - z}{t - x}}} \]
      4. associate-/r/44.1%

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 - -1 \cdot \frac{z}{a - z}\right)} \]
    7. Step-by-step derivation
      1. cancel-sign-sub-inv40.6%

        \[\leadsto x \cdot \color{blue}{\left(1 + \left(--1\right) \cdot \frac{z}{a - z}\right)} \]
      2. metadata-eval40.6%

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

        \[\leadsto x \cdot \left(1 + \color{blue}{\frac{z}{a - z}}\right) \]
    8. Simplified40.6%

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

    if -1.84999999999999995e-212 < t < 1.30000000000000005e-38

    1. Initial program 60.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/44.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{-100}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;t \leq -1.85 \cdot 10^{-212}:\\ \;\;\;\;x \cdot \left(\frac{z}{a - z} + 1\right)\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-38}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 54.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{if}\;t \leq -20000000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -9 \cdot 10^{-280}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\

\mathbf{elif}\;t \leq 4.3 \cdot 10^{-41}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2e13 or 4.2999999999999999e-41 < t

    1. Initial program 87.5%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
      2. associate-/r/70.0%

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

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

    if -2e13 < t < -8.9999999999999991e-280

    1. Initial program 57.7%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--53.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around 0 42.2%

      \[\leadsto \color{blue}{t - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. sub-neg42.2%

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

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

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

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t - x}}} \]
    8. Simplified45.9%

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

    if -8.9999999999999991e-280 < t < 4.2999999999999999e-41

    1. Initial program 65.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/47.9%

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

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

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

Alternative 13: 39.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-295}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.5 \cdot 10^{-140}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{+47}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.30000000000000008e106 or 9.50000000000000001e47 < z

    1. Initial program 55.8%

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

      \[\leadsto \color{blue}{t} \]

    if -3.30000000000000008e106 < z < 3.2e-295 or 5.50000000000000026e-140 < z < 9.50000000000000001e47

    1. Initial program 90.9%

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

      \[\leadsto \color{blue}{x} \]

    if 3.2e-295 < z < 5.50000000000000026e-140

    1. Initial program 85.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/67.6%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
    8. Simplified53.1%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-295}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-140}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+47}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 38.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-297}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-174}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+44}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.2e+106)
   t
   (if (<= z 8.2e-297)
     x
     (if (<= z 8.5e-174) (/ t (/ a y)) (if (<= z 7e+44) x t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.2e+106) {
		tmp = t;
	} else if (z <= 8.2e-297) {
		tmp = x;
	} else if (z <= 8.5e-174) {
		tmp = t / (a / y);
	} else if (z <= 7e+44) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-6.2d+106)) then
        tmp = t
    else if (z <= 8.2d-297) then
        tmp = x
    else if (z <= 8.5d-174) then
        tmp = t / (a / y)
    else if (z <= 7d+44) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.2e+106) {
		tmp = t;
	} else if (z <= 8.2e-297) {
		tmp = x;
	} else if (z <= 8.5e-174) {
		tmp = t / (a / y);
	} else if (z <= 7e+44) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6.2e+106:
		tmp = t
	elif z <= 8.2e-297:
		tmp = x
	elif z <= 8.5e-174:
		tmp = t / (a / y)
	elif z <= 7e+44:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.2e+106)
		tmp = t;
	elseif (z <= 8.2e-297)
		tmp = x;
	elseif (z <= 8.5e-174)
		tmp = Float64(t / Float64(a / y));
	elseif (z <= 7e+44)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6.2e+106)
		tmp = t;
	elseif (z <= 8.2e-297)
		tmp = x;
	elseif (z <= 8.5e-174)
		tmp = t / (a / y);
	elseif (z <= 7e+44)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.2e+106], t, If[LessEqual[z, 8.2e-297], x, If[LessEqual[z, 8.5e-174], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+44], x, t]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+106}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 8.2 \cdot 10^{-297}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{-174}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

\mathbf{elif}\;z \leq 7 \cdot 10^{+44}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.1999999999999999e106 or 6.9999999999999998e44 < z

    1. Initial program 55.8%

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

      \[\leadsto \color{blue}{t} \]

    if -6.1999999999999999e106 < z < 8.2000000000000004e-297 or 8.4999999999999996e-174 < z < 6.9999999999999998e44

    1. Initial program 91.3%

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

      \[\leadsto \color{blue}{x} \]

    if 8.2000000000000004e-297 < z < 8.4999999999999996e-174

    1. Initial program 82.4%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
      2. associate-/r/55.6%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    8. Simplified55.5%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-297}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-174}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+44}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 76.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+61} \lor \neg \left(z \leq 2.05 \cdot 10^{+21}\right):\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\


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

    1. Initial program 61.5%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--68.3%

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

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

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

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

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

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

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

    if -2.45000000000000013e61 < z < 2.05e21

    1. Initial program 89.2%

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

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

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

      \[\leadsto \color{blue}{x + \frac{t - x}{\frac{a}{y - z}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification81.5%

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

Alternative 16: 69.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+106}:\\
\;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\

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

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


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

    1. Initial program 47.9%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--77.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 78.5%

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

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

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

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

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

        \[\leadsto t - \frac{\color{blue}{\left(0 - \left(y - a\right)\right)} \cdot x}{z} \]
      6. associate--r-78.5%

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

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

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

    if -3.69999999999999995e106 < z < 5.4e20

    1. Initial program 90.2%

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

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

    if 5.4e20 < z

    1. Initial program 63.4%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--65.3%

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

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

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

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

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

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

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

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

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

Alternative 17: 71.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+106}:\\
\;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\

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

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


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

    1. Initial program 47.9%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--77.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 78.5%

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

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

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

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

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

        \[\leadsto t - \frac{\color{blue}{\left(0 - \left(y - a\right)\right)} \cdot x}{z} \]
      6. associate--r-78.5%

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

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

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

    if -3.30000000000000008e106 < z < 1.9e21

    1. Initial program 90.2%

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

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

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

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

    if 1.9e21 < z

    1. Initial program 63.4%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--65.3%

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

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

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

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

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

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

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

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

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

Alternative 18: 71.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+61}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\

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

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


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

    1. Initial program 59.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt58.3%

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

        \[\leadsto x + \left(y - z\right) \cdot \color{blue}{{\left(\sqrt[3]{\frac{t - x}{a - z}}\right)}^{3}} \]
    4. Applied egg-rr58.2%

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{{\left(\sqrt[3]{\frac{t - x}{a - z}}\right)}^{3}} \]
    5. Taylor expanded in z around inf 72.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2e61 < z < 1.5e23

    1. Initial program 89.2%

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

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

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

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

    if 1.5e23 < z

    1. Initial program 63.4%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--65.3%

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

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

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

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

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

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

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

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

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

Alternative 19: 70.2% accurate, 0.7× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\


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

    1. Initial program 61.5%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--68.3%

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

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

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

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

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

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

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

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

    if -7.20000000000000021e61 < z < 1.8e21

    1. Initial program 89.2%

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

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

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

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification75.0%

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

Alternative 20: 62.2% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 42.3%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--79.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around 0 67.6%

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t - x}}} \]
    8. Simplified73.3%

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

    if -7.19999999999999976e134 < z < 2.05000000000000003e30

    1. Initial program 90.1%

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

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

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

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

    if 2.05000000000000003e30 < z

    1. Initial program 61.8%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
      2. associate-/r/64.3%

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

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

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

Alternative 21: 67.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+106}:\\
\;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\

\mathbf{elif}\;z \leq 6.8 \cdot 10^{+21}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\

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


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

    1. Initial program 47.9%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--77.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 78.5%

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

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

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

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

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

        \[\leadsto t - \frac{\color{blue}{\left(0 - \left(y - a\right)\right)} \cdot x}{z} \]
      6. associate--r-78.5%

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

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

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

    if -3.30000000000000008e106 < z < 6.8e21

    1. Initial program 90.2%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    5. Simplified75.1%

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

    if 6.8e21 < z

    1. Initial program 63.4%

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--65.3%

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

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

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

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

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

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

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

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

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

Alternative 22: 38.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -9.2e+106) t (if (<= z 3.3e+42) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9.2e+106) {
		tmp = t;
	} else if (z <= 3.3e+42) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-9.2d+106)) then
        tmp = t
    else if (z <= 3.3d+42) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9.2e+106) {
		tmp = t;
	} else if (z <= 3.3e+42) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -9.2e+106:
		tmp = t
	elif z <= 3.3e+42:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -9.2e+106)
		tmp = t;
	elseif (z <= 3.3e+42)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -9.2e+106)
		tmp = t;
	elseif (z <= 3.3e+42)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e+106], t, If[LessEqual[z, 3.3e+42], x, t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+106}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 3.3 \cdot 10^{+42}:\\
\;\;\;\;x\\

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


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

    1. Initial program 55.8%

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

      \[\leadsto \color{blue}{t} \]

    if -9.2000000000000008e106 < z < 3.2999999999999999e42

    1. Initial program 90.0%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 25.6% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 75.3%

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

    \[\leadsto \color{blue}{t} \]
  4. Final simplification27.9%

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024026 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))