Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.3% → 94.8%
Time: 20.7s
Alternatives: 30
Speedup: 0.3×

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 30 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: 80.3% 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: 94.8% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_1 + x \cdot \frac{y - a}{z}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\


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

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\frac{a - z}{y - z}} - x \cdot \color{blue}{\frac{a + -1 \cdot y}{z}} \]
    6. Step-by-step derivation
      1. mul-1-neg99.8%

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

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

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

    if 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. Step-by-step derivation
      1. +-commutative92.8%

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

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

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

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

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

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

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

Alternative 2: 95.5% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\
t_2 := \frac{z}{t - x}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-295} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x - \frac{x - t}{\frac{a - z}{y - z}}\\

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


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

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

    1. Initial program 3.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t - \frac{y}{\frac{z}{t - x}}\right) + \color{blue}{\frac{a}{\frac{z}{t - x}}} \]
    6. Simplified99.7%

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

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

Alternative 3: 95.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\ t_2 := \frac{a - z}{y - z}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{-295} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;x - \frac{x - t}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{t_2} + x \cdot \frac{y - a}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- z y) (/ (- x t) (- a z))))) (t_2 (/ (- a z) (- y z))))
   (if (or (<= t_1 -5e-295) (not (<= t_1 0.0)))
     (- x (/ (- x t) t_2))
     (+ (/ t t_2) (* x (/ (- y a) z))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - y) * ((x - t) / (a - z)));
	double t_2 = (a - z) / (y - z);
	double tmp;
	if ((t_1 <= -5e-295) || !(t_1 <= 0.0)) {
		tmp = x - ((x - t) / t_2);
	} else {
		tmp = (t / t_2) + (x * ((y - 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) :: t_2
    real(8) :: tmp
    t_1 = x + ((z - y) * ((x - t) / (a - z)))
    t_2 = (a - z) / (y - z)
    if ((t_1 <= (-5d-295)) .or. (.not. (t_1 <= 0.0d0))) then
        tmp = x - ((x - t) / t_2)
    else
        tmp = (t / t_2) + (x * ((y - 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 = x + ((z - y) * ((x - t) / (a - z)));
	double t_2 = (a - z) / (y - z);
	double tmp;
	if ((t_1 <= -5e-295) || !(t_1 <= 0.0)) {
		tmp = x - ((x - t) / t_2);
	} else {
		tmp = (t / t_2) + (x * ((y - a) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((z - y) * ((x - t) / (a - z)))
	t_2 = (a - z) / (y - z)
	tmp = 0
	if (t_1 <= -5e-295) or not (t_1 <= 0.0):
		tmp = x - ((x - t) / t_2)
	else:
		tmp = (t / t_2) + (x * ((y - a) / z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / Float64(a - z))))
	t_2 = Float64(Float64(a - z) / Float64(y - z))
	tmp = 0.0
	if ((t_1 <= -5e-295) || !(t_1 <= 0.0))
		tmp = Float64(x - Float64(Float64(x - t) / t_2));
	else
		tmp = Float64(Float64(t / t_2) + Float64(x * Float64(Float64(y - a) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((z - y) * ((x - t) / (a - z)));
	t_2 = (a - z) / (y - z);
	tmp = 0.0;
	if ((t_1 <= -5e-295) || ~((t_1 <= 0.0)))
		tmp = x - ((x - t) / t_2);
	else
		tmp = (t / t_2) + (x * ((y - a) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-295], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x - N[(N[(x - t), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(t / t$95$2), $MachinePrecision] + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\
t_2 := \frac{a - z}{y - z}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-295} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x - \frac{x - t}{t_2}\\

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


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

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

    1. Initial program 3.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\frac{a - z}{y - z}} - x \cdot \color{blue}{\frac{a + -1 \cdot y}{z}} \]
    6. Step-by-step derivation
      1. mul-1-neg99.8%

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

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

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

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

Alternative 4: 94.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a - z}{y - z}\\ t_2 := \frac{t}{t_1}\\ t_3 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\ \mathbf{if}\;t_3 \leq -5 \cdot 10^{-295}:\\ \;\;\;\;t_2 + x \cdot \left(\frac{z - y}{a - z} - -1\right)\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;t_2 + x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - t}{t_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- a z) (- y z)))
        (t_2 (/ t t_1))
        (t_3 (+ x (* (- z y) (/ (- x t) (- a z))))))
   (if (<= t_3 -5e-295)
     (+ t_2 (* x (- (/ (- z y) (- a z)) -1.0)))
     (if (<= t_3 0.0) (+ t_2 (* x (/ (- y a) z))) (- x (/ (- x t) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (a - z) / (y - z);
	double t_2 = t / t_1;
	double t_3 = x + ((z - y) * ((x - t) / (a - z)));
	double tmp;
	if (t_3 <= -5e-295) {
		tmp = t_2 + (x * (((z - y) / (a - z)) - -1.0));
	} else if (t_3 <= 0.0) {
		tmp = t_2 + (x * ((y - a) / z));
	} else {
		tmp = x - ((x - t) / 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (a - z) / (y - z)
    t_2 = t / t_1
    t_3 = x + ((z - y) * ((x - t) / (a - z)))
    if (t_3 <= (-5d-295)) then
        tmp = t_2 + (x * (((z - y) / (a - z)) - (-1.0d0)))
    else if (t_3 <= 0.0d0) then
        tmp = t_2 + (x * ((y - a) / z))
    else
        tmp = x - ((x - t) / 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 = (a - z) / (y - z);
	double t_2 = t / t_1;
	double t_3 = x + ((z - y) * ((x - t) / (a - z)));
	double tmp;
	if (t_3 <= -5e-295) {
		tmp = t_2 + (x * (((z - y) / (a - z)) - -1.0));
	} else if (t_3 <= 0.0) {
		tmp = t_2 + (x * ((y - a) / z));
	} else {
		tmp = x - ((x - t) / t_1);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (a - z) / (y - z)
	t_2 = t / t_1
	t_3 = x + ((z - y) * ((x - t) / (a - z)))
	tmp = 0
	if t_3 <= -5e-295:
		tmp = t_2 + (x * (((z - y) / (a - z)) - -1.0))
	elif t_3 <= 0.0:
		tmp = t_2 + (x * ((y - a) / z))
	else:
		tmp = x - ((x - t) / t_1)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(a - z) / Float64(y - z))
	t_2 = Float64(t / t_1)
	t_3 = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / Float64(a - z))))
	tmp = 0.0
	if (t_3 <= -5e-295)
		tmp = Float64(t_2 + Float64(x * Float64(Float64(Float64(z - y) / Float64(a - z)) - -1.0)));
	elseif (t_3 <= 0.0)
		tmp = Float64(t_2 + Float64(x * Float64(Float64(y - a) / z)));
	else
		tmp = Float64(x - Float64(Float64(x - t) / t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (a - z) / (y - z);
	t_2 = t / t_1;
	t_3 = x + ((z - y) * ((x - t) / (a - z)));
	tmp = 0.0;
	if (t_3 <= -5e-295)
		tmp = t_2 + (x * (((z - y) / (a - z)) - -1.0));
	elseif (t_3 <= 0.0)
		tmp = t_2 + (x * ((y - a) / z));
	else
		tmp = x - ((x - t) / t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e-295], N[(t$95$2 + N[(x * N[(N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(t$95$2 + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x - t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;t_2 + x \cdot \frac{y - a}{z}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{x - t}{t_1}\\


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

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{t}{\frac{a - z}{y - z}} - x \cdot \color{blue}{\frac{a + -1 \cdot y}{z}} \]
    6. Step-by-step derivation
      1. mul-1-neg99.8%

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

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

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

    if 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. Step-by-step derivation
      1. *-commutative92.8%

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

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

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

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

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

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

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

Alternative 5: 89.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{-295} \lor \neg \left(t_1 \leq 10^{-242}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- z y) (/ (- x t) (- a z))))))
   (if (or (<= t_1 -5e-295) (not (<= t_1 1e-242)))
     t_1
     (+ t (/ (* (- y a) (- x t)) z)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - y) * ((x - t) / (a - z)));
	double tmp;
	if ((t_1 <= -5e-295) || !(t_1 <= 1e-242)) {
		tmp = t_1;
	} else {
		tmp = t + (((y - a) * (x - t)) / 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 = x + ((z - y) * ((x - t) / (a - z)))
    if ((t_1 <= (-5d-295)) .or. (.not. (t_1 <= 1d-242))) then
        tmp = t_1
    else
        tmp = t + (((y - a) * (x - t)) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - y) * ((x - t) / (a - z)));
	double tmp;
	if ((t_1 <= -5e-295) || !(t_1 <= 1e-242)) {
		tmp = t_1;
	} else {
		tmp = t + (((y - a) * (x - t)) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((z - y) * ((x - t) / (a - z)))
	tmp = 0
	if (t_1 <= -5e-295) or not (t_1 <= 1e-242):
		tmp = t_1
	else:
		tmp = t + (((y - a) * (x - t)) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / Float64(a - z))))
	tmp = 0.0
	if ((t_1 <= -5e-295) || !(t_1 <= 1e-242))
		tmp = t_1;
	else
		tmp = Float64(t + Float64(Float64(Float64(y - a) * Float64(x - t)) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((z - y) * ((x - t) / (a - z)));
	tmp = 0.0;
	if ((t_1 <= -5e-295) || ~((t_1 <= 1e-242)))
		tmp = t_1;
	else
		tmp = t + (((y - a) * (x - t)) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-295], N[Not[LessEqual[t$95$1, 1e-242]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(y - a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 92.9%

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

    if -5.00000000000000008e-295 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1e-242

    1. Initial program 7.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative90.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} \]
      2. associate--l+90.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)} \]
      3. associate-*r/90.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) \]
      4. associate-*r/90.2%

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

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

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

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

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

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

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

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

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

Alternative 6: 93.5% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

    1. Initial program 3.3%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative94.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} \]
      2. associate--l+94.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)} \]
      3. associate-*r/94.3%

        \[\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) \]
      4. associate-*r/94.3%

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

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

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

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

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

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

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

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

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

Alternative 7: 95.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{-295} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;x - \frac{x - t}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{-1}{\frac{\frac{z}{t - x}}{y - a}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- z y) (/ (- x t) (- a z))))))
   (if (or (<= t_1 -5e-295) (not (<= t_1 0.0)))
     (- x (/ (- x t) (/ (- a z) (- y z))))
     (+ t (/ -1.0 (/ (/ z (- t x)) (- y a)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - y) * ((x - t) / (a - z)));
	double tmp;
	if ((t_1 <= -5e-295) || !(t_1 <= 0.0)) {
		tmp = x - ((x - t) / ((a - z) / (y - z)));
	} else {
		tmp = t + (-1.0 / ((z / (t - x)) / (y - a)));
	}
	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 + ((z - y) * ((x - t) / (a - z)))
    if ((t_1 <= (-5d-295)) .or. (.not. (t_1 <= 0.0d0))) then
        tmp = x - ((x - t) / ((a - z) / (y - z)))
    else
        tmp = t + ((-1.0d0) / ((z / (t - x)) / (y - a)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((z - y) * ((x - t) / (a - z)));
	double tmp;
	if ((t_1 <= -5e-295) || !(t_1 <= 0.0)) {
		tmp = x - ((x - t) / ((a - z) / (y - z)));
	} else {
		tmp = t + (-1.0 / ((z / (t - x)) / (y - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((z - y) * ((x - t) / (a - z)))
	tmp = 0
	if (t_1 <= -5e-295) or not (t_1 <= 0.0):
		tmp = x - ((x - t) / ((a - z) / (y - z)))
	else:
		tmp = t + (-1.0 / ((z / (t - x)) / (y - a)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / Float64(a - z))))
	tmp = 0.0
	if ((t_1 <= -5e-295) || !(t_1 <= 0.0))
		tmp = Float64(x - Float64(Float64(x - t) / Float64(Float64(a - z) / Float64(y - z))));
	else
		tmp = Float64(t + Float64(-1.0 / Float64(Float64(z / Float64(t - x)) / Float64(y - a))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((z - y) * ((x - t) / (a - z)));
	tmp = 0.0;
	if ((t_1 <= -5e-295) || ~((t_1 <= 0.0)))
		tmp = x - ((x - t) / ((a - z) / (y - z)));
	else
		tmp = t + (-1.0 / ((z / (t - x)) / (y - a)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-295], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x - N[(N[(x - t), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(-1.0 / N[(N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

    1. Initial program 3.3%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative94.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} \]
      2. associate--l+94.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)} \]
      3. associate-*r/94.3%

        \[\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) \]
      4. associate-*r/94.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \color{blue}{{\left(\frac{z}{\left(t - x\right) \cdot \left(y - a\right)}\right)}^{-1}} \]
    7. Step-by-step derivation
      1. unpow-194.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(z - y\right) \cdot \frac{x - t}{a - z} \leq -5 \cdot 10^{-295} \lor \neg \left(x + \left(z - y\right) \cdot \frac{x - t}{a - z} \leq 0\right):\\ \;\;\;\;x - \frac{x - t}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{-1}{\frac{\frac{z}{t - x}}{y - a}}\\ \end{array} \]

Alternative 8: 39.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a}\\ t_2 := x - \frac{z \cdot t}{a}\\ \mathbf{if}\;a \leq -5.1 \cdot 10^{+104}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -5 \cdot 10^{+16}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -51000000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-144}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{-282}:\\ \;\;\;\;\frac{-y \cdot t}{z}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-299}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-137}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-53}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{+122}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) a))) (t_2 (- x (/ (* z t) a))))
   (if (<= a -5.1e+104)
     t_2
     (if (<= a -5e+16)
       t_1
       (if (<= a -51000000000000.0)
         x
         (if (<= a -7.5e-144)
           t
           (if (<= a -1.95e-282)
             (/ (- (* y t)) z)
             (if (<= a 1.85e-299)
               t
               (if (<= a 1.9e-137)
                 (* (- y a) (/ x z))
                 (if (<= a 5e-53) t (if (<= a 4.6e+122) t_1 t_2)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double t_2 = x - ((z * t) / a);
	double tmp;
	if (a <= -5.1e+104) {
		tmp = t_2;
	} else if (a <= -5e+16) {
		tmp = t_1;
	} else if (a <= -51000000000000.0) {
		tmp = x;
	} else if (a <= -7.5e-144) {
		tmp = t;
	} else if (a <= -1.95e-282) {
		tmp = -(y * t) / z;
	} else if (a <= 1.85e-299) {
		tmp = t;
	} else if (a <= 1.9e-137) {
		tmp = (y - a) * (x / z);
	} else if (a <= 5e-53) {
		tmp = t;
	} else if (a <= 4.6e+122) {
		tmp = t_1;
	} 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)
    t_2 = x - ((z * t) / a)
    if (a <= (-5.1d+104)) then
        tmp = t_2
    else if (a <= (-5d+16)) then
        tmp = t_1
    else if (a <= (-51000000000000.0d0)) then
        tmp = x
    else if (a <= (-7.5d-144)) then
        tmp = t
    else if (a <= (-1.95d-282)) then
        tmp = -(y * t) / z
    else if (a <= 1.85d-299) then
        tmp = t
    else if (a <= 1.9d-137) then
        tmp = (y - a) * (x / z)
    else if (a <= 5d-53) then
        tmp = t
    else if (a <= 4.6d+122) then
        tmp = t_1
    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);
	double t_2 = x - ((z * t) / a);
	double tmp;
	if (a <= -5.1e+104) {
		tmp = t_2;
	} else if (a <= -5e+16) {
		tmp = t_1;
	} else if (a <= -51000000000000.0) {
		tmp = x;
	} else if (a <= -7.5e-144) {
		tmp = t;
	} else if (a <= -1.95e-282) {
		tmp = -(y * t) / z;
	} else if (a <= 1.85e-299) {
		tmp = t;
	} else if (a <= 1.9e-137) {
		tmp = (y - a) * (x / z);
	} else if (a <= 5e-53) {
		tmp = t;
	} else if (a <= 4.6e+122) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / a)
	t_2 = x - ((z * t) / a)
	tmp = 0
	if a <= -5.1e+104:
		tmp = t_2
	elif a <= -5e+16:
		tmp = t_1
	elif a <= -51000000000000.0:
		tmp = x
	elif a <= -7.5e-144:
		tmp = t
	elif a <= -1.95e-282:
		tmp = -(y * t) / z
	elif a <= 1.85e-299:
		tmp = t
	elif a <= 1.9e-137:
		tmp = (y - a) * (x / z)
	elif a <= 5e-53:
		tmp = t
	elif a <= 4.6e+122:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / a))
	t_2 = Float64(x - Float64(Float64(z * t) / a))
	tmp = 0.0
	if (a <= -5.1e+104)
		tmp = t_2;
	elseif (a <= -5e+16)
		tmp = t_1;
	elseif (a <= -51000000000000.0)
		tmp = x;
	elseif (a <= -7.5e-144)
		tmp = t;
	elseif (a <= -1.95e-282)
		tmp = Float64(Float64(-Float64(y * t)) / z);
	elseif (a <= 1.85e-299)
		tmp = t;
	elseif (a <= 1.9e-137)
		tmp = Float64(Float64(y - a) * Float64(x / z));
	elseif (a <= 5e-53)
		tmp = t;
	elseif (a <= 4.6e+122)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / a);
	t_2 = x - ((z * t) / a);
	tmp = 0.0;
	if (a <= -5.1e+104)
		tmp = t_2;
	elseif (a <= -5e+16)
		tmp = t_1;
	elseif (a <= -51000000000000.0)
		tmp = x;
	elseif (a <= -7.5e-144)
		tmp = t;
	elseif (a <= -1.95e-282)
		tmp = -(y * t) / z;
	elseif (a <= 1.85e-299)
		tmp = t;
	elseif (a <= 1.9e-137)
		tmp = (y - a) * (x / z);
	elseif (a <= 5e-53)
		tmp = t;
	elseif (a <= 4.6e+122)
		tmp = t_1;
	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] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.1e+104], t$95$2, If[LessEqual[a, -5e+16], t$95$1, If[LessEqual[a, -51000000000000.0], x, If[LessEqual[a, -7.5e-144], t, If[LessEqual[a, -1.95e-282], N[((-N[(y * t), $MachinePrecision]) / z), $MachinePrecision], If[LessEqual[a, 1.85e-299], t, If[LessEqual[a, 1.9e-137], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5e-53], t, If[LessEqual[a, 4.6e+122], t$95$1, t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -5 \cdot 10^{+16}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -51000000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -7.5 \cdot 10^{-144}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.85 \cdot 10^{-299}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 5 \cdot 10^{-53}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 4.6 \cdot 10^{+122}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -5.1000000000000002e104 or 4.6000000000000001e122 < a

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

    if -5.1000000000000002e104 < a < -5e16 or 5e-53 < a < 4.6000000000000001e122

    1. Initial program 87.3%

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a}} \cdot y \]
      2. *-commutative52.1%

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

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

    if -5e16 < a < -5.1e13

    1. Initial program 100.0%

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

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

    if -5.1e13 < a < -7.49999999999999963e-144 or -1.95000000000000019e-282 < a < 1.85000000000000007e-299 or 1.89999999999999999e-137 < a < 5e-53

    1. Initial program 60.4%

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

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

    if -7.49999999999999963e-144 < a < -1.95000000000000019e-282

    1. Initial program 75.9%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative72.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot y\right) \cdot t}}{z} \]
      2. neg-mul-140.8%

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

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

    if 1.85000000000000007e-299 < a < 1.89999999999999999e-137

    1. Initial program 74.4%

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

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

        \[\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} \]
      2. associate--l+82.7%

        \[\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)} \]
      3. associate-*r/82.7%

        \[\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) \]
      4. associate-*r/82.7%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.1 \cdot 10^{+104}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{+16}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -51000000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-144}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{-282}:\\ \;\;\;\;\frac{-y \cdot t}{z}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-299}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-137}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-53}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{+122}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \end{array} \]

