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

Percentage Accurate: 67.6% → 88.8%
Time: 14.9s
Alternatives: 25
Speedup: 0.7×

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 25 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.6% 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.8% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-281}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+307}:\\
\;\;\;\;x + t\_1 \cdot \frac{-1}{t - a}\\

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


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

    1. Initial program 39.4%

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

      \[\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.0%

        \[\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.0%

        \[\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.0%

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

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

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

        \[\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*69.1%

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

        \[\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)} \]

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

    1. Initial program 94.9%

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

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

    1. Initial program 4.1%

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

      \[\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))) < 3.99999999999999994e307

    1. Initial program 97.8%

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

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

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

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

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

    1. Initial program 35.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification92.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(a - z\right)\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -5 \cdot 10^{-281}:\\ \;\;\;\;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 a + z \cdot \left(x - y\right)}{t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 4 \cdot 10^{+307}:\\ \;\;\;\;x + \left(\left(y - x\right) \cdot \left(z - t\right)\right) \cdot \frac{-1}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y - x}{a - t} \cdot \left(t - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 88.7% 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(a - z\right)\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-281}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot a + z \cdot \left(x - y\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\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) (- a z)))
     (if (<= t_1 -5e-281)
       t_1
       (if (<= t_1 0.0)
         (+ y (/ (+ (* (- y x) a) (* z (- x y))) t))
         (fma (- y x) (/ (- z t) (- a t)) x))))))
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) * (a - z));
	} else if (t_1 <= -5e-281) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = y + ((((y - x) * a) + (z * (x - y))) / t);
	} else {
		tmp = fma((y - x), ((z - t) / (a - t)), x);
	}
	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(a - z)));
	elseif (t_1 <= -5e-281)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(y + Float64(Float64(Float64(Float64(y - x) * a) + Float64(z * Float64(x - y))) / t));
	else
		tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x);
	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[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-281], t$95$1, If[LessEqual[t$95$1, 0.0], N[(y + N[(N[(N[(N[(y - x), $MachinePrecision] * a), $MachinePrecision] + N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $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(a - z\right)\\

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\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 39.4%

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

      \[\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.0%

        \[\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.0%

        \[\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.0%

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

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

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

        \[\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*69.1%

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

        \[\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)} \]

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

    1. Initial program 94.9%

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

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

    1. Initial program 4.1%

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

      \[\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 72.5%

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

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

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

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

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

    \[\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(a - z\right)\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -5 \cdot 10^{-281}:\\ \;\;\;\;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 a + z \cdot \left(x - y\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 88.8% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-281}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+307}:\\
\;\;\;\;x + t\_1 \cdot \frac{-1}{t - a}\\

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


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

    1. Initial program 39.4%

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

      \[\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.0%

        \[\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.0%

        \[\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.0%

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

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

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

        \[\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*69.1%

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

        \[\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)} \]

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

    1. Initial program 94.9%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} \]
    8. Taylor expanded in t around inf 99.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}} \]
    9. Step-by-step derivation
      1. associate--l+99.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. associate-*r/99.8%

        \[\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.8%

        \[\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.8%

        \[\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.8%

        \[\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.8%

        \[\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.8%

        \[\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.8%

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

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

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

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

      \[\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))) < 3.99999999999999994e307

    1. Initial program 97.8%

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

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

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

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

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

    1. Initial program 35.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification92.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(a - z\right)\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -5 \cdot 10^{-281}:\\ \;\;\;\;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 \left(a - z\right)}{t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 4 \cdot 10^{+307}:\\ \;\;\;\;x + \left(\left(y - x\right) \cdot \left(z - t\right)\right) \cdot \frac{-1}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y - x}{a - t} \cdot \left(t - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 88.9% 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(a - z\right)\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-281}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+307}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y - x}{a - t} \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) (- a z)))
     (if (<= t_1 -5e-281)
       t_1
       (if (<= t_1 0.0)
         (+ y (/ (* (- y x) (- a z)) t))
         (if (<= t_1 4e+307) t_1 (- x (* (/ (- y x) (- 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) * (a - z));
	} else if (t_1 <= -5e-281) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = y + (((y - x) * (a - z)) / t);
	} else if (t_1 <= 4e+307) {
		tmp = t_1;
	} else {
		tmp = x - (((y - x) / (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) * (a - z));
	} else if (t_1 <= -5e-281) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = y + (((y - x) * (a - z)) / t);
	} else if (t_1 <= 4e+307) {
		tmp = t_1;
	} else {
		tmp = x - (((y - x) / (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) * (a - z))
	elif t_1 <= -5e-281:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = y + (((y - x) * (a - z)) / t)
	elif t_1 <= 4e+307:
		tmp = t_1
	else:
		tmp = x - (((y - x) / (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(a - z)));
	elseif (t_1 <= -5e-281)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t));
	elseif (t_1 <= 4e+307)
		tmp = t_1;
	else
		tmp = Float64(x - Float64(Float64(Float64(y - x) / 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) * (a - z));
	elseif (t_1 <= -5e-281)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = y + (((y - x) * (a - z)) / t);
	elseif (t_1 <= 4e+307)
		tmp = t_1;
	else
		tmp = x - (((y - x) / (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[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-281], t$95$1, If[LessEqual[t$95$1, 0.0], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+307], t$95$1, N[(x - N[(N[(N[(y - x), $MachinePrecision] / N[(a - t), $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(a - z\right)\\

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

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

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+307}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x - \frac{y - x}{a - t} \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 39.4%

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

      \[\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.0%

        \[\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.0%

        \[\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.0%

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

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

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

        \[\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*69.1%

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

        \[\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)} \]

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.9999999999999998e-281 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 3.99999999999999994e307

    1. Initial program 96.4%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{z - t}{\frac{a - t}{y - x}}} \]
    8. Taylor expanded in t around inf 99.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}} \]
    9. Step-by-step derivation
      1. associate--l+99.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. associate-*r/99.8%

        \[\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.8%

        \[\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.8%

        \[\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.8%

        \[\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.8%

        \[\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.8%

        \[\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.8%

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

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

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

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

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

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

    1. Initial program 35.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification92.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(a - z\right)\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -5 \cdot 10^{-281}:\\ \;\;\;\;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 \left(a - z\right)}{t}\\ \mathbf{elif}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq 4 \cdot 10^{+307}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y - x}{a - t} \cdot \left(t - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 47.6% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\ t_2 := y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{if}\;a \leq -1.6 \cdot 10^{+29}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-9}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-84}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-131}:\\ \;\;\;\;\frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-297}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-278}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{-93} \lor \neg \left(a \leq 8 \cdot 10^{-43}\right) \land a \leq 1.25 \cdot 10^{+14}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ z a)))) (t_2 (* y (- 1.0 (/ z t)))))
   (if (<= a -1.6e+29)
     t_1
     (if (<= a -4.8e-9)
       (* y (/ z a))
       (if (<= a -6.4e-84)
         y
         (if (<= a -1.8e-131)
           (/ (* y z) a)
           (if (<= a -1.25e-297)
             t_2
             (if (<= a 5.2e-278)
               (* x (/ z t))
               (if (or (<= a 8.6e-93) (and (not (<= a 8e-43)) (<= a 1.25e+14)))
                 t_2
                 t_1)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (z / a));
	double t_2 = y * (1.0 - (z / t));
	double tmp;
	if (a <= -1.6e+29) {
		tmp = t_1;
	} else if (a <= -4.8e-9) {
		tmp = y * (z / a);
	} else if (a <= -6.4e-84) {
		tmp = y;
	} else if (a <= -1.8e-131) {
		tmp = (y * z) / a;
	} else if (a <= -1.25e-297) {
		tmp = t_2;
	} else if (a <= 5.2e-278) {
		tmp = x * (z / t);
	} else if ((a <= 8.6e-93) || (!(a <= 8e-43) && (a <= 1.25e+14))) {
		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 = x * (1.0d0 - (z / a))
    t_2 = y * (1.0d0 - (z / t))
    if (a <= (-1.6d+29)) then
        tmp = t_1
    else if (a <= (-4.8d-9)) then
        tmp = y * (z / a)
    else if (a <= (-6.4d-84)) then
        tmp = y
    else if (a <= (-1.8d-131)) then
        tmp = (y * z) / a
    else if (a <= (-1.25d-297)) then
        tmp = t_2
    else if (a <= 5.2d-278) then
        tmp = x * (z / t)
    else if ((a <= 8.6d-93) .or. (.not. (a <= 8d-43)) .and. (a <= 1.25d+14)) 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 = x * (1.0 - (z / a));
	double t_2 = y * (1.0 - (z / t));
	double tmp;
	if (a <= -1.6e+29) {
		tmp = t_1;
	} else if (a <= -4.8e-9) {
		tmp = y * (z / a);
	} else if (a <= -6.4e-84) {
		tmp = y;
	} else if (a <= -1.8e-131) {
		tmp = (y * z) / a;
	} else if (a <= -1.25e-297) {
		tmp = t_2;
	} else if (a <= 5.2e-278) {
		tmp = x * (z / t);
	} else if ((a <= 8.6e-93) || (!(a <= 8e-43) && (a <= 1.25e+14))) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (z / a))
	t_2 = y * (1.0 - (z / t))
	tmp = 0
	if a <= -1.6e+29:
		tmp = t_1
	elif a <= -4.8e-9:
		tmp = y * (z / a)
	elif a <= -6.4e-84:
		tmp = y
	elif a <= -1.8e-131:
		tmp = (y * z) / a
	elif a <= -1.25e-297:
		tmp = t_2
	elif a <= 5.2e-278:
		tmp = x * (z / t)
	elif (a <= 8.6e-93) or (not (a <= 8e-43) and (a <= 1.25e+14)):
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(z / a)))
	t_2 = Float64(y * Float64(1.0 - Float64(z / t)))
	tmp = 0.0
	if (a <= -1.6e+29)
		tmp = t_1;
	elseif (a <= -4.8e-9)
		tmp = Float64(y * Float64(z / a));
	elseif (a <= -6.4e-84)
		tmp = y;
	elseif (a <= -1.8e-131)
		tmp = Float64(Float64(y * z) / a);
	elseif (a <= -1.25e-297)
		tmp = t_2;
	elseif (a <= 5.2e-278)
		tmp = Float64(x * Float64(z / t));
	elseif ((a <= 8.6e-93) || (!(a <= 8e-43) && (a <= 1.25e+14)))
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (z / a));
	t_2 = y * (1.0 - (z / t));
	tmp = 0.0;
	if (a <= -1.6e+29)
		tmp = t_1;
	elseif (a <= -4.8e-9)
		tmp = y * (z / a);
	elseif (a <= -6.4e-84)
		tmp = y;
	elseif (a <= -1.8e-131)
		tmp = (y * z) / a;
	elseif (a <= -1.25e-297)
		tmp = t_2;
	elseif (a <= 5.2e-278)
		tmp = x * (z / t);
	elseif ((a <= 8.6e-93) || (~((a <= 8e-43)) && (a <= 1.25e+14)))
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.6e+29], t$95$1, If[LessEqual[a, -4.8e-9], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6.4e-84], y, If[LessEqual[a, -1.8e-131], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -1.25e-297], t$95$2, If[LessEqual[a, 5.2e-278], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 8.6e-93], And[N[Not[LessEqual[a, 8e-43]], $MachinePrecision], LessEqual[a, 1.25e+14]]], t$95$2, t$95$1]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -6.4 \cdot 10^{-84}:\\
\;\;\;\;y\\

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

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

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

\mathbf{elif}\;a \leq 8.6 \cdot 10^{-93} \lor \neg \left(a \leq 8 \cdot 10^{-43}\right) \land a \leq 1.25 \cdot 10^{+14}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -1.59999999999999993e29 or 8.59999999999999925e-93 < a < 8.00000000000000062e-43 or 1.25e14 < a

    1. Initial program 66.3%

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

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

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

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

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

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

    if -1.59999999999999993e29 < a < -4.8e-9

    1. Initial program 79.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    11. Simplified51.9%

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

    if -4.8e-9 < a < -6.3999999999999999e-84

    1. Initial program 54.4%

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

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

    if -6.3999999999999999e-84 < a < -1.8e-131

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8e-131 < a < -1.25e-297 or 5.1999999999999997e-278 < a < 8.59999999999999925e-93 or 8.00000000000000062e-43 < a < 1.25e14

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.25e-297 < a < 5.1999999999999997e-278

    1. Initial program 48.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+29}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-9}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-84}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-131}:\\ \;\;\;\;\frac{y \cdot z}{a}\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-297}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-278}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{-93} \lor \neg \left(a \leq 8 \cdot 10^{-43}\right) \land a \leq 1.25 \cdot 10^{+14}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 56.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;x \leq -0.22:\\
\;\;\;\;x + y\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -2.1e41

    1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1e41 < x < -0.220000000000000001

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    8. Step-by-step derivation
      1. +-commutative71.7%

        \[\leadsto \color{blue}{y + x} \]
    9. Simplified71.7%

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

    if -0.220000000000000001 < x < 7.2e21

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e21 < x < 4.19999999999999961e90

    1. Initial program 56.0%

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

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

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

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

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

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

    if 4.19999999999999961e90 < x < 1.1000000000000001e119

    1. Initial program 35.3%

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

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

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

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

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

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

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

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

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

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

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

    if 1.1000000000000001e119 < x

    1. Initial program 38.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{+41}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;x \leq -0.22:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{+21}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{+90}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+119}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 55.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;x \leq -0.0035:\\
\;\;\;\;x + y\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -4.3999999999999998e41

    1. Initial program 64.8%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot z}{a - t}} \]
      2. mul-1-neg54.1%

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

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

    if -4.3999999999999998e41 < x < -0.00350000000000000007

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    8. Step-by-step derivation
      1. +-commutative71.7%

        \[\leadsto \color{blue}{y + x} \]
    9. Simplified71.7%

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

    if -0.00350000000000000007 < x < 1.6e23

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6e23 < x < 6.19999999999999977e90

    1. Initial program 56.0%

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

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

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

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

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

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

    if 6.19999999999999977e90 < x < 8.2e120

    1. Initial program 35.3%

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

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

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

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

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

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

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

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

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

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

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

    if 8.2e120 < x

    1. Initial program 38.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.4 \cdot 10^{+41}:\\ \;\;\;\;x \cdot \frac{z}{t - a}\\ \mathbf{elif}\;x \leq -0.0035:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+23}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{+90}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{+120}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 40.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;x \leq -2.8 \cdot 10^{-70}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;x \leq 6 \cdot 10^{-109}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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

