Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3

Percentage Accurate: 67.9% → 88.5%
Time: 15.3s
Alternatives: 30
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 30 alternatives:

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

Initial Program: 67.9% accurate, 1.0× speedup?

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

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

Alternative 1: 88.5% accurate, 0.1× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-288} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\

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


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

    1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 96.7%

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

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

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

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

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

    if -1.00000000000000006e-32 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.00000000000000012e-288 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 80.0%

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

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

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

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

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

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

    1. Initial program 3.8%

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

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

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

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

        \[\leadsto y + \left(-\frac{\mathsf{fma}\left(z, y - x, \color{blue}{a \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}}\right) - a \cdot \left(y - x\right)}{t}\right) \]
      4. distribute-rgt-out--99.7%

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

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

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

Alternative 2: 88.5% accurate, 0.1× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-288} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\

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


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

    1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 96.7%

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

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

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

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

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

    if -1.00000000000000006e-32 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.00000000000000012e-288 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 80.0%

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

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

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

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

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

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

    1. Initial program 3.8%

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

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

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

Alternative 3: 86.5% accurate, 0.2× speedup?

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

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

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

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

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+291}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 35.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.00000000000000012e-288 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 3.9999999999999998e291

    1. Initial program 96.8%

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

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

    1. Initial program 3.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num3.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/3.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    6. Applied egg-rr3.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 86.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-288}:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 94.9%

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

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

    1. Initial program 3.8%

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

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

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

    1. Initial program 76.9%

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

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

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

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

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

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

Alternative 5: 86.2% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-288}:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 94.9%

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

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

    1. Initial program 3.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \left(\left(\left(-y\right) + \left(-\color{blue}{\sqrt{x} \cdot \sqrt{x}}\right)\right) \cdot \frac{1}{-t}\right) \cdot \left(z - a\right) \]
      9. add-sqr-sqrt39.2%

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

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

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

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

        \[\leadsto y - \left(\left(\left(-y\right) + \color{blue}{\sqrt{x} \cdot \sqrt{x}}\right) \cdot \frac{1}{-t}\right) \cdot \left(z - a\right) \]
      14. add-sqr-sqrt99.6%

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

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

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

    1. Initial program 76.9%

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

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

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

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

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

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

Alternative 6: 86.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-288}:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 94.9%

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

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

    1. Initial program 3.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num3.8%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/3.7%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    6. Applied egg-rr3.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 76.9%

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

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

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

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

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

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

