Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.3% → 91.9%
Time: 16.1s
Alternatives: 19
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 19 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 80.3% accurate, 1.0× speedup?

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

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

Alternative 1: 91.9% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-185}:\\
\;\;\;\;t\_2\\

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

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


\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

    1. Initial program 76.5%

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

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

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

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

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

    1. Initial program 95.5%

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

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

    1. Initial program 7.1%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 90.1%

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

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

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

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

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

Alternative 2: 91.9% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-185} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;t\_1\\

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


\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

    1. Initial program 76.5%

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

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

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

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

    if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-185 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 92.6%

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

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

    1. Initial program 7.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 58.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\ t_2 := t - a \cdot \frac{x}{z}\\ t_3 := x - y \cdot \frac{x - t}{a}\\ \mathbf{if}\;a \leq -5.2 \cdot 10^{+42}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-216}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq -4.9 \cdot 10^{-236}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-31}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 5800000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{+136} \lor \neg \left(a \leq 7.1 \cdot 10^{+152}\right):\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- t x) (/ y (- a z))))
        (t_2 (- t (* a (/ x z))))
        (t_3 (- x (* y (/ (- x t) a)))))
   (if (<= a -5.2e+42)
     t_3
     (if (<= a -2.5e-216)
       (* (- y z) (/ t (- a z)))
       (if (<= a -4.9e-236)
         (/ (* x y) z)
         (if (<= a 3.8e-104)
           t_1
           (if (<= a 5.2e-31)
             t_2
             (if (<= a 5800000.0)
               t_1
               (if (or (<= a 4.3e+136) (not (<= a 7.1e+152))) t_3 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - x) * (y / (a - z));
	double t_2 = t - (a * (x / z));
	double t_3 = x - (y * ((x - t) / a));
	double tmp;
	if (a <= -5.2e+42) {
		tmp = t_3;
	} else if (a <= -2.5e-216) {
		tmp = (y - z) * (t / (a - z));
	} else if (a <= -4.9e-236) {
		tmp = (x * y) / z;
	} else if (a <= 3.8e-104) {
		tmp = t_1;
	} else if (a <= 5.2e-31) {
		tmp = t_2;
	} else if (a <= 5800000.0) {
		tmp = t_1;
	} else if ((a <= 4.3e+136) || !(a <= 7.1e+152)) {
		tmp = t_3;
	} 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) :: t_3
    real(8) :: tmp
    t_1 = (t - x) * (y / (a - z))
    t_2 = t - (a * (x / z))
    t_3 = x - (y * ((x - t) / a))
    if (a <= (-5.2d+42)) then
        tmp = t_3
    else if (a <= (-2.5d-216)) then
        tmp = (y - z) * (t / (a - z))
    else if (a <= (-4.9d-236)) then
        tmp = (x * y) / z
    else if (a <= 3.8d-104) then
        tmp = t_1
    else if (a <= 5.2d-31) then
        tmp = t_2
    else if (a <= 5800000.0d0) then
        tmp = t_1
    else if ((a <= 4.3d+136) .or. (.not. (a <= 7.1d+152))) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - x) * (y / (a - z));
	double t_2 = t - (a * (x / z));
	double t_3 = x - (y * ((x - t) / a));
	double tmp;
	if (a <= -5.2e+42) {
		tmp = t_3;
	} else if (a <= -2.5e-216) {
		tmp = (y - z) * (t / (a - z));
	} else if (a <= -4.9e-236) {
		tmp = (x * y) / z;
	} else if (a <= 3.8e-104) {
		tmp = t_1;
	} else if (a <= 5.2e-31) {
		tmp = t_2;
	} else if (a <= 5800000.0) {
		tmp = t_1;
	} else if ((a <= 4.3e+136) || !(a <= 7.1e+152)) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (t - x) * (y / (a - z))
	t_2 = t - (a * (x / z))
	t_3 = x - (y * ((x - t) / a))
	tmp = 0
	if a <= -5.2e+42:
		tmp = t_3
	elif a <= -2.5e-216:
		tmp = (y - z) * (t / (a - z))
	elif a <= -4.9e-236:
		tmp = (x * y) / z
	elif a <= 3.8e-104:
		tmp = t_1
	elif a <= 5.2e-31:
		tmp = t_2
	elif a <= 5800000.0:
		tmp = t_1
	elif (a <= 4.3e+136) or not (a <= 7.1e+152):
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(t - x) * Float64(y / Float64(a - z)))
	t_2 = Float64(t - Float64(a * Float64(x / z)))
	t_3 = Float64(x - Float64(y * Float64(Float64(x - t) / a)))
	tmp = 0.0
	if (a <= -5.2e+42)
		tmp = t_3;
	elseif (a <= -2.5e-216)
		tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z)));
	elseif (a <= -4.9e-236)
		tmp = Float64(Float64(x * y) / z);
	elseif (a <= 3.8e-104)
		tmp = t_1;
	elseif (a <= 5.2e-31)
		tmp = t_2;
	elseif (a <= 5800000.0)
		tmp = t_1;
	elseif ((a <= 4.3e+136) || !(a <= 7.1e+152))
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (t - x) * (y / (a - z));
	t_2 = t - (a * (x / z));
	t_3 = x - (y * ((x - t) / a));
	tmp = 0.0;
	if (a <= -5.2e+42)
		tmp = t_3;
	elseif (a <= -2.5e-216)
		tmp = (y - z) * (t / (a - z));
	elseif (a <= -4.9e-236)
		tmp = (x * y) / z;
	elseif (a <= 3.8e-104)
		tmp = t_1;
	elseif (a <= 5.2e-31)
		tmp = t_2;
	elseif (a <= 5800000.0)
		tmp = t_1;
	elseif ((a <= 4.3e+136) || ~((a <= 7.1e+152)))
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(a * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(y * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.2e+42], t$95$3, If[LessEqual[a, -2.5e-216], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.9e-236], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 3.8e-104], t$95$1, If[LessEqual[a, 5.2e-31], t$95$2, If[LessEqual[a, 5800000.0], t$95$1, If[Or[LessEqual[a, 4.3e+136], N[Not[LessEqual[a, 7.1e+152]], $MachinePrecision]], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;a \leq 3.8 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{-31}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 5800000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 4.3 \cdot 10^{+136} \lor \neg \left(a \leq 7.1 \cdot 10^{+152}\right):\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -5.1999999999999998e42 or 5.8e6 < a < 4.2999999999999999e136 or 7.10000000000000017e152 < a

    1. Initial program 87.3%

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

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

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

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

    if -5.1999999999999998e42 < a < -2.5000000000000001e-216

    1. Initial program 78.9%

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

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

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

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

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

    if -2.5000000000000001e-216 < a < -4.8999999999999997e-236

    1. Initial program 41.5%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-lft-neg-out100.0%

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

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

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

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

    if -4.8999999999999997e-236 < a < 3.8000000000000001e-104 or 5.19999999999999991e-31 < a < 5.8e6

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

    if 3.8000000000000001e-104 < a < 5.19999999999999991e-31 or 4.2999999999999999e136 < a < 7.10000000000000017e152

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.2 \cdot 10^{+42}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-216}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq -4.9 \cdot 10^{-236}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-104}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-31}:\\ \;\;\;\;t - a \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 5800000:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{+136} \lor \neg \left(a \leq 7.1 \cdot 10^{+152}\right):\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{else}:\\ \;\;\;\;t - a \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 58.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\ t_2 := t - a \cdot \frac{x}{z}\\ t_3 := x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -6.6 \cdot 10^{+42}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{-216}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq -4.9 \cdot 10^{-236}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-105}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{-31}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 150000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{+136}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq 7.1 \cdot 10^{+152}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- t x) (/ y (- a z))))
        (t_2 (- t (* a (/ x z))))
        (t_3 (+ x (* (- t x) (/ y a)))))
   (if (<= a -6.6e+42)
     t_3
     (if (<= a -2.55e-216)
       (* (- y z) (/ t (- a z)))
       (if (<= a -4.9e-236)
         (/ (* x y) z)
         (if (<= a 5e-105)
           t_1
           (if (<= a 2.55e-31)
             t_2
             (if (<= a 150000.0)
               t_1
               (if (<= a 4.3e+136)
                 (- x (* y (/ (- x t) a)))
                 (if (<= a 7.1e+152) t_2 t_3))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - x) * (y / (a - z));
	double t_2 = t - (a * (x / z));
	double t_3 = x + ((t - x) * (y / a));
	double tmp;
	if (a <= -6.6e+42) {
		tmp = t_3;
	} else if (a <= -2.55e-216) {
		tmp = (y - z) * (t / (a - z));
	} else if (a <= -4.9e-236) {
		tmp = (x * y) / z;
	} else if (a <= 5e-105) {
		tmp = t_1;
	} else if (a <= 2.55e-31) {
		tmp = t_2;
	} else if (a <= 150000.0) {
		tmp = t_1;
	} else if (a <= 4.3e+136) {
		tmp = x - (y * ((x - t) / a));
	} else if (a <= 7.1e+152) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (t - x) * (y / (a - z))
    t_2 = t - (a * (x / z))
    t_3 = x + ((t - x) * (y / a))
    if (a <= (-6.6d+42)) then
        tmp = t_3
    else if (a <= (-2.55d-216)) then
        tmp = (y - z) * (t / (a - z))
    else if (a <= (-4.9d-236)) then
        tmp = (x * y) / z
    else if (a <= 5d-105) then
        tmp = t_1
    else if (a <= 2.55d-31) then
        tmp = t_2
    else if (a <= 150000.0d0) then
        tmp = t_1
    else if (a <= 4.3d+136) then
        tmp = x - (y * ((x - t) / a))
    else if (a <= 7.1d+152) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - x) * (y / (a - z));
	double t_2 = t - (a * (x / z));
	double t_3 = x + ((t - x) * (y / a));
	double tmp;
	if (a <= -6.6e+42) {
		tmp = t_3;
	} else if (a <= -2.55e-216) {
		tmp = (y - z) * (t / (a - z));
	} else if (a <= -4.9e-236) {
		tmp = (x * y) / z;
	} else if (a <= 5e-105) {
		tmp = t_1;
	} else if (a <= 2.55e-31) {
		tmp = t_2;
	} else if (a <= 150000.0) {
		tmp = t_1;
	} else if (a <= 4.3e+136) {
		tmp = x - (y * ((x - t) / a));
	} else if (a <= 7.1e+152) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (t - x) * (y / (a - z))
	t_2 = t - (a * (x / z))
	t_3 = x + ((t - x) * (y / a))
	tmp = 0
	if a <= -6.6e+42:
		tmp = t_3
	elif a <= -2.55e-216:
		tmp = (y - z) * (t / (a - z))
	elif a <= -4.9e-236:
		tmp = (x * y) / z
	elif a <= 5e-105:
		tmp = t_1
	elif a <= 2.55e-31:
		tmp = t_2
	elif a <= 150000.0:
		tmp = t_1
	elif a <= 4.3e+136:
		tmp = x - (y * ((x - t) / a))
	elif a <= 7.1e+152:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(t - x) * Float64(y / Float64(a - z)))
	t_2 = Float64(t - Float64(a * Float64(x / z)))
	t_3 = Float64(x + Float64(Float64(t - x) * Float64(y / a)))
	tmp = 0.0
	if (a <= -6.6e+42)
		tmp = t_3;
	elseif (a <= -2.55e-216)
		tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z)));
	elseif (a <= -4.9e-236)
		tmp = Float64(Float64(x * y) / z);
	elseif (a <= 5e-105)
		tmp = t_1;
	elseif (a <= 2.55e-31)
		tmp = t_2;
	elseif (a <= 150000.0)
		tmp = t_1;
	elseif (a <= 4.3e+136)
		tmp = Float64(x - Float64(y * Float64(Float64(x - t) / a)));
	elseif (a <= 7.1e+152)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (t - x) * (y / (a - z));
	t_2 = t - (a * (x / z));
	t_3 = x + ((t - x) * (y / a));
	tmp = 0.0;
	if (a <= -6.6e+42)
		tmp = t_3;
	elseif (a <= -2.55e-216)
		tmp = (y - z) * (t / (a - z));
	elseif (a <= -4.9e-236)
		tmp = (x * y) / z;
	elseif (a <= 5e-105)
		tmp = t_1;
	elseif (a <= 2.55e-31)
		tmp = t_2;
	elseif (a <= 150000.0)
		tmp = t_1;
	elseif (a <= 4.3e+136)
		tmp = x - (y * ((x - t) / a));
	elseif (a <= 7.1e+152)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(a * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.6e+42], t$95$3, If[LessEqual[a, -2.55e-216], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.9e-236], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 5e-105], t$95$1, If[LessEqual[a, 2.55e-31], t$95$2, If[LessEqual[a, 150000.0], t$95$1, If[LessEqual[a, 4.3e+136], N[(x - N[(y * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.1e+152], t$95$2, t$95$3]]]]]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;a \leq 2.55 \cdot 10^{-31}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 150000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 4.3 \cdot 10^{+136}:\\
\;\;\;\;x - y \cdot \frac{x - t}{a}\\

\mathbf{elif}\;a \leq 7.1 \cdot 10^{+152}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -6.5999999999999998e42 or 7.10000000000000017e152 < a

    1. Initial program 90.1%

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

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

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

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

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

    if -6.5999999999999998e42 < a < -2.5500000000000001e-216

    1. Initial program 78.9%

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

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

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

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

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

    if -2.5500000000000001e-216 < a < -4.8999999999999997e-236

    1. Initial program 41.5%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-lft-neg-out100.0%

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

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

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

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

    if -4.8999999999999997e-236 < a < 4.99999999999999963e-105 or 2.5499999999999999e-31 < a < 1.5e5

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

    if 4.99999999999999963e-105 < a < 2.5499999999999999e-31 or 4.2999999999999999e136 < a < 7.10000000000000017e152

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

    if 1.5e5 < a < 4.2999999999999999e136

    1. Initial program 80.1%

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    5. Simplified68.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.6 \cdot 10^{+42}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{-216}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq -4.9 \cdot 10^{-236}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-105}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{-31}:\\ \;\;\;\;t - a \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 150000:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{+136}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq 7.1 \cdot 10^{+152}:\\ \;\;\;\;t - a \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 36.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;a \leq -1.35 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{+38}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -6.7 \cdot 10^{-121}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-216}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -3.35 \cdot 10^{-282}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-283}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-252}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-113}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 0.0034:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y (- a z)))))
   (if (<= a -1.35e+90)
     x
     (if (<= a -9.2e+38)
       t_1
       (if (<= a -6.7e-121)
         t
         (if (<= a -2.9e-216)
           t_1
           (if (<= a -3.35e-282)
             (/ (* x y) z)
             (if (<= a 1.25e-283)
               t
               (if (<= a 4e-252)
                 (* x (/ y z))
                 (if (<= a 2.6e-113) t_1 (if (<= a 0.0034) t x)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (a <= -1.35e+90) {
		tmp = x;
	} else if (a <= -9.2e+38) {
		tmp = t_1;
	} else if (a <= -6.7e-121) {
		tmp = t;
	} else if (a <= -2.9e-216) {
		tmp = t_1;
	} else if (a <= -3.35e-282) {
		tmp = (x * y) / z;
	} else if (a <= 1.25e-283) {
		tmp = t;
	} else if (a <= 4e-252) {
		tmp = x * (y / z);
	} else if (a <= 2.6e-113) {
		tmp = t_1;
	} else if (a <= 0.0034) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (y / (a - z))
    if (a <= (-1.35d+90)) then
        tmp = x
    else if (a <= (-9.2d+38)) then
        tmp = t_1
    else if (a <= (-6.7d-121)) then
        tmp = t
    else if (a <= (-2.9d-216)) then
        tmp = t_1
    else if (a <= (-3.35d-282)) then
        tmp = (x * y) / z
    else if (a <= 1.25d-283) then
        tmp = t
    else if (a <= 4d-252) then
        tmp = x * (y / z)
    else if (a <= 2.6d-113) then
        tmp = t_1
    else if (a <= 0.0034d0) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (a <= -1.35e+90) {
		tmp = x;
	} else if (a <= -9.2e+38) {
		tmp = t_1;
	} else if (a <= -6.7e-121) {
		tmp = t;
	} else if (a <= -2.9e-216) {
		tmp = t_1;
	} else if (a <= -3.35e-282) {
		tmp = (x * y) / z;
	} else if (a <= 1.25e-283) {
		tmp = t;
	} else if (a <= 4e-252) {
		tmp = x * (y / z);
	} else if (a <= 2.6e-113) {
		tmp = t_1;
	} else if (a <= 0.0034) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / (a - z))
	tmp = 0
	if a <= -1.35e+90:
		tmp = x
	elif a <= -9.2e+38:
		tmp = t_1
	elif a <= -6.7e-121:
		tmp = t
	elif a <= -2.9e-216:
		tmp = t_1
	elif a <= -3.35e-282:
		tmp = (x * y) / z
	elif a <= 1.25e-283:
		tmp = t
	elif a <= 4e-252:
		tmp = x * (y / z)
	elif a <= 2.6e-113:
		tmp = t_1
	elif a <= 0.0034:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (a <= -1.35e+90)
		tmp = x;
	elseif (a <= -9.2e+38)
		tmp = t_1;
	elseif (a <= -6.7e-121)
		tmp = t;
	elseif (a <= -2.9e-216)
		tmp = t_1;
	elseif (a <= -3.35e-282)
		tmp = Float64(Float64(x * y) / z);
	elseif (a <= 1.25e-283)
		tmp = t;
	elseif (a <= 4e-252)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 2.6e-113)
		tmp = t_1;
	elseif (a <= 0.0034)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / (a - z));
	tmp = 0.0;
	if (a <= -1.35e+90)
		tmp = x;
	elseif (a <= -9.2e+38)
		tmp = t_1;
	elseif (a <= -6.7e-121)
		tmp = t;
	elseif (a <= -2.9e-216)
		tmp = t_1;
	elseif (a <= -3.35e-282)
		tmp = (x * y) / z;
	elseif (a <= 1.25e-283)
		tmp = t;
	elseif (a <= 4e-252)
		tmp = x * (y / z);
	elseif (a <= 2.6e-113)
		tmp = t_1;
	elseif (a <= 0.0034)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.35e+90], x, If[LessEqual[a, -9.2e+38], t$95$1, If[LessEqual[a, -6.7e-121], t, If[LessEqual[a, -2.9e-216], t$95$1, If[LessEqual[a, -3.35e-282], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.25e-283], t, If[LessEqual[a, 4e-252], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.6e-113], t$95$1, If[LessEqual[a, 0.0034], t, x]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -9.2 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -6.7 \cdot 10^{-121}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq -2.9 \cdot 10^{-216}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-283}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 0.0034:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.35e90 or 0.00339999999999999981 < a

    1. Initial program 84.8%

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

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

    if -1.35e90 < a < -9.2000000000000005e38 or -6.7000000000000001e-121 < a < -2.9000000000000001e-216 or 3.99999999999999977e-252 < a < 2.5999999999999999e-113

    1. Initial program 74.3%

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

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

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

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

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

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

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

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

    if -9.2000000000000005e38 < a < -6.7000000000000001e-121 or -3.3500000000000001e-282 < a < 1.25e-283 or 2.5999999999999999e-113 < a < 0.00339999999999999981

    1. Initial program 75.9%

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

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

    if -2.9000000000000001e-216 < a < -3.3500000000000001e-282

    1. Initial program 61.0%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-lft-neg-out61.3%

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

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

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

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

    if 1.25e-283 < a < 3.99999999999999977e-252

    1. Initial program 24.4%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-lft-neg-out61.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{+90}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -6.7 \cdot 10^{-121}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-216}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -3.35 \cdot 10^{-282}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-283}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-252}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-113}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 0.0034:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 91.0% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 90.5%

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

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

    1. Initial program 7.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 36.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \leq -2.8 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -1.4 \cdot 10^{-120}:\\
\;\;\;\;t\\

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

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

\mathbf{elif}\;a \leq 9.2 \cdot 10^{-284}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 175:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.6e89 or 175 < a

    1. Initial program 85.6%

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

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

    if -3.6e89 < a < -2.80000000000000004e-64 or 9.2e-284 < a < 175

    1. Initial program 70.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.80000000000000004e-64 < a < -1.39999999999999997e-120 or -6.1999999999999996e-284 < a < 9.2e-284

    1. Initial program 78.3%

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

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

    if -1.39999999999999997e-120 < a < -8.5999999999999995e-216

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

    if -8.5999999999999995e-216 < a < -6.1999999999999996e-284

    1. Initial program 61.0%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-lft-neg-out61.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.6 \cdot 10^{+89}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-64}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-120}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-216}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-284}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-284}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 175:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 52.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;y \leq -2.6 \cdot 10^{-66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3.35 \cdot 10^{-192}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-264}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-296}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-220}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-56}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) (- a z)))))
   (if (<= y -2.6e-66)
     t_1
     (if (<= y -3.35e-192)
       t
       (if (<= y -1.2e-264)
         x
         (if (<= y -2e-296)
           t
           (if (<= y 9.5e-220) x (if (<= y 1.05e-56) t t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / (a - z));
	double tmp;
	if (y <= -2.6e-66) {
		tmp = t_1;
	} else if (y <= -3.35e-192) {
		tmp = t;
	} else if (y <= -1.2e-264) {
		tmp = x;
	} else if (y <= -2e-296) {
		tmp = t;
	} else if (y <= 9.5e-220) {
		tmp = x;
	} else if (y <= 1.05e-56) {
		tmp = t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * ((t - x) / (a - z))
    if (y <= (-2.6d-66)) then
        tmp = t_1
    else if (y <= (-3.35d-192)) then
        tmp = t
    else if (y <= (-1.2d-264)) then
        tmp = x
    else if (y <= (-2d-296)) then
        tmp = t
    else if (y <= 9.5d-220) then
        tmp = x
    else if (y <= 1.05d-56) then
        tmp = t
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / (a - z));
	double tmp;
	if (y <= -2.6e-66) {
		tmp = t_1;
	} else if (y <= -3.35e-192) {
		tmp = t;
	} else if (y <= -1.2e-264) {
		tmp = x;
	} else if (y <= -2e-296) {
		tmp = t;
	} else if (y <= 9.5e-220) {
		tmp = x;
	} else if (y <= 1.05e-56) {
		tmp = t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / (a - z))
	tmp = 0
	if y <= -2.6e-66:
		tmp = t_1
	elif y <= -3.35e-192:
		tmp = t
	elif y <= -1.2e-264:
		tmp = x
	elif y <= -2e-296:
		tmp = t
	elif y <= 9.5e-220:
		tmp = x
	elif y <= 1.05e-56:
		tmp = t
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	tmp = 0.0
	if (y <= -2.6e-66)
		tmp = t_1;
	elseif (y <= -3.35e-192)
		tmp = t;
	elseif (y <= -1.2e-264)
		tmp = x;
	elseif (y <= -2e-296)
		tmp = t;
	elseif (y <= 9.5e-220)
		tmp = x;
	elseif (y <= 1.05e-56)
		tmp = t;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / (a - z));
	tmp = 0.0;
	if (y <= -2.6e-66)
		tmp = t_1;
	elseif (y <= -3.35e-192)
		tmp = t;
	elseif (y <= -1.2e-264)
		tmp = x;
	elseif (y <= -2e-296)
		tmp = t;
	elseif (y <= 9.5e-220)
		tmp = x;
	elseif (y <= 1.05e-56)
		tmp = t;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e-66], t$95$1, If[LessEqual[y, -3.35e-192], t, If[LessEqual[y, -1.2e-264], x, If[LessEqual[y, -2e-296], t, If[LessEqual[y, 9.5e-220], x, If[LessEqual[y, 1.05e-56], t, t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -3.35 \cdot 10^{-192}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -1.2 \cdot 10^{-264}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -2 \cdot 10^{-296}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 9.5 \cdot 10^{-220}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-56}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.5999999999999999e-66 or 1.05000000000000003e-56 < y

    1. Initial program 81.0%

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

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

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

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

    if -2.5999999999999999e-66 < y < -3.34999999999999995e-192 or -1.1999999999999999e-264 < y < -2e-296 or 9.50000000000000062e-220 < y < 1.05000000000000003e-56

    1. Initial program 69.0%

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

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

    if -3.34999999999999995e-192 < y < -1.1999999999999999e-264 or -2e-296 < y < 9.50000000000000062e-220

    1. Initial program 74.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{-66}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;y \leq -3.35 \cdot 10^{-192}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{-264}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-296}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-220}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-56}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 42.5% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq -9.6 \cdot 10^{-216}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -5.7 \cdot 10^{-282}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 2.06 \cdot 10^{-283}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.5 \cdot 10^{+47}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.5000000000000001e89 or 5.4999999999999998e47 < a

    1. Initial program 86.5%

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

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

    if -3.5000000000000001e89 < a < -2.4000000000000002e41

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

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

    if -2.4000000000000002e41 < a < -9.60000000000000014e-216 or -5.7000000000000003e-282 < a < 2.06000000000000004e-283

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

    if -9.60000000000000014e-216 < a < -5.7000000000000003e-282 or 2.06000000000000004e-283 < a < 5.4999999999999998e47

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+89}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{+41}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-216}:\\ \;\;\;\;\frac{t}{z} \cdot \left(z - y\right)\\ \mathbf{elif}\;a \leq -5.7 \cdot 10^{-282}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 2.06 \cdot 10^{-283}:\\ \;\;\;\;\frac{t}{z} \cdot \left(z - y\right)\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+47}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 39.7% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq -2.5 \cdot 10^{-120}:\\
\;\;\;\;t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.5000000000000001e89 or 7.2e44 < a

    1. Initial program 86.5%

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

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

    if -3.5000000000000001e89 < a < -2.55e-73

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.55e-73 < a < -2.50000000000000003e-120

    1. Initial program 81.9%

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

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

    if -2.50000000000000003e-120 < a < -1.39999999999999993e-215

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

    if -1.39999999999999993e-215 < a < 7.2e44

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+89}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{-73}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-120}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-215}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{+44}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 36.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -4.5 \cdot 10^{-216}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq -4.7 \cdot 10^{-284}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.6 \cdot 10^{-281}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1700000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.1000000000000001e51 or 1.7e6 < a

    1. Initial program 85.4%

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

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

    if -5.1000000000000001e51 < a < -4.4999999999999999e-216 or -4.70000000000000022e-284 < a < 1.6e-281

    1. Initial program 76.3%

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

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

    if -4.4999999999999999e-216 < a < -4.70000000000000022e-284 or 1.6e-281 < a < 1.7e6

    1. Initial program 63.6%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-lft-neg-out39.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.1 \cdot 10^{+51}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-216}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-284}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-281}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1700000:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 36.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -1.45 \cdot 10^{-216}:\\
