Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.2% → 92.7%
Time: 16.6s
Alternatives: 20
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 20 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.2% 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: 92.7% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-263}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-285}:\\
\;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\

\mathbf{elif}\;t_2 \leq 10^{+305}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -inf.0 or 9.9999999999999994e304 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 74.4%

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

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

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

    if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4e-263

    1. Initial program 92.4%

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

    if -4e-263 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.00000000000000018e-285

    1. Initial program 3.3%

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

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

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

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

        \[\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) \]
      4. div-sub74.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}} \]
      5. distribute-lft-out--74.6%

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

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

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

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

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

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

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

    if 5.00000000000000018e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.9999999999999994e304

    1. Initial program 97.5%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)} \]
  3. Recombined 4 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 -\infty:\\ \;\;\;\;x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z}\\ \mathbf{elif}\;x + \left(z - y\right) \cdot \frac{x - t}{a - z} \leq -4 \cdot 10^{-263}:\\ \;\;\;\;x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\ \mathbf{elif}\;x + \left(z - y\right) \cdot \frac{x - t}{a - z} \leq 5 \cdot 10^{-285}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\ \mathbf{elif}\;x + \left(z - y\right) \cdot \frac{x - t}{a - z} \leq 10^{+305}:\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z}\\ \end{array} \]

Alternative 2: 94.4% accurate, 0.1× 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 -4 \cdot 10^{-263} \lor \neg \left(t_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{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 -4e-263) (not (<= t_1 0.0)))
     (fma (/ (- y z) (- a z)) (- t x) x)
     (- t (/ (- t x) (/ z (- 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 <= -4e-263) || !(t_1 <= 0.0)) {
		tmp = fma(((y - z) / (a - z)), (t - x), x);
	} else {
		tmp = t - ((t - x) / (z / (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 <= -4e-263) || !(t_1 <= 0.0))
		tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x);
	else
		tmp = Float64(t - Float64(Float64(t - x) / Float64(z / Float64(y - a))));
	end
	return 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, -4e-263], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(N[(t - x), $MachinePrecision] / N[(z / 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 -4 \cdot 10^{-263} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\

\mathbf{else}:\\
\;\;\;\;t - \frac{t - x}{\frac{z}{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)))) < -4e-263 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 90.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, -\left(-x\right)\right)} \]
      8. remove-double-neg95.5%

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

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

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

    1. Initial program 3.0%

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

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

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

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

        \[\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) \]
      4. div-sub72.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}} \]
      5. distribute-lft-out--72.6%

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

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

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

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

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

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

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

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

Alternative 3: 92.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-263}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-285}:\\
\;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\

\mathbf{elif}\;t_2 \leq 10^{+305}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;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)))) < -inf.0 or 9.9999999999999994e304 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 74.4%

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

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

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

    if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4e-263 or 5.00000000000000018e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.9999999999999994e304

    1. Initial program 94.9%

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

    if -4e-263 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.00000000000000018e-285

    1. Initial program 3.3%

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

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

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

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

        \[\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) \]
      4. div-sub74.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}} \]
      5. distribute-lft-out--74.6%

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

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

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

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

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

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

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

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