\mathbf{elif}\;x \leq 5.8 \cdot 10^{+86}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -2.89999999999999988e41

    1. Initial program 64.8%

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot z}{a - t}} \]
      2. mul-1-neg54.1%

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

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

    if -2.89999999999999988e41 < x < -2.7999999999999999e-70 or 1.94999999999999987e-82 < x < 5.79999999999999981e86

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    8. Step-by-step derivation
      1. +-commutative50.9%

        \[\leadsto \color{blue}{y + x} \]
    9. Simplified50.9%

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

    if -2.7999999999999999e-70 < x < 6.00000000000000043e-109

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

    if 6.00000000000000043e-109 < x < 1.94999999999999987e-82

    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 y around 0 83.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.79999999999999981e86 < x

    1. Initial program 39.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{+41}:\\ \;\;\;\;x \cdot \frac{z}{t - a}\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{-70}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x \leq 6 \cdot 10^{-109}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{-82}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+86}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 41.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;x \leq -1.5 \cdot 10^{-69}:\\
\;\;\;\;x + y\\

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

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

\mathbf{elif}\;x \leq 1.2 \cdot 10^{+86}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -5.49999999999999974e40 or 1.2e86 < x

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

    if -5.49999999999999974e40 < x < -1.49999999999999995e-69 or 3.2999999999999998e-79 < x < 1.2e86

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    8. Step-by-step derivation
      1. +-commutative50.9%

        \[\leadsto \color{blue}{y + x} \]
    9. Simplified50.9%

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

    if -1.49999999999999995e-69 < x < 4.4999999999999997e-105

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

    if 4.4999999999999997e-105 < x < 3.2999999999999998e-79

    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 y around 0 83.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{+40}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;x \leq -1.5 \cdot 10^{-69}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-105}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{-79}:\\ \;\;\;\;y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{+86}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 45.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -3.1 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.25 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -5.20000000000000024e66 or 2.3000000000000001e-48 < t

    1. Initial program 46.0%

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

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

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

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

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

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

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

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

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

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

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

    if -5.20000000000000024e66 < t < -3.1000000000000002e-169 or 7.80000000000000014e-206 < t < 2.24999999999999997e-123

    1. Initial program 86.3%

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

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

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

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

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

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

    if -3.1000000000000002e-169 < t < 7.80000000000000014e-206

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    11. Simplified57.6%

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

    if 2.24999999999999997e-123 < t < 2.3000000000000001e-48

    1. Initial program 73.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 77.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+77.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--77.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-sub77.5%

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

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

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub77.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*77.6%

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

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

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

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

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