Alternative 9: 37.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a}\\ \mathbf{if}\;a \leq -2.26 \cdot 10^{+105}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8 \cdot 10^{+16}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-144}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-283}:\\ \;\;\;\;\frac{-y \cdot t}{z}\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-302}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-159}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-53}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2 \cdot 10^{+123}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) a))))
   (if (<= a -2.26e+105)
     x
     (if (<= a -8e+16)
       t_1
       (if (<= a -6.4e-144)
         t
         (if (<= a -9.6e-283)
           (/ (- (* y t)) z)
           (if (<= a 3.7e-302)
             t
             (if (<= a 5.4e-159)
               (/ y (/ z x))
               (if (<= a 1.55e-53) t (if (<= a 2e+123) t_1 x))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double tmp;
	if (a <= -2.26e+105) {
		tmp = x;
	} else if (a <= -8e+16) {
		tmp = t_1;
	} else if (a <= -6.4e-144) {
		tmp = t;
	} else if (a <= -9.6e-283) {
		tmp = -(y * t) / z;
	} else if (a <= 3.7e-302) {
		tmp = t;
	} else if (a <= 5.4e-159) {
		tmp = y / (z / x);
	} else if (a <= 1.55e-53) {
		tmp = t;
	} else if (a <= 2e+123) {
		tmp = t_1;
	} else {
		tmp = 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) :: t_1
    real(8) :: tmp
    t_1 = y * ((t - x) / a)
    if (a <= (-2.26d+105)) then
        tmp = x
    else if (a <= (-8d+16)) then
        tmp = t_1
    else if (a <= (-6.4d-144)) then
        tmp = t
    else if (a <= (-9.6d-283)) then
        tmp = -(y * t) / z
    else if (a <= 3.7d-302) then
        tmp = t
    else if (a <= 5.4d-159) then
        tmp = y / (z / x)
    else if (a <= 1.55d-53) then
        tmp = t
    else if (a <= 2d+123) then
        tmp = t_1
    else
        tmp = x
    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);
	double tmp;
	if (a <= -2.26e+105) {
		tmp = x;
	} else if (a <= -8e+16) {
		tmp = t_1;
	} else if (a <= -6.4e-144) {
		tmp = t;
	} else if (a <= -9.6e-283) {
		tmp = -(y * t) / z;
	} else if (a <= 3.7e-302) {
		tmp = t;
	} else if (a <= 5.4e-159) {
		tmp = y / (z / x);
	} else if (a <= 1.55e-53) {
		tmp = t;
	} else if (a <= 2e+123) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / a)
	tmp = 0
	if a <= -2.26e+105:
		tmp = x
	elif a <= -8e+16:
		tmp = t_1
	elif a <= -6.4e-144:
		tmp = t
	elif a <= -9.6e-283:
		tmp = -(y * t) / z
	elif a <= 3.7e-302:
		tmp = t
	elif a <= 5.4e-159:
		tmp = y / (z / x)
	elif a <= 1.55e-53:
		tmp = t
	elif a <= 2e+123:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / a))
	tmp = 0.0
	if (a <= -2.26e+105)
		tmp = x;
	elseif (a <= -8e+16)
		tmp = t_1;
	elseif (a <= -6.4e-144)
		tmp = t;
	elseif (a <= -9.6e-283)
		tmp = Float64(Float64(-Float64(y * t)) / z);
	elseif (a <= 3.7e-302)
		tmp = t;
	elseif (a <= 5.4e-159)
		tmp = Float64(y / Float64(z / x));
	elseif (a <= 1.55e-53)
		tmp = t;
	elseif (a <= 2e+123)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / a);
	tmp = 0.0;
	if (a <= -2.26e+105)
		tmp = x;
	elseif (a <= -8e+16)
		tmp = t_1;
	elseif (a <= -6.4e-144)
		tmp = t;
	elseif (a <= -9.6e-283)
		tmp = -(y * t) / z;
	elseif (a <= 3.7e-302)
		tmp = t;
	elseif (a <= 5.4e-159)
		tmp = y / (z / x);
	elseif (a <= 1.55e-53)
		tmp = t;
	elseif (a <= 2e+123)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.26e+105], x, If[LessEqual[a, -8e+16], t$95$1, If[LessEqual[a, -6.4e-144], t, If[LessEqual[a, -9.6e-283], N[((-N[(y * t), $MachinePrecision]) / z), $MachinePrecision], If[LessEqual[a, 3.7e-302], t, If[LessEqual[a, 5.4e-159], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e-53], t, If[LessEqual[a, 2e+123], t$95$1, x]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -2.26 \cdot 10^{+105}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -8 \cdot 10^{+16}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -6.4 \cdot 10^{-144}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 3.7 \cdot 10^{-302}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.55 \cdot 10^{-53}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 2 \cdot 10^{+123}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.2600000000000001e105 or 1.99999999999999996e123 < a

    1. Initial program 91.9%

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

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

    if -2.2600000000000001e105 < a < -8e16 or 1.55000000000000008e-53 < a < 1.99999999999999996e123

    1. Initial program 87.3%

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a}} \cdot y \]
      2. *-commutative52.1%

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

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

    if -8e16 < a < -6.39999999999999946e-144 or -9.5999999999999999e-283 < a < 3.7e-302 or 5.4000000000000001e-159 < a < 1.55000000000000008e-53

    1. Initial program 63.2%

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

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

    if -6.39999999999999946e-144 < a < -9.5999999999999999e-283

    1. Initial program 75.9%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative72.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot y\right) \cdot t}}{z} \]
      2. neg-mul-140.8%

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

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

    if 3.7e-302 < a < 5.4000000000000001e-159

    1. Initial program 73.0%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative72.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    10. Simplified45.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.26 \cdot 10^{+105}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8 \cdot 10^{+16}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-144}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-283}:\\ \;\;\;\;\frac{-y \cdot t}{z}\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-302}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-159}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-53}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2 \cdot 10^{+123}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 37.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a}\\ \mathbf{if}\;a \leq -1.62 \cdot 10^{+105}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6 \cdot 10^{+16}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-144}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-282}:\\ \;\;\;\;\frac{-y \cdot t}{z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-299}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-137}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1.72 \cdot 10^{-53}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+122}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) a))))
   (if (<= a -1.62e+105)
     x
     (if (<= a -6e+16)
       t_1
       (if (<= a -6.8e-144)
         t
         (if (<= a -1e-282)
           (/ (- (* y t)) z)
           (if (<= a 8.2e-299)
             t
             (if (<= a 1.9e-137)
               (* (- y a) (/ x z))
               (if (<= a 1.72e-53) t (if (<= a 2.8e+122) t_1 x))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double tmp;
	if (a <= -1.62e+105) {
		tmp = x;
	} else if (a <= -6e+16) {
		tmp = t_1;
	} else if (a <= -6.8e-144) {
		tmp = t;
	} else if (a <= -1e-282) {
		tmp = -(y * t) / z;
	} else if (a <= 8.2e-299) {
		tmp = t;
	} else if (a <= 1.9e-137) {
		tmp = (y - a) * (x / z);
	} else if (a <= 1.72e-53) {
		tmp = t;
	} else if (a <= 2.8e+122) {
		tmp = t_1;
	} else {
		tmp = 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) :: t_1
    real(8) :: tmp
    t_1 = y * ((t - x) / a)
    if (a <= (-1.62d+105)) then
        tmp = x
    else if (a <= (-6d+16)) then
        tmp = t_1
    else if (a <= (-6.8d-144)) then
        tmp = t
    else if (a <= (-1d-282)) then
        tmp = -(y * t) / z
    else if (a <= 8.2d-299) then
        tmp = t
    else if (a <= 1.9d-137) then
        tmp = (y - a) * (x / z)
    else if (a <= 1.72d-53) then
        tmp = t
    else if (a <= 2.8d+122) then
        tmp = t_1
    else
        tmp = x
    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);
	double tmp;
	if (a <= -1.62e+105) {
		tmp = x;
	} else if (a <= -6e+16) {
		tmp = t_1;
	} else if (a <= -6.8e-144) {
		tmp = t;
	} else if (a <= -1e-282) {
		tmp = -(y * t) / z;
	} else if (a <= 8.2e-299) {
		tmp = t;
	} else if (a <= 1.9e-137) {
		tmp = (y - a) * (x / z);
	} else if (a <= 1.72e-53) {
		tmp = t;
	} else if (a <= 2.8e+122) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / a)
	tmp = 0
	if a <= -1.62e+105:
		tmp = x
	elif a <= -6e+16:
		tmp = t_1
	elif a <= -6.8e-144:
		tmp = t
	elif a <= -1e-282:
		tmp = -(y * t) / z
	elif a <= 8.2e-299:
		tmp = t
	elif a <= 1.9e-137:
		tmp = (y - a) * (x / z)
	elif a <= 1.72e-53:
		tmp = t
	elif a <= 2.8e+122:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / a))
	tmp = 0.0
	if (a <= -1.62e+105)
		tmp = x;
	elseif (a <= -6e+16)
		tmp = t_1;
	elseif (a <= -6.8e-144)
		tmp = t;
	elseif (a <= -1e-282)
		tmp = Float64(Float64(-Float64(y * t)) / z);
	elseif (a <= 8.2e-299)
		tmp = t;
	elseif (a <= 1.9e-137)
		tmp = Float64(Float64(y - a) * Float64(x / z));
	elseif (a <= 1.72e-53)
		tmp = t;
	elseif (a <= 2.8e+122)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / a);
	tmp = 0.0;
	if (a <= -1.62e+105)
		tmp = x;
	elseif (a <= -6e+16)
		tmp = t_1;
	elseif (a <= -6.8e-144)
		tmp = t;
	elseif (a <= -1e-282)
		tmp = -(y * t) / z;
	elseif (a <= 8.2e-299)
		tmp = t;
	elseif (a <= 1.9e-137)
		tmp = (y - a) * (x / z);
	elseif (a <= 1.72e-53)
		tmp = t;
	elseif (a <= 2.8e+122)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.62e+105], x, If[LessEqual[a, -6e+16], t$95$1, If[LessEqual[a, -6.8e-144], t, If[LessEqual[a, -1e-282], N[((-N[(y * t), $MachinePrecision]) / z), $MachinePrecision], If[LessEqual[a, 8.2e-299], t, If[LessEqual[a, 1.9e-137], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.72e-53], t, If[LessEqual[a, 2.8e+122], t$95$1, x]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -1.62 \cdot 10^{+105}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -6 \cdot 10^{+16}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -6.8 \cdot 10^{-144}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 8.2 \cdot 10^{-299}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.72 \cdot 10^{-53}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 2.8 \cdot 10^{+122}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.6200000000000001e105 or 2.8e122 < a

    1. Initial program 91.9%

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

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

    if -1.6200000000000001e105 < a < -6e16 or 1.72e-53 < a < 2.8e122

    1. Initial program 87.3%

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a}} \cdot y \]
      2. *-commutative52.1%

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

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

    if -6e16 < a < -6.80000000000000035e-144 or -1e-282 < a < 8.2000000000000002e-299 or 1.89999999999999999e-137 < a < 1.72e-53

    1. Initial program 61.0%

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

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

    if -6.80000000000000035e-144 < a < -1e-282

    1. Initial program 75.9%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative72.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot y\right) \cdot t}}{z} \]
      2. neg-mul-140.8%

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

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

    if 8.2000000000000002e-299 < a < 1.89999999999999999e-137

    1. Initial program 74.4%

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

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

        \[\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} \]
      2. associate--l+82.7%

        \[\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)} \]
      3. associate-*r/82.7%

        \[\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) \]
      4. associate-*r/82.7%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.62 \cdot 10^{+105}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6 \cdot 10^{+16}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-144}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-282}:\\ \;\;\;\;\frac{-y \cdot t}{z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-299}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-137}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1.72 \cdot 10^{-53}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+122}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 44.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{\frac{a}{t - x}}\\ t_2 := x - \frac{z \cdot t}{a}\\ \mathbf{if}\;a \leq -2.6 \cdot 10^{+104}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -4 \cdot 10^{+17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -5 \cdot 10^{+15}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.8 \cdot 10^{-144}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-150}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-51}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+114}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ y (/ a (- t x)))) (t_2 (- x (/ (* z t) a))))
   (if (<= a -2.6e+104)
     t_2
     (if (<= a -4e+17)
       t_1
       (if (<= a -5e+15)
         x
         (if (<= a -8.8e-144)
           t
           (if (<= a 2.9e-150)
             (/ (* y (- x t)) z)
             (if (<= a 1.05e-51) t (if (<= a 3.1e+114) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a / (t - x));
	double t_2 = x - ((z * t) / a);
	double tmp;
	if (a <= -2.6e+104) {
		tmp = t_2;
	} else if (a <= -4e+17) {
		tmp = t_1;
	} else if (a <= -5e+15) {
		tmp = x;
	} else if (a <= -8.8e-144) {
		tmp = t;
	} else if (a <= 2.9e-150) {
		tmp = (y * (x - t)) / z;
	} else if (a <= 1.05e-51) {
		tmp = t;
	} else if (a <= 3.1e+114) {
		tmp = t_1;
	} 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 / (a / (t - x))
    t_2 = x - ((z * t) / a)
    if (a <= (-2.6d+104)) then
        tmp = t_2
    else if (a <= (-4d+17)) then
        tmp = t_1
    else if (a <= (-5d+15)) then
        tmp = x
    else if (a <= (-8.8d-144)) then
        tmp = t
    else if (a <= 2.9d-150) then
        tmp = (y * (x - t)) / z
    else if (a <= 1.05d-51) then
        tmp = t
    else if (a <= 3.1d+114) then
        tmp = t_1
    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 / (a / (t - x));
	double t_2 = x - ((z * t) / a);
	double tmp;
	if (a <= -2.6e+104) {
		tmp = t_2;
	} else if (a <= -4e+17) {
		tmp = t_1;
	} else if (a <= -5e+15) {
		tmp = x;
	} else if (a <= -8.8e-144) {
		tmp = t;
	} else if (a <= 2.9e-150) {
		tmp = (y * (x - t)) / z;
	} else if (a <= 1.05e-51) {
		tmp = t;
	} else if (a <= 3.1e+114) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y / (a / (t - x))
	t_2 = x - ((z * t) / a)
	tmp = 0
	if a <= -2.6e+104:
		tmp = t_2
	elif a <= -4e+17:
		tmp = t_1
	elif a <= -5e+15:
		tmp = x
	elif a <= -8.8e-144:
		tmp = t
	elif a <= 2.9e-150:
		tmp = (y * (x - t)) / z
	elif a <= 1.05e-51:
		tmp = t
	elif a <= 3.1e+114:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y / Float64(a / Float64(t - x)))
	t_2 = Float64(x - Float64(Float64(z * t) / a))
	tmp = 0.0
	if (a <= -2.6e+104)
		tmp = t_2;
	elseif (a <= -4e+17)
		tmp = t_1;
	elseif (a <= -5e+15)
		tmp = x;
	elseif (a <= -8.8e-144)
		tmp = t;
	elseif (a <= 2.9e-150)
		tmp = Float64(Float64(y * Float64(x - t)) / z);
	elseif (a <= 1.05e-51)
		tmp = t;
	elseif (a <= 3.1e+114)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y / (a / (t - x));
	t_2 = x - ((z * t) / a);
	tmp = 0.0;
	if (a <= -2.6e+104)
		tmp = t_2;
	elseif (a <= -4e+17)
		tmp = t_1;
	elseif (a <= -5e+15)
		tmp = x;
	elseif (a <= -8.8e-144)
		tmp = t;
	elseif (a <= 2.9e-150)
		tmp = (y * (x - t)) / z;
	elseif (a <= 1.05e-51)
		tmp = t;
	elseif (a <= 3.1e+114)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.6e+104], t$95$2, If[LessEqual[a, -4e+17], t$95$1, If[LessEqual[a, -5e+15], x, If[LessEqual[a, -8.8e-144], t, If[LessEqual[a, 2.9e-150], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.05e-51], t, If[LessEqual[a, 3.1e+114], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4 \cdot 10^{+17}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -5 \cdot 10^{+15}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -8.8 \cdot 10^{-144}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-51}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 3.1 \cdot 10^{+114}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.6e104 or 3.1e114 < a

    1. Initial program 92.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-\frac{\left(t - x\right) \cdot z}{a}\right)} \]
      4. unsub-neg60.9%

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

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

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

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

    if -2.6e104 < a < -4e17 or 1.05000000000000001e-51 < a < 3.1e114

    1. Initial program 85.8%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative59.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    7. Simplified52.1%

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

    if -4e17 < a < -5e15

    1. Initial program 100.0%

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

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

    if -5e15 < a < -8.80000000000000025e-144 or 2.8999999999999998e-150 < a < 1.05000000000000001e-51

    1. Initial program 58.5%

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

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

    if -8.80000000000000025e-144 < a < 2.8999999999999998e-150

    1. Initial program 75.6%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative69.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{+104}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;a \leq -4 \cdot 10^{+17}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{+15}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.8 \cdot 10^{-144}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{-150}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-51}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+114}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \end{array} \]

Alternative 12: 35.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+16}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-144}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -8.8 \cdot 10^{-283}:\\ \;\;\;\;\frac{-y}{\frac{z}{t}}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-310}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-160}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-34}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{+119}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.5e+16)
   x
   (if (<= a -6.4e-144)
     t
     (if (<= a -8.8e-283)
       (/ (- y) (/ z t))
       (if (<= a -5e-310)
         t
         (if (<= a 2.4e-160)
           (/ y (/ z x))
           (if (<= a 2.2e-34) t (if (<= a 6.1e+119) (/ (* y t) a) x))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.5e+16) {
		tmp = x;
	} else if (a <= -6.4e-144) {
		tmp = t;
	} else if (a <= -8.8e-283) {
		tmp = -y / (z / t);
	} else if (a <= -5e-310) {
		tmp = t;
	} else if (a <= 2.4e-160) {
		tmp = y / (z / x);
	} else if (a <= 2.2e-34) {
		tmp = t;
	} else if (a <= 6.1e+119) {
		tmp = (y * t) / a;
	} else {
		tmp = 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 (a <= (-2.5d+16)) then
        tmp = x
    else if (a <= (-6.4d-144)) then
        tmp = t
    else if (a <= (-8.8d-283)) then
        tmp = -y / (z / t)
    else if (a <= (-5d-310)) then
        tmp = t
    else if (a <= 2.4d-160) then
        tmp = y / (z / x)
    else if (a <= 2.2d-34) then
        tmp = t
    else if (a <= 6.1d+119) then
        tmp = (y * t) / a
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.5e+16) {
		tmp = x;
	} else if (a <= -6.4e-144) {
		tmp = t;
	} else if (a <= -8.8e-283) {
		tmp = -y / (z / t);
	} else if (a <= -5e-310) {
		tmp = t;
	} else if (a <= 2.4e-160) {
		tmp = y / (z / x);
	} else if (a <= 2.2e-34) {
		tmp = t;
	} else if (a <= 6.1e+119) {
		tmp = (y * t) / a;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.5e+16:
		tmp = x
	elif a <= -6.4e-144:
		tmp = t
	elif a <= -8.8e-283:
		tmp = -y / (z / t)
	elif a <= -5e-310:
		tmp = t
	elif a <= 2.4e-160:
		tmp = y / (z / x)
	elif a <= 2.2e-34:
		tmp = t
	elif a <= 6.1e+119:
		tmp = (y * t) / a
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.5e+16)
		tmp = x;
	elseif (a <= -6.4e-144)
		tmp = t;
	elseif (a <= -8.8e-283)
		tmp = Float64(Float64(-y) / Float64(z / t));
	elseif (a <= -5e-310)
		tmp = t;
	elseif (a <= 2.4e-160)
		tmp = Float64(y / Float64(z / x));
	elseif (a <= 2.2e-34)
		tmp = t;
	elseif (a <= 6.1e+119)
		tmp = Float64(Float64(y * t) / a);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.5e+16)
		tmp = x;
	elseif (a <= -6.4e-144)
		tmp = t;
	elseif (a <= -8.8e-283)
		tmp = -y / (z / t);
	elseif (a <= -5e-310)
		tmp = t;
	elseif (a <= 2.4e-160)
		tmp = y / (z / x);
	elseif (a <= 2.2e-34)
		tmp = t;
	elseif (a <= 6.1e+119)
		tmp = (y * t) / a;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e+16], x, If[LessEqual[a, -6.4e-144], t, If[LessEqual[a, -8.8e-283], N[((-y) / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5e-310], t, If[LessEqual[a, 2.4e-160], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.2e-34], t, If[LessEqual[a, 6.1e+119], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], x]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+16}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -6.4 \cdot 10^{-144}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 2.2 \cdot 10^{-34}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 6.1 \cdot 10^{+119}:\\
\;\;\;\;\frac{y \cdot t}{a}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.5e16 or 6.1e119 < a

    1. Initial program 91.7%

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

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

    if -2.5e16 < a < -6.39999999999999946e-144 or -8.7999999999999992e-283 < a < -4.999999999999985e-310 or 2.39999999999999991e-160 < a < 2.1999999999999999e-34

    1. Initial program 64.2%

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

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

    if -6.39999999999999946e-144 < a < -8.7999999999999992e-283

    1. Initial program 75.9%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative72.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg40.8%

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{t}}} \]
    10. Simplified37.1%

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

    if -4.999999999999985e-310 < a < 2.39999999999999991e-160

    1. Initial program 73.0%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative72.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    10. Simplified45.3%

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

    if 2.1999999999999999e-34 < a < 6.1e119

    1. Initial program 83.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot t}{a}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification47.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+16}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-144}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -8.8 \cdot 10^{-283}:\\ \;\;\;\;\frac{-y}{\frac{z}{t}}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-310}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-160}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-34}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{+119}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 35.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-143}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-283}:\\ \;\;\;\;\frac{-y \cdot t}{z}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-306}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-162}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-35}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+119}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.2e+14)
   x
   (if (<= a -1.2e-143)
     t
     (if (<= a -5.2e-283)
       (/ (- (* y t)) z)
       (if (<= a 8e-306)
         t
         (if (<= a 9.5e-162)
           (/ y (/ z x))
           (if (<= a 1.1e-35) t (if (<= a 5.8e+119) (/ (* y t) a) x))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.2e+14) {
		tmp = x;
	} else if (a <= -1.2e-143) {
		tmp = t;
	} else if (a <= -5.2e-283) {
		tmp = -(y * t) / z;
	} else if (a <= 8e-306) {
		tmp = t;
	} else if (a <= 9.5e-162) {
		tmp = y / (z / x);
	} else if (a <= 1.1e-35) {
		tmp = t;
	} else if (a <= 5.8e+119) {
		tmp = (y * t) / a;
	} else {
		tmp = 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 (a <= (-1.2d+14)) then
        tmp = x
    else if (a <= (-1.2d-143)) then
        tmp = t
    else if (a <= (-5.2d-283)) then
        tmp = -(y * t) / z
    else if (a <= 8d-306) then
        tmp = t
    else if (a <= 9.5d-162) then
        tmp = y / (z / x)
    else if (a <= 1.1d-35) then
        tmp = t
    else if (a <= 5.8d+119) then
        tmp = (y * t) / a
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.2e+14) {
		tmp = x;
	} else if (a <= -1.2e-143) {
		tmp = t;
	} else if (a <= -5.2e-283) {
		tmp = -(y * t) / z;
	} else if (a <= 8e-306) {
		tmp = t;
	} else if (a <= 9.5e-162) {
		tmp = y / (z / x);
	} else if (a <= 1.1e-35) {
		tmp = t;
	} else if (a <= 5.8e+119) {
		tmp = (y * t) / a;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.2e+14:
		tmp = x
	elif a <= -1.2e-143:
		tmp = t
	elif a <= -5.2e-283:
		tmp = -(y * t) / z
	elif a <= 8e-306:
		tmp = t
	elif a <= 9.5e-162:
		tmp = y / (z / x)
	elif a <= 1.1e-35:
		tmp = t
	elif a <= 5.8e+119:
		tmp = (y * t) / a
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.2e+14)
		tmp = x;
	elseif (a <= -1.2e-143)
		tmp = t;
	elseif (a <= -5.2e-283)
		tmp = Float64(Float64(-Float64(y * t)) / z);
	elseif (a <= 8e-306)
		tmp = t;
	elseif (a <= 9.5e-162)
		tmp = Float64(y / Float64(z / x));
	elseif (a <= 1.1e-35)
		tmp = t;
	elseif (a <= 5.8e+119)
		tmp = Float64(Float64(y * t) / a);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.2e+14)
		tmp = x;
	elseif (a <= -1.2e-143)
		tmp = t;
	elseif (a <= -5.2e-283)
		tmp = -(y * t) / z;
	elseif (a <= 8e-306)
		tmp = t;
	elseif (a <= 9.5e-162)
		tmp = y / (z / x);
	elseif (a <= 1.1e-35)
		tmp = t;
	elseif (a <= 5.8e+119)
		tmp = (y * t) / a;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.2e+14], x, If[LessEqual[a, -1.2e-143], t, If[LessEqual[a, -5.2e-283], N[((-N[(y * t), $MachinePrecision]) / z), $MachinePrecision], If[LessEqual[a, 8e-306], t, If[LessEqual[a, 9.5e-162], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e-35], t, If[LessEqual[a, 5.8e+119], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], x]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{+14}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-143}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 8 \cdot 10^{-306}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.1 \cdot 10^{-35}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 5.8 \cdot 10^{+119}:\\
\;\;\;\;\frac{y \cdot t}{a}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.2e14 or 5.80000000000000014e119 < a

    1. Initial program 91.7%

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

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

    if -1.2e14 < a < -1.1999999999999999e-143 or -5.2000000000000002e-283 < a < 8.00000000000000022e-306 or 9.5000000000000004e-162 < a < 1.09999999999999997e-35

    1. Initial program 64.2%

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

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

    if -1.1999999999999999e-143 < a < -5.2000000000000002e-283

    1. Initial program 75.9%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative72.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot y\right) \cdot t}}{z} \]
      2. neg-mul-140.8%

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

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

    if 8.00000000000000022e-306 < a < 9.5000000000000004e-162

    1. Initial program 73.0%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative72.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    10. Simplified45.3%

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

    if 1.09999999999999997e-35 < a < 5.80000000000000014e119

    1. Initial program 83.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-143}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-283}:\\ \;\;\;\;\frac{-y \cdot t}{z}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-306}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-162}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-35}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+119}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 43.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{z \cdot t}{a}\\ t_2 := \left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{if}\;z \leq -2.1 \cdot 10^{+107}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.35 \cdot 10^{+16}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-42}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-51}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-69}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+73}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ (* z t) a))) (t_2 (* (- y a) (/ x z))))
   (if (<= z -2.1e+107)
     t
     (if (<= z -3.35e+16)
       t_2
       (if (<= z -5.8e-42)
         t_1
         (if (<= z -9.2e-51)
           t_2
           (if (<= z 5.2e-69)
             (/ y (/ a (- t x)))
             (if (<= z 2.35e+73) t_1 t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((z * t) / a);
	double t_2 = (y - a) * (x / z);
	double tmp;
	if (z <= -2.1e+107) {
		tmp = t;
	} else if (z <= -3.35e+16) {
		tmp = t_2;
	} else if (z <= -5.8e-42) {
		tmp = t_1;
	} else if (z <= -9.2e-51) {
		tmp = t_2;
	} else if (z <= 5.2e-69) {
		tmp = y / (a / (t - x));
	} else if (z <= 2.35e+73) {
		tmp = t_1;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x - ((z * t) / a)
    t_2 = (y - a) * (x / z)
    if (z <= (-2.1d+107)) then
        tmp = t
    else if (z <= (-3.35d+16)) then
        tmp = t_2
    else if (z <= (-5.8d-42)) then
        tmp = t_1
    else if (z <= (-9.2d-51)) then
        tmp = t_2
    else if (z <= 5.2d-69) then
        tmp = y / (a / (t - x))
    else if (z <= 2.35d+73) then
        tmp = t_1
    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 = x - ((z * t) / a);
	double t_2 = (y - a) * (x / z);
	double tmp;
	if (z <= -2.1e+107) {
		tmp = t;
	} else if (z <= -3.35e+16) {
		tmp = t_2;
	} else if (z <= -5.8e-42) {
		tmp = t_1;
	} else if (z <= -9.2e-51) {
		tmp = t_2;
	} else if (z <= 5.2e-69) {
		tmp = y / (a / (t - x));
	} else if (z <= 2.35e+73) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - ((z * t) / a)
	t_2 = (y - a) * (x / z)
	tmp = 0
	if z <= -2.1e+107:
		tmp = t
	elif z <= -3.35e+16:
		tmp = t_2
	elif z <= -5.8e-42:
		tmp = t_1
	elif z <= -9.2e-51:
		tmp = t_2
	elif z <= 5.2e-69:
		tmp = y / (a / (t - x))
	elif z <= 2.35e+73:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(z * t) / a))
	t_2 = Float64(Float64(y - a) * Float64(x / z))
	tmp = 0.0
	if (z <= -2.1e+107)
		tmp = t;
	elseif (z <= -3.35e+16)
		tmp = t_2;
	elseif (z <= -5.8e-42)
		tmp = t_1;
	elseif (z <= -9.2e-51)
		tmp = t_2;
	elseif (z <= 5.2e-69)
		tmp = Float64(y / Float64(a / Float64(t - x)));
	elseif (z <= 2.35e+73)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - ((z * t) / a);
	t_2 = (y - a) * (x / z);
	tmp = 0.0;
	if (z <= -2.1e+107)
		tmp = t;
	elseif (z <= -3.35e+16)
		tmp = t_2;
	elseif (z <= -5.8e-42)
		tmp = t_1;
	elseif (z <= -9.2e-51)
		tmp = t_2;
	elseif (z <= 5.2e-69)
		tmp = y / (a / (t - x));
	elseif (z <= 2.35e+73)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+107], t, If[LessEqual[z, -3.35e+16], t$95$2, If[LessEqual[z, -5.8e-42], t$95$1, If[LessEqual[z, -9.2e-51], t$95$2, If[LessEqual[z, 5.2e-69], N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.35e+73], t$95$1, t]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -3.35 \cdot 10^{+16}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -5.8 \cdot 10^{-42}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -9.2 \cdot 10^{-51}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 2.35 \cdot 10^{+73}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.1e107 or 2.3500000000000001e73 < z

    1. Initial program 62.6%

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

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

    if -2.1e107 < z < -3.35e16 or -5.8000000000000006e-42 < z < -9.20000000000000007e-51

    1. Initial program 67.6%

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

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

        \[\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} \]
      2. associate--l+62.9%

        \[\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)} \]
      3. associate-*r/62.9%

        \[\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) \]
      4. associate-*r/62.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.35e16 < z < -5.8000000000000006e-42 or 5.2000000000000004e-69 < z < 2.3500000000000001e73

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

    if -9.20000000000000007e-51 < z < 5.2000000000000004e-69

    1. Initial program 92.2%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative61.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    7. Simplified51.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+107}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.35 \cdot 10^{+16}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{-42}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-51}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-69}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+73}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 15: 43.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{z \cdot t}{a}\\ \mathbf{if}\;z \leq -9.6 \cdot 10^{+111}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{+15}:\\ \;\;\;\;\frac{y - a}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-41}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-51}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-69}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+73}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ (* z t) a))))
   (if (<= z -9.6e+111)
     t
     (if (<= z -1.1e+15)
       (/ (- y a) (/ z x))
       (if (<= z -3.5e-41)
         t_1
         (if (<= z -4.4e-51)
           (* (- y a) (/ x z))
           (if (<= z 2.8e-69)
             (/ y (/ a (- t x)))
             (if (<= z 1.1e+73) t_1 t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((z * t) / a);
	double tmp;
	if (z <= -9.6e+111) {
		tmp = t;
	} else if (z <= -1.1e+15) {
		tmp = (y - a) / (z / x);
	} else if (z <= -3.5e-41) {
		tmp = t_1;
	} else if (z <= -4.4e-51) {
		tmp = (y - a) * (x / z);
	} else if (z <= 2.8e-69) {
		tmp = y / (a / (t - x));
	} else if (z <= 1.1e+73) {
		tmp = t_1;
	} 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 = x - ((z * t) / a)
    if (z <= (-9.6d+111)) then
        tmp = t
    else if (z <= (-1.1d+15)) then
        tmp = (y - a) / (z / x)
    else if (z <= (-3.5d-41)) then
        tmp = t_1
    else if (z <= (-4.4d-51)) then
        tmp = (y - a) * (x / z)
    else if (z <= 2.8d-69) then
        tmp = y / (a / (t - x))
    else if (z <= 1.1d+73) then
        tmp = t_1
    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 = x - ((z * t) / a);
	double tmp;
	if (z <= -9.6e+111) {
		tmp = t;
	} else if (z <= -1.1e+15) {
		tmp = (y - a) / (z / x);
	} else if (z <= -3.5e-41) {
		tmp = t_1;
	} else if (z <= -4.4e-51) {
		tmp = (y - a) * (x / z);
	} else if (z <= 2.8e-69) {
		tmp = y / (a / (t - x));
	} else if (z <= 1.1e+73) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - ((z * t) / a)
	tmp = 0
	if z <= -9.6e+111:
		tmp = t
	elif z <= -1.1e+15:
		tmp = (y - a) / (z / x)
	elif z <= -3.5e-41:
		tmp = t_1
	elif z <= -4.4e-51:
		tmp = (y - a) * (x / z)
	elif z <= 2.8e-69:
		tmp = y / (a / (t - x))
	elif z <= 1.1e+73:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(z * t) / a))
	tmp = 0.0
	if (z <= -9.6e+111)
		tmp = t;
	elseif (z <= -1.1e+15)
		tmp = Float64(Float64(y - a) / Float64(z / x));
	elseif (z <= -3.5e-41)
		tmp = t_1;
	elseif (z <= -4.4e-51)
		tmp = Float64(Float64(y - a) * Float64(x / z));
	elseif (z <= 2.8e-69)
		tmp = Float64(y / Float64(a / Float64(t - x)));
	elseif (z <= 1.1e+73)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - ((z * t) / a);
	tmp = 0.0;
	if (z <= -9.6e+111)
		tmp = t;
	elseif (z <= -1.1e+15)
		tmp = (y - a) / (z / x);
	elseif (z <= -3.5e-41)
		tmp = t_1;
	elseif (z <= -4.4e-51)
		tmp = (y - a) * (x / z);
	elseif (z <= 2.8e-69)
		tmp = y / (a / (t - x));
	elseif (z <= 1.1e+73)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.6e+111], t, If[LessEqual[z, -1.1e+15], N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.5e-41], t$95$1, If[LessEqual[z, -4.4e-51], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-69], N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+73], t$95$1, t]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.1 \cdot 10^{+15}:\\
\;\;\;\;\frac{y - a}{\frac{z}{x}}\\

\mathbf{elif}\;z \leq -3.5 \cdot 10^{-41}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+73}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -9.60000000000000023e111 or 1.1e73 < z

    1. Initial program 62.6%

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

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

    if -9.60000000000000023e111 < z < -1.1e15

    1. Initial program 73.1%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative62.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} \]
      2. associate--l+62.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)} \]
      3. associate-*r/62.3%

        \[\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) \]
      4. associate-*r/62.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - a}{\frac{z}{x}}} \]
    7. Simplified42.0%

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

    if -1.1e15 < z < -3.5e-41 or 2.79999999999999979e-69 < z < 1.1e73

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

    if -3.5e-41 < z < -4.4e-51

    1. Initial program 34.8%

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

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

        \[\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} \]
      2. associate--l+66.7%

        \[\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)} \]
      3. associate-*r/66.7%

        \[\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) \]
      4. associate-*r/66.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4e-51 < z < 2.79999999999999979e-69

    1. Initial program 92.2%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative61.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    7. Simplified51.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.6 \cdot 10^{+111}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{+15}:\\ \;\;\;\;\frac{y - a}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-41}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-51}:\\ \;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-69}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+73}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 16: 58.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 + \frac{z - y}{a}\right)\\ \mathbf{if}\;a \leq -5.6 \cdot 10^{+104}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -2 \cdot 10^{+20}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -3700000 \lor \neg \left(a \leq 1.9 \cdot 10^{+123}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (+ 1.0 (/ (- z y) a)))))
   (if (<= a -5.6e+104)
     t_1
     (if (<= a -2e+20)
       (* (- t x) (/ y (- a z)))
       (if (or (<= a -3700000.0) (not (<= a 1.9e+123)))
         t_1
         (* t (/ (- y z) (- a z))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 + ((z - y) / a));
	double tmp;
	if (a <= -5.6e+104) {
		tmp = t_1;
	} else if (a <= -2e+20) {
		tmp = (t - x) * (y / (a - z));
	} else if ((a <= -3700000.0) || !(a <= 1.9e+123)) {
		tmp = t_1;
	} else {
		tmp = t * ((y - z) / (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 = x * (1.0d0 + ((z - y) / a))
    if (a <= (-5.6d+104)) then
        tmp = t_1
    else if (a <= (-2d+20)) then
        tmp = (t - x) * (y / (a - z))
    else if ((a <= (-3700000.0d0)) .or. (.not. (a <= 1.9d+123))) then
        tmp = t_1
    else
        tmp = t * ((y - z) / (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 = x * (1.0 + ((z - y) / a));
	double tmp;
	if (a <= -5.6e+104) {
		tmp = t_1;
	} else if (a <= -2e+20) {
		tmp = (t - x) * (y / (a - z));
	} else if ((a <= -3700000.0) || !(a <= 1.9e+123)) {
		tmp = t_1;
	} else {
		tmp = t * ((y - z) / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 + ((z - y) / a))
	tmp = 0
	if a <= -5.6e+104:
		tmp = t_1
	elif a <= -2e+20:
		tmp = (t - x) * (y / (a - z))
	elif (a <= -3700000.0) or not (a <= 1.9e+123):
		tmp = t_1
	else:
		tmp = t * ((y - z) / (a - z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 + Float64(Float64(z - y) / a)))
	tmp = 0.0
	if (a <= -5.6e+104)
		tmp = t_1;
	elseif (a <= -2e+20)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	elseif ((a <= -3700000.0) || !(a <= 1.9e+123))
		tmp = t_1;
	else
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 + ((z - y) / a));
	tmp = 0.0;
	if (a <= -5.6e+104)
		tmp = t_1;
	elseif (a <= -2e+20)
		tmp = (t - x) * (y / (a - z));
	elseif ((a <= -3700000.0) || ~((a <= 1.9e+123)))
		tmp = t_1;
	else
		tmp = t * ((y - z) / (a - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 + N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.6e+104], t$95$1, If[LessEqual[a, -2e+20], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -3700000.0], N[Not[LessEqual[a, 1.9e+123]], $MachinePrecision]], t$95$1, N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -3700000 \lor \neg \left(a \leq 1.9 \cdot 10^{+123}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.6e104 or -2e20 < a < -3.7e6 or 1.89999999999999997e123 < a

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

    if -5.6e104 < a < -2e20

    1. Initial program 89.1%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative62.0%

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
    4. Simplified62.1%

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

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

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

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

    if -3.7e6 < a < 1.89999999999999997e123

    1. Initial program 71.3%

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

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

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    4. Simplified66.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+104}:\\ \;\;\;\;x \cdot \left(1 + \frac{z - y}{a}\right)\\ \mathbf{elif}\;a \leq -2 \cdot 10^{+20}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -3700000 \lor \neg \left(a \leq 1.9 \cdot 10^{+123}\right):\\ \;\;\;\;x \cdot \left(1 + \frac{z - y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 17: 36.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.6 \cdot 10^{+16}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.72 \cdot 10^{-307}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-161}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-33}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{+119}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -3.6e+16)
   x
   (if (<= a -1.72e-307)
     t
     (if (<= a 1.45e-161)
       (/ y (/ z x))
       (if (<= a 8.5e-33) t (if (<= a 6.1e+119) (/ (* y t) a) x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.6e+16) {
		tmp = x;
	} else if (a <= -1.72e-307) {
		tmp = t;
	} else if (a <= 1.45e-161) {
		tmp = y / (z / x);
	} else if (a <= 8.5e-33) {
		tmp = t;
	} else if (a <= 6.1e+119) {
		tmp = (y * t) / a;
	} else {
		tmp = 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 (a <= (-3.6d+16)) then
        tmp = x
    else if (a <= (-1.72d-307)) then
        tmp = t
    else if (a <= 1.45d-161) then
        tmp = y / (z / x)
    else if (a <= 8.5d-33) then
        tmp = t
    else if (a <= 6.1d+119) then
        tmp = (y * t) / a
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.6e+16) {
		tmp = x;
	} else if (a <= -1.72e-307) {
		tmp = t;
	} else if (a <= 1.45e-161) {
		tmp = y / (z / x);
	} else if (a <= 8.5e-33) {
		tmp = t;
	} else if (a <= 6.1e+119) {
		tmp = (y * t) / a;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -3.6e+16:
		tmp = x
	elif a <= -1.72e-307:
		tmp = t
	elif a <= 1.45e-161:
		tmp = y / (z / x)
	elif a <= 8.5e-33:
		tmp = t
	elif a <= 6.1e+119:
		tmp = (y * t) / a
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -3.6e+16)
		tmp = x;
	elseif (a <= -1.72e-307)
		tmp = t;
	elseif (a <= 1.45e-161)
		tmp = Float64(y / Float64(z / x));
	elseif (a <= 8.5e-33)
		tmp = t;
	elseif (a <= 6.1e+119)
		tmp = Float64(Float64(y * t) / a);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -3.6e+16)
		tmp = x;
	elseif (a <= -1.72e-307)
		tmp = t;
	elseif (a <= 1.45e-161)
		tmp = y / (z / x);
	elseif (a <= 8.5e-33)
		tmp = t;
	elseif (a <= 6.1e+119)
		tmp = (y * t) / a;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.6e+16], x, If[LessEqual[a, -1.72e-307], t, If[LessEqual[a, 1.45e-161], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e-33], t, If[LessEqual[a, 6.1e+119], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], x]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.6 \cdot 10^{+16}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.72 \cdot 10^{-307}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 8.5 \cdot 10^{-33}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 6.1 \cdot 10^{+119}:\\
\;\;\;\;\frac{y \cdot t}{a}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.6e16 or 6.1e119 < a

    1. Initial program 91.7%

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

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

    if -3.6e16 < a < -1.72000000000000008e-307 or 1.45e-161 < a < 8.49999999999999945e-33

    1. Initial program 67.5%

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

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

    if -1.72000000000000008e-307 < a < 1.45e-161

    1. Initial program 73.0%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative72.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    10. Simplified45.3%

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

    if 8.49999999999999945e-33 < a < 6.1e119

    1. Initial program 83.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.6 \cdot 10^{+16}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.72 \cdot 10^{-307}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-161}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{-33}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{+119}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 18: 68.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2900:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-239}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{-39}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2900.0)
   (- x (/ (- x t) (/ a y)))
   (if (<= a -1.8e-239)
     (* t (/ (- y z) (- a z)))
     (if (<= a 8.6e-39) (+ t (* y (/ (- x t) z))) (+ x (/ y (/ a (- t x))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2900.0) {
		tmp = x - ((x - t) / (a / y));
	} else if (a <= -1.8e-239) {
		tmp = t * ((y - z) / (a - z));
	} else if (a <= 8.6e-39) {
		tmp = t + (y * ((x - t) / z));
	} 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 (a <= (-2900.0d0)) then
        tmp = x - ((x - t) / (a / y))
    else if (a <= (-1.8d-239)) then
        tmp = t * ((y - z) / (a - z))
    else if (a <= 8.6d-39) then
        tmp = t + (y * ((x - t) / z))
    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 (a <= -2900.0) {
		tmp = x - ((x - t) / (a / y));
	} else if (a <= -1.8e-239) {
		tmp = t * ((y - z) / (a - z));
	} else if (a <= 8.6e-39) {
		tmp = t + (y * ((x - t) / z));
	} else {
		tmp = x + (y / (a / (t - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2900.0:
		tmp = x - ((x - t) / (a / y))
	elif a <= -1.8e-239:
		tmp = t * ((y - z) / (a - z))
	elif a <= 8.6e-39:
		tmp = t + (y * ((x - t) / z))
	else:
		tmp = x + (y / (a / (t - x)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2900.0)
		tmp = Float64(x - Float64(Float64(x - t) / Float64(a / y)));
	elseif (a <= -1.8e-239)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif (a <= 8.6e-39)
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	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 (a <= -2900.0)
		tmp = x - ((x - t) / (a / y));
	elseif (a <= -1.8e-239)
		tmp = t * ((y - z) / (a - z));
	elseif (a <= 8.6e-39)
		tmp = t + (y * ((x - t) / z));
	else
		tmp = x + (y / (a / (t - x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2900.0], N[(x - N[(N[(x - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.8e-239], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.6e-39], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2900:\\
\;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2900

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

    if -2900 < a < -1.8000000000000001e-239

    1. Initial program 64.1%

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

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

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    4. Simplified72.9%

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

    if -1.8000000000000001e-239 < a < 8.5999999999999999e-39

    1. Initial program 70.1%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative89.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} \]
      2. associate--l+89.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)} \]
      3. associate-*r/89.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) \]
      4. associate-*r/89.2%

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

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

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

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

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

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

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

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

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

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

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

    if 8.5999999999999999e-39 < a

    1. Initial program 89.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2900:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-239}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{-39}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 19: 71.6% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -51000 or 1.55000000000000005e-40 < a

    1. Initial program 90.1%

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

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

    if -51000 < a < 1.55000000000000005e-40

    1. Initial program 67.6%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative82.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} \]
      2. associate--l+82.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)} \]
      3. associate-*r/82.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) \]
      4. associate-*r/82.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -51000 \lor \neg \left(a \leq 1.55 \cdot 10^{-40}\right):\\ \;\;\;\;x + \left(z - y\right) \cdot \frac{x - t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \end{array} \]

Alternative 20: 76.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.3 \cdot 10^{+103}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+73}:\\ \;\;\;\;x - \frac{x - t}{\frac{a - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.3e+103)
   (* t (/ (- y z) (- a z)))
   (if (<= z 1.5e+73)
     (- x (/ (- x t) (/ (- a z) y)))
     (+ t (* y (/ (- x t) z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.3e+103) {
		tmp = t * ((y - z) / (a - z));
	} else if (z <= 1.5e+73) {
		tmp = x - ((x - t) / ((a - z) / y));
	} else {
		tmp = t + (y * ((x - t) / 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 <= (-6.3d+103)) then
        tmp = t * ((y - z) / (a - z))
    else if (z <= 1.5d+73) then
        tmp = x - ((x - t) / ((a - z) / y))
    else
        tmp = t + (y * ((x - t) / 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 <= -6.3e+103) {
		tmp = t * ((y - z) / (a - z));
	} else if (z <= 1.5e+73) {
		tmp = x - ((x - t) / ((a - z) / y));
	} else {
		tmp = t + (y * ((x - t) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6.3e+103:
		tmp = t * ((y - z) / (a - z))
	elif z <= 1.5e+73:
		tmp = x - ((x - t) / ((a - z) / y))
	else:
		tmp = t + (y * ((x - t) / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.3e+103)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif (z <= 1.5e+73)
		tmp = Float64(x - Float64(Float64(x - t) / Float64(Float64(a - z) / y)));
	else
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6.3e+103)
		tmp = t * ((y - z) / (a - z));
	elseif (z <= 1.5e+73)
		tmp = x - ((x - t) / ((a - z) / y));
	else
		tmp = t + (y * ((x - t) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.3e+103], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+73], N[(x - N[(N[(x - t), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.3 \cdot 10^{+103}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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

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


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

    1. Initial program 64.8%

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

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

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    4. Simplified76.0%

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

    if -6.29999999999999969e103 < z < 1.50000000000000005e73

    1. Initial program 87.6%

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

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

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

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

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

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

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

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

    if 1.50000000000000005e73 < z

    1. Initial program 59.6%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative75.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} \]
      2. associate--l+75.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)} \]
      3. associate-*r/75.5%

        \[\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) \]
      4. associate-*r/75.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.3 \cdot 10^{+103}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+73}:\\ \;\;\;\;x - \frac{x - t}{\frac{a - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \end{array} \]

Alternative 21: 72.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -0.000175:\\ \;\;\;\;x - \frac{x - t}{\frac{a - z}{y}}\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-42}:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - y\right) \cdot \frac{x - t}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -0.000175)
   (- x (/ (- x t) (/ (- a z) y)))
   (if (<= a 3.6e-42)
     (+ t (/ (* (- y a) (- x t)) z))
     (+ x (* (- z y) (/ (- x t) a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -0.000175) {
		tmp = x - ((x - t) / ((a - z) / y));
	} else if (a <= 3.6e-42) {
		tmp = t + (((y - a) * (x - t)) / z);
	} else {
		tmp = x + ((z - y) * ((x - t) / a));
	}
	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 (a <= (-0.000175d0)) then
        tmp = x - ((x - t) / ((a - z) / y))
    else if (a <= 3.6d-42) then
        tmp = t + (((y - a) * (x - t)) / z)
    else
        tmp = x + ((z - y) * ((x - t) / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -0.000175) {
		tmp = x - ((x - t) / ((a - z) / y));
	} else if (a <= 3.6e-42) {
		tmp = t + (((y - a) * (x - t)) / z);
	} else {
		tmp = x + ((z - y) * ((x - t) / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -0.000175:
		tmp = x - ((x - t) / ((a - z) / y))
	elif a <= 3.6e-42:
		tmp = t + (((y - a) * (x - t)) / z)
	else:
		tmp = x + ((z - y) * ((x - t) / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -0.000175)
		tmp = Float64(x - Float64(Float64(x - t) / Float64(Float64(a - z) / y)));
	elseif (a <= 3.6e-42)
		tmp = Float64(t + Float64(Float64(Float64(y - a) * Float64(x - t)) / z));
	else
		tmp = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -0.000175)
		tmp = x - ((x - t) / ((a - z) / y));
	elseif (a <= 3.6e-42)
		tmp = t + (((y - a) * (x - t)) / z);
	else
		tmp = x + ((z - y) * ((x - t) / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.000175], N[(x - N[(N[(x - t), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e-42], N[(t + N[(N[(N[(y - a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.000175:\\
\;\;\;\;x - \frac{x - t}{\frac{a - z}{y}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.74999999999999998e-4

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

    if -1.74999999999999998e-4 < a < 3.6000000000000002e-42

    1. Initial program 67.9%

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

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

        \[\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} \]
      2. associate--l+82.7%

        \[\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)} \]
      3. associate-*r/82.7%

        \[\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) \]
      4. associate-*r/82.7%

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

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

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

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

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

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

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

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

    if 3.6000000000000002e-42 < a

    1. Initial program 89.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.000175:\\ \;\;\;\;x - \frac{x - t}{\frac{a - z}{y}}\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-42}:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - y\right) \cdot \frac{x - t}{a}\\ \end{array} \]

Alternative 22: 58.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.8 \cdot 10^{+107} \lor \neg \left(a \leq 4.9 \cdot 10^{+123}\right):\\
\;\;\;\;x - \frac{z \cdot t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.7999999999999997e107 or 4.89999999999999976e123 < a

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

    if -7.7999999999999997e107 < a < 4.89999999999999976e123

    1. Initial program 73.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{+107} \lor \neg \left(a \leq 4.9 \cdot 10^{+123}\right):\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 23: 59.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{+172} \lor \neg \left(a \leq 2.35 \cdot 10^{+123}\right):\\
\;\;\;\;x \cdot \left(1 + \frac{z - y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.4000000000000002e172 or 2.3499999999999999e123 < a

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

    if -4.4000000000000002e172 < a < 2.3499999999999999e123

    1. Initial program 74.8%

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

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

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    4. Simplified62.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.4 \cdot 10^{+172} \lor \neg \left(a \leq 2.35 \cdot 10^{+123}\right):\\ \;\;\;\;x \cdot \left(1 + \frac{z - y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 24: 63.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4100 \lor \neg \left(a \leq 8 \cdot 10^{-39}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4100 or 7.99999999999999943e-39 < a

    1. Initial program 90.1%

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

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

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

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

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

    if -4100 < a < 7.99999999999999943e-39

    1. Initial program 67.6%

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

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

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    4. Simplified70.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4100 \lor \neg \left(a \leq 8 \cdot 10^{-39}\right):\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 25: 63.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -750:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-39}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -750.0)
   (- x (/ (- x t) (/ a y)))
   (if (<= a 1.8e-39) (* t (/ (- y z) (- a z))) (+ x (/ y (/ a (- t x)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -750.0) {
		tmp = x - ((x - t) / (a / y));
	} else if (a <= 1.8e-39) {
		tmp = t * ((y - z) / (a - z));
	} 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 (a <= (-750.0d0)) then
        tmp = x - ((x - t) / (a / y))
    else if (a <= 1.8d-39) then
        tmp = t * ((y - z) / (a - z))
    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 (a <= -750.0) {
		tmp = x - ((x - t) / (a / y));
	} else if (a <= 1.8e-39) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = x + (y / (a / (t - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -750.0:
		tmp = x - ((x - t) / (a / y))
	elif a <= 1.8e-39:
		tmp = t * ((y - z) / (a - z))
	else:
		tmp = x + (y / (a / (t - x)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -750.0)
		tmp = Float64(x - Float64(Float64(x - t) / Float64(a / y)));
	elseif (a <= 1.8e-39)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	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 (a <= -750.0)
		tmp = x - ((x - t) / (a / y));
	elseif (a <= 1.8e-39)
		tmp = t * ((y - z) / (a - z));
	else
		tmp = x + (y / (a / (t - x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -750.0], N[(x - N[(N[(x - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.8e-39], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -750:\\
\;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\

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

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


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

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

    if -750 < a < 1.8e-39

    1. Initial program 67.6%

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

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

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    4. Simplified70.9%

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

    if 1.8e-39 < a

    1. Initial program 89.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -750:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-39}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 26: 67.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6500:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-40}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -6500.0)
   (- x (/ (- x t) (/ a y)))
   (if (<= a 6.5e-40) (+ t (/ (* y (- x t)) z)) (+ x (/ y (/ a (- t x)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -6500.0) {
		tmp = x - ((x - t) / (a / y));
	} else if (a <= 6.5e-40) {
		tmp = t + ((y * (x - t)) / z);
	} 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 (a <= (-6500.0d0)) then
        tmp = x - ((x - t) / (a / y))
    else if (a <= 6.5d-40) then
        tmp = t + ((y * (x - t)) / z)
    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 (a <= -6500.0) {
		tmp = x - ((x - t) / (a / y));
	} else if (a <= 6.5e-40) {
		tmp = t + ((y * (x - t)) / z);
	} else {
		tmp = x + (y / (a / (t - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -6500.0:
		tmp = x - ((x - t) / (a / y))
	elif a <= 6.5e-40:
		tmp = t + ((y * (x - t)) / z)
	else:
		tmp = x + (y / (a / (t - x)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -6500.0)
		tmp = Float64(x - Float64(Float64(x - t) / Float64(a / y)));
	elseif (a <= 6.5e-40)
		tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z));
	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 (a <= -6500.0)
		tmp = x - ((x - t) / (a / y));
	elseif (a <= 6.5e-40)
		tmp = t + ((y * (x - t)) / z);
	else
		tmp = x + (y / (a / (t - x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6500.0], N[(x - N[(N[(x - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-40], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6500:\\
\;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\

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

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


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

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

    if -6500 < a < 6.4999999999999999e-40

    1. Initial program 67.6%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative82.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} \]
      2. associate--l+82.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)} \]
      3. associate-*r/82.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) \]
      4. associate-*r/82.2%

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

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

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

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

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

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

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

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

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

    if 6.4999999999999999e-40 < a

    1. Initial program 89.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6500:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-40}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 27: 36.7% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{+16}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-295}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-216}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+111}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -3.7e+16)
   x
   (if (<= a 1.55e-295)
     t
     (if (<= a 6.8e-216) (* t (/ y a)) (if (<= a 3.6e+111) t x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.7e+16) {
		tmp = x;
	} else if (a <= 1.55e-295) {
		tmp = t;
	} else if (a <= 6.8e-216) {
		tmp = t * (y / a);
	} else if (a <= 3.6e+111) {
		tmp = t;
	} else {
		tmp = 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 (a <= (-3.7d+16)) then
        tmp = x
    else if (a <= 1.55d-295) then
        tmp = t
    else if (a <= 6.8d-216) then
        tmp = t * (y / a)
    else if (a <= 3.6d+111) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.7e+16) {
		tmp = x;
	} else if (a <= 1.55e-295) {
		tmp = t;
	} else if (a <= 6.8e-216) {
		tmp = t * (y / a);
	} else if (a <= 3.6e+111) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -3.7e+16:
		tmp = x
	elif a <= 1.55e-295:
		tmp = t
	elif a <= 6.8e-216:
		tmp = t * (y / a)
	elif a <= 3.6e+111:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -3.7e+16)
		tmp = x;
	elseif (a <= 1.55e-295)
		tmp = t;
	elseif (a <= 6.8e-216)
		tmp = Float64(t * Float64(y / a));
	elseif (a <= 3.6e+111)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -3.7e+16)
		tmp = x;
	elseif (a <= 1.55e-295)
		tmp = t;
	elseif (a <= 6.8e-216)
		tmp = t * (y / a);
	elseif (a <= 3.6e+111)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.7e+16], x, If[LessEqual[a, 1.55e-295], t, If[LessEqual[a, 6.8e-216], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e+111], t, x]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+16}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{-295}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 3.6 \cdot 10^{+111}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.7e16 or 3.6000000000000002e111 < a

    1. Initial program 92.0%

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

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

    if -3.7e16 < a < 1.5500000000000001e-295 or 6.7999999999999995e-216 < a < 3.6000000000000002e111

    1. Initial program 71.0%

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

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

    if 1.5500000000000001e-295 < a < 6.7999999999999995e-216

    1. Initial program 68.1%

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a}} \]
    5. Simplified54.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{+16}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-295}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-216}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+111}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 28: 37.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-302}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-161}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+113}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -3.8e+14)
   x
   (if (<= a 6.5e-302)
     t
     (if (<= a 1.55e-161) (/ y (/ z x)) (if (<= a 4e+113) t x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.8e+14) {
		tmp = x;
	} else if (a <= 6.5e-302) {
		tmp = t;
	} else if (a <= 1.55e-161) {
		tmp = y / (z / x);
	} else if (a <= 4e+113) {
		tmp = t;
	} else {
		tmp = 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 (a <= (-3.8d+14)) then
        tmp = x
    else if (a <= 6.5d-302) then
        tmp = t
    else if (a <= 1.55d-161) then
        tmp = y / (z / x)
    else if (a <= 4d+113) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.8e+14) {
		tmp = x;
	} else if (a <= 6.5e-302) {
		tmp = t;
	} else if (a <= 1.55e-161) {
		tmp = y / (z / x);
	} else if (a <= 4e+113) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -3.8e+14:
		tmp = x
	elif a <= 6.5e-302:
		tmp = t
	elif a <= 1.55e-161:
		tmp = y / (z / x)
	elif a <= 4e+113:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -3.8e+14)
		tmp = x;
	elseif (a <= 6.5e-302)
		tmp = t;
	elseif (a <= 1.55e-161)
		tmp = Float64(y / Float64(z / x));
	elseif (a <= 4e+113)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -3.8e+14)
		tmp = x;
	elseif (a <= 6.5e-302)
		tmp = t;
	elseif (a <= 1.55e-161)
		tmp = y / (z / x);
	elseif (a <= 4e+113)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.8e+14], x, If[LessEqual[a, 6.5e-302], t, If[LessEqual[a, 1.55e-161], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e+113], t, x]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{+14}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 6.5 \cdot 10^{-302}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 4 \cdot 10^{+113}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.8e14 or 4e113 < a

    1. Initial program 92.0%

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

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

    if -3.8e14 < a < 6.4999999999999995e-302 or 1.5499999999999999e-161 < a < 4e113

    1. Initial program 70.3%

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

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

    if 6.4999999999999995e-302 < a < 1.5499999999999999e-161

    1. Initial program 73.0%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative72.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    10. Simplified45.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-302}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-161}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+113}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 29: 38.4% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -50000000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+111}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -50000000000000.0) x (if (<= a 3.6e+111) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -50000000000000.0) {
		tmp = x;
	} else if (a <= 3.6e+111) {
		tmp = t;
	} else {
		tmp = 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 (a <= (-50000000000000.0d0)) then
        tmp = x
    else if (a <= 3.6d+111) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -50000000000000.0) {
		tmp = x;
	} else if (a <= 3.6e+111) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -50000000000000.0:
		tmp = x
	elif a <= 3.6e+111:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -50000000000000.0)
		tmp = x;
	elseif (a <= 3.6e+111)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -50000000000000.0)
		tmp = x;
	elseif (a <= 3.6e+111)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -50000000000000.0], x, If[LessEqual[a, 3.6e+111], t, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -50000000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.6 \cdot 10^{+111}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5e13 or 3.6000000000000002e111 < a

    1. Initial program 92.0%

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

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

    if -5e13 < a < 3.6000000000000002e111

    1. Initial program 70.7%

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -50000000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{+111}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 30: 25.4% 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 79.1%

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

    \[\leadsto \color{blue}{t} \]
  3. Final simplification25.7%

    \[\leadsto t \]

Reproduce

?
herbie shell --seed 2023196 
(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)))))