Alternative 7: 53.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y - z \cdot \frac{y}{t}\\ t_2 := x + y \cdot \frac{z}{a}\\ \mathbf{if}\;t \leq -5.5 \cdot 10^{+70}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-89}:\\ \;\;\;\;x - t \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-289}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-67}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-23}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{-8}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{+40}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- y (* z (/ y t)))) (t_2 (+ x (* y (/ z a)))))
   (if (<= t -5.5e+70)
     t_1
     (if (<= t -2.8e-89)
       (- x (* t (/ y a)))
       (if (<= t -3e-289)
         t_2
         (if (<= t 8.2e-67)
           (- x (* x (/ z a)))
           (if (<= t 7e-23)
             (+ x (/ (* y z) a))
             (if (<= t 9.8e-8)
               (* z (/ (- x y) t))
               (if (<= t 1.22e+40) t_2 t_1)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y - (z * (y / t));
	double t_2 = x + (y * (z / a));
	double tmp;
	if (t <= -5.5e+70) {
		tmp = t_1;
	} else if (t <= -2.8e-89) {
		tmp = x - (t * (y / a));
	} else if (t <= -3e-289) {
		tmp = t_2;
	} else if (t <= 8.2e-67) {
		tmp = x - (x * (z / a));
	} else if (t <= 7e-23) {
		tmp = x + ((y * z) / a);
	} else if (t <= 9.8e-8) {
		tmp = z * ((x - y) / t);
	} else if (t <= 1.22e+40) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = y - (z * (y / t))
    t_2 = x + (y * (z / a))
    if (t <= (-5.5d+70)) then
        tmp = t_1
    else if (t <= (-2.8d-89)) then
        tmp = x - (t * (y / a))
    else if (t <= (-3d-289)) then
        tmp = t_2
    else if (t <= 8.2d-67) then
        tmp = x - (x * (z / a))
    else if (t <= 7d-23) then
        tmp = x + ((y * z) / a)
    else if (t <= 9.8d-8) then
        tmp = z * ((x - y) / t)
    else if (t <= 1.22d+40) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y - (z * (y / t));
	double t_2 = x + (y * (z / a));
	double tmp;
	if (t <= -5.5e+70) {
		tmp = t_1;
	} else if (t <= -2.8e-89) {
		tmp = x - (t * (y / a));
	} else if (t <= -3e-289) {
		tmp = t_2;
	} else if (t <= 8.2e-67) {
		tmp = x - (x * (z / a));
	} else if (t <= 7e-23) {
		tmp = x + ((y * z) / a);
	} else if (t <= 9.8e-8) {
		tmp = z * ((x - y) / t);
	} else if (t <= 1.22e+40) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y - (z * (y / t))
	t_2 = x + (y * (z / a))
	tmp = 0
	if t <= -5.5e+70:
		tmp = t_1
	elif t <= -2.8e-89:
		tmp = x - (t * (y / a))
	elif t <= -3e-289:
		tmp = t_2
	elif t <= 8.2e-67:
		tmp = x - (x * (z / a))
	elif t <= 7e-23:
		tmp = x + ((y * z) / a)
	elif t <= 9.8e-8:
		tmp = z * ((x - y) / t)
	elif t <= 1.22e+40:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y - Float64(z * Float64(y / t)))
	t_2 = Float64(x + Float64(y * Float64(z / a)))
	tmp = 0.0
	if (t <= -5.5e+70)
		tmp = t_1;
	elseif (t <= -2.8e-89)
		tmp = Float64(x - Float64(t * Float64(y / a)));
	elseif (t <= -3e-289)
		tmp = t_2;
	elseif (t <= 8.2e-67)
		tmp = Float64(x - Float64(x * Float64(z / a)));
	elseif (t <= 7e-23)
		tmp = Float64(x + Float64(Float64(y * z) / a));
	elseif (t <= 9.8e-8)
		tmp = Float64(z * Float64(Float64(x - y) / t));
	elseif (t <= 1.22e+40)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y - (z * (y / t));
	t_2 = x + (y * (z / a));
	tmp = 0.0;
	if (t <= -5.5e+70)
		tmp = t_1;
	elseif (t <= -2.8e-89)
		tmp = x - (t * (y / a));
	elseif (t <= -3e-289)
		tmp = t_2;
	elseif (t <= 8.2e-67)
		tmp = x - (x * (z / a));
	elseif (t <= 7e-23)
		tmp = x + ((y * z) / a);
	elseif (t <= 9.8e-8)
		tmp = z * ((x - y) / t);
	elseif (t <= 1.22e+40)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e+70], t$95$1, If[LessEqual[t, -2.8e-89], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3e-289], t$95$2, If[LessEqual[t, 8.2e-67], N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-23], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.8e-8], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.22e+40], t$95$2, t$95$1]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -3 \cdot 10^{-289}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 8.2 \cdot 10^{-67}:\\
\;\;\;\;x - x \cdot \frac{z}{a}\\

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

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

\mathbf{elif}\;t \leq 1.22 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -5.49999999999999986e70 or 1.22000000000000004e40 < t

    1. Initial program 44.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    9. Taylor expanded in y around inf 59.8%

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

    if -5.49999999999999986e70 < t < -2.7999999999999999e-89

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + t \cdot \color{blue}{\frac{-1 \cdot y}{a}} \]
      6. neg-mul-156.0%

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

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

    if -2.7999999999999999e-89 < t < -2.9999999999999998e-289 or 9.8000000000000004e-8 < t < 1.22000000000000004e40

    1. Initial program 95.2%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified74.5%

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

    if -2.9999999999999998e-289 < t < 8.1999999999999994e-67

    1. Initial program 88.7%

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

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot z}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg70.0%

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

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

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

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

        \[\leadsto x + x \cdot \color{blue}{\frac{-1 \cdot z}{a}} \]
      6. neg-mul-176.5%

        \[\leadsto x + x \cdot \frac{\color{blue}{-z}}{a} \]
    6. Simplified76.5%

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

    if 8.1999999999999994e-67 < t < 6.99999999999999987e-23

    1. Initial program 100.0%

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

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

      \[\leadsto x + \frac{\color{blue}{y \cdot z}}{a} \]
    5. Step-by-step derivation
      1. *-commutative60.4%

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

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

    if 6.99999999999999987e-23 < t < 9.8000000000000004e-8

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{z \cdot \frac{y - x}{t}} \]
      3. *-commutative77.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+70}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-89}:\\ \;\;\;\;x - t \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -3 \cdot 10^{-289}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-67}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-23}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 9.8 \cdot 10^{-8}:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 1.22 \cdot 10^{+40}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 53.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y - z \cdot \frac{y}{t}\\ \mathbf{if}\;t \leq -8.5 \cdot 10^{+103}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.22 \cdot 10^{-287}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-64}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 3.05 \cdot 10^{+81} \lor \neg \left(t \leq 1.8 \cdot 10^{+111}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- y (* z (/ y t)))))
   (if (<= t -8.5e+103)
     t_1
     (if (<= t -1.22e-287)
       (+ x (* y (/ z a)))
       (if (<= t 2.5e-64)
         (- x (* x (/ z a)))
         (if (<= t 8.2e-27)
           (+ x (/ (* y z) a))
           (if (or (<= t 3.05e+81) (not (<= t 1.8e+111)))
             t_1
             (* x (/ z t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y - (z * (y / t));
	double tmp;
	if (t <= -8.5e+103) {
		tmp = t_1;
	} else if (t <= -1.22e-287) {
		tmp = x + (y * (z / a));
	} else if (t <= 2.5e-64) {
		tmp = x - (x * (z / a));
	} else if (t <= 8.2e-27) {
		tmp = x + ((y * z) / a);
	} else if ((t <= 3.05e+81) || !(t <= 1.8e+111)) {
		tmp = t_1;
	} else {
		tmp = x * (z / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y - (z * (y / t))
    if (t <= (-8.5d+103)) then
        tmp = t_1
    else if (t <= (-1.22d-287)) then
        tmp = x + (y * (z / a))
    else if (t <= 2.5d-64) then
        tmp = x - (x * (z / a))
    else if (t <= 8.2d-27) then
        tmp = x + ((y * z) / a)
    else if ((t <= 3.05d+81) .or. (.not. (t <= 1.8d+111))) then
        tmp = t_1
    else
        tmp = x * (z / t)
    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 * (y / t));
	double tmp;
	if (t <= -8.5e+103) {
		tmp = t_1;
	} else if (t <= -1.22e-287) {
		tmp = x + (y * (z / a));
	} else if (t <= 2.5e-64) {
		tmp = x - (x * (z / a));
	} else if (t <= 8.2e-27) {
		tmp = x + ((y * z) / a);
	} else if ((t <= 3.05e+81) || !(t <= 1.8e+111)) {
		tmp = t_1;
	} else {
		tmp = x * (z / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y - (z * (y / t))
	tmp = 0
	if t <= -8.5e+103:
		tmp = t_1
	elif t <= -1.22e-287:
		tmp = x + (y * (z / a))
	elif t <= 2.5e-64:
		tmp = x - (x * (z / a))
	elif t <= 8.2e-27:
		tmp = x + ((y * z) / a)
	elif (t <= 3.05e+81) or not (t <= 1.8e+111):
		tmp = t_1
	else:
		tmp = x * (z / t)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y - Float64(z * Float64(y / t)))
	tmp = 0.0
	if (t <= -8.5e+103)
		tmp = t_1;
	elseif (t <= -1.22e-287)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	elseif (t <= 2.5e-64)
		tmp = Float64(x - Float64(x * Float64(z / a)));
	elseif (t <= 8.2e-27)
		tmp = Float64(x + Float64(Float64(y * z) / a));
	elseif ((t <= 3.05e+81) || !(t <= 1.8e+111))
		tmp = t_1;
	else
		tmp = Float64(x * Float64(z / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y - (z * (y / t));
	tmp = 0.0;
	if (t <= -8.5e+103)
		tmp = t_1;
	elseif (t <= -1.22e-287)
		tmp = x + (y * (z / a));
	elseif (t <= 2.5e-64)
		tmp = x - (x * (z / a));
	elseif (t <= 8.2e-27)
		tmp = x + ((y * z) / a);
	elseif ((t <= 3.05e+81) || ~((t <= 1.8e+111)))
		tmp = t_1;
	else
		tmp = x * (z / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+103], t$95$1, If[LessEqual[t, -1.22e-287], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-64], N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e-27], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 3.05e+81], N[Not[LessEqual[t, 1.8e+111]], $MachinePrecision]], t$95$1, N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y - z \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.5 \cdot 10^{-64}:\\
\;\;\;\;x - x \cdot \frac{z}{a}\\

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

\mathbf{elif}\;t \leq 3.05 \cdot 10^{+81} \lor \neg \left(t \leq 1.8 \cdot 10^{+111}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -8.4999999999999992e103 or 8.1999999999999997e-27 < t < 3.05000000000000019e81 or 1.8000000000000001e111 < t

    1. Initial program 45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    9. Taylor expanded in y around inf 61.9%

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

    if -8.4999999999999992e103 < t < -1.21999999999999996e-287

    1. Initial program 84.1%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified58.6%

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

    if -1.21999999999999996e-287 < t < 2.50000000000000017e-64

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-x\right)} \cdot \frac{z}{a} \]
      4. cancel-sign-sub-inv76.5%

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

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

    if 2.50000000000000017e-64 < t < 8.1999999999999997e-27

    1. Initial program 100.0%

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

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

      \[\leadsto x + \frac{\color{blue}{y \cdot z}}{a} \]
    5. Step-by-step derivation
      1. *-commutative65.4%

        \[\leadsto x + \frac{\color{blue}{z \cdot y}}{a} \]
    6. Simplified65.4%

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

    if 3.05000000000000019e81 < t < 1.8000000000000001e111

    1. Initial program 63.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    9. Taylor expanded in y around 0 51.4%

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

        \[\leadsto \color{blue}{x \cdot \frac{z}{t}} \]
    11. Simplified62.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.5 \cdot 10^{+103}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq -1.22 \cdot 10^{-287}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-64}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-27}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 3.05 \cdot 10^{+81} \lor \neg \left(t \leq 1.8 \cdot 10^{+111}\right):\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 53.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z}{a}\\ t_2 := y - z \cdot \frac{y}{t}\\ \mathbf{if}\;t \leq -1.02 \cdot 10^{+105}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-290}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-64}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-22}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 0.013:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 5.3 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ z a)))) (t_2 (- y (* z (/ y t)))))
   (if (<= t -1.02e+105)
     t_2
     (if (<= t -4.6e-290)
       t_1
       (if (<= t 2.6e-64)
         (- x (* x (/ z a)))
         (if (<= t 4.2e-22)
           (+ x (/ (* y z) a))
           (if (<= t 0.013)
             (* z (/ (- x y) t))
             (if (<= t 5.3e+40) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (z / a));
	double t_2 = y - (z * (y / t));
	double tmp;
	if (t <= -1.02e+105) {
		tmp = t_2;
	} else if (t <= -4.6e-290) {
		tmp = t_1;
	} else if (t <= 2.6e-64) {
		tmp = x - (x * (z / a));
	} else if (t <= 4.2e-22) {
		tmp = x + ((y * z) / a);
	} else if (t <= 0.013) {
		tmp = z * ((x - y) / t);
	} else if (t <= 5.3e+40) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (y * (z / a))
    t_2 = y - (z * (y / t))
    if (t <= (-1.02d+105)) then
        tmp = t_2
    else if (t <= (-4.6d-290)) then
        tmp = t_1
    else if (t <= 2.6d-64) then
        tmp = x - (x * (z / a))
    else if (t <= 4.2d-22) then
        tmp = x + ((y * z) / a)
    else if (t <= 0.013d0) then
        tmp = z * ((x - y) / t)
    else if (t <= 5.3d+40) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (z / a));
	double t_2 = y - (z * (y / t));
	double tmp;
	if (t <= -1.02e+105) {
		tmp = t_2;
	} else if (t <= -4.6e-290) {
		tmp = t_1;
	} else if (t <= 2.6e-64) {
		tmp = x - (x * (z / a));
	} else if (t <= 4.2e-22) {
		tmp = x + ((y * z) / a);
	} else if (t <= 0.013) {
		tmp = z * ((x - y) / t);
	} else if (t <= 5.3e+40) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (z / a))
	t_2 = y - (z * (y / t))
	tmp = 0
	if t <= -1.02e+105:
		tmp = t_2
	elif t <= -4.6e-290:
		tmp = t_1
	elif t <= 2.6e-64:
		tmp = x - (x * (z / a))
	elif t <= 4.2e-22:
		tmp = x + ((y * z) / a)
	elif t <= 0.013:
		tmp = z * ((x - y) / t)
	elif t <= 5.3e+40:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(z / a)))
	t_2 = Float64(y - Float64(z * Float64(y / t)))
	tmp = 0.0
	if (t <= -1.02e+105)
		tmp = t_2;
	elseif (t <= -4.6e-290)
		tmp = t_1;
	elseif (t <= 2.6e-64)
		tmp = Float64(x - Float64(x * Float64(z / a)));
	elseif (t <= 4.2e-22)
		tmp = Float64(x + Float64(Float64(y * z) / a));
	elseif (t <= 0.013)
		tmp = Float64(z * Float64(Float64(x - y) / t));
	elseif (t <= 5.3e+40)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (z / a));
	t_2 = y - (z * (y / t));
	tmp = 0.0;
	if (t <= -1.02e+105)
		tmp = t_2;
	elseif (t <= -4.6e-290)
		tmp = t_1;
	elseif (t <= 2.6e-64)
		tmp = x - (x * (z / a));
	elseif (t <= 4.2e-22)
		tmp = x + ((y * z) / a);
	elseif (t <= 0.013)
		tmp = z * ((x - y) / t);
	elseif (t <= 5.3e+40)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.02e+105], t$95$2, If[LessEqual[t, -4.6e-290], t$95$1, If[LessEqual[t, 2.6e-64], N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-22], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.013], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.3e+40], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4.6 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-64}:\\