Alternative 11: 37.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -7 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+38}:\\
\;\;\;\;x + y\\

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


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

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.75000000000000014e246 < z < -7.0000000000000001e119 or 1.8999999999999999e38 < z

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    11. Simplified47.0%

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

    if -7.0000000000000001e119 < z < -8.9999999999999996e22

    1. Initial program 59.5%

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

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

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

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

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

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

    if -8.9999999999999996e22 < z < 1.8999999999999999e38

    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 y around 0 70.2%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    8. Step-by-step derivation
      1. +-commutative46.9%

        \[\leadsto \color{blue}{y + x} \]
    9. Simplified46.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.75 \cdot 10^{+246}:\\ \;\;\;\;x \cdot \frac{z}{-a}\\ \mathbf{elif}\;z \leq -7 \cdot 10^{+119}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;z \leq -9 \cdot 10^{+22}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+38}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 65.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.4e19 or 5.8e52 < t

    1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4e19 < t < 2.24999999999999997e-123

    1. Initial program 89.8%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. associate-/l/89.8%

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{a}{z}}{y - x}}} \]
    9. Simplified77.7%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{a}{z}}{y - x}}} \]
    10. Step-by-step derivation
      1. clear-num77.7%

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a}{z}}} \]
      2. add-cube-cbrt77.1%

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

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

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

      \[\leadsto x + \color{blue}{{\left(\sqrt[3]{y - x}\right)}^{2} \cdot \frac{\sqrt[3]{y - x}}{\frac{a}{z}}} \]
    12. Step-by-step derivation
      1. associate-*r/77.1%

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

        \[\leadsto x + \frac{\color{blue}{\left(\sqrt[3]{y - x} \cdot \sqrt[3]{y - x}\right)} \cdot \sqrt[3]{y - x}}{\frac{a}{z}} \]
      3. rem-3cbrt-lft77.7%

        \[\leadsto x + \frac{\color{blue}{y - x}}{\frac{a}{z}} \]
    13. Simplified77.7%

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

    if 2.24999999999999997e-123 < t < 5.8e52

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 65.5% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7e20 or 3.00000000000000017e55 < t

    1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7e20 < t < 1.69999999999999998e-131

    1. Initial program 89.8%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. associate-/l/89.8%

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{a}{z}}{y - x}}} \]
    9. Simplified77.7%

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

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

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

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

    if 1.69999999999999998e-131 < t < 3.00000000000000017e55

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 64.9% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.4e15 or 1.18e51 < t

    1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.4e15 < t < 1.45000000000000002e-123

    1. Initial program 89.8%

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

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

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

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

    if 1.45000000000000002e-123 < t < 1.18e51

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 38.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -8 \cdot 10^{-252}:\\
\;\;\;\;y\\

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