\;\;\;\;t\\

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

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

\mathbf{elif}\;a \leq 2.7:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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


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

    1. Initial program 85.4%

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

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

    if -3.6e53 < a < -1.45e-216 or -2.89999999999999998e-282 < a < 5.2000000000000002e-283

    1. Initial program 76.3%

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

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

    if -1.45e-216 < a < -2.89999999999999998e-282

    1. Initial program 61.0%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-lft-neg-out61.3%

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

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

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

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

    if 5.2000000000000002e-283 < a < 2.7000000000000002

    1. Initial program 64.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-lft-neg-out30.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.6 \cdot 10^{+53}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-216}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-282}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-283}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.7:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 55.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-191}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -7.2 \cdot 10^{-275}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 6.5 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.69999999999999984e45 or 6.50000000000000006e-55 < y

    1. Initial program 81.1%

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

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

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

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

    if -2.69999999999999984e45 < y < -1.09999999999999999e-191 or -7.1999999999999994e-275 < y < 6.50000000000000006e-55

    1. Initial program 73.7%

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

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

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

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

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

    if -1.09999999999999999e-191 < y < -7.1999999999999994e-275

    1. Initial program 69.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+45}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-191}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq -7.2 \cdot 10^{-275}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-55}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 55.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq -8.8 \cdot 10^{-193}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.45 \cdot 10^{-270}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.02 \cdot 10^{-54}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.9e48 or 1.01999999999999999e-54 < y

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

    if -1.9e48 < y < -8.79999999999999906e-193 or -1.44999999999999991e-270 < y < 1.01999999999999999e-54

    1. Initial program 73.7%

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

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

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

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

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

    if -8.79999999999999906e-193 < y < -1.44999999999999991e-270

    1. Initial program 69.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{+48}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -8.8 \cdot 10^{-193}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{-270}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{-54}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 56.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{if}\;y \leq -1.55 \cdot 10^{-65}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-294}:\\ \;\;\;\;t - a \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 6.9 \cdot 10^{-220}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{-60}:\\ \;\;\;\;\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 x) (/ y (- a z)))))
   (if (<= y -1.55e-65)
     t_1
     (if (<= y 7e-294)
       (- t (* a (/ x z)))
       (if (<= y 6.9e-220)
         x
         (if (<= y 9.8e-60) (* (- y z) (/ t (- a z))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - x) * (y / (a - z));
	double tmp;
	if (y <= -1.55e-65) {
		tmp = t_1;
	} else if (y <= 7e-294) {
		tmp = t - (a * (x / z));
	} else if (y <= 6.9e-220) {
		tmp = x;
	} else if (y <= 9.8e-60) {
		tmp = (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 - x) * (y / (a - z))
    if (y <= (-1.55d-65)) then
        tmp = t_1
    else if (y <= 7d-294) then
        tmp = t - (a * (x / z))
    else if (y <= 6.9d-220) then
        tmp = x
    else if (y <= 9.8d-60) then
        tmp = (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 - x) * (y / (a - z));
	double tmp;
	if (y <= -1.55e-65) {
		tmp = t_1;
	} else if (y <= 7e-294) {
		tmp = t - (a * (x / z));
	} else if (y <= 6.9e-220) {
		tmp = x;
	} else if (y <= 9.8e-60) {
		tmp = (y - z) * (t / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (t - x) * (y / (a - z))
	tmp = 0
	if y <= -1.55e-65:
		tmp = t_1
	elif y <= 7e-294:
		tmp = t - (a * (x / z))
	elif y <= 6.9e-220:
		tmp = x
	elif y <= 9.8e-60:
		tmp = (y - z) * (t / (a - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(t - x) * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (y <= -1.55e-65)
		tmp = t_1;
	elseif (y <= 7e-294)
		tmp = Float64(t - Float64(a * Float64(x / z)));
	elseif (y <= 6.9e-220)
		tmp = x;
	elseif (y <= 9.8e-60)
		tmp = 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 - x) * (y / (a - z));
	tmp = 0.0;
	if (y <= -1.55e-65)
		tmp = t_1;
	elseif (y <= 7e-294)
		tmp = t - (a * (x / z));
	elseif (y <= 6.9e-220)
		tmp = x;
	elseif (y <= 9.8e-60)
		tmp = (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[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.55e-65], t$95$1, If[LessEqual[y, 7e-294], N[(t - N[(a * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.9e-220], x, If[LessEqual[y, 9.8e-60], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 6.9 \cdot 10^{-220}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 9.8 \cdot 10^{-60}:\\
\;\;\;\;\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 y < -1.55000000000000008e-65 or 9.79999999999999977e-60 < y

    1. Initial program 81.0%

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

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

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

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

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

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

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

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

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

    if -1.55000000000000008e-65 < y < 7.00000000000000064e-294

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

    if 7.00000000000000064e-294 < y < 6.89999999999999981e-220

    1. Initial program 80.3%

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

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

    if 6.89999999999999981e-220 < y < 9.79999999999999977e-60

    1. Initial program 68.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{-65}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{-294}:\\ \;\;\;\;t - a \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 6.9 \cdot 10^{-220}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{-60}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 69.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq 4.3 \cdot 10^{+136}:\\
\;\;\;\;x - y \cdot \frac{x - t}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.8e62 or 7.10000000000000017e152 < a

    1. Initial program 92.1%

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

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

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

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

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

    if -1.8e62 < a < 2.69999999999999984e45

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

    if 2.69999999999999984e45 < a < 4.2999999999999999e136

    1. Initial program 82.3%

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    5. Simplified76.3%

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

    if 4.2999999999999999e136 < a < 7.10000000000000017e152

    1. Initial program 33.4%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+62}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+45}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 4.3 \cdot 10^{+136}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq 7.1 \cdot 10^{+152}:\\ \;\;\;\;t - a \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 75.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-15} \lor \neg \left(z \leq 340000000000\right):\\
\;\;\;\;t - \left(t - x\right) \cdot \frac{y - a}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.2999999999999999e-15 or 3.4e11 < z

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

    if -2.2999999999999999e-15 < z < 3.4e11

    1. Initial program 89.1%

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

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

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

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

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

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

Alternative 18: 38.4% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 0.0024:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.7999999999999997e55 or 0.00239999999999999979 < a

    1. Initial program 84.7%

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

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

    if -5.7999999999999997e55 < a < 0.00239999999999999979

    1. Initial program 70.9%

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+55}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 0.0024:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 25.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 77.1%

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

    \[\leadsto \color{blue}{t} \]
  4. Final simplification21.5%

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

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