\;\;\;\;x - x \cdot \frac{z}{a}\\

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

\mathbf{elif}\;t \leq 0.013:\\
\;\;\;\;z \cdot \frac{x - y}{t}\\

\mathbf{elif}\;t \leq 5.3 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.02e105 or 5.3e40 < t

    1. Initial program 42.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    9. Taylor expanded in y around inf 62.0%

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

    if -1.02e105 < t < -4.6000000000000001e-290 or 0.0129999999999999994 < t < 5.3e40

    1. Initial program 83.9%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified59.1%

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

    if -4.6000000000000001e-290 < t < 2.6e-64

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-x\right)} \cdot \frac{z}{a} \]
      4. cancel-sign-sub-inv76.5%

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

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

    if 2.6e-64 < t < 4.20000000000000016e-22

    1. Initial program 100.0%

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

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

      \[\leadsto x + \frac{\color{blue}{y \cdot z}}{a} \]
    5. Step-by-step derivation
      1. *-commutative60.4%

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

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

    if 4.20000000000000016e-22 < t < 0.0129999999999999994

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{z \cdot \frac{y - x}{t}} \]
      3. *-commutative77.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.02 \cdot 10^{+105}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-290}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-64}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-22}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 0.013:\\ \;\;\;\;z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 5.3 \cdot 10^{+40}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 50.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot \frac{z}{a}\\ t_2 := x + y \cdot \frac{z}{a}\\ \mathbf{if}\;t \leq -1.3 \cdot 10^{+116}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{+75}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{+70}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-145}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-290}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 2.85 \cdot 10^{+54}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* x (/ z a)))) (t_2 (+ x (* y (/ z a)))))
   (if (<= t -1.3e+116)
     y
     (if (<= t -1.7e+75)
       t_2
       (if (<= t -3.3e+70)
         y
         (if (<= t -7e-145)
           t_1
           (if (<= t -4.2e-290) t_2 (if (<= t 2.85e+54) t_1 y))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (z / a));
	double t_2 = x + (y * (z / a));
	double tmp;
	if (t <= -1.3e+116) {
		tmp = y;
	} else if (t <= -1.7e+75) {
		tmp = t_2;
	} else if (t <= -3.3e+70) {
		tmp = y;
	} else if (t <= -7e-145) {
		tmp = t_1;
	} else if (t <= -4.2e-290) {
		tmp = t_2;
	} else if (t <= 2.85e+54) {
		tmp = t_1;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (x * (z / a))
    t_2 = x + (y * (z / a))
    if (t <= (-1.3d+116)) then
        tmp = y
    else if (t <= (-1.7d+75)) then
        tmp = t_2
    else if (t <= (-3.3d+70)) then
        tmp = y
    else if (t <= (-7d-145)) then
        tmp = t_1
    else if (t <= (-4.2d-290)) then
        tmp = t_2
    else if (t <= 2.85d+54) then
        tmp = t_1
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (z / a));
	double t_2 = x + (y * (z / a));
	double tmp;
	if (t <= -1.3e+116) {
		tmp = y;
	} else if (t <= -1.7e+75) {
		tmp = t_2;
	} else if (t <= -3.3e+70) {
		tmp = y;
	} else if (t <= -7e-145) {
		tmp = t_1;
	} else if (t <= -4.2e-290) {
		tmp = t_2;
	} else if (t <= 2.85e+54) {
		tmp = t_1;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (x * (z / a))
	t_2 = x + (y * (z / a))
	tmp = 0
	if t <= -1.3e+116:
		tmp = y
	elif t <= -1.7e+75:
		tmp = t_2
	elif t <= -3.3e+70:
		tmp = y
	elif t <= -7e-145:
		tmp = t_1
	elif t <= -4.2e-290:
		tmp = t_2
	elif t <= 2.85e+54:
		tmp = t_1
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(x * Float64(z / a)))
	t_2 = Float64(x + Float64(y * Float64(z / a)))
	tmp = 0.0
	if (t <= -1.3e+116)
		tmp = y;
	elseif (t <= -1.7e+75)
		tmp = t_2;
	elseif (t <= -3.3e+70)
		tmp = y;
	elseif (t <= -7e-145)
		tmp = t_1;
	elseif (t <= -4.2e-290)
		tmp = t_2;
	elseif (t <= 2.85e+54)
		tmp = t_1;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (x * (z / a));
	t_2 = x + (y * (z / a));
	tmp = 0.0;
	if (t <= -1.3e+116)
		tmp = y;
	elseif (t <= -1.7e+75)
		tmp = t_2;
	elseif (t <= -3.3e+70)
		tmp = y;
	elseif (t <= -7e-145)
		tmp = t_1;
	elseif (t <= -4.2e-290)
		tmp = t_2;
	elseif (t <= 2.85e+54)
		tmp = t_1;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.3e+116], y, If[LessEqual[t, -1.7e+75], t$95$2, If[LessEqual[t, -3.3e+70], y, If[LessEqual[t, -7e-145], t$95$1, If[LessEqual[t, -4.2e-290], t$95$2, If[LessEqual[t, 2.85e+54], t$95$1, y]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.7 \cdot 10^{+75}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -3.3 \cdot 10^{+70}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;t \leq -4.2 \cdot 10^{-290}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 2.85 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.29999999999999993e116 or -1.70000000000000006e75 < t < -3.30000000000000016e70 or 2.8499999999999998e54 < t

    1. Initial program 41.9%

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

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

    if -1.29999999999999993e116 < t < -1.70000000000000006e75 or -6.99999999999999994e-145 < t < -4.2000000000000002e-290

    1. Initial program 90.7%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified79.7%

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

    if -3.30000000000000016e70 < t < -6.99999999999999994e-145 or -4.2000000000000002e-290 < t < 2.8499999999999998e54

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-x\right)} \cdot \frac{z}{a} \]
      4. cancel-sign-sub-inv56.9%

        \[\leadsto \color{blue}{x - x \cdot \frac{z}{a}} \]
    9. Simplified56.9%

      \[\leadsto \color{blue}{x - x \cdot \frac{z}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 11: 50.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -2.9 \cdot 10^{+75}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -1.9 \cdot 10^{+70}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -3.05 \cdot 10^{-143}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.3 \cdot 10^{-287}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5e103 or -2.8999999999999998e75 < t < -1.8999999999999999e70 or 2.2000000000000001e55 < t

    1. Initial program 41.9%

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

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

    if -5e103 < t < -2.8999999999999998e75 or -3.04999999999999996e-143 < t < -1.3e-287

    1. Initial program 90.7%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified79.7%

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

    if -1.8999999999999999e70 < t < -3.04999999999999996e-143 or -1.3e-287 < t < 2.2000000000000001e55

    1. Initial program 84.1%

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{a}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 12: 78.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -2.7 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.75 \cdot 10^{-142}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 5.1 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.55 \cdot 10^{+40}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.8999999999999999e58 or 1.5499999999999999e40 < t

    1. Initial program 45.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8999999999999999e58 < t < -2.69999999999999988e-89 or 1.75000000000000007e-142 < t < 5.0999999999999998e-19

    1. Initial program 81.0%

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

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

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

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

    if -2.69999999999999988e-89 < t < 1.75000000000000007e-142 or 5.0999999999999998e-19 < t < 1.5499999999999999e40

    1. Initial program 94.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+58}:\\ \;\;\;\;y - \frac{y - x}{t} \cdot \left(z - a\right)\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-89}:\\ \;\;\;\;x + \frac{y \cdot \left(t - z\right)}{t - a}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-142}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{y \cdot \left(t - z\right)}{t - a}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{+40}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y - \frac{y - x}{t} \cdot \left(z - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 75.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y \cdot \left(t - z\right)}{t - a}\\ t_2 := x + z \cdot \frac{y - x}{a - t}\\ \mathbf{if}\;t \leq -1.65 \cdot 10^{+58}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -2.95 \cdot 10^{-89}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-142}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+40}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z}{\frac{t}{x - y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* y (- t z)) (- t a))))
        (t_2 (+ x (* z (/ (- y x) (- a t))))))
   (if (<= t -1.65e+58)
     (+ y (* z (/ (- x y) t)))
     (if (<= t -2.95e-89)
       t_1
       (if (<= t 1.55e-142)
         t_2
         (if (<= t 2.4e-19)
           t_1
           (if (<= t 5.5e+40) t_2 (+ y (/ z (/ t (- x y)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y * (t - z)) / (t - a));
	double t_2 = x + (z * ((y - x) / (a - t)));
	double tmp;
	if (t <= -1.65e+58) {
		tmp = y + (z * ((x - y) / t));
	} else if (t <= -2.95e-89) {
		tmp = t_1;
	} else if (t <= 1.55e-142) {
		tmp = t_2;
	} else if (t <= 2.4e-19) {
		tmp = t_1;
	} else if (t <= 5.5e+40) {
		tmp = t_2;
	} else {
		tmp = y + (z / (t / (x - y)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + ((y * (t - z)) / (t - a))
    t_2 = x + (z * ((y - x) / (a - t)))
    if (t <= (-1.65d+58)) then
        tmp = y + (z * ((x - y) / t))
    else if (t <= (-2.95d-89)) then
        tmp = t_1
    else if (t <= 1.55d-142) then
        tmp = t_2
    else if (t <= 2.4d-19) then
        tmp = t_1
    else if (t <= 5.5d+40) then
        tmp = t_2
    else
        tmp = y + (z / (t / (x - y)))
    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 * (t - z)) / (t - a));
	double t_2 = x + (z * ((y - x) / (a - t)));
	double tmp;
	if (t <= -1.65e+58) {
		tmp = y + (z * ((x - y) / t));
	} else if (t <= -2.95e-89) {
		tmp = t_1;
	} else if (t <= 1.55e-142) {
		tmp = t_2;
	} else if (t <= 2.4e-19) {
		tmp = t_1;
	} else if (t <= 5.5e+40) {
		tmp = t_2;
	} else {
		tmp = y + (z / (t / (x - y)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y * (t - z)) / (t - a))
	t_2 = x + (z * ((y - x) / (a - t)))
	tmp = 0
	if t <= -1.65e+58:
		tmp = y + (z * ((x - y) / t))
	elif t <= -2.95e-89:
		tmp = t_1
	elif t <= 1.55e-142:
		tmp = t_2
	elif t <= 2.4e-19:
		tmp = t_1
	elif t <= 5.5e+40:
		tmp = t_2
	else:
		tmp = y + (z / (t / (x - y)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y * Float64(t - z)) / Float64(t - a)))
	t_2 = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t))))
	tmp = 0.0
	if (t <= -1.65e+58)
		tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t)));
	elseif (t <= -2.95e-89)
		tmp = t_1;
	elseif (t <= 1.55e-142)
		tmp = t_2;
	elseif (t <= 2.4e-19)
		tmp = t_1;
	elseif (t <= 5.5e+40)
		tmp = t_2;
	else
		tmp = Float64(y + Float64(z / Float64(t / Float64(x - y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y * (t - z)) / (t - a));
	t_2 = x + (z * ((y - x) / (a - t)));
	tmp = 0.0;
	if (t <= -1.65e+58)
		tmp = y + (z * ((x - y) / t));
	elseif (t <= -2.95e-89)
		tmp = t_1;
	elseif (t <= 1.55e-142)
		tmp = t_2;
	elseif (t <= 2.4e-19)
		tmp = t_1;
	elseif (t <= 5.5e+40)
		tmp = t_2;
	else
		tmp = y + (z / (t / (x - y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.65e+58], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.95e-89], t$95$1, If[LessEqual[t, 1.55e-142], t$95$2, If[LessEqual[t, 2.4e-19], t$95$1, If[LessEqual[t, 5.5e+40], t$95$2, N[(y + N[(z / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.95 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.55 \cdot 10^{-142}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.64999999999999991e58

    1. Initial program 44.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.64999999999999991e58 < t < -2.9500000000000001e-89 or 1.55e-142 < t < 2.40000000000000023e-19

    1. Initial program 81.0%

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

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

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

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

    if -2.9500000000000001e-89 < t < 1.55e-142 or 2.40000000000000023e-19 < t < 5.49999999999999974e40

    1. Initial program 94.0%

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

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

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

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

    if 5.49999999999999974e40 < t

    1. Initial program 46.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
    10. Applied egg-rr74.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+58}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -2.95 \cdot 10^{-89}:\\ \;\;\;\;x + \frac{y \cdot \left(t - z\right)}{t - a}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-142}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{y \cdot \left(t - z\right)}{t - a}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+40}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z}{\frac{t}{x - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 56.9% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 2.65 \cdot 10^{-67}:\\
\;\;\;\;x - x \cdot \frac{z}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -6.79999999999999984e57 or 3.6999999999999997e-29 < t

    1. Initial program 48.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    9. Taylor expanded in y around 0 65.6%

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

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

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

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

    if -6.79999999999999984e57 < t < -2.9500000000000001e-89

    1. Initial program 78.2%

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{a} \]
      2. distribute-lft-neg-out58.8%

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

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

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

    if -2.9500000000000001e-89 < t < -2.79999999999999997e-290

    1. Initial program 96.9%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified75.0%

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

    if -2.79999999999999997e-290 < t < 2.64999999999999986e-67

    1. Initial program 88.7%

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

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot z}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg70.0%

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

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

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

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

        \[\leadsto x + x \cdot \color{blue}{\frac{-1 \cdot z}{a}} \]
      6. neg-mul-176.5%

        \[\leadsto x + x \cdot \frac{\color{blue}{-z}}{a} \]
    6. Simplified76.5%

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

    if 2.64999999999999986e-67 < t < 3.6999999999999997e-29

    1. Initial program 100.0%

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

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

      \[\leadsto x + \frac{\color{blue}{y \cdot z}}{a} \]
    5. Step-by-step derivation
      1. *-commutative65.4%

        \[\leadsto x + \frac{\color{blue}{z \cdot y}}{a} \]
    6. Simplified65.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+57}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -2.95 \cdot 10^{-89}:\\ \;\;\;\;x - \frac{y \cdot t}{a}\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-290}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 2.65 \cdot 10^{-67}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-29}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 61.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq 1.02 \cdot 10^{-240}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 10^{+111}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.0000000000000001e-18 or 9.99999999999999957e110 < a

    1. Initial program 70.6%

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

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

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

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

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

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

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

    if -1.0000000000000001e-18 < a < 1.02e-240 or 1.6000000000000001e51 < a < 9.99999999999999957e110

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    9. Taylor expanded in y around 0 71.8%

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

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

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

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

    if 1.02e-240 < a < 1.6000000000000001e51

    1. Initial program 68.4%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num83.1%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/83.1%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    6. Applied egg-rr83.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{-18}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-240}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+51}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;a \leq 10^{+111}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 58.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq 3.5 \cdot 10^{-270}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 1.65 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.59999999999999965e-40 or 1.64999999999999996e-77 < y

    1. Initial program 69.2%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num89.5%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{\frac{a - t}{z - t}}}, x\right) \]
      2. associate-/r/89.9%

        \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{\frac{1}{a - t} \cdot \left(z - t\right)}, x\right) \]
    6. Applied egg-rr89.9%

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

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

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

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

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

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

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

    if -9.59999999999999965e-40 < y < 3.49999999999999994e-270 or 2.2e-188 < y < 1.64999999999999996e-77

    1. Initial program 74.6%

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

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot z}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg59.9%

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

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

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

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

        \[\leadsto x + x \cdot \color{blue}{\frac{-1 \cdot z}{a}} \]
      6. neg-mul-164.1%

        \[\leadsto x + x \cdot \frac{\color{blue}{-z}}{a} \]
    6. Simplified64.1%

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

    if 3.49999999999999994e-270 < y < 2.2e-188

    1. Initial program 55.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.6 \cdot 10^{-40}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-270}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-188}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-77}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 53.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := y - z \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.5000000000000001e70 or 1.05000000000000005e40 < t

    1. Initial program 44.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    9. Taylor expanded in y around inf 59.8%

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

    if -2.5000000000000001e70 < t < -2.9500000000000001e-89

    1. Initial program 77.9%

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{a} \]
      2. distribute-lft-neg-out56.0%

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

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

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

    if -2.9500000000000001e-89 < t < -8.1999999999999996e-289

    1. Initial program 96.9%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified75.0%

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

    if -8.1999999999999996e-289 < t < 1.05000000000000005e40

    1. Initial program 89.5%

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

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

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

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

        \[\leadsto x + \left(-\color{blue}{x \cdot \frac{z}{a}}\right) \]
      3. distribute-rgt-neg-in64.4%

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

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

        \[\leadsto x + x \cdot \color{blue}{\frac{-1 \cdot z}{a}} \]
      6. neg-mul-164.4%

        \[\leadsto x + x \cdot \frac{\color{blue}{-z}}{a} \]
    6. Simplified64.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+70}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq -2.95 \cdot 10^{-89}:\\ \;\;\;\;x - \frac{y \cdot t}{a}\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-289}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+40}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 53.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := y - z \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.4999999999999999e70 or 1.42e40 < t

    1. Initial program 44.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    9. Taylor expanded in y around inf 59.8%

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

    if -4.4999999999999999e70 < t < -2.9500000000000001e-89

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + t \cdot \color{blue}{\frac{-1 \cdot y}{a}} \]
      6. neg-mul-156.0%

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

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

    if -2.9500000000000001e-89 < t < -1.0199999999999999e-288

    1. Initial program 96.9%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    6. Simplified75.0%

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

    if -1.0199999999999999e-288 < t < 1.42e40

    1. Initial program 89.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-x\right)} \cdot \frac{z}{a} \]
      4. cancel-sign-sub-inv64.4%

        \[\leadsto \color{blue}{x - x \cdot \frac{z}{a}} \]
    9. Simplified64.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+70}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq -2.95 \cdot 10^{-89}:\\ \;\;\;\;x - t \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -1.02 \cdot 10^{-288}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.42 \cdot 10^{+40}:\\ \;\;\;\;x - x \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 48.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -9.2 \cdot 10^{-144}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4.6 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.1000000000000001e108 or 4.59999999999999988e54 < t

    1. Initial program 41.7%

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

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

    if -1.1000000000000001e108 < t < -9.2e-144 or -1.50000000000000006e-270 < t < 4.59999999999999988e54

    1. Initial program 82.9%

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

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

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

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

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

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

    if -9.2e-144 < t < -1.50000000000000006e-270

    1. Initial program 98.7%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - x}{a} \cdot z} \]
    6. Applied egg-rr64.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+108}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -9.2 \cdot 10^{-144}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{-270}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+54}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 48.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -5.2 \cdot 10^{-147}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 5.5 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.4999999999999992e103 or 5.5000000000000004e55 < t

    1. Initial program 41.7%

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

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

    if -8.4999999999999992e103 < t < -5.1999999999999997e-147 or -2.9999999999999999e-269 < t < 5.5000000000000004e55

    1. Initial program 82.9%

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

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

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

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

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

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

    if -5.1999999999999997e-147 < t < -2.9999999999999999e-269

    1. Initial program 98.7%

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 21: 75.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+57}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.49999999999999996e57

    1. Initial program 44.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.49999999999999996e57 < t < -3.9e-54

    1. Initial program 79.4%

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

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

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

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

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

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

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

    if -3.9e-54 < t < 6.0000000000000004e40

    1. Initial program 91.2%

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

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

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

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

    if 6.0000000000000004e40 < t

    1. Initial program 46.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
    10. Applied egg-rr74.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+57}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -3.9 \cdot 10^{-54}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+40}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z}{\frac{t}{x - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 69.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+57}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.7999999999999999e57

    1. Initial program 44.9%

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

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

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

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

        \[\leadsto y + -1 \cdot \color{blue}{\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      4. mul-1-neg61.6%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      5. unsub-neg61.6%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub61.6%

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      7. associate-/l*68.7%

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      8. associate-/l*84.8%

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      9. distribute-rgt-out--84.8%

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
    5. Simplified84.8%

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
    6. Taylor expanded in z around inf 67.4%

      \[\leadsto y - \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} \]
    7. Step-by-step derivation
      1. associate-/l*74.6%

        \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    8. Simplified74.6%

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]

    if -3.7999999999999999e57 < t < -2.55000000000000002e-89

    1. Initial program 78.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 74.1%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. *-commutative74.1%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
    5. Simplified74.1%

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    6. Taylor expanded in a around inf 60.6%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*62.8%

        \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]
    8. Simplified62.8%

      \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]

    if -2.55000000000000002e-89 < t < 1.35000000000000005e40

    1. Initial program 92.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 77.0%

      \[\leadsto x + \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*81.7%

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
      2. *-commutative81.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{a} \cdot z} \]
    5. Applied egg-rr81.7%

      \[\leadsto x + \color{blue}{\frac{y - x}{a} \cdot z} \]

    if 1.35000000000000005e40 < t

    1. Initial program 46.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 65.3%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    4. Step-by-step derivation
      1. associate--l+65.3%

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--65.3%

        \[\leadsto y + \color{blue}{-1 \cdot \left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      3. div-sub65.3%

        \[\leadsto y + -1 \cdot \color{blue}{\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      4. mul-1-neg65.3%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      5. unsub-neg65.3%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub65.3%

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      7. associate-/l*79.9%

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      8. associate-/l*83.3%

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      9. distribute-rgt-out--83.3%

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
    5. Simplified83.3%

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
    6. Taylor expanded in z around inf 60.2%

      \[\leadsto y - \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} \]
    7. Step-by-step derivation
      1. associate-/l*74.8%

        \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    8. Simplified74.8%

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    9. Step-by-step derivation
      1. clear-num74.8%

        \[\leadsto y - z \cdot \color{blue}{\frac{1}{\frac{t}{y - x}}} \]
      2. un-div-inv74.8%

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
    10. Applied egg-rr74.8%

      \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification75.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+57}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -2.55 \cdot 10^{-89}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+40}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z}{\frac{t}{x - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 69.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \frac{x - y}{t}\\ \mathbf{if}\;t \leq -6.5 \cdot 10^{+57}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.75 \cdot 10^{-89}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+39}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ y (* z (/ (- x y) t)))))
   (if (<= t -6.5e+57)
     t_1
     (if (<= t -2.75e-89)
       (- x (* y (/ (- t z) a)))
       (if (<= t 9e+39) (- x (* z (/ (- x y) a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + (z * ((x - y) / t));
	double tmp;
	if (t <= -6.5e+57) {
		tmp = t_1;
	} else if (t <= -2.75e-89) {
		tmp = x - (y * ((t - z) / a));
	} else if (t <= 9e+39) {
		tmp = x - (z * ((x - y) / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y + (z * ((x - y) / t))
    if (t <= (-6.5d+57)) then
        tmp = t_1
    else if (t <= (-2.75d-89)) then
        tmp = x - (y * ((t - z) / a))
    else if (t <= 9d+39) then
        tmp = x - (z * ((x - y) / a))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y + (z * ((x - y) / t));
	double tmp;
	if (t <= -6.5e+57) {
		tmp = t_1;
	} else if (t <= -2.75e-89) {
		tmp = x - (y * ((t - z) / a));
	} else if (t <= 9e+39) {
		tmp = x - (z * ((x - y) / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y + (z * ((x - y) / t))
	tmp = 0
	if t <= -6.5e+57:
		tmp = t_1
	elif t <= -2.75e-89:
		tmp = x - (y * ((t - z) / a))
	elif t <= 9e+39:
		tmp = x - (z * ((x - y) / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y + Float64(z * Float64(Float64(x - y) / t)))
	tmp = 0.0
	if (t <= -6.5e+57)
		tmp = t_1;
	elseif (t <= -2.75e-89)
		tmp = Float64(x - Float64(y * Float64(Float64(t - z) / a)));
	elseif (t <= 9e+39)
		tmp = Float64(x - Float64(z * Float64(Float64(x - y) / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y + (z * ((x - y) / t));
	tmp = 0.0;
	if (t <= -6.5e+57)
		tmp = t_1;
	elseif (t <= -2.75e-89)
		tmp = x - (y * ((t - z) / a));
	elseif (t <= 9e+39)
		tmp = x - (z * ((x - y) / a));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e+57], t$95$1, If[LessEqual[t, -2.75e-89], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e+39], N[(x - N[(z * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + z \cdot \frac{x - y}{t}\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -2.75 \cdot 10^{-89}:\\
\;\;\;\;x - y \cdot \frac{t - z}{a}\\

\mathbf{elif}\;t \leq 9 \cdot 10^{+39}:\\
\;\;\;\;x - z \cdot \frac{x - y}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.4999999999999997e57 or 8.99999999999999991e39 < t

    1. Initial program 45.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 63.5%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    4. Step-by-step derivation
      1. associate--l+63.5%

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--63.5%

        \[\leadsto y + \color{blue}{-1 \cdot \left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      3. div-sub63.5%

        \[\leadsto y + -1 \cdot \color{blue}{\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      4. mul-1-neg63.5%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      5. unsub-neg63.5%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub63.5%

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      7. associate-/l*74.6%

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      8. associate-/l*84.0%

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      9. distribute-rgt-out--84.0%

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
    5. Simplified84.0%

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
    6. Taylor expanded in z around inf 63.6%

      \[\leadsto y - \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} \]
    7. Step-by-step derivation
      1. associate-/l*74.7%

        \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    8. Simplified74.7%

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]

    if -6.4999999999999997e57 < t < -2.75000000000000006e-89

    1. Initial program 78.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 74.1%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. *-commutative74.1%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
    5. Simplified74.1%

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    6. Taylor expanded in a around inf 60.6%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*62.8%

        \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]
    8. Simplified62.8%

      \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]

    if -2.75000000000000006e-89 < t < 8.99999999999999991e39

    1. Initial program 92.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 77.0%

      \[\leadsto x + \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*81.7%

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
      2. *-commutative81.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{a} \cdot z} \]
    5. Applied egg-rr81.7%

      \[\leadsto x + \color{blue}{\frac{y - x}{a} \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+57}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq -2.75 \cdot 10^{-89}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+39}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 66.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \frac{x}{t}\\ \mathbf{if}\;t \leq -9.2 \cdot 10^{+57}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-89}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+40}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ y (* z (/ x t)))))
   (if (<= t -9.2e+57)
     t_1
     (if (<= t -2.6e-89)
       (- x (* y (/ (- t z) a)))
       (if (<= t 1.4e+40) (- x (* z (/ (- x y) a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + (z * (x / t));
	double tmp;
	if (t <= -9.2e+57) {
		tmp = t_1;
	} else if (t <= -2.6e-89) {
		tmp = x - (y * ((t - z) / a));
	} else if (t <= 1.4e+40) {
		tmp = x - (z * ((x - y) / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y + (z * (x / t))
    if (t <= (-9.2d+57)) then
        tmp = t_1
    else if (t <= (-2.6d-89)) then
        tmp = x - (y * ((t - z) / a))
    else if (t <= 1.4d+40) then
        tmp = x - (z * ((x - y) / a))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y + (z * (x / t));
	double tmp;
	if (t <= -9.2e+57) {
		tmp = t_1;
	} else if (t <= -2.6e-89) {
		tmp = x - (y * ((t - z) / a));
	} else if (t <= 1.4e+40) {
		tmp = x - (z * ((x - y) / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y + (z * (x / t))
	tmp = 0
	if t <= -9.2e+57:
		tmp = t_1
	elif t <= -2.6e-89:
		tmp = x - (y * ((t - z) / a))
	elif t <= 1.4e+40:
		tmp = x - (z * ((x - y) / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y + Float64(z * Float64(x / t)))
	tmp = 0.0
	if (t <= -9.2e+57)
		tmp = t_1;
	elseif (t <= -2.6e-89)
		tmp = Float64(x - Float64(y * Float64(Float64(t - z) / a)));
	elseif (t <= 1.4e+40)
		tmp = Float64(x - Float64(z * Float64(Float64(x - y) / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y + (z * (x / t));
	tmp = 0.0;
	if (t <= -9.2e+57)
		tmp = t_1;
	elseif (t <= -2.6e-89)
		tmp = x - (y * ((t - z) / a));
	elseif (t <= 1.4e+40)
		tmp = x - (z * ((x - y) / a));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.2e+57], t$95$1, If[LessEqual[t, -2.6e-89], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e+40], N[(x - N[(z * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + z \cdot \frac{x}{t}\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -2.6 \cdot 10^{-89}:\\
\;\;\;\;x - y \cdot \frac{t - z}{a}\\

\mathbf{elif}\;t \leq 1.4 \cdot 10^{+40}:\\
\;\;\;\;x - z \cdot \frac{x - y}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.1999999999999995e57 or 1.4000000000000001e40 < t

    1. Initial program 45.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 63.5%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    4. Step-by-step derivation
      1. associate--l+63.5%

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--63.5%

        \[\leadsto y + \color{blue}{-1 \cdot \left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      3. div-sub63.5%

        \[\leadsto y + -1 \cdot \color{blue}{\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      4. mul-1-neg63.5%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      5. unsub-neg63.5%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub63.5%

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      7. associate-/l*74.6%

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      8. associate-/l*84.0%

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      9. distribute-rgt-out--84.0%

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
    5. Simplified84.0%

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
    6. Taylor expanded in z around inf 63.6%

      \[\leadsto y - \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} \]
    7. Step-by-step derivation
      1. associate-/l*74.7%

        \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    8. Simplified74.7%

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    9. Taylor expanded in y around 0 67.6%

      \[\leadsto y - z \cdot \color{blue}{\left(-1 \cdot \frac{x}{t}\right)} \]
    10. Step-by-step derivation
      1. neg-mul-167.6%

        \[\leadsto y - z \cdot \color{blue}{\left(-\frac{x}{t}\right)} \]
      2. distribute-neg-frac67.6%

        \[\leadsto y - z \cdot \color{blue}{\frac{-x}{t}} \]
    11. Simplified67.6%

      \[\leadsto y - z \cdot \color{blue}{\frac{-x}{t}} \]

    if -9.1999999999999995e57 < t < -2.5999999999999999e-89

    1. Initial program 78.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 74.1%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. *-commutative74.1%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
    5. Simplified74.1%

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    6. Taylor expanded in a around inf 60.6%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*62.8%

        \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]
    8. Simplified62.8%

      \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]

    if -2.5999999999999999e-89 < t < 1.4000000000000001e40

    1. Initial program 92.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 77.0%

      \[\leadsto x + \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*81.7%

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
      2. *-commutative81.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{a} \cdot z} \]
    5. Applied egg-rr81.7%

      \[\leadsto x + \color{blue}{\frac{y - x}{a} \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.2 \cdot 10^{+57}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-89}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+40}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 66.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + z \cdot \frac{x}{t}\\ \mathbf{if}\;t \leq -5.2 \cdot 10^{+57}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-89}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq 1.32 \cdot 10^{+40}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ y (* z (/ x t)))))
   (if (<= t -5.2e+57)
     t_1
     (if (<= t -2.7e-89)
       (- x (* y (/ (- t z) a)))
       (if (<= t 1.32e+40) (- x (* z (/ (- x y) a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + (z * (x / t));
	double tmp;
	if (t <= -5.2e+57) {
		tmp = t_1;
	} else if (t <= -2.7e-89) {
		tmp = x - (y * ((t - z) / a));
	} else if (t <= 1.32e+40) {
		tmp = x - (z * ((x - y) / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y + (z * (x / t))
    if (t <= (-5.2d+57)) then
        tmp = t_1
    else if (t <= (-2.7d-89)) then
        tmp = x - (y * ((t - z) / a))
    else if (t <= 1.32d+40) then
        tmp = x - (z * ((x - y) / a))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y + (z * (x / t));
	double tmp;
	if (t <= -5.2e+57) {
		tmp = t_1;
	} else if (t <= -2.7e-89) {
		tmp = x - (y * ((t - z) / a));
	} else if (t <= 1.32e+40) {
		tmp = x - (z * ((x - y) / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y + (z * (x / t))
	tmp = 0
	if t <= -5.2e+57:
		tmp = t_1
	elif t <= -2.7e-89:
		tmp = x - (y * ((t - z) / a))
	elif t <= 1.32e+40:
		tmp = x - (z * ((x - y) / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y + Float64(z * Float64(x / t)))
	tmp = 0.0
	if (t <= -5.2e+57)
		tmp = t_1;
	elseif (t <= -2.7e-89)
		tmp = Float64(x - Float64(y * Float64(Float64(t - z) / a)));
	elseif (t <= 1.32e+40)
		tmp = Float64(x - Float64(z * Float64(Float64(x - y) / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y + (z * (x / t));
	tmp = 0.0;
	if (t <= -5.2e+57)
		tmp = t_1;
	elseif (t <= -2.7e-89)
		tmp = x - (y * ((t - z) / a));
	elseif (t <= 1.32e+40)
		tmp = x - (z * ((x - y) / a));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+57], t$95$1, If[LessEqual[t, -2.7e-89], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.32e+40], N[(x - N[(z * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + z \cdot \frac{x}{t}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -2.7 \cdot 10^{-89}:\\
\;\;\;\;x - y \cdot \frac{t - z}{a}\\

\mathbf{elif}\;t \leq 1.32 \cdot 10^{+40}:\\
\;\;\;\;x - z \cdot \frac{x - y}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.2e57 or 1.32000000000000008e40 < t

    1. Initial program 45.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 63.5%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    4. Step-by-step derivation
      1. associate--l+63.5%

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--63.5%

        \[\leadsto y + \color{blue}{-1 \cdot \left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      3. div-sub63.5%

        \[\leadsto y + -1 \cdot \color{blue}{\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      4. mul-1-neg63.5%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      5. unsub-neg63.5%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub63.5%

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      7. associate-/l*74.6%

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      8. associate-/l*84.0%

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      9. distribute-rgt-out--84.0%

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
    5. Simplified84.0%

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
    6. Taylor expanded in z around inf 63.6%

      \[\leadsto y - \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} \]
    7. Step-by-step derivation
      1. associate-/l*74.7%

        \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    8. Simplified74.7%

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    9. Taylor expanded in y around 0 67.6%

      \[\leadsto y - z \cdot \color{blue}{\left(-1 \cdot \frac{x}{t}\right)} \]
    10. Step-by-step derivation
      1. neg-mul-167.6%

        \[\leadsto y - z \cdot \color{blue}{\left(-\frac{x}{t}\right)} \]
      2. distribute-neg-frac67.6%

        \[\leadsto y - z \cdot \color{blue}{\frac{-x}{t}} \]
    11. Simplified67.6%

      \[\leadsto y - z \cdot \color{blue}{\frac{-x}{t}} \]

    if -5.2e57 < t < -2.69999999999999988e-89

    1. Initial program 78.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 74.1%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. *-commutative74.1%

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a - t} \]
    5. Simplified74.1%

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    6. Taylor expanded in a around inf 60.6%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*62.8%

        \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]
    8. Simplified62.8%

      \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a}} \]

    if -2.69999999999999988e-89 < t < 1.32000000000000008e40

    1. Initial program 92.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 77.0%

      \[\leadsto x + \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*81.7%

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
    5. Simplified81.7%

      \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{+57}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-89}:\\ \;\;\;\;x - y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;t \leq 1.32 \cdot 10^{+40}:\\ \;\;\;\;x - z \cdot \frac{x - y}{a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 38.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{+55}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2 \cdot 10^{-139}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-271}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-40}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -7e+55)
   y
   (if (<= t -2e-139)
     x
     (if (<= t -3.4e-271) (* y (/ z a)) (if (<= t 1.4e-40) x y)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -7e+55) {
		tmp = y;
	} else if (t <= -2e-139) {
		tmp = x;
	} else if (t <= -3.4e-271) {
		tmp = y * (z / a);
	} else if (t <= 1.4e-40) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-7d+55)) then
        tmp = y
    else if (t <= (-2d-139)) then
        tmp = x
    else if (t <= (-3.4d-271)) then
        tmp = y * (z / a)
    else if (t <= 1.4d-40) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -7e+55) {
		tmp = y;
	} else if (t <= -2e-139) {
		tmp = x;
	} else if (t <= -3.4e-271) {
		tmp = y * (z / a);
	} else if (t <= 1.4e-40) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -7e+55:
		tmp = y
	elif t <= -2e-139:
		tmp = x
	elif t <= -3.4e-271:
		tmp = y * (z / a)
	elif t <= 1.4e-40:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -7e+55)
		tmp = y;
	elseif (t <= -2e-139)
		tmp = x;
	elseif (t <= -3.4e-271)
		tmp = Float64(y * Float64(z / a));
	elseif (t <= 1.4e-40)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -7e+55)
		tmp = y;
	elseif (t <= -2e-139)
		tmp = x;
	elseif (t <= -3.4e-271)
		tmp = y * (z / a);
	elseif (t <= 1.4e-40)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7e+55], y, If[LessEqual[t, -2e-139], x, If[LessEqual[t, -3.4e-271], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e-40], x, y]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+55}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq -2 \cdot 10^{-139}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq -3.4 \cdot 10^{-271}:\\
\;\;\;\;y \cdot \frac{z}{a}\\

\mathbf{elif}\;t \leq 1.4 \cdot 10^{-40}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.00000000000000021e55 or 1.4e-40 < t

    1. Initial program 50.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 47.9%

      \[\leadsto \color{blue}{y} \]

    if -7.00000000000000021e55 < t < -2.00000000000000006e-139 or -3.4000000000000001e-271 < t < 1.4e-40

    1. Initial program 87.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 46.7%

      \[\leadsto \color{blue}{x} \]

    if -2.00000000000000006e-139 < t < -3.4000000000000001e-271

    1. Initial program 95.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 84.8%

      \[\leadsto x + \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    4. Taylor expanded in z around -inf 60.9%

      \[\leadsto \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    5. Taylor expanded in y around inf 54.1%

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*79.0%

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified55.2%

      \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 27: 73.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+57}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+40}:\\ \;\;\;\;x - \left(y - x\right) \cdot \frac{t - z}{a}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z}{\frac{t}{x - y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -3.8e+57)
   (+ y (* z (/ (- x y) t)))
   (if (<= t 1.1e+40)
     (- x (* (- y x) (/ (- t z) a)))
     (+ y (/ z (/ t (- x y)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -3.8e+57) {
		tmp = y + (z * ((x - y) / t));
	} else if (t <= 1.1e+40) {
		tmp = x - ((y - x) * ((t - z) / a));
	} else {
		tmp = y + (z / (t / (x - y)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-3.8d+57)) then
        tmp = y + (z * ((x - y) / t))
    else if (t <= 1.1d+40) then
        tmp = x - ((y - x) * ((t - z) / a))
    else
        tmp = y + (z / (t / (x - y)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -3.8e+57) {
		tmp = y + (z * ((x - y) / t));
	} else if (t <= 1.1e+40) {
		tmp = x - ((y - x) * ((t - z) / a));
	} else {
		tmp = y + (z / (t / (x - y)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -3.8e+57:
		tmp = y + (z * ((x - y) / t))
	elif t <= 1.1e+40:
		tmp = x - ((y - x) * ((t - z) / a))
	else:
		tmp = y + (z / (t / (x - y)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -3.8e+57)
		tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t)));
	elseif (t <= 1.1e+40)
		tmp = Float64(x - Float64(Float64(y - x) * Float64(Float64(t - z) / a)));
	else
		tmp = Float64(y + Float64(z / Float64(t / Float64(x - y))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -3.8e+57)
		tmp = y + (z * ((x - y) / t));
	elseif (t <= 1.1e+40)
		tmp = x - ((y - x) * ((t - z) / a));
	else
		tmp = y + (z / (t / (x - y)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.8e+57], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+40], N[(x - N[(N[(y - x), $MachinePrecision] * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+57}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+40}:\\
\;\;\;\;x - \left(y - x\right) \cdot \frac{t - z}{a}\\

\mathbf{else}:\\
\;\;\;\;y + \frac{z}{\frac{t}{x - y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.7999999999999999e57

    1. Initial program 44.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 61.6%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    4. Step-by-step derivation
      1. associate--l+61.6%

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--61.6%

        \[\leadsto y + \color{blue}{-1 \cdot \left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      3. div-sub61.6%

        \[\leadsto y + -1 \cdot \color{blue}{\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      4. mul-1-neg61.6%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      5. unsub-neg61.6%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub61.6%

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      7. associate-/l*68.7%

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      8. associate-/l*84.8%

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      9. distribute-rgt-out--84.8%

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
    5. Simplified84.8%

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
    6. Taylor expanded in z around inf 67.4%

      \[\leadsto y - \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} \]
    7. Step-by-step derivation
      1. associate-/l*74.6%

        \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    8. Simplified74.6%

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]

    if -3.7999999999999999e57 < t < 1.0999999999999999e40

    1. Initial program 88.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 74.9%

      \[\leadsto x + \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*78.7%

        \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a}} \]
    5. Simplified78.7%

      \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a}} \]

    if 1.0999999999999999e40 < t

    1. Initial program 46.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 65.3%

      \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    4. Step-by-step derivation
      1. associate--l+65.3%

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--65.3%

        \[\leadsto y + \color{blue}{-1 \cdot \left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      3. div-sub65.3%

        \[\leadsto y + -1 \cdot \color{blue}{\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      4. mul-1-neg65.3%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      5. unsub-neg65.3%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub65.3%

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      7. associate-/l*79.9%

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      8. associate-/l*83.3%

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      9. distribute-rgt-out--83.3%

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
    5. Simplified83.3%

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
    6. Taylor expanded in z around inf 60.2%

      \[\leadsto y - \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} \]
    7. Step-by-step derivation
      1. associate-/l*74.8%

        \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    8. Simplified74.8%

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    9. Step-by-step derivation
      1. clear-num74.8%

        \[\leadsto y - z \cdot \color{blue}{\frac{1}{\frac{t}{y - x}}} \]
      2. un-div-inv74.8%

        \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
    10. Applied egg-rr74.8%

      \[\leadsto y - \color{blue}{\frac{z}{\frac{t}{y - x}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification77.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+57}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+40}:\\ \;\;\;\;x - \left(y - x\right) \cdot \frac{t - z}{a}\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z}{\frac{t}{x - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 28: 49.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.1 \cdot 10^{+104}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+51}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -3.1e+104) y (if (<= t 9.2e+51) (* x (- 1.0 (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -3.1e+104) {
		tmp = y;
	} else if (t <= 9.2e+51) {
		tmp = x * (1.0 - (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-3.1d+104)) then
        tmp = y
    else if (t <= 9.2d+51) then
        tmp = x * (1.0d0 - (z / a))
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -3.1e+104) {
		tmp = y;
	} else if (t <= 9.2e+51) {
		tmp = x * (1.0 - (z / a));
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -3.1e+104:
		tmp = y
	elif t <= 9.2e+51:
		tmp = x * (1.0 - (z / a))
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -3.1e+104)
		tmp = y;
	elseif (t <= 9.2e+51)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -3.1e+104)
		tmp = y;
	elseif (t <= 9.2e+51)
		tmp = x * (1.0 - (z / a));
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.1e+104], y, If[LessEqual[t, 9.2e+51], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{+104}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 9.2 \cdot 10^{+51}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.10000000000000017e104 or 9.2000000000000002e51 < t

    1. Initial program 41.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 55.6%

      \[\leadsto \color{blue}{y} \]

    if -3.10000000000000017e104 < t < 9.2000000000000002e51

    1. Initial program 85.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 65.4%

      \[\leadsto x + \color{blue}{\frac{z \cdot \left(y - x\right)}{a}} \]
    4. Taylor expanded in x around inf 53.7%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z}{a}\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg53.7%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z}{a}\right)}\right) \]
      2. unsub-neg53.7%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]
    6. Simplified53.7%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z}{a}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 29: 38.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.75 \cdot 10^{+56}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-40}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -2.75e+56) y (if (<= t 1.9e-40) x y)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -2.75e+56) {
		tmp = y;
	} else if (t <= 1.9e-40) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-2.75d+56)) then
        tmp = y
    else if (t <= 1.9d-40) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -2.75e+56) {
		tmp = y;
	} else if (t <= 1.9e-40) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -2.75e+56:
		tmp = y
	elif t <= 1.9e-40:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -2.75e+56)
		tmp = y;
	elseif (t <= 1.9e-40)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -2.75e+56)
		tmp = y;
	elseif (t <= 1.9e-40)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.75e+56], y, If[LessEqual[t, 1.9e-40], x, y]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.75 \cdot 10^{+56}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-40}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.7500000000000001e56 or 1.8999999999999999e-40 < t

    1. Initial program 50.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 47.9%

      \[\leadsto \color{blue}{y} \]

    if -2.7500000000000001e56 < t < 1.8999999999999999e-40

    1. Initial program 88.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 42.5%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 30: 25.1% accurate, 13.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 70.2%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in a around inf 27.8%

    \[\leadsto \color{blue}{x} \]
  4. Add Preprocessing

Developer target: 86.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\ \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
   (if (< a -1.6153062845442575e-142)
     t_1
     (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	double tmp;
	if (a < -1.6153062845442575e-142) {
		tmp = t_1;
	} else if (a < 3.774403170083174e-182) {
		tmp = y - ((z / t) * (y - x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
    if (a < (-1.6153062845442575d-142)) then
        tmp = t_1
    else if (a < 3.774403170083174d-182) then
        tmp = y - ((z / t) * (y - x))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	double tmp;
	if (a < -1.6153062845442575e-142) {
		tmp = t_1;
	} else if (a < 3.774403170083174e-182) {
		tmp = y - ((z / t) * (y - x));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)))
	tmp = 0
	if a < -1.6153062845442575e-142:
		tmp = t_1
	elif a < 3.774403170083174e-182:
		tmp = y - ((z / t) * (y - x))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t))))
	tmp = 0.0
	if (a < -1.6153062845442575e-142)
		tmp = t_1;
	elseif (a < 3.774403170083174e-182)
		tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
	tmp = 0.0;
	if (a < -1.6153062845442575e-142)
		tmp = t_1;
	elseif (a < 3.774403170083174e-182)
		tmp = y - ((z / t) * (y - x));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024103 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :alt
  (if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))

  (+ x (/ (* (- y x) (- z t)) (- a t))))