\mathbf{elif}\;a \leq 3.5 \cdot 10^{-93}:\\
\;\;\;\;y\\

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


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

    1. Initial program 66.1%

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

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

    if -1.42e29 < a < -7.99999999999999954e-252 or 1.79999999999999985e-275 < a < 3.5e-93

    1. Initial program 63.9%

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

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

    if -7.99999999999999954e-252 < a < 1.79999999999999985e-275

    1. Initial program 66.2%

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

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

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

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

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

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

    if 3.5e-93 < a

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + y} \]
    8. Step-by-step derivation
      1. +-commutative45.9%

        \[\leadsto \color{blue}{y + x} \]
    9. Simplified45.9%

      \[\leadsto \color{blue}{y + x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification45.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.42 \cdot 10^{+29}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-252}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-275}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-93}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 86.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.5000000000000003e166

    1. Initial program 33.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 74.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+74.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--74.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-sub74.2%

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

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

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub74.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*74.1%

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

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

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

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

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

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

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

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

    if -4.5000000000000003e166 < t < 2.05e187

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.05e187 < t

    1. Initial program 25.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 60.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+60.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--60.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-sub60.7%

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

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

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub60.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*78.2%

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

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

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

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

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

Alternative 17: 77.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.89999999999999991e-9 or 1.2e6 < a

    1. Initial program 65.8%

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

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

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

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

    if -2.89999999999999991e-9 < a < 1.2e6

    1. Initial program 64.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 76.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+76.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--76.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-sub76.6%

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

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

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub76.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*79.6%

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

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

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

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

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

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

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

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

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