Alternative 4: 91.1% 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 -4 \cdot 10^{-263} \lor \neg \left(t_1 \leq 5 \cdot 10^{-285}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{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 -4e-263) (not (<= t_1 5e-285)))
     t_1
     (- t (/ (- t x) (/ z (- 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 <= -4e-263) || !(t_1 <= 5e-285)) {
		tmp = t_1;
	} else {
		tmp = t - ((t - x) / (z / (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 <= (-4d-263)) .or. (.not. (t_1 <= 5d-285))) then
        tmp = t_1
    else
        tmp = t - ((t - x) / (z / (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 <= -4e-263) || !(t_1 <= 5e-285)) {
		tmp = t_1;
	} else {
		tmp = t - ((t - x) / (z / (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 <= -4e-263) or not (t_1 <= 5e-285):
		tmp = t_1
	else:
		tmp = t - ((t - x) / (z / (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 <= -4e-263) || !(t_1 <= 5e-285))
		tmp = t_1;
	else
		tmp = Float64(t - Float64(Float64(t - x) / Float64(z / 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 <= -4e-263) || ~((t_1 <= 5e-285)))
		tmp = t_1;
	else
		tmp = t - ((t - x) / (z / (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, -4e-263], N[Not[LessEqual[t$95$1, 5e-285]], $MachinePrecision]], t$95$1, N[(t - N[(N[(t - x), $MachinePrecision] / N[(z / 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 -4 \cdot 10^{-263} \lor \neg \left(t_1 \leq 5 \cdot 10^{-285}\right):\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t - \frac{t - x}{\frac{z}{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)))) < -4e-263 or 5.00000000000000018e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 91.3%

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

    if -4e-263 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.00000000000000018e-285

    1. Initial program 3.3%

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

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

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

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

        \[\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) \]
      4. div-sub74.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}} \]
      5. distribute-lft-out--74.6%

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

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

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

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

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

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

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

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

Alternative 5: 58.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq -5.8 \cdot 10^{-92}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;t \leq 1.6 \cdot 10^{-60}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.5e-11 or 1.6000000000000001e-60 < t

    1. Initial program 85.7%

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

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

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

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

    if -4.5e-11 < t < -5.79999999999999969e-92 or -1.35000000000000005e-153 < t < -8.1999999999999997e-251 or -2.74999999999999976e-283 < t < 1.6000000000000001e-60

    1. Initial program 79.2%

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

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

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

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

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

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

    if -5.79999999999999969e-92 < t < -1.35000000000000005e-153

    1. Initial program 90.1%

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

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

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

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

    if -8.1999999999999997e-251 < t < -2.74999999999999976e-283

    1. Initial program 17.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, -\left(-x\right)\right)} \]
      8. remove-double-neg18.7%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around -inf 86.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{-11}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-92}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-153}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-251}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq -2.75 \cdot 10^{-283}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - \frac{a}{z}\right)\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-60}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 6: 77.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -5.4 \cdot 10^{-210}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3.7 \cdot 10^{+127}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.2000000000000001e146 or 3.6999999999999998e127 < z

    1. Initial program 57.7%

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

      \[\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}} \]
    3. Step-by-step derivation
      1. associate--l+60.4%

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

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

        \[\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) \]
      4. div-sub60.4%

        \[\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}} \]
      5. distribute-lft-out--60.4%

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

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

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

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

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

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

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

    if -4.2000000000000001e146 < z < -5.39999999999999983e-210 or 2.44999999999999994e-60 < z < 3.6999999999999998e127

    1. Initial program 90.6%

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

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

    if -5.39999999999999983e-210 < z < 2.44999999999999994e-60

    1. Initial program 88.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+146}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-210}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-60}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{+127}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\ \end{array} \]

Alternative 7: 77.8% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.99999999999999973e146 or 1.45000000000000001e129 < z

    1. Initial program 57.7%

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

      \[\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}} \]
    3. Step-by-step derivation
      1. associate--l+60.4%

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

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

        \[\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) \]
      4. div-sub60.4%

        \[\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}} \]
      5. distribute-lft-out--60.4%

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

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

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

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

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

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

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

    if -3.99999999999999973e146 < z < -8.79999999999999958e-210

    1. Initial program 93.0%

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

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

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

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

    if -8.79999999999999958e-210 < z < 9.99999999999999955e-58

    1. Initial program 88.5%

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

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

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

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

    if 9.99999999999999955e-58 < z < 1.45000000000000001e129

    1. Initial program 85.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+146}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-210}:\\ \;\;\;\;x + \left(y - z\right) \cdot \left(t \cdot \frac{1}{a - z}\right)\\ \mathbf{elif}\;z \leq 10^{-57}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+129}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\ \end{array} \]