Alternative 18: 77.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.99999999999999999e-14 or 1.9e7 < a

    1. Initial program 65.8%

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

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

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

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

    if -7.99999999999999999e-14 < a < 1.9e7

    1. Initial program 64.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 76.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+76.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--76.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-sub76.6%

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

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

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub76.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*79.6%

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

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

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

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

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

Alternative 19: 75.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.7999999999999999e-14 or 7.50000000000000051e-91 < a

    1. Initial program 66.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 60.5%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Step-by-step derivation
      1. associate-/l*74.3%

        \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    5. Simplified74.3%

      \[\leadsto x + \color{blue}{y \cdot \frac{z - t}{a - t}} \]

    if -1.7999999999999999e-14 < a < 7.50000000000000051e-91

    1. Initial program 63.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 82.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+82.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--82.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-sub82.2%

        \[\leadsto y + -1 \cdot \color{blue}{\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      4. mul-1-neg82.2%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      5. unsub-neg82.2%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub82.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*85.2%

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      8. associate-/l*82.2%

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      9. distribute-rgt-out--85.2%

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
    5. Simplified85.2%

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
    6. Taylor expanded in z around inf 76.4%

      \[\leadsto y - \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} \]
    7. Step-by-step derivation
      1. associate-*r/79.4%

        \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    8. Simplified79.4%

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{-14} \lor \neg \left(a \leq 7.5 \cdot 10^{-91}\right):\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 38.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{+245}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+75} \lor \neg \left(z \leq 1.62 \cdot 10^{+38}\right):\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.15e+245)
   (* x (- 1.0 (/ z a)))
   (if (or (<= z -5.2e+75) (not (<= z 1.62e+38))) (* y (/ z a)) (+ x y))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.15e+245) {
		tmp = x * (1.0 - (z / a));
	} else if ((z <= -5.2e+75) || !(z <= 1.62e+38)) {
		tmp = y * (z / a);
	} else {
		tmp = 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 (z <= (-2.15d+245)) then
        tmp = x * (1.0d0 - (z / a))
    else if ((z <= (-5.2d+75)) .or. (.not. (z <= 1.62d+38))) then
        tmp = y * (z / a)
    else
        tmp = 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 (z <= -2.15e+245) {
		tmp = x * (1.0 - (z / a));
	} else if ((z <= -5.2e+75) || !(z <= 1.62e+38)) {
		tmp = y * (z / a);
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.15e+245:
		tmp = x * (1.0 - (z / a))
	elif (z <= -5.2e+75) or not (z <= 1.62e+38):
		tmp = y * (z / a)
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.15e+245)
		tmp = Float64(x * Float64(1.0 - Float64(z / a)));
	elseif ((z <= -5.2e+75) || !(z <= 1.62e+38))
		tmp = Float64(y * Float64(z / a));
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.15e+245)
		tmp = x * (1.0 - (z / a));
	elseif ((z <= -5.2e+75) || ~((z <= 1.62e+38)))
		tmp = y * (z / a);
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.15e+245], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -5.2e+75], N[Not[LessEqual[z, 1.62e+38]], $MachinePrecision]], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+245}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\

\mathbf{elif}\;z \leq -5.2 \cdot 10^{+75} \lor \neg \left(z \leq 1.62 \cdot 10^{+38}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.1499999999999999e245

    1. Initial program 68.7%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 67.2%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg67.2%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      2. unsub-neg67.2%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    5. Simplified67.2%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
    6. Taylor expanded in t around 0 62.4%

      \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z}{a}\right)} \]

    if -2.1499999999999999e245 < z < -5.1999999999999997e75 or 1.62000000000000001e38 < z

    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 y around 0 72.2%

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} + y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative72.2%

        \[\leadsto x + \color{blue}{\left(y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right) + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}\right)} \]
      2. div-sub72.2%

        \[\leadsto x + \left(y \cdot \color{blue}{\frac{z - t}{a - t}} + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}\right) \]
      3. mul-1-neg72.2%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \color{blue}{\left(-\frac{x \cdot \left(z - t\right)}{a - t}\right)}\right) \]
      4. associate-/l*79.0%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \left(-\color{blue}{x \cdot \frac{z - t}{a - t}}\right)\right) \]
      5. distribute-lft-neg-in79.0%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \color{blue}{\left(-x\right) \cdot \frac{z - t}{a - t}}\right) \]
      6. distribute-rgt-in87.7%

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y + \left(-x\right)\right)} \]
      7. sub-neg87.7%

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      8. associate-*l/70.2%

        \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot \left(y - x\right)}{a - t}} \]
      9. associate-*r/85.6%

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} \]
    5. Simplified85.6%

      \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} \]
    6. Taylor expanded in x around 0 45.0%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    7. Step-by-step derivation
      1. associate-/l*59.1%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    8. Simplified59.1%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    9. Taylor expanded in t around 0 37.8%

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    10. Step-by-step derivation
      1. associate-/l*46.1%

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    11. Simplified46.1%

      \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]

    if -5.1999999999999997e75 < z < 1.62000000000000001e38

    1. Initial program 62.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 69.8%

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} + y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative69.8%

        \[\leadsto x + \color{blue}{\left(y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right) + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}\right)} \]
      2. div-sub69.8%

        \[\leadsto x + \left(y \cdot \color{blue}{\frac{z - t}{a - t}} + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}\right) \]
      3. mul-1-neg69.8%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \color{blue}{\left(-\frac{x \cdot \left(z - t\right)}{a - t}\right)}\right) \]
      4. associate-/l*72.8%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \left(-\color{blue}{x \cdot \frac{z - t}{a - t}}\right)\right) \]
      5. distribute-lft-neg-in72.8%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \color{blue}{\left(-x\right) \cdot \frac{z - t}{a - t}}\right) \]
      6. distribute-rgt-in72.8%

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y + \left(-x\right)\right)} \]
      7. sub-neg72.8%

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      8. associate-*l/62.4%

        \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot \left(y - x\right)}{a - t}} \]
      9. associate-*r/66.2%

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} \]
    5. Simplified66.2%

      \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} \]
    6. Taylor expanded in y around inf 61.5%

      \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a - t}} \]
    7. Taylor expanded in t around inf 45.1%

      \[\leadsto \color{blue}{x + y} \]
    8. Step-by-step derivation
      1. +-commutative45.1%

        \[\leadsto \color{blue}{y + x} \]
    9. Simplified45.1%

      \[\leadsto \color{blue}{y + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{+245}:\\ \;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+75} \lor \neg \left(z \leq 1.62 \cdot 10^{+38}\right):\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 69.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -7.5 \cdot 10^{-9} \lor \neg \left(a \leq 3550000000\right):\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -7.5e-9) (not (<= a 3550000000.0)))
   (+ x (* (- y x) (/ z a)))
   (+ y (* z (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -7.5e-9) || !(a <= 3550000000.0)) {
		tmp = x + ((y - x) * (z / a));
	} else {
		tmp = y + (z * ((x - y) / t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((a <= (-7.5d-9)) .or. (.not. (a <= 3550000000.0d0))) then
        tmp = x + ((y - x) * (z / a))
    else
        tmp = y + (z * ((x - y) / t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -7.5e-9) || !(a <= 3550000000.0)) {
		tmp = x + ((y - x) * (z / a));
	} else {
		tmp = y + (z * ((x - y) / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -7.5e-9) or not (a <= 3550000000.0):
		tmp = x + ((y - x) * (z / a))
	else:
		tmp = y + (z * ((x - y) / t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -7.5e-9) || !(a <= 3550000000.0))
		tmp = Float64(x + Float64(Float64(y - x) * Float64(z / a)));
	else
		tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -7.5e-9) || ~((a <= 3550000000.0)))
		tmp = x + ((y - x) * (z / a));
	else
		tmp = y + (z * ((x - y) / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.5e-9], N[Not[LessEqual[a, 3550000000.0]], $MachinePrecision]], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-9} \lor \neg \left(a \leq 3550000000\right):\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\

\mathbf{else}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.49999999999999933e-9 or 3.55e9 < a

    1. Initial program 65.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num65.8%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - t}{\left(y - x\right) \cdot \left(z - t\right)}}} \]
      2. inv-pow65.8%

        \[\leadsto x + \color{blue}{{\left(\frac{a - t}{\left(y - x\right) \cdot \left(z - t\right)}\right)}^{-1}} \]
      3. *-commutative65.8%

        \[\leadsto x + {\left(\frac{a - t}{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}\right)}^{-1} \]
      4. associate-/r*88.0%

        \[\leadsto x + {\color{blue}{\left(\frac{\frac{a - t}{z - t}}{y - x}\right)}}^{-1} \]
    4. Applied egg-rr88.0%

      \[\leadsto x + \color{blue}{{\left(\frac{\frac{a - t}{z - t}}{y - x}\right)}^{-1}} \]
    5. Step-by-step derivation
      1. unpow-188.0%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z - t}}{y - x}}} \]
      2. associate-/l/65.8%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{a - t}{\left(y - x\right) \cdot \left(z - t\right)}}} \]
      3. *-commutative65.8%

        \[\leadsto x + \frac{1}{\frac{a - t}{\color{blue}{\left(z - t\right) \cdot \left(y - x\right)}}} \]
    6. Simplified65.8%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{a - t}{\left(z - t\right) \cdot \left(y - x\right)}}} \]
    7. Taylor expanded in t around 0 55.4%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{a}{z \cdot \left(y - x\right)}}} \]
    8. Step-by-step derivation
      1. associate-/r*65.8%

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{a}{z}}{y - x}}} \]
    9. Simplified65.8%

      \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{a}{z}}{y - x}}} \]
    10. Step-by-step derivation
      1. associate-/r/65.8%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a}{z}} \cdot \left(y - x\right)} \]
      2. clear-num65.9%

        \[\leadsto x + \color{blue}{\frac{z}{a}} \cdot \left(y - x\right) \]
    11. Applied egg-rr65.9%

      \[\leadsto x + \color{blue}{\frac{z}{a} \cdot \left(y - x\right)} \]

    if -7.49999999999999933e-9 < a < 3.55e9

    1. Initial program 64.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 76.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+76.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--76.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-sub76.6%

        \[\leadsto y + -1 \cdot \color{blue}{\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      4. mul-1-neg76.6%

        \[\leadsto y + \color{blue}{\left(-\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)} \]
      5. unsub-neg76.6%

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. div-sub76.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*79.6%

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      8. associate-/l*77.2%

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      9. distribute-rgt-out--79.7%

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
    5. Simplified79.7%

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
    6. Taylor expanded in z around inf 71.3%

      \[\leadsto y - \color{blue}{\frac{z \cdot \left(y - x\right)}{t}} \]
    7. Step-by-step derivation
      1. associate-*r/74.3%

        \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
    8. Simplified74.3%

      \[\leadsto y - \color{blue}{z \cdot \frac{y - x}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.5 \cdot 10^{-9} \lor \neg \left(a \leq 3550000000\right):\\ \;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y + z \cdot \frac{x - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 37.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+38}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.15e+23)
   (* x (/ z t))
   (if (<= z 1.15e+38) (+ x y) (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.15e+23) {
		tmp = x * (z / t);
	} else if (z <= 1.15e+38) {
		tmp = x + y;
	} else {
		tmp = y * (z / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.15d+23)) then
        tmp = x * (z / t)
    else if (z <= 1.15d+38) then
        tmp = x + y
    else
        tmp = y * (z / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.15e+23) {
		tmp = x * (z / t);
	} else if (z <= 1.15e+38) {
		tmp = x + y;
	} else {
		tmp = y * (z / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.15e+23:
		tmp = x * (z / t)
	elif z <= 1.15e+38:
		tmp = x + y
	else:
		tmp = y * (z / a)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.15e+23)
		tmp = Float64(x * Float64(z / t));
	elseif (z <= 1.15e+38)
		tmp = Float64(x + y);
	else
		tmp = Float64(y * Float64(z / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.15e+23)
		tmp = x * (z / t);
	elseif (z <= 1.15e+38)
		tmp = x + y;
	else
		tmp = y * (z / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+23], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e+38], N[(x + y), $MachinePrecision], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+23}:\\
\;\;\;\;x \cdot \frac{z}{t}\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+38}:\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.15e23

    1. Initial program 64.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 46.9%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg46.9%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{z - t}{a - t}\right)}\right) \]
      2. unsub-neg46.9%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{z - t}{a - t}\right)} \]
    5. Simplified46.9%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{z - t}{a - t}\right)} \]
    6. Taylor expanded in a around 0 36.5%

      \[\leadsto x \cdot \color{blue}{\frac{z}{t}} \]

    if -1.15e23 < z < 1.1500000000000001e38

    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 y around 0 70.2%

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} + y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative70.2%

        \[\leadsto x + \color{blue}{\left(y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right) + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}\right)} \]
      2. div-sub70.2%

        \[\leadsto x + \left(y \cdot \color{blue}{\frac{z - t}{a - t}} + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}\right) \]
      3. mul-1-neg70.2%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \color{blue}{\left(-\frac{x \cdot \left(z - t\right)}{a - t}\right)}\right) \]
      4. associate-/l*73.4%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \left(-\color{blue}{x \cdot \frac{z - t}{a - t}}\right)\right) \]
      5. distribute-lft-neg-in73.4%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \color{blue}{\left(-x\right) \cdot \frac{z - t}{a - t}}\right) \]
      6. distribute-rgt-in73.4%

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y + \left(-x\right)\right)} \]
      7. sub-neg73.4%

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      8. associate-*l/63.6%

        \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot \left(y - x\right)}{a - t}} \]
      9. associate-*r/66.3%

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} \]
    5. Simplified66.3%

      \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} \]
    6. Taylor expanded in y around inf 62.5%

      \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a - t}} \]
    7. Taylor expanded in t around inf 46.9%

      \[\leadsto \color{blue}{x + y} \]
    8. Step-by-step derivation
      1. +-commutative46.9%

        \[\leadsto \color{blue}{y + x} \]
    9. Simplified46.9%

      \[\leadsto \color{blue}{y + x} \]

    if 1.1500000000000001e38 < z

    1. Initial program 71.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 69.3%

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} + y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative69.3%

        \[\leadsto x + \color{blue}{\left(y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right) + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}\right)} \]
      2. div-sub69.3%

        \[\leadsto x + \left(y \cdot \color{blue}{\frac{z - t}{a - t}} + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}\right) \]
      3. mul-1-neg69.3%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \color{blue}{\left(-\frac{x \cdot \left(z - t\right)}{a - t}\right)}\right) \]
      4. associate-/l*74.3%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \left(-\color{blue}{x \cdot \frac{z - t}{a - t}}\right)\right) \]
      5. distribute-lft-neg-in74.3%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \color{blue}{\left(-x\right) \cdot \frac{z - t}{a - t}}\right) \]
      6. distribute-rgt-in85.5%

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y + \left(-x\right)\right)} \]
      7. sub-neg85.5%

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      8. associate-*l/71.5%

        \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot \left(y - x\right)}{a - t}} \]
      9. associate-*r/87.1%

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} \]
    5. Simplified87.1%

      \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} \]
    6. Taylor expanded in x around 0 44.4%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    7. Step-by-step derivation
      1. associate-/l*56.8%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    8. Simplified56.8%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    9. Taylor expanded in t around 0 39.2%

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    10. Step-by-step derivation
      1. associate-/l*46.3%

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    11. Simplified46.3%

      \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+23}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+38}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 38.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.75 \cdot 10^{+30}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-93}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -3.75e+30) x (if (<= a 7.2e-93) y (+ x y))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.75e+30) {
		tmp = x;
	} else if (a <= 7.2e-93) {
		tmp = y;
	} else {
		tmp = 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 (a <= (-3.75d+30)) then
        tmp = x
    else if (a <= 7.2d-93) then
        tmp = y
    else
        tmp = 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 (a <= -3.75e+30) {
		tmp = x;
	} else if (a <= 7.2e-93) {
		tmp = y;
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -3.75e+30:
		tmp = x
	elif a <= 7.2e-93:
		tmp = y
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -3.75e+30)
		tmp = x;
	elseif (a <= 7.2e-93)
		tmp = y;
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -3.75e+30)
		tmp = x;
	elseif (a <= 7.2e-93)
		tmp = y;
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.75e+30], x, If[LessEqual[a, 7.2e-93], y, N[(x + y), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.75 \cdot 10^{+30}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 7.2 \cdot 10^{-93}:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.74999999999999986e30

    1. Initial program 66.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 44.2%

      \[\leadsto \color{blue}{x} \]

    if -3.74999999999999986e30 < a < 7.2000000000000003e-93

    1. Initial program 64.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 33.7%

      \[\leadsto \color{blue}{y} \]

    if 7.2000000000000003e-93 < a

    1. Initial program 66.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 78.2%

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{x \cdot \left(z - t\right)}{a - t} + y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative78.2%

        \[\leadsto x + \color{blue}{\left(y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right) + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}\right)} \]
      2. div-sub78.2%

        \[\leadsto x + \left(y \cdot \color{blue}{\frac{z - t}{a - t}} + -1 \cdot \frac{x \cdot \left(z - t\right)}{a - t}\right) \]
      3. mul-1-neg78.2%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \color{blue}{\left(-\frac{x \cdot \left(z - t\right)}{a - t}\right)}\right) \]
      4. associate-/l*86.5%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \left(-\color{blue}{x \cdot \frac{z - t}{a - t}}\right)\right) \]
      5. distribute-lft-neg-in86.5%

        \[\leadsto x + \left(y \cdot \frac{z - t}{a - t} + \color{blue}{\left(-x\right) \cdot \frac{z - t}{a - t}}\right) \]
      6. distribute-rgt-in86.5%

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y + \left(-x\right)\right)} \]
      7. sub-neg86.5%

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      8. associate-*l/66.2%

        \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot \left(y - x\right)}{a - t}} \]
      9. associate-*r/81.7%

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} \]
    5. Simplified81.7%

      \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a - t}} \]
    6. Taylor expanded in y around inf 69.5%

      \[\leadsto x + \left(z - t\right) \cdot \color{blue}{\frac{y}{a - t}} \]
    7. Taylor expanded in t around inf 45.9%

      \[\leadsto \color{blue}{x + y} \]
    8. Step-by-step derivation
      1. +-commutative45.9%

        \[\leadsto \color{blue}{y + x} \]
    9. Simplified45.9%

      \[\leadsto \color{blue}{y + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification39.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.75 \cdot 10^{+30}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-93}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 38.8% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6400000000:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.9e+28) x (if (<= a 6400000000.0) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.9e+28) {
		tmp = x;
	} else if (a <= 6400000000.0) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1.9d+28)) then
        tmp = x
    else if (a <= 6400000000.0d0) then
        tmp = y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.9e+28) {
		tmp = x;
	} else if (a <= 6400000000.0) {
		tmp = y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.9e+28:
		tmp = x
	elif a <= 6400000000.0:
		tmp = y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.9e+28)
		tmp = x;
	elseif (a <= 6400000000.0)
		tmp = y;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.9e+28)
		tmp = x;
	elseif (a <= 6400000000.0)
		tmp = y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.9e+28], x, If[LessEqual[a, 6400000000.0], y, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+28}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 6400000000:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.8999999999999999e28 or 6.4e9 < a

    1. Initial program 64.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 43.7%

      \[\leadsto \color{blue}{x} \]

    if -1.8999999999999999e28 < a < 6.4e9

    1. Initial program 65.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 32.7%

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 25: 24.6% 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 65.3%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in a around inf 22.6%

    \[\leadsto \color{blue}{x} \]
  4. Add Preprocessing

Developer target: 86.2% 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 2024108 
(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))))