Alternative 8: 59.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -1.28 \cdot 10^{-250}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4 \cdot 10^{-63}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.2000000000000001e-12 or 4.00000000000000027e-63 < t

    1. Initial program 85.7%

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

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

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

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

    if -3.2000000000000001e-12 < t < -1.27999999999999993e-250 or -1.44999999999999994e-283 < t < 4.00000000000000027e-63

    1. Initial program 81.3%

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

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

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

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

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

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

    if -1.27999999999999993e-250 < t < -1.44999999999999994e-283

    1. Initial program 17.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, -\left(-x\right)\right)} \]
      8. remove-double-neg18.7%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around -inf 86.0%

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

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

        \[\leadsto x \cdot \color{blue}{\frac{y - a}{z}} \]
    7. Simplified73.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{-12}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -1.28 \cdot 10^{-250}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-283}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-63}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 9: 59.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -3.8 \cdot 10^{-248}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 6 \cdot 10^{-64}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.0000000000000002e-15 or 6.0000000000000001e-64 < t

    1. Initial program 85.7%

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

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

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

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

    if -2.0000000000000002e-15 < t < -3.7999999999999999e-248 or -5.2000000000000002e-283 < t < 6.0000000000000001e-64

    1. Initial program 81.3%

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

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

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

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

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

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

    if -3.7999999999999999e-248 < t < -5.2000000000000002e-283

    1. Initial program 17.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, -\left(-x\right)\right)} \]
      8. remove-double-neg18.7%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)} \]
    4. Taylor expanded in z around -inf 86.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-15}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-248}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-283}:\\ \;\;\;\;x \cdot \left(\frac{y}{z} - \frac{a}{z}\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-64}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 10: 73.9% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1e4 or 1.25000000000000007e-33 < a

    1. Initial program 90.5%

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

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

    if -1e4 < a < -3.10000000000000021e-131

    1. Initial program 79.6%

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

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

    if -3.10000000000000021e-131 < a < 1.25000000000000007e-33

    1. Initial program 69.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 73.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}} \]
    3. Step-by-step derivation
      1. associate--l+73.3%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/73.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) \]
      3. associate-*r/73.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) \]
      4. div-sub73.4%

        \[\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}} \]
      5. distribute-lft-out--73.4%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -10000:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-131}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-33}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \end{array} \]

Alternative 11: 48.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq -1.3 \cdot 10^{-192}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+95}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.90000000000000019e136 or 3.2000000000000001e95 < z

    1. Initial program 60.0%

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

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

    if -3.90000000000000019e136 < z < -1.3000000000000001e-192 or -4.9000000000000002e-220 < z < 3.2000000000000001e95

    1. Initial program 89.7%

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

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

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

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

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

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

    if -1.3000000000000001e-192 < z < -4.9000000000000002e-220

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+136}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-192}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{-220}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 12: 72.8% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.9000000000000002e-131 or 7.10000000000000036e-34 < a

    1. Initial program 88.8%

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

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

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

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

    if -2.9000000000000002e-131 < a < 7.10000000000000036e-34

    1. Initial program 69.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 73.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}} \]
    3. Step-by-step derivation
      1. associate--l+73.3%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/73.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) \]
      3. associate-*r/73.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) \]
      4. div-sub73.4%

        \[\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}} \]
      5. distribute-lft-out--73.4%

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

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

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

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

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

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

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

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

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

Alternative 13: 50.4% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.05 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4999999999999999e141 or 2.04999999999999993e95 < z

    1. Initial program 60.0%

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

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

    if -1.4999999999999999e141 < z < -9.9999999999999995e-214

    1. Initial program 93.1%

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    6. Step-by-step derivation
      1. associate-/r/61.5%

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

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

    if -9.9999999999999995e-214 < z < 2.04999999999999993e95

    1. Initial program 87.8%

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

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

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

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

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

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

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

Alternative 14: 51.2% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.1e136 or 4.50000000000000017e95 < z

    1. Initial program 60.0%

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

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

    if -1.1e136 < z < -1.54999999999999992e-302

    1. Initial program 89.7%

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

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

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

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

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

    if -1.54999999999999992e-302 < z < 4.50000000000000017e95

    1. Initial program 89.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+136}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-302}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 15: 64.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3 \cdot 10^{+80} \lor \neg \left(a \leq 1.08 \cdot 10^{-8}\right):\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{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 -3e+80) (not (<= a 1.08e-8)))
   (+ x (* (- y z) (/ t a)))
   (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -3e+80) || !(a <= 1.08e-8)) {
		tmp = x + ((y - 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 <= (-3d+80)) .or. (.not. (a <= 1.08d-8))) then
        tmp = x + ((y - 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 <= -3e+80) || !(a <= 1.08e-8)) {
		tmp = x + ((y - z) * (t / a));
	} else {
		tmp = t * ((y - z) / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -3e+80) or not (a <= 1.08e-8):
		tmp = x + ((y - z) * (t / a))
	else:
		tmp = t * ((y - z) / (a - z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -3e+80) || !(a <= 1.08e-8))
		tmp = Float64(x + Float64(Float64(y - z) * Float64(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 <= -3e+80) || ~((a <= 1.08e-8)))
		tmp = x + ((y - 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, -3e+80], N[Not[LessEqual[a, 1.08e-8]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / 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 -3 \cdot 10^{+80} \lor \neg \left(a \leq 1.08 \cdot 10^{-8}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{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 < -2.99999999999999987e80 or 1.0800000000000001e-8 < a

    1. Initial program 89.1%

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

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

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

    if -2.99999999999999987e80 < a < 1.0800000000000001e-8

    1. Initial program 75.5%

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

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

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

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

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

Alternative 16: 62.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{-83} \lor \neg \left(a \leq 2 \cdot 10^{-54}\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 -1.15e-83) (not (<= a 2e-54)))
   (+ 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 <= -1.15e-83) || !(a <= 2e-54)) {
		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 <= (-1.15d-83)) .or. (.not. (a <= 2d-54))) 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 <= -1.15e-83) || !(a <= 2e-54)) {
		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 <= -1.15e-83) or not (a <= 2e-54):
		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 <= -1.15e-83) || !(a <= 2e-54))
		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 <= -1.15e-83) || ~((a <= 2e-54)))
		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, -1.15e-83], N[Not[LessEqual[a, 2e-54]], $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 -1.15 \cdot 10^{-83} \lor \neg \left(a \leq 2 \cdot 10^{-54}\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 < -1.14999999999999995e-83 or 2.0000000000000001e-54 < a

    1. Initial program 89.5%

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

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

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

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

    if -1.14999999999999995e-83 < a < 2.0000000000000001e-54

    1. Initial program 69.1%

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

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

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

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

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

Alternative 17: 68.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.1 \cdot 10^{-131} \lor \neg \left(a \leq 7.7 \cdot 10^{-34}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.10000000000000021e-131 or 7.7e-34 < a

    1. Initial program 88.8%

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

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

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

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

    if -3.10000000000000021e-131 < a < 7.7e-34

    1. Initial program 69.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 73.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}} \]
    3. Step-by-step derivation
      1. associate--l+73.3%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/73.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) \]
      3. associate-*r/73.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) \]
      4. div-sub73.4%

        \[\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}} \]
      5. distribute-lft-out--73.4%

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

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

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

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

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

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

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

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

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

Alternative 18: 49.1% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq 1.7 \cdot 10^{+97}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


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

    1. Initial program 60.0%

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

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

    if -3.2000000000000001e138 < z < 1.70000000000000005e97

    1. Initial program 89.8%

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

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

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

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

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

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

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

Alternative 19: 39.7% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;z \leq 2.2 \cdot 10^{+96}:\\
\;\;\;\;x\\

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


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

    1. Initial program 64.5%

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

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

    if -2.59999999999999988e58 < z < 2.1999999999999999e96

    1. Initial program 90.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+58}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+96}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 20: 26.0% 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 82.0%

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

    \[\leadsto \color{blue}{t} \]
  3. Final simplification19.8%

    \[\leadsto t \]

Reproduce

?
herbie shell --seed 2023293 
(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)))))