Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.4% → 93.2%
Time: 35.3s
Alternatives: 31
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 31 alternatives:

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

Initial Program: 80.4% accurate, 1.0× speedup?

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

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

Alternative 1: 93.2% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-280}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\

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

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


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

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 93.4%

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

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

Alternative 2: 40.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x - t}{z}\\ \mathbf{if}\;a \leq -1.75 \cdot 10^{+226}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{+195}:\\ \;\;\;\;\frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -13000000000:\\ \;\;\;\;z \cdot \frac{t}{z - a}\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-96}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-156}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-295}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-252}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+152}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- x t) z))))
   (if (<= a -1.75e+226)
     x
     (if (<= a -4.2e+195)
       (/ (- y z) (/ a t))
       (if (<= a -8.2e+87)
         x
         (if (<= a -13000000000.0)
           (* z (/ t (- z a)))
           (if (<= a -2.7e-96)
             (* y (/ t (- a z)))
             (if (<= a -4.1e-156)
               t
               (if (<= a 3.6e-295)
                 t_1
                 (if (<= a 3.7e-252)
                   t
                   (if (<= a 3.8e-91)
                     t_1
                     (if (<= a 2.9e+152) (* t (/ (- y z) a)) x))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((x - t) / z);
	double tmp;
	if (a <= -1.75e+226) {
		tmp = x;
	} else if (a <= -4.2e+195) {
		tmp = (y - z) / (a / t);
	} else if (a <= -8.2e+87) {
		tmp = x;
	} else if (a <= -13000000000.0) {
		tmp = z * (t / (z - a));
	} else if (a <= -2.7e-96) {
		tmp = y * (t / (a - z));
	} else if (a <= -4.1e-156) {
		tmp = t;
	} else if (a <= 3.6e-295) {
		tmp = t_1;
	} else if (a <= 3.7e-252) {
		tmp = t;
	} else if (a <= 3.8e-91) {
		tmp = t_1;
	} else if (a <= 2.9e+152) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * ((x - t) / z)
    if (a <= (-1.75d+226)) then
        tmp = x
    else if (a <= (-4.2d+195)) then
        tmp = (y - z) / (a / t)
    else if (a <= (-8.2d+87)) then
        tmp = x
    else if (a <= (-13000000000.0d0)) then
        tmp = z * (t / (z - a))
    else if (a <= (-2.7d-96)) then
        tmp = y * (t / (a - z))
    else if (a <= (-4.1d-156)) then
        tmp = t
    else if (a <= 3.6d-295) then
        tmp = t_1
    else if (a <= 3.7d-252) then
        tmp = t
    else if (a <= 3.8d-91) then
        tmp = t_1
    else if (a <= 2.9d+152) then
        tmp = t * ((y - z) / a)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((x - t) / z);
	double tmp;
	if (a <= -1.75e+226) {
		tmp = x;
	} else if (a <= -4.2e+195) {
		tmp = (y - z) / (a / t);
	} else if (a <= -8.2e+87) {
		tmp = x;
	} else if (a <= -13000000000.0) {
		tmp = z * (t / (z - a));
	} else if (a <= -2.7e-96) {
		tmp = y * (t / (a - z));
	} else if (a <= -4.1e-156) {
		tmp = t;
	} else if (a <= 3.6e-295) {
		tmp = t_1;
	} else if (a <= 3.7e-252) {
		tmp = t;
	} else if (a <= 3.8e-91) {
		tmp = t_1;
	} else if (a <= 2.9e+152) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((x - t) / z)
	tmp = 0
	if a <= -1.75e+226:
		tmp = x
	elif a <= -4.2e+195:
		tmp = (y - z) / (a / t)
	elif a <= -8.2e+87:
		tmp = x
	elif a <= -13000000000.0:
		tmp = z * (t / (z - a))
	elif a <= -2.7e-96:
		tmp = y * (t / (a - z))
	elif a <= -4.1e-156:
		tmp = t
	elif a <= 3.6e-295:
		tmp = t_1
	elif a <= 3.7e-252:
		tmp = t
	elif a <= 3.8e-91:
		tmp = t_1
	elif a <= 2.9e+152:
		tmp = t * ((y - z) / a)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(x - t) / z))
	tmp = 0.0
	if (a <= -1.75e+226)
		tmp = x;
	elseif (a <= -4.2e+195)
		tmp = Float64(Float64(y - z) / Float64(a / t));
	elseif (a <= -8.2e+87)
		tmp = x;
	elseif (a <= -13000000000.0)
		tmp = Float64(z * Float64(t / Float64(z - a)));
	elseif (a <= -2.7e-96)
		tmp = Float64(y * Float64(t / Float64(a - z)));
	elseif (a <= -4.1e-156)
		tmp = t;
	elseif (a <= 3.6e-295)
		tmp = t_1;
	elseif (a <= 3.7e-252)
		tmp = t;
	elseif (a <= 3.8e-91)
		tmp = t_1;
	elseif (a <= 2.9e+152)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((x - t) / z);
	tmp = 0.0;
	if (a <= -1.75e+226)
		tmp = x;
	elseif (a <= -4.2e+195)
		tmp = (y - z) / (a / t);
	elseif (a <= -8.2e+87)
		tmp = x;
	elseif (a <= -13000000000.0)
		tmp = z * (t / (z - a));
	elseif (a <= -2.7e-96)
		tmp = y * (t / (a - z));
	elseif (a <= -4.1e-156)
		tmp = t;
	elseif (a <= 3.6e-295)
		tmp = t_1;
	elseif (a <= 3.7e-252)
		tmp = t;
	elseif (a <= 3.8e-91)
		tmp = t_1;
	elseif (a <= 2.9e+152)
		tmp = t * ((y - z) / a);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.75e+226], x, If[LessEqual[a, -4.2e+195], N[(N[(y - z), $MachinePrecision] / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -8.2e+87], x, If[LessEqual[a, -13000000000.0], N[(z * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.7e-96], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.1e-156], t, If[LessEqual[a, 3.6e-295], t$95$1, If[LessEqual[a, 3.7e-252], t, If[LessEqual[a, 3.8e-91], t$95$1, If[LessEqual[a, 2.9e+152], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -8.2 \cdot 10^{+87}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -13000000000:\\
\;\;\;\;z \cdot \frac{t}{z - a}\\

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

\mathbf{elif}\;a \leq -4.1 \cdot 10^{-156}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 3.6 \cdot 10^{-295}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if a < -1.7499999999999999e226 or -4.20000000000000019e195 < a < -8.1999999999999998e87 or 2.8999999999999998e152 < a

    1. Initial program 93.3%

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

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

    if -1.7499999999999999e226 < a < -4.20000000000000019e195

    1. Initial program 99.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{\frac{a}{t}}} \]
    8. Applied egg-rr76.0%

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

    if -8.1999999999999998e87 < a < -1.3e10

    1. Initial program 67.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot z\right)}{a - z}} \]
      2. mul-1-neg28.9%

        \[\leadsto \frac{\color{blue}{-t \cdot z}}{a - z} \]
      3. distribute-rgt-neg-out28.9%

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

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

        \[\leadsto \color{blue}{\left(-z\right) \cdot \frac{t}{a - z}} \]
      6. distribute-lft-neg-out41.7%

        \[\leadsto \color{blue}{-z \cdot \frac{t}{a - z}} \]
      7. distribute-rgt-neg-in41.7%

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

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

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

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

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

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

    if -1.3e10 < a < -2.7e-96

    1. Initial program 87.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative47.9%

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

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

    if -2.7e-96 < a < -4.1000000000000002e-156 or 3.6000000000000001e-295 < a < 3.7000000000000001e-252

    1. Initial program 70.1%

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

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

    if -4.1000000000000002e-156 < a < 3.6000000000000001e-295 or 3.7000000000000001e-252 < a < 3.79999999999999978e-91

    1. Initial program 68.6%

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

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

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

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

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

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

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

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

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

    if 3.79999999999999978e-91 < a < 2.8999999999999998e152

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.75 \cdot 10^{+226}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{+195}:\\ \;\;\;\;\frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -13000000000:\\ \;\;\;\;z \cdot \frac{t}{z - a}\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-96}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-156}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-295}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-252}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-91}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+152}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 67.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{x}{z} \cdot \left(y - a\right)\\ t_2 := x + y \cdot \frac{t - x}{a}\\ \mathbf{if}\;a \leq -3.2 \cdot 10^{+84}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{+70}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{+36}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-17}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;a \leq -4.05 \cdot 10^{-97}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-88}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-15}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+65}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* (/ x z) (- y a)))) (t_2 (+ x (* y (/ (- t x) a)))))
   (if (<= a -3.2e+84)
     t_2
     (if (<= a -5.2e+70)
       t_1
       (if (<= a -5.1e+36)
         t_2
         (if (<= a -1.75e-17)
           (+ t (* (- t x) (/ a z)))
           (if (<= a -4.05e-97)
             (* y (/ (- t x) (- a z)))
             (if (<= a 3.4e-88)
               (+ t (/ (- x t) (/ z y)))
               (if (<= a 2.7e-15)
                 (+ x (/ (* y (- t x)) a))
                 (if (<= a 8.2e+65) t_1 (- x (* (/ y a) (- x t)))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((x / z) * (y - a));
	double t_2 = x + (y * ((t - x) / a));
	double tmp;
	if (a <= -3.2e+84) {
		tmp = t_2;
	} else if (a <= -5.2e+70) {
		tmp = t_1;
	} else if (a <= -5.1e+36) {
		tmp = t_2;
	} else if (a <= -1.75e-17) {
		tmp = t + ((t - x) * (a / z));
	} else if (a <= -4.05e-97) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 3.4e-88) {
		tmp = t + ((x - t) / (z / y));
	} else if (a <= 2.7e-15) {
		tmp = x + ((y * (t - x)) / a);
	} else if (a <= 8.2e+65) {
		tmp = t_1;
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t + ((x / z) * (y - a))
    t_2 = x + (y * ((t - x) / a))
    if (a <= (-3.2d+84)) then
        tmp = t_2
    else if (a <= (-5.2d+70)) then
        tmp = t_1
    else if (a <= (-5.1d+36)) then
        tmp = t_2
    else if (a <= (-1.75d-17)) then
        tmp = t + ((t - x) * (a / z))
    else if (a <= (-4.05d-97)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 3.4d-88) then
        tmp = t + ((x - t) / (z / y))
    else if (a <= 2.7d-15) then
        tmp = x + ((y * (t - x)) / a)
    else if (a <= 8.2d+65) then
        tmp = t_1
    else
        tmp = x - ((y / a) * (x - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((x / z) * (y - a));
	double t_2 = x + (y * ((t - x) / a));
	double tmp;
	if (a <= -3.2e+84) {
		tmp = t_2;
	} else if (a <= -5.2e+70) {
		tmp = t_1;
	} else if (a <= -5.1e+36) {
		tmp = t_2;
	} else if (a <= -1.75e-17) {
		tmp = t + ((t - x) * (a / z));
	} else if (a <= -4.05e-97) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 3.4e-88) {
		tmp = t + ((x - t) / (z / y));
	} else if (a <= 2.7e-15) {
		tmp = x + ((y * (t - x)) / a);
	} else if (a <= 8.2e+65) {
		tmp = t_1;
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + ((x / z) * (y - a))
	t_2 = x + (y * ((t - x) / a))
	tmp = 0
	if a <= -3.2e+84:
		tmp = t_2
	elif a <= -5.2e+70:
		tmp = t_1
	elif a <= -5.1e+36:
		tmp = t_2
	elif a <= -1.75e-17:
		tmp = t + ((t - x) * (a / z))
	elif a <= -4.05e-97:
		tmp = y * ((t - x) / (a - z))
	elif a <= 3.4e-88:
		tmp = t + ((x - t) / (z / y))
	elif a <= 2.7e-15:
		tmp = x + ((y * (t - x)) / a)
	elif a <= 8.2e+65:
		tmp = t_1
	else:
		tmp = x - ((y / a) * (x - t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(x / z) * Float64(y - a)))
	t_2 = Float64(x + Float64(y * Float64(Float64(t - x) / a)))
	tmp = 0.0
	if (a <= -3.2e+84)
		tmp = t_2;
	elseif (a <= -5.2e+70)
		tmp = t_1;
	elseif (a <= -5.1e+36)
		tmp = t_2;
	elseif (a <= -1.75e-17)
		tmp = Float64(t + Float64(Float64(t - x) * Float64(a / z)));
	elseif (a <= -4.05e-97)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 3.4e-88)
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / y)));
	elseif (a <= 2.7e-15)
		tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a));
	elseif (a <= 8.2e+65)
		tmp = t_1;
	else
		tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + ((x / z) * (y - a));
	t_2 = x + (y * ((t - x) / a));
	tmp = 0.0;
	if (a <= -3.2e+84)
		tmp = t_2;
	elseif (a <= -5.2e+70)
		tmp = t_1;
	elseif (a <= -5.1e+36)
		tmp = t_2;
	elseif (a <= -1.75e-17)
		tmp = t + ((t - x) * (a / z));
	elseif (a <= -4.05e-97)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 3.4e-88)
		tmp = t + ((x - t) / (z / y));
	elseif (a <= 2.7e-15)
		tmp = x + ((y * (t - x)) / a);
	elseif (a <= 8.2e+65)
		tmp = t_1;
	else
		tmp = x - ((y / a) * (x - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.2e+84], t$95$2, If[LessEqual[a, -5.2e+70], t$95$1, If[LessEqual[a, -5.1e+36], t$95$2, If[LessEqual[a, -1.75e-17], N[(t + N[(N[(t - x), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.05e-97], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e-88], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e-15], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.2e+65], t$95$1, N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -5.1 \cdot 10^{+36}:\\
\;\;\;\;t\_2\\

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

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

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

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

\mathbf{elif}\;a \leq 8.2 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if a < -3.2000000000000001e84 or -5.2000000000000001e70 < a < -5.09999999999999973e36

    1. Initial program 93.9%

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

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

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

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

    if -3.2000000000000001e84 < a < -5.2000000000000001e70 or 2.70000000000000009e-15 < a < 8.2000000000000003e65

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.09999999999999973e36 < a < -1.7500000000000001e-17

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7500000000000001e-17 < a < -4.05000000000000004e-97

    1. Initial program 99.8%

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

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

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

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

    if -4.05000000000000004e-97 < a < 3.39999999999999975e-88

    1. Initial program 69.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.39999999999999975e-88 < a < 2.70000000000000009e-15

    1. Initial program 87.2%

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

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

    if 8.2000000000000003e65 < a

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{+84}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{+70}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{+36}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-17}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;a \leq -4.05 \cdot 10^{-97}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-88}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-15}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+65}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 67.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{t - x}{a}\\ \mathbf{if}\;a \leq -2 \cdot 10^{+85}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -9 \cdot 10^{+73}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{+29}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-19}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;a \leq -7.4 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-88}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-15}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+66}:\\ \;\;\;\;t + \frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ (- t x) a)))))
   (if (<= a -2e+85)
     t_1
     (if (<= a -9e+73)
       (+ t (* (/ x z) (- y a)))
       (if (<= a -1.9e+29)
         t_1
         (if (<= a -6.5e-19)
           (+ t (* (- t x) (/ a z)))
           (if (<= a -7.4e-94)
             (* y (/ (- t x) (- a z)))
             (if (<= a 8.2e-88)
               (+ t (/ (- x t) (/ z y)))
               (if (<= a 4e-15)
                 (+ x (/ (* y (- t x)) a))
                 (if (<= a 1.55e+66)
                   (+ t (/ (* x (- y a)) z))
                   (- x (* (/ y a) (- x t)))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((t - x) / a));
	double tmp;
	if (a <= -2e+85) {
		tmp = t_1;
	} else if (a <= -9e+73) {
		tmp = t + ((x / z) * (y - a));
	} else if (a <= -1.9e+29) {
		tmp = t_1;
	} else if (a <= -6.5e-19) {
		tmp = t + ((t - x) * (a / z));
	} else if (a <= -7.4e-94) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 8.2e-88) {
		tmp = t + ((x - t) / (z / y));
	} else if (a <= 4e-15) {
		tmp = x + ((y * (t - x)) / a);
	} else if (a <= 1.55e+66) {
		tmp = t + ((x * (y - a)) / z);
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (y * ((t - x) / a))
    if (a <= (-2d+85)) then
        tmp = t_1
    else if (a <= (-9d+73)) then
        tmp = t + ((x / z) * (y - a))
    else if (a <= (-1.9d+29)) then
        tmp = t_1
    else if (a <= (-6.5d-19)) then
        tmp = t + ((t - x) * (a / z))
    else if (a <= (-7.4d-94)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 8.2d-88) then
        tmp = t + ((x - t) / (z / y))
    else if (a <= 4d-15) then
        tmp = x + ((y * (t - x)) / a)
    else if (a <= 1.55d+66) then
        tmp = t + ((x * (y - a)) / z)
    else
        tmp = x - ((y / a) * (x - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((t - x) / a));
	double tmp;
	if (a <= -2e+85) {
		tmp = t_1;
	} else if (a <= -9e+73) {
		tmp = t + ((x / z) * (y - a));
	} else if (a <= -1.9e+29) {
		tmp = t_1;
	} else if (a <= -6.5e-19) {
		tmp = t + ((t - x) * (a / z));
	} else if (a <= -7.4e-94) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 8.2e-88) {
		tmp = t + ((x - t) / (z / y));
	} else if (a <= 4e-15) {
		tmp = x + ((y * (t - x)) / a);
	} else if (a <= 1.55e+66) {
		tmp = t + ((x * (y - a)) / z);
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * ((t - x) / a))
	tmp = 0
	if a <= -2e+85:
		tmp = t_1
	elif a <= -9e+73:
		tmp = t + ((x / z) * (y - a))
	elif a <= -1.9e+29:
		tmp = t_1
	elif a <= -6.5e-19:
		tmp = t + ((t - x) * (a / z))
	elif a <= -7.4e-94:
		tmp = y * ((t - x) / (a - z))
	elif a <= 8.2e-88:
		tmp = t + ((x - t) / (z / y))
	elif a <= 4e-15:
		tmp = x + ((y * (t - x)) / a)
	elif a <= 1.55e+66:
		tmp = t + ((x * (y - a)) / z)
	else:
		tmp = x - ((y / a) * (x - t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(Float64(t - x) / a)))
	tmp = 0.0
	if (a <= -2e+85)
		tmp = t_1;
	elseif (a <= -9e+73)
		tmp = Float64(t + Float64(Float64(x / z) * Float64(y - a)));
	elseif (a <= -1.9e+29)
		tmp = t_1;
	elseif (a <= -6.5e-19)
		tmp = Float64(t + Float64(Float64(t - x) * Float64(a / z)));
	elseif (a <= -7.4e-94)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 8.2e-88)
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / y)));
	elseif (a <= 4e-15)
		tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a));
	elseif (a <= 1.55e+66)
		tmp = Float64(t + Float64(Float64(x * Float64(y - a)) / z));
	else
		tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * ((t - x) / a));
	tmp = 0.0;
	if (a <= -2e+85)
		tmp = t_1;
	elseif (a <= -9e+73)
		tmp = t + ((x / z) * (y - a));
	elseif (a <= -1.9e+29)
		tmp = t_1;
	elseif (a <= -6.5e-19)
		tmp = t + ((t - x) * (a / z));
	elseif (a <= -7.4e-94)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 8.2e-88)
		tmp = t + ((x - t) / (z / y));
	elseif (a <= 4e-15)
		tmp = x + ((y * (t - x)) / a);
	elseif (a <= 1.55e+66)
		tmp = t + ((x * (y - a)) / z);
	else
		tmp = x - ((y / a) * (x - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e+85], t$95$1, If[LessEqual[a, -9e+73], N[(t + N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.9e+29], t$95$1, If[LessEqual[a, -6.5e-19], N[(t + N[(N[(t - x), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7.4e-94], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.2e-88], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e-15], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e+66], N[(t + N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if a < -2e85 or -8.99999999999999969e73 < a < -1.89999999999999985e29

    1. Initial program 93.9%

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

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

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

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

    if -2e85 < a < -8.99999999999999969e73

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.89999999999999985e29 < a < -6.5000000000000001e-19

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.5000000000000001e-19 < a < -7.3999999999999996e-94

    1. Initial program 99.8%

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

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

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

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

    if -7.3999999999999996e-94 < a < 8.2000000000000002e-88

    1. Initial program 69.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.2000000000000002e-88 < a < 4.0000000000000003e-15

    1. Initial program 87.2%

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

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

    if 4.0000000000000003e-15 < a < 1.55000000000000009e66

    1. Initial program 54.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.55000000000000009e66 < a

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{+85}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -9 \cdot 10^{+73}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{+29}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-19}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;a \leq -7.4 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-88}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-15}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+66}:\\ \;\;\;\;t + \frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 66.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a}\\ \mathbf{if}\;a \leq -2.05 \cdot 10^{+83}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -7.6 \cdot 10^{+73}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{+27}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-18}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-90}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-15}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+65}:\\ \;\;\;\;t + \frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y z) (- t x)) a))))
   (if (<= a -2.05e+83)
     t_1
     (if (<= a -7.6e+73)
       (+ t (* (/ x z) (- y a)))
       (if (<= a -8.5e+27)
         t_1
         (if (<= a -1.35e-18)
           (+ t (* (- t x) (/ a z)))
           (if (<= a -4.5e-94)
             (* y (/ (- t x) (- a z)))
             (if (<= a 5.6e-90)
               (+ t (/ (- x t) (/ z y)))
               (if (<= a 2.2e-15)
                 (+ x (/ (* y (- t x)) a))
                 (if (<= a 8.2e+65)
                   (+ t (/ (* x (- y a)) z))
                   (- x (* (/ y a) (- x t)))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / a);
	double tmp;
	if (a <= -2.05e+83) {
		tmp = t_1;
	} else if (a <= -7.6e+73) {
		tmp = t + ((x / z) * (y - a));
	} else if (a <= -8.5e+27) {
		tmp = t_1;
	} else if (a <= -1.35e-18) {
		tmp = t + ((t - x) * (a / z));
	} else if (a <= -4.5e-94) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 5.6e-90) {
		tmp = t + ((x - t) / (z / y));
	} else if (a <= 2.2e-15) {
		tmp = x + ((y * (t - x)) / a);
	} else if (a <= 8.2e+65) {
		tmp = t + ((x * (y - a)) / z);
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (((y - z) * (t - x)) / a)
    if (a <= (-2.05d+83)) then
        tmp = t_1
    else if (a <= (-7.6d+73)) then
        tmp = t + ((x / z) * (y - a))
    else if (a <= (-8.5d+27)) then
        tmp = t_1
    else if (a <= (-1.35d-18)) then
        tmp = t + ((t - x) * (a / z))
    else if (a <= (-4.5d-94)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 5.6d-90) then
        tmp = t + ((x - t) / (z / y))
    else if (a <= 2.2d-15) then
        tmp = x + ((y * (t - x)) / a)
    else if (a <= 8.2d+65) then
        tmp = t + ((x * (y - a)) / z)
    else
        tmp = x - ((y / a) * (x - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / a);
	double tmp;
	if (a <= -2.05e+83) {
		tmp = t_1;
	} else if (a <= -7.6e+73) {
		tmp = t + ((x / z) * (y - a));
	} else if (a <= -8.5e+27) {
		tmp = t_1;
	} else if (a <= -1.35e-18) {
		tmp = t + ((t - x) * (a / z));
	} else if (a <= -4.5e-94) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 5.6e-90) {
		tmp = t + ((x - t) / (z / y));
	} else if (a <= 2.2e-15) {
		tmp = x + ((y * (t - x)) / a);
	} else if (a <= 8.2e+65) {
		tmp = t + ((x * (y - a)) / z);
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - z) * (t - x)) / a)
	tmp = 0
	if a <= -2.05e+83:
		tmp = t_1
	elif a <= -7.6e+73:
		tmp = t + ((x / z) * (y - a))
	elif a <= -8.5e+27:
		tmp = t_1
	elif a <= -1.35e-18:
		tmp = t + ((t - x) * (a / z))
	elif a <= -4.5e-94:
		tmp = y * ((t - x) / (a - z))
	elif a <= 5.6e-90:
		tmp = t + ((x - t) / (z / y))
	elif a <= 2.2e-15:
		tmp = x + ((y * (t - x)) / a)
	elif a <= 8.2e+65:
		tmp = t + ((x * (y - a)) / z)
	else:
		tmp = x - ((y / a) * (x - t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / a))
	tmp = 0.0
	if (a <= -2.05e+83)
		tmp = t_1;
	elseif (a <= -7.6e+73)
		tmp = Float64(t + Float64(Float64(x / z) * Float64(y - a)));
	elseif (a <= -8.5e+27)
		tmp = t_1;
	elseif (a <= -1.35e-18)
		tmp = Float64(t + Float64(Float64(t - x) * Float64(a / z)));
	elseif (a <= -4.5e-94)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 5.6e-90)
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / y)));
	elseif (a <= 2.2e-15)
		tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a));
	elseif (a <= 8.2e+65)
		tmp = Float64(t + Float64(Float64(x * Float64(y - a)) / z));
	else
		tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (((y - z) * (t - x)) / a);
	tmp = 0.0;
	if (a <= -2.05e+83)
		tmp = t_1;
	elseif (a <= -7.6e+73)
		tmp = t + ((x / z) * (y - a));
	elseif (a <= -8.5e+27)
		tmp = t_1;
	elseif (a <= -1.35e-18)
		tmp = t + ((t - x) * (a / z));
	elseif (a <= -4.5e-94)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 5.6e-90)
		tmp = t + ((x - t) / (z / y));
	elseif (a <= 2.2e-15)
		tmp = x + ((y * (t - x)) / a);
	elseif (a <= 8.2e+65)
		tmp = t + ((x * (y - a)) / z);
	else
		tmp = x - ((y / a) * (x - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.05e+83], t$95$1, If[LessEqual[a, -7.6e+73], N[(t + N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -8.5e+27], t$95$1, If[LessEqual[a, -1.35e-18], N[(t + N[(N[(t - x), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.5e-94], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.6e-90], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.2e-15], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.2e+65], N[(t + N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if a < -2.05e83 or -7.60000000000000044e73 < a < -8.5e27

    1. Initial program 92.5%

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

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

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

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

    if -2.05e83 < a < -7.60000000000000044e73

    1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.5e27 < a < -1.34999999999999994e-18

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.34999999999999994e-18 < a < -4.5000000000000002e-94

    1. Initial program 99.8%

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

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

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

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

    if -4.5000000000000002e-94 < a < 5.5999999999999998e-90

    1. Initial program 69.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5999999999999998e-90 < a < 2.19999999999999986e-15

    1. Initial program 87.2%

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

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

    if 2.19999999999999986e-15 < a < 8.2000000000000003e65

    1. Initial program 54.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.2000000000000003e65 < a

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.05 \cdot 10^{+83}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq -7.6 \cdot 10^{+73}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{+27}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-18}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-90}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-15}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+65}:\\ \;\;\;\;t + \frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 43.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x - t}{z}\\ t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -1.75 \cdot 10^{+226}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1 \cdot 10^{+198}:\\ \;\;\;\;\frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-144}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-298}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{-235}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-87}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+153}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- x t) z))) (t_2 (* t (- 1.0 (/ y z)))))
   (if (<= a -1.75e+226)
     x
     (if (<= a -1e+198)
       (/ (- y z) (/ a t))
       (if (<= a -1.35e+87)
         x
         (if (<= a -8.6e-144)
           t_2
           (if (<= a 1.85e-298)
             t_1
             (if (<= a 4.9e-235)
               t_2
               (if (<= a 1.25e-87)
                 t_1
                 (if (<= a 4.5e+153) (* t (/ (- y z) a)) x))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((x - t) / z);
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -1.75e+226) {
		tmp = x;
	} else if (a <= -1e+198) {
		tmp = (y - z) / (a / t);
	} else if (a <= -1.35e+87) {
		tmp = x;
	} else if (a <= -8.6e-144) {
		tmp = t_2;
	} else if (a <= 1.85e-298) {
		tmp = t_1;
	} else if (a <= 4.9e-235) {
		tmp = t_2;
	} else if (a <= 1.25e-87) {
		tmp = t_1;
	} else if (a <= 4.5e+153) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((x - t) / z)
    t_2 = t * (1.0d0 - (y / z))
    if (a <= (-1.75d+226)) then
        tmp = x
    else if (a <= (-1d+198)) then
        tmp = (y - z) / (a / t)
    else if (a <= (-1.35d+87)) then
        tmp = x
    else if (a <= (-8.6d-144)) then
        tmp = t_2
    else if (a <= 1.85d-298) then
        tmp = t_1
    else if (a <= 4.9d-235) then
        tmp = t_2
    else if (a <= 1.25d-87) then
        tmp = t_1
    else if (a <= 4.5d+153) then
        tmp = t * ((y - z) / a)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((x - t) / z);
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -1.75e+226) {
		tmp = x;
	} else if (a <= -1e+198) {
		tmp = (y - z) / (a / t);
	} else if (a <= -1.35e+87) {
		tmp = x;
	} else if (a <= -8.6e-144) {
		tmp = t_2;
	} else if (a <= 1.85e-298) {
		tmp = t_1;
	} else if (a <= 4.9e-235) {
		tmp = t_2;
	} else if (a <= 1.25e-87) {
		tmp = t_1;
	} else if (a <= 4.5e+153) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((x - t) / z)
	t_2 = t * (1.0 - (y / z))
	tmp = 0
	if a <= -1.75e+226:
		tmp = x
	elif a <= -1e+198:
		tmp = (y - z) / (a / t)
	elif a <= -1.35e+87:
		tmp = x
	elif a <= -8.6e-144:
		tmp = t_2
	elif a <= 1.85e-298:
		tmp = t_1
	elif a <= 4.9e-235:
		tmp = t_2
	elif a <= 1.25e-87:
		tmp = t_1
	elif a <= 4.5e+153:
		tmp = t * ((y - z) / a)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(x - t) / z))
	t_2 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (a <= -1.75e+226)
		tmp = x;
	elseif (a <= -1e+198)
		tmp = Float64(Float64(y - z) / Float64(a / t));
	elseif (a <= -1.35e+87)
		tmp = x;
	elseif (a <= -8.6e-144)
		tmp = t_2;
	elseif (a <= 1.85e-298)
		tmp = t_1;
	elseif (a <= 4.9e-235)
		tmp = t_2;
	elseif (a <= 1.25e-87)
		tmp = t_1;
	elseif (a <= 4.5e+153)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((x - t) / z);
	t_2 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (a <= -1.75e+226)
		tmp = x;
	elseif (a <= -1e+198)
		tmp = (y - z) / (a / t);
	elseif (a <= -1.35e+87)
		tmp = x;
	elseif (a <= -8.6e-144)
		tmp = t_2;
	elseif (a <= 1.85e-298)
		tmp = t_1;
	elseif (a <= 4.9e-235)
		tmp = t_2;
	elseif (a <= 1.25e-87)
		tmp = t_1;
	elseif (a <= 4.5e+153)
		tmp = t * ((y - z) / a);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.75e+226], x, If[LessEqual[a, -1e+198], N[(N[(y - z), $MachinePrecision] / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.35e+87], x, If[LessEqual[a, -8.6e-144], t$95$2, If[LessEqual[a, 1.85e-298], t$95$1, If[LessEqual[a, 4.9e-235], t$95$2, If[LessEqual[a, 1.25e-87], t$95$1, If[LessEqual[a, 4.5e+153], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -1.35 \cdot 10^{+87}:\\
\;\;\;\;x\\

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

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

\mathbf{elif}\;a \leq 4.9 \cdot 10^{-235}:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.7499999999999999e226 or -1.00000000000000002e198 < a < -1.35000000000000003e87 or 4.5000000000000001e153 < a

    1. Initial program 93.3%

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

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

    if -1.7499999999999999e226 < a < -1.00000000000000002e198

    1. Initial program 99.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{\frac{a}{t}}} \]
    8. Applied egg-rr76.0%

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

    if -1.35000000000000003e87 < a < -8.5999999999999998e-144 or 1.8499999999999999e-298 < a < 4.89999999999999965e-235

    1. Initial program 78.4%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. distribute-lft-neg-in49.4%

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

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

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

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

    if -8.5999999999999998e-144 < a < 1.8499999999999999e-298 or 4.89999999999999965e-235 < a < 1.25000000000000011e-87

    1. Initial program 65.7%

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. div-sub61.7%

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

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

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

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

    if 1.25000000000000011e-87 < a < 4.5000000000000001e153

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.75 \cdot 10^{+226}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1 \cdot 10^{+198}:\\ \;\;\;\;\frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-144}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-298}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{-235}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-87}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+153}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 91.4% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 93.1%

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

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

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 91.4% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 92.7%

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

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

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

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

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

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 93.4%

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

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

Alternative 9: 93.2% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 93.4%

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

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

Alternative 10: 59.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\ t_2 := x + y \cdot \frac{t - x}{a}\\ t_3 := y \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;a \leq -2.1 \cdot 10^{+84}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-92}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-144}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-298}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-280}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-9}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- y z) (/ t (- a z))))
        (t_2 (+ x (* y (/ (- t x) a))))
        (t_3 (* y (/ (- t x) (- a z)))))
   (if (<= a -2.1e+84)
     t_2
     (if (<= a -7.5e-19)
       t_1
       (if (<= a -5.2e-92)
         t_3
         (if (<= a -9.2e-144)
           t_1
           (if (<= a 3e-298)
             t_3
             (if (<= a 2.5e-280)
               (* t (- 1.0 (/ y z)))
               (if (<= a 7.5e-9) t_3 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / (a - z));
	double t_2 = x + (y * ((t - x) / a));
	double t_3 = y * ((t - x) / (a - z));
	double tmp;
	if (a <= -2.1e+84) {
		tmp = t_2;
	} else if (a <= -7.5e-19) {
		tmp = t_1;
	} else if (a <= -5.2e-92) {
		tmp = t_3;
	} else if (a <= -9.2e-144) {
		tmp = t_1;
	} else if (a <= 3e-298) {
		tmp = t_3;
	} else if (a <= 2.5e-280) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 7.5e-9) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (y - z) * (t / (a - z))
    t_2 = x + (y * ((t - x) / a))
    t_3 = y * ((t - x) / (a - z))
    if (a <= (-2.1d+84)) then
        tmp = t_2
    else if (a <= (-7.5d-19)) then
        tmp = t_1
    else if (a <= (-5.2d-92)) then
        tmp = t_3
    else if (a <= (-9.2d-144)) then
        tmp = t_1
    else if (a <= 3d-298) then
        tmp = t_3
    else if (a <= 2.5d-280) then
        tmp = t * (1.0d0 - (y / z))
    else if (a <= 7.5d-9) then
        tmp = t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / (a - z));
	double t_2 = x + (y * ((t - x) / a));
	double t_3 = y * ((t - x) / (a - z));
	double tmp;
	if (a <= -2.1e+84) {
		tmp = t_2;
	} else if (a <= -7.5e-19) {
		tmp = t_1;
	} else if (a <= -5.2e-92) {
		tmp = t_3;
	} else if (a <= -9.2e-144) {
		tmp = t_1;
	} else if (a <= 3e-298) {
		tmp = t_3;
	} else if (a <= 2.5e-280) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 7.5e-9) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - z) * (t / (a - z))
	t_2 = x + (y * ((t - x) / a))
	t_3 = y * ((t - x) / (a - z))
	tmp = 0
	if a <= -2.1e+84:
		tmp = t_2
	elif a <= -7.5e-19:
		tmp = t_1
	elif a <= -5.2e-92:
		tmp = t_3
	elif a <= -9.2e-144:
		tmp = t_1
	elif a <= 3e-298:
		tmp = t_3
	elif a <= 2.5e-280:
		tmp = t * (1.0 - (y / z))
	elif a <= 7.5e-9:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - z) * Float64(t / Float64(a - z)))
	t_2 = Float64(x + Float64(y * Float64(Float64(t - x) / a)))
	t_3 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	tmp = 0.0
	if (a <= -2.1e+84)
		tmp = t_2;
	elseif (a <= -7.5e-19)
		tmp = t_1;
	elseif (a <= -5.2e-92)
		tmp = t_3;
	elseif (a <= -9.2e-144)
		tmp = t_1;
	elseif (a <= 3e-298)
		tmp = t_3;
	elseif (a <= 2.5e-280)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif (a <= 7.5e-9)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - z) * (t / (a - z));
	t_2 = x + (y * ((t - x) / a));
	t_3 = y * ((t - x) / (a - z));
	tmp = 0.0;
	if (a <= -2.1e+84)
		tmp = t_2;
	elseif (a <= -7.5e-19)
		tmp = t_1;
	elseif (a <= -5.2e-92)
		tmp = t_3;
	elseif (a <= -9.2e-144)
		tmp = t_1;
	elseif (a <= 3e-298)
		tmp = t_3;
	elseif (a <= 2.5e-280)
		tmp = t * (1.0 - (y / z));
	elseif (a <= 7.5e-9)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.1e+84], t$95$2, If[LessEqual[a, -7.5e-19], t$95$1, If[LessEqual[a, -5.2e-92], t$95$3, If[LessEqual[a, -9.2e-144], t$95$1, If[LessEqual[a, 3e-298], t$95$3, If[LessEqual[a, 2.5e-280], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.5e-9], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;a \leq 3 \cdot 10^{-298}:\\
\;\;\;\;t\_3\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.10000000000000019e84 or 7.49999999999999933e-9 < a

    1. Initial program 88.3%

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

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

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

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

    if -2.10000000000000019e84 < a < -7.49999999999999957e-19 or -5.2e-92 < a < -9.2e-144

    1. Initial program 75.5%

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

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

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

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

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

    if -7.49999999999999957e-19 < a < -5.2e-92 or -9.2e-144 < a < 2.9999999999999999e-298 or 2.50000000000000014e-280 < a < 7.49999999999999933e-9

    1. Initial program 71.9%

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

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

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

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

    if 2.9999999999999999e-298 < a < 2.50000000000000014e-280

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+84}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-19}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-92}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-144}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-298}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-280}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-9}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 59.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\ t_2 := y \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;a \leq -2.1 \cdot 10^{+84}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -3.4 \cdot 10^{-91}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-295}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-280}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-91}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- y z) (/ t (- a z)))) (t_2 (* y (/ (- t x) (- a z)))))
   (if (<= a -2.1e+84)
     (+ x (* y (/ (- t x) a)))
     (if (<= a -1.75e-18)
       t_1
       (if (<= a -3.4e-91)
         t_2
         (if (<= a -4.5e-142)
           t_1
           (if (<= a 3e-295)
             t_2
             (if (<= a 7e-280)
               (* t (- 1.0 (/ y z)))
               (if (<= a 5e-91) t_2 (- x (* (/ y a) (- x t))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / (a - z));
	double t_2 = y * ((t - x) / (a - z));
	double tmp;
	if (a <= -2.1e+84) {
		tmp = x + (y * ((t - x) / a));
	} else if (a <= -1.75e-18) {
		tmp = t_1;
	} else if (a <= -3.4e-91) {
		tmp = t_2;
	} else if (a <= -4.5e-142) {
		tmp = t_1;
	} else if (a <= 3e-295) {
		tmp = t_2;
	} else if (a <= 7e-280) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 5e-91) {
		tmp = t_2;
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (y - z) * (t / (a - z))
    t_2 = y * ((t - x) / (a - z))
    if (a <= (-2.1d+84)) then
        tmp = x + (y * ((t - x) / a))
    else if (a <= (-1.75d-18)) then
        tmp = t_1
    else if (a <= (-3.4d-91)) then
        tmp = t_2
    else if (a <= (-4.5d-142)) then
        tmp = t_1
    else if (a <= 3d-295) then
        tmp = t_2
    else if (a <= 7d-280) then
        tmp = t * (1.0d0 - (y / z))
    else if (a <= 5d-91) then
        tmp = t_2
    else
        tmp = x - ((y / a) * (x - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / (a - z));
	double t_2 = y * ((t - x) / (a - z));
	double tmp;
	if (a <= -2.1e+84) {
		tmp = x + (y * ((t - x) / a));
	} else if (a <= -1.75e-18) {
		tmp = t_1;
	} else if (a <= -3.4e-91) {
		tmp = t_2;
	} else if (a <= -4.5e-142) {
		tmp = t_1;
	} else if (a <= 3e-295) {
		tmp = t_2;
	} else if (a <= 7e-280) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 5e-91) {
		tmp = t_2;
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - z) * (t / (a - z))
	t_2 = y * ((t - x) / (a - z))
	tmp = 0
	if a <= -2.1e+84:
		tmp = x + (y * ((t - x) / a))
	elif a <= -1.75e-18:
		tmp = t_1
	elif a <= -3.4e-91:
		tmp = t_2
	elif a <= -4.5e-142:
		tmp = t_1
	elif a <= 3e-295:
		tmp = t_2
	elif a <= 7e-280:
		tmp = t * (1.0 - (y / z))
	elif a <= 5e-91:
		tmp = t_2
	else:
		tmp = x - ((y / a) * (x - t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - z) * Float64(t / Float64(a - z)))
	t_2 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	tmp = 0.0
	if (a <= -2.1e+84)
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	elseif (a <= -1.75e-18)
		tmp = t_1;
	elseif (a <= -3.4e-91)
		tmp = t_2;
	elseif (a <= -4.5e-142)
		tmp = t_1;
	elseif (a <= 3e-295)
		tmp = t_2;
	elseif (a <= 7e-280)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif (a <= 5e-91)
		tmp = t_2;
	else
		tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - z) * (t / (a - z));
	t_2 = y * ((t - x) / (a - z));
	tmp = 0.0;
	if (a <= -2.1e+84)
		tmp = x + (y * ((t - x) / a));
	elseif (a <= -1.75e-18)
		tmp = t_1;
	elseif (a <= -3.4e-91)
		tmp = t_2;
	elseif (a <= -4.5e-142)
		tmp = t_1;
	elseif (a <= 3e-295)
		tmp = t_2;
	elseif (a <= 7e-280)
		tmp = t * (1.0 - (y / z));
	elseif (a <= 5e-91)
		tmp = t_2;
	else
		tmp = x - ((y / a) * (x - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.1e+84], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.75e-18], t$95$1, If[LessEqual[a, -3.4e-91], t$95$2, If[LessEqual[a, -4.5e-142], t$95$1, If[LessEqual[a, 3e-295], t$95$2, If[LessEqual[a, 7e-280], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5e-91], t$95$2, N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.75 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -3.4 \cdot 10^{-91}:\\
\;\;\;\;t\_2\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.10000000000000019e84

    1. Initial program 91.4%

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

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

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

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

    if -2.10000000000000019e84 < a < -1.7499999999999999e-18 or -3.40000000000000027e-91 < a < -4.50000000000000019e-142

    1. Initial program 75.5%

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

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

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

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

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

    if -1.7499999999999999e-18 < a < -3.40000000000000027e-91 or -4.50000000000000019e-142 < a < 2.99999999999999996e-295 or 7.0000000000000002e-280 < a < 4.99999999999999997e-91

    1. Initial program 70.0%

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

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

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

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

    if 2.99999999999999996e-295 < a < 7.0000000000000002e-280

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999997e-91 < a

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+84}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-18}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq -3.4 \cdot 10^{-91}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-142}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-295}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-280}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-91}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 67.6% accurate, 0.3× speedup?

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

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

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

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

\mathbf{elif}\;a \leq -1.65 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if a < -2.2999999999999999e84

    1. Initial program 91.4%

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

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

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

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

    if -2.2999999999999999e84 < a < -2.99999999999999993e-19

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
    9. Simplified55.7%

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

    if -2.99999999999999993e-19 < a < -3.14999999999999996e-99

    1. Initial program 99.8%

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

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

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

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

    if -3.14999999999999996e-99 < a < -1.65e-118 or 0.104999999999999996 < a < 4.00000000000000037e56

    1. Initial program 61.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.65e-118 < a < 1.30000000000000001e-87

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.30000000000000001e-87 < a < 0.104999999999999996

    1. Initial program 82.9%

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

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

    if 4.00000000000000037e56 < a

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+84}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-19}:\\ \;\;\;\;\frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;a \leq -3.15 \cdot 10^{-99}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-118}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-87}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 0.105:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+56}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 46.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{x - t}{z}\\ t_2 := x - x \cdot \frac{y}{a}\\ t_3 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -2.35 \cdot 10^{+226}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6 \cdot 10^{+195}:\\ \;\;\;\;\frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{+84}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-144}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-297}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-249}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{-69}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- x t) z)))
        (t_2 (- x (* x (/ y a))))
        (t_3 (* t (- 1.0 (/ y z)))))
   (if (<= a -2.35e+226)
     x
     (if (<= a -6e+195)
       (/ (- y z) (/ a t))
       (if (<= a -1.95e+84)
         t_2
         (if (<= a -6.8e-144)
           t_3
           (if (<= a 2.2e-297)
             t_1
             (if (<= a 2.4e-249) t_3 (if (<= a 1.32e-69) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((x - t) / z);
	double t_2 = x - (x * (y / a));
	double t_3 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -2.35e+226) {
		tmp = x;
	} else if (a <= -6e+195) {
		tmp = (y - z) / (a / t);
	} else if (a <= -1.95e+84) {
		tmp = t_2;
	} else if (a <= -6.8e-144) {
		tmp = t_3;
	} else if (a <= 2.2e-297) {
		tmp = t_1;
	} else if (a <= 2.4e-249) {
		tmp = t_3;
	} else if (a <= 1.32e-69) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = y * ((x - t) / z)
    t_2 = x - (x * (y / a))
    t_3 = t * (1.0d0 - (y / z))
    if (a <= (-2.35d+226)) then
        tmp = x
    else if (a <= (-6d+195)) then
        tmp = (y - z) / (a / t)
    else if (a <= (-1.95d+84)) then
        tmp = t_2
    else if (a <= (-6.8d-144)) then
        tmp = t_3
    else if (a <= 2.2d-297) then
        tmp = t_1
    else if (a <= 2.4d-249) then
        tmp = t_3
    else if (a <= 1.32d-69) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((x - t) / z);
	double t_2 = x - (x * (y / a));
	double t_3 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -2.35e+226) {
		tmp = x;
	} else if (a <= -6e+195) {
		tmp = (y - z) / (a / t);
	} else if (a <= -1.95e+84) {
		tmp = t_2;
	} else if (a <= -6.8e-144) {
		tmp = t_3;
	} else if (a <= 2.2e-297) {
		tmp = t_1;
	} else if (a <= 2.4e-249) {
		tmp = t_3;
	} else if (a <= 1.32e-69) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((x - t) / z)
	t_2 = x - (x * (y / a))
	t_3 = t * (1.0 - (y / z))
	tmp = 0
	if a <= -2.35e+226:
		tmp = x
	elif a <= -6e+195:
		tmp = (y - z) / (a / t)
	elif a <= -1.95e+84:
		tmp = t_2
	elif a <= -6.8e-144:
		tmp = t_3
	elif a <= 2.2e-297:
		tmp = t_1
	elif a <= 2.4e-249:
		tmp = t_3
	elif a <= 1.32e-69:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(x - t) / z))
	t_2 = Float64(x - Float64(x * Float64(y / a)))
	t_3 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (a <= -2.35e+226)
		tmp = x;
	elseif (a <= -6e+195)
		tmp = Float64(Float64(y - z) / Float64(a / t));
	elseif (a <= -1.95e+84)
		tmp = t_2;
	elseif (a <= -6.8e-144)
		tmp = t_3;
	elseif (a <= 2.2e-297)
		tmp = t_1;
	elseif (a <= 2.4e-249)
		tmp = t_3;
	elseif (a <= 1.32e-69)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((x - t) / z);
	t_2 = x - (x * (y / a));
	t_3 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (a <= -2.35e+226)
		tmp = x;
	elseif (a <= -6e+195)
		tmp = (y - z) / (a / t);
	elseif (a <= -1.95e+84)
		tmp = t_2;
	elseif (a <= -6.8e-144)
		tmp = t_3;
	elseif (a <= 2.2e-297)
		tmp = t_1;
	elseif (a <= 2.4e-249)
		tmp = t_3;
	elseif (a <= 1.32e-69)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.35e+226], x, If[LessEqual[a, -6e+195], N[(N[(y - z), $MachinePrecision] / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.95e+84], t$95$2, If[LessEqual[a, -6.8e-144], t$95$3, If[LessEqual[a, 2.2e-297], t$95$1, If[LessEqual[a, 2.4e-249], t$95$3, If[LessEqual[a, 1.32e-69], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -6 \cdot 10^{+195}:\\
\;\;\;\;\frac{y - z}{\frac{a}{t}}\\

\mathbf{elif}\;a \leq -1.95 \cdot 10^{+84}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;a \leq 2.4 \cdot 10^{-249}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 1.32 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.34999999999999996e226

    1. Initial program 90.8%

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

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

    if -2.34999999999999996e226 < a < -6.0000000000000001e195

    1. Initial program 99.2%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y - z}{\frac{a}{t}}} \]
    8. Applied egg-rr76.0%

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

    if -6.0000000000000001e195 < a < -1.95000000000000008e84 or 1.32000000000000007e-69 < a

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\color{blue}{x \cdot \frac{y}{a}}\right) + x \]
      3. distribute-lft-neg-out49.6%

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

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

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

    if -1.95000000000000008e84 < a < -6.80000000000000035e-144 or 2.1999999999999998e-297 < a < 2.40000000000000013e-249

    1. Initial program 79.5%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. distribute-lft-neg-in50.1%

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

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

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

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

    if -6.80000000000000035e-144 < a < 2.1999999999999998e-297 or 2.40000000000000013e-249 < a < 1.32000000000000007e-69

    1. Initial program 67.2%

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. div-sub60.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.35 \cdot 10^{+226}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6 \cdot 10^{+195}:\\ \;\;\;\;\frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{+84}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-144}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-297}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-249}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{-69}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 36.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.04 \cdot 10^{+37}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-142}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-297}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-242}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-102}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{+153}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.04e+37)
   x
   (if (<= a -1.65e-142)
     t
     (if (<= a 2.7e-297)
       (/ (* x y) z)
       (if (<= a 5.2e-242)
         t
         (if (<= a 4.2e-102)
           (* x (/ y z))
           (if (<= a 2e+153) (* t (/ (- y z) a)) x)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.04e+37) {
		tmp = x;
	} else if (a <= -1.65e-142) {
		tmp = t;
	} else if (a <= 2.7e-297) {
		tmp = (x * y) / z;
	} else if (a <= 5.2e-242) {
		tmp = t;
	} else if (a <= 4.2e-102) {
		tmp = x * (y / z);
	} else if (a <= 2e+153) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1.04d+37)) then
        tmp = x
    else if (a <= (-1.65d-142)) then
        tmp = t
    else if (a <= 2.7d-297) then
        tmp = (x * y) / z
    else if (a <= 5.2d-242) then
        tmp = t
    else if (a <= 4.2d-102) then
        tmp = x * (y / z)
    else if (a <= 2d+153) then
        tmp = t * ((y - z) / a)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.04e+37) {
		tmp = x;
	} else if (a <= -1.65e-142) {
		tmp = t;
	} else if (a <= 2.7e-297) {
		tmp = (x * y) / z;
	} else if (a <= 5.2e-242) {
		tmp = t;
	} else if (a <= 4.2e-102) {
		tmp = x * (y / z);
	} else if (a <= 2e+153) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.04e+37:
		tmp = x
	elif a <= -1.65e-142:
		tmp = t
	elif a <= 2.7e-297:
		tmp = (x * y) / z
	elif a <= 5.2e-242:
		tmp = t
	elif a <= 4.2e-102:
		tmp = x * (y / z)
	elif a <= 2e+153:
		tmp = t * ((y - z) / a)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.04e+37)
		tmp = x;
	elseif (a <= -1.65e-142)
		tmp = t;
	elseif (a <= 2.7e-297)
		tmp = Float64(Float64(x * y) / z);
	elseif (a <= 5.2e-242)
		tmp = t;
	elseif (a <= 4.2e-102)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 2e+153)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.04e+37)
		tmp = x;
	elseif (a <= -1.65e-142)
		tmp = t;
	elseif (a <= 2.7e-297)
		tmp = (x * y) / z;
	elseif (a <= 5.2e-242)
		tmp = t;
	elseif (a <= 4.2e-102)
		tmp = x * (y / z);
	elseif (a <= 2e+153)
		tmp = t * ((y - z) / a);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.04e+37], x, If[LessEqual[a, -1.65e-142], t, If[LessEqual[a, 2.7e-297], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 5.2e-242], t, If[LessEqual[a, 4.2e-102], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e+153], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.65 \cdot 10^{-142}:\\
\;\;\;\;t\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.0400000000000001e37 or 2e153 < a

    1. Initial program 90.7%

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

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

    if -1.0400000000000001e37 < a < -1.6499999999999998e-142 or 2.7000000000000001e-297 < a < 5.20000000000000034e-242

    1. Initial program 79.6%

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

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

    if -1.6499999999999998e-142 < a < 2.7000000000000001e-297

    1. Initial program 55.2%

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

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

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

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

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

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

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

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

    if 5.20000000000000034e-242 < a < 4.2e-102

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

    if 4.2e-102 < a < 2e153

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.04 \cdot 10^{+37}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-142}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-297}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-242}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-102}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{+153}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 32.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -5.8 \cdot 10^{+49}:\\
\;\;\;\;x\\

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

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

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

\mathbf{elif}\;t \leq 1.3 \cdot 10^{+156}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -2.6e97

    1. Initial program 93.5%

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

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

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

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

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

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

    if -2.6e97 < t < -5.8e49

    1. Initial program 78.3%

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

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

    if -5.8e49 < t < -1.65000000000000004e-21 or 2.5e51 < t < 1.30000000000000009e156

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

    if -1.65000000000000004e-21 < t < 1.7500000000000001e-141

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7500000000000001e-141 < t < 2.5e51

    1. Initial program 82.8%

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. div-sub59.4%

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

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

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

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

    if 1.30000000000000009e156 < t

    1. Initial program 93.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+97}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{+49}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-21}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-141}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+51}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+156}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 35.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -3.8 \cdot 10^{+108}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{+41}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{+22}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-135}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-238}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y a))))
   (if (<= z -3.8e+108)
     t
     (if (<= z -2.4e+41)
       x
       (if (<= z -6.5e+22)
         t
         (if (<= z -4e-135)
           t_1
           (if (<= z -2.6e-238)
             x
             (if (<= z 2.2e-66) t_1 (if (<= z 4.4e+110) x t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -3.8e+108) {
		tmp = t;
	} else if (z <= -2.4e+41) {
		tmp = x;
	} else if (z <= -6.5e+22) {
		tmp = t;
	} else if (z <= -4e-135) {
		tmp = t_1;
	} else if (z <= -2.6e-238) {
		tmp = x;
	} else if (z <= 2.2e-66) {
		tmp = t_1;
	} else if (z <= 4.4e+110) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (y / a)
    if (z <= (-3.8d+108)) then
        tmp = t
    else if (z <= (-2.4d+41)) then
        tmp = x
    else if (z <= (-6.5d+22)) then
        tmp = t
    else if (z <= (-4d-135)) then
        tmp = t_1
    else if (z <= (-2.6d-238)) then
        tmp = x
    else if (z <= 2.2d-66) then
        tmp = t_1
    else if (z <= 4.4d+110) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -3.8e+108) {
		tmp = t;
	} else if (z <= -2.4e+41) {
		tmp = x;
	} else if (z <= -6.5e+22) {
		tmp = t;
	} else if (z <= -4e-135) {
		tmp = t_1;
	} else if (z <= -2.6e-238) {
		tmp = x;
	} else if (z <= 2.2e-66) {
		tmp = t_1;
	} else if (z <= 4.4e+110) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / a)
	tmp = 0
	if z <= -3.8e+108:
		tmp = t
	elif z <= -2.4e+41:
		tmp = x
	elif z <= -6.5e+22:
		tmp = t
	elif z <= -4e-135:
		tmp = t_1
	elif z <= -2.6e-238:
		tmp = x
	elif z <= 2.2e-66:
		tmp = t_1
	elif z <= 4.4e+110:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / a))
	tmp = 0.0
	if (z <= -3.8e+108)
		tmp = t;
	elseif (z <= -2.4e+41)
		tmp = x;
	elseif (z <= -6.5e+22)
		tmp = t;
	elseif (z <= -4e-135)
		tmp = t_1;
	elseif (z <= -2.6e-238)
		tmp = x;
	elseif (z <= 2.2e-66)
		tmp = t_1;
	elseif (z <= 4.4e+110)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / a);
	tmp = 0.0;
	if (z <= -3.8e+108)
		tmp = t;
	elseif (z <= -2.4e+41)
		tmp = x;
	elseif (z <= -6.5e+22)
		tmp = t;
	elseif (z <= -4e-135)
		tmp = t_1;
	elseif (z <= -2.6e-238)
		tmp = x;
	elseif (z <= 2.2e-66)
		tmp = t_1;
	elseif (z <= 4.4e+110)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+108], t, If[LessEqual[z, -2.4e+41], x, If[LessEqual[z, -6.5e+22], t, If[LessEqual[z, -4e-135], t$95$1, If[LessEqual[z, -2.6e-238], x, If[LessEqual[z, 2.2e-66], t$95$1, If[LessEqual[z, 4.4e+110], x, t]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq -4 \cdot 10^{-135}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-238}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.2 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+110}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.80000000000000008e108 or -2.4000000000000002e41 < z < -6.49999999999999979e22 or 4.39999999999999984e110 < z

    1. Initial program 60.6%

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

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

    if -3.80000000000000008e108 < z < -2.4000000000000002e41 or -4.0000000000000002e-135 < z < -2.6000000000000001e-238 or 2.2000000000000001e-66 < z < 4.39999999999999984e110

    1. Initial program 85.2%

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

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

    if -6.49999999999999979e22 < z < -4.0000000000000002e-135 or -2.6000000000000001e-238 < z < 2.2000000000000001e-66

    1. Initial program 92.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*38.4%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified38.4%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+108}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{+41}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{+22}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-135}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-238}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-66}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 35.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -6 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{+41}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3 \cdot 10^{+33}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-129}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-237}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y a))))
   (if (<= z -6e+106)
     t
     (if (<= z -1.5e+41)
       x
       (if (<= z -3e+33)
         (* x (/ y z))
         (if (<= z -2.4e-129)
           t_1
           (if (<= z -6.2e-237)
             x
             (if (<= z 3.7e-66) t_1 (if (<= z 5e+110) x t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -6e+106) {
		tmp = t;
	} else if (z <= -1.5e+41) {
		tmp = x;
	} else if (z <= -3e+33) {
		tmp = x * (y / z);
	} else if (z <= -2.4e-129) {
		tmp = t_1;
	} else if (z <= -6.2e-237) {
		tmp = x;
	} else if (z <= 3.7e-66) {
		tmp = t_1;
	} else if (z <= 5e+110) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (y / a)
    if (z <= (-6d+106)) then
        tmp = t
    else if (z <= (-1.5d+41)) then
        tmp = x
    else if (z <= (-3d+33)) then
        tmp = x * (y / z)
    else if (z <= (-2.4d-129)) then
        tmp = t_1
    else if (z <= (-6.2d-237)) then
        tmp = x
    else if (z <= 3.7d-66) then
        tmp = t_1
    else if (z <= 5d+110) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -6e+106) {
		tmp = t;
	} else if (z <= -1.5e+41) {
		tmp = x;
	} else if (z <= -3e+33) {
		tmp = x * (y / z);
	} else if (z <= -2.4e-129) {
		tmp = t_1;
	} else if (z <= -6.2e-237) {
		tmp = x;
	} else if (z <= 3.7e-66) {
		tmp = t_1;
	} else if (z <= 5e+110) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / a)
	tmp = 0
	if z <= -6e+106:
		tmp = t
	elif z <= -1.5e+41:
		tmp = x
	elif z <= -3e+33:
		tmp = x * (y / z)
	elif z <= -2.4e-129:
		tmp = t_1
	elif z <= -6.2e-237:
		tmp = x
	elif z <= 3.7e-66:
		tmp = t_1
	elif z <= 5e+110:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / a))
	tmp = 0.0
	if (z <= -6e+106)
		tmp = t;
	elseif (z <= -1.5e+41)
		tmp = x;
	elseif (z <= -3e+33)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= -2.4e-129)
		tmp = t_1;
	elseif (z <= -6.2e-237)
		tmp = x;
	elseif (z <= 3.7e-66)
		tmp = t_1;
	elseif (z <= 5e+110)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / a);
	tmp = 0.0;
	if (z <= -6e+106)
		tmp = t;
	elseif (z <= -1.5e+41)
		tmp = x;
	elseif (z <= -3e+33)
		tmp = x * (y / z);
	elseif (z <= -2.4e-129)
		tmp = t_1;
	elseif (z <= -6.2e-237)
		tmp = x;
	elseif (z <= 3.7e-66)
		tmp = t_1;
	elseif (z <= 5e+110)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+106], t, If[LessEqual[z, -1.5e+41], x, If[LessEqual[z, -3e+33], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.4e-129], t$95$1, If[LessEqual[z, -6.2e-237], x, If[LessEqual[z, 3.7e-66], t$95$1, If[LessEqual[z, 5e+110], x, t]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+106}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -1.5 \cdot 10^{+41}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -3 \cdot 10^{+33}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

\mathbf{elif}\;z \leq -2.4 \cdot 10^{-129}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -6.2 \cdot 10^{-237}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3.7 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 5 \cdot 10^{+110}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.0000000000000001e106 or 4.99999999999999978e110 < z

    1. Initial program 58.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 52.8%

      \[\leadsto \color{blue}{t} \]

    if -6.0000000000000001e106 < z < -1.4999999999999999e41 or -2.39999999999999989e-129 < z < -6.1999999999999997e-237 or 3.7000000000000002e-66 < z < 4.99999999999999978e110

    1. Initial program 85.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 43.6%

      \[\leadsto \color{blue}{x} \]

    if -1.4999999999999999e41 < z < -2.99999999999999984e33

    1. Initial program 74.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 76.0%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    4. Taylor expanded in t around 0 52.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    5. Step-by-step derivation
      1. associate-*r/52.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot y\right)}{a - z}} \]
      2. mul-1-neg52.3%

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-rgt-neg-in52.3%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-y\right)}}{a - z} \]
    6. Simplified52.3%

      \[\leadsto \color{blue}{\frac{x \cdot \left(-y\right)}{a - z}} \]
    7. Taylor expanded in a around 0 53.5%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    8. Step-by-step derivation
      1. associate-/l*53.5%

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    9. Simplified53.5%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]

    if -2.99999999999999984e33 < z < -2.39999999999999989e-129 or -6.1999999999999997e-237 < z < 3.7000000000000002e-66

    1. Initial program 92.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 47.4%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. *-commutative47.4%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
      2. associate-/l*53.2%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    5. Simplified53.2%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    6. Taylor expanded in z around 0 32.8%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*37.7%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified37.7%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification44.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{+41}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3 \cdot 10^{+33}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-129}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-237}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-66}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 34.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t}{a}\\ \mathbf{if}\;z \leq -2.5 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+41}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{+33}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-130}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-240}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+117}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ t a))))
   (if (<= z -2.5e+106)
     t
     (if (<= z -2.6e+41)
       x
       (if (<= z -2.8e+33)
         (* x (/ y z))
         (if (<= z -4.4e-130)
           t_1
           (if (<= z -1.95e-240)
             x
             (if (<= z 1.9e-61) t_1 (if (<= z 1.15e+117) x t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (t / a);
	double tmp;
	if (z <= -2.5e+106) {
		tmp = t;
	} else if (z <= -2.6e+41) {
		tmp = x;
	} else if (z <= -2.8e+33) {
		tmp = x * (y / z);
	} else if (z <= -4.4e-130) {
		tmp = t_1;
	} else if (z <= -1.95e-240) {
		tmp = x;
	} else if (z <= 1.9e-61) {
		tmp = t_1;
	} else if (z <= 1.15e+117) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (t / a)
    if (z <= (-2.5d+106)) then
        tmp = t
    else if (z <= (-2.6d+41)) then
        tmp = x
    else if (z <= (-2.8d+33)) then
        tmp = x * (y / z)
    else if (z <= (-4.4d-130)) then
        tmp = t_1
    else if (z <= (-1.95d-240)) then
        tmp = x
    else if (z <= 1.9d-61) then
        tmp = t_1
    else if (z <= 1.15d+117) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (t / a);
	double tmp;
	if (z <= -2.5e+106) {
		tmp = t;
	} else if (z <= -2.6e+41) {
		tmp = x;
	} else if (z <= -2.8e+33) {
		tmp = x * (y / z);
	} else if (z <= -4.4e-130) {
		tmp = t_1;
	} else if (z <= -1.95e-240) {
		tmp = x;
	} else if (z <= 1.9e-61) {
		tmp = t_1;
	} else if (z <= 1.15e+117) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (t / a)
	tmp = 0
	if z <= -2.5e+106:
		tmp = t
	elif z <= -2.6e+41:
		tmp = x
	elif z <= -2.8e+33:
		tmp = x * (y / z)
	elif z <= -4.4e-130:
		tmp = t_1
	elif z <= -1.95e-240:
		tmp = x
	elif z <= 1.9e-61:
		tmp = t_1
	elif z <= 1.15e+117:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(t / a))
	tmp = 0.0
	if (z <= -2.5e+106)
		tmp = t;
	elseif (z <= -2.6e+41)
		tmp = x;
	elseif (z <= -2.8e+33)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= -4.4e-130)
		tmp = t_1;
	elseif (z <= -1.95e-240)
		tmp = x;
	elseif (z <= 1.9e-61)
		tmp = t_1;
	elseif (z <= 1.15e+117)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (t / a);
	tmp = 0.0;
	if (z <= -2.5e+106)
		tmp = t;
	elseif (z <= -2.6e+41)
		tmp = x;
	elseif (z <= -2.8e+33)
		tmp = x * (y / z);
	elseif (z <= -4.4e-130)
		tmp = t_1;
	elseif (z <= -1.95e-240)
		tmp = x;
	elseif (z <= 1.9e-61)
		tmp = t_1;
	elseif (z <= 1.15e+117)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e+106], t, If[LessEqual[z, -2.6e+41], x, If[LessEqual[z, -2.8e+33], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.4e-130], t$95$1, If[LessEqual[z, -1.95e-240], x, If[LessEqual[z, 1.9e-61], t$95$1, If[LessEqual[z, 1.15e+117], x, t]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+106}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -2.6 \cdot 10^{+41}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -2.8 \cdot 10^{+33}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

\mathbf{elif}\;z \leq -4.4 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.95 \cdot 10^{-240}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.9 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+117}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.4999999999999999e106 or 1.14999999999999994e117 < z

    1. Initial program 58.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 52.8%

      \[\leadsto \color{blue}{t} \]

    if -2.4999999999999999e106 < z < -2.6000000000000001e41 or -4.3999999999999997e-130 < z < -1.95000000000000007e-240 or 1.8999999999999999e-61 < z < 1.14999999999999994e117

    1. Initial program 85.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 43.6%

      \[\leadsto \color{blue}{x} \]

    if -2.6000000000000001e41 < z < -2.8000000000000001e33

    1. Initial program 74.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 76.0%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    4. Taylor expanded in t around 0 52.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    5. Step-by-step derivation
      1. associate-*r/52.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot y\right)}{a - z}} \]
      2. mul-1-neg52.3%

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-rgt-neg-in52.3%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-y\right)}}{a - z} \]
    6. Simplified52.3%

      \[\leadsto \color{blue}{\frac{x \cdot \left(-y\right)}{a - z}} \]
    7. Taylor expanded in a around 0 53.5%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    8. Step-by-step derivation
      1. associate-/l*53.5%

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    9. Simplified53.5%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]

    if -2.8000000000000001e33 < z < -4.3999999999999997e-130 or -1.95000000000000007e-240 < z < 1.8999999999999999e-61

    1. Initial program 92.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 47.4%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. *-commutative47.4%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
      2. associate-/l*53.2%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    5. Simplified53.2%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    6. Taylor expanded in z around 0 32.8%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*37.7%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified37.7%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Taylor expanded in t around 0 32.8%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    10. Step-by-step derivation
      1. *-commutative32.8%

        \[\leadsto \frac{\color{blue}{y \cdot t}}{a} \]
      2. associate-/l*38.7%

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
    11. Simplified38.7%

      \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification44.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+41}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{+33}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-130}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-240}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-61}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+117}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 34.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{\frac{a}{t}}\\ \mathbf{if}\;z \leq -2.9 \cdot 10^{+112}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{+41}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3 \cdot 10^{+33}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-132}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-241}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-65}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ y (/ a t))))
   (if (<= z -2.9e+112)
     t
     (if (<= z -1.7e+41)
       x
       (if (<= z -3e+33)
         (* x (/ y z))
         (if (<= z -6.5e-132)
           t_1
           (if (<= z -2.6e-241)
             x
             (if (<= z 1.3e-65) t_1 (if (<= z 3.1e+110) x t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a / t);
	double tmp;
	if (z <= -2.9e+112) {
		tmp = t;
	} else if (z <= -1.7e+41) {
		tmp = x;
	} else if (z <= -3e+33) {
		tmp = x * (y / z);
	} else if (z <= -6.5e-132) {
		tmp = t_1;
	} else if (z <= -2.6e-241) {
		tmp = x;
	} else if (z <= 1.3e-65) {
		tmp = t_1;
	} else if (z <= 3.1e+110) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y / (a / t)
    if (z <= (-2.9d+112)) then
        tmp = t
    else if (z <= (-1.7d+41)) then
        tmp = x
    else if (z <= (-3d+33)) then
        tmp = x * (y / z)
    else if (z <= (-6.5d-132)) then
        tmp = t_1
    else if (z <= (-2.6d-241)) then
        tmp = x
    else if (z <= 1.3d-65) then
        tmp = t_1
    else if (z <= 3.1d+110) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a / t);
	double tmp;
	if (z <= -2.9e+112) {
		tmp = t;
	} else if (z <= -1.7e+41) {
		tmp = x;
	} else if (z <= -3e+33) {
		tmp = x * (y / z);
	} else if (z <= -6.5e-132) {
		tmp = t_1;
	} else if (z <= -2.6e-241) {
		tmp = x;
	} else if (z <= 1.3e-65) {
		tmp = t_1;
	} else if (z <= 3.1e+110) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y / (a / t)
	tmp = 0
	if z <= -2.9e+112:
		tmp = t
	elif z <= -1.7e+41:
		tmp = x
	elif z <= -3e+33:
		tmp = x * (y / z)
	elif z <= -6.5e-132:
		tmp = t_1
	elif z <= -2.6e-241:
		tmp = x
	elif z <= 1.3e-65:
		tmp = t_1
	elif z <= 3.1e+110:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y / Float64(a / t))
	tmp = 0.0
	if (z <= -2.9e+112)
		tmp = t;
	elseif (z <= -1.7e+41)
		tmp = x;
	elseif (z <= -3e+33)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= -6.5e-132)
		tmp = t_1;
	elseif (z <= -2.6e-241)
		tmp = x;
	elseif (z <= 1.3e-65)
		tmp = t_1;
	elseif (z <= 3.1e+110)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y / (a / t);
	tmp = 0.0;
	if (z <= -2.9e+112)
		tmp = t;
	elseif (z <= -1.7e+41)
		tmp = x;
	elseif (z <= -3e+33)
		tmp = x * (y / z);
	elseif (z <= -6.5e-132)
		tmp = t_1;
	elseif (z <= -2.6e-241)
		tmp = x;
	elseif (z <= 1.3e-65)
		tmp = t_1;
	elseif (z <= 3.1e+110)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+112], t, If[LessEqual[z, -1.7e+41], x, If[LessEqual[z, -3e+33], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.5e-132], t$95$1, If[LessEqual[z, -2.6e-241], x, If[LessEqual[z, 1.3e-65], t$95$1, If[LessEqual[z, 3.1e+110], x, t]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y}{\frac{a}{t}}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+112}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -1.7 \cdot 10^{+41}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -3 \cdot 10^{+33}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

\mathbf{elif}\;z \leq -6.5 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-241}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.1 \cdot 10^{+110}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.9000000000000002e112 or 3.10000000000000017e110 < z

    1. Initial program 58.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 52.8%

      \[\leadsto \color{blue}{t} \]

    if -2.9000000000000002e112 < z < -1.69999999999999999e41 or -6.49999999999999991e-132 < z < -2.5999999999999999e-241 or 1.30000000000000005e-65 < z < 3.10000000000000017e110

    1. Initial program 85.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 43.6%

      \[\leadsto \color{blue}{x} \]

    if -1.69999999999999999e41 < z < -2.99999999999999984e33

    1. Initial program 74.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 76.0%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    4. Taylor expanded in t around 0 52.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    5. Step-by-step derivation
      1. associate-*r/52.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot y\right)}{a - z}} \]
      2. mul-1-neg52.3%

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-rgt-neg-in52.3%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-y\right)}}{a - z} \]
    6. Simplified52.3%

      \[\leadsto \color{blue}{\frac{x \cdot \left(-y\right)}{a - z}} \]
    7. Taylor expanded in a around 0 53.5%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    8. Step-by-step derivation
      1. associate-/l*53.5%

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    9. Simplified53.5%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]

    if -2.99999999999999984e33 < z < -6.49999999999999991e-132 or -2.5999999999999999e-241 < z < 1.30000000000000005e-65

    1. Initial program 92.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 47.4%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. *-commutative47.4%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
      2. associate-/l*53.2%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    5. Simplified53.2%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    6. Taylor expanded in z around 0 32.8%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*37.7%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified37.7%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Step-by-step derivation
      1. *-commutative37.7%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot t} \]
      2. associate-/r/38.7%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    10. Applied egg-rr38.7%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification44.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+112}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{+41}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -3 \cdot 10^{+33}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-132}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-241}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-65}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 31.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{z}\\ \mathbf{if}\;x \leq -4.1 \cdot 10^{+226}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -2.3 \cdot 10^{+92}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-30}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{-81}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+68}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.08 \cdot 10^{+178}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ y z))))
   (if (<= x -4.1e+226)
     x
     (if (<= x -2.3e+92)
       t_1
       (if (<= x -8e-30)
         t
         (if (<= x 3.2e-81)
           (* y (/ t (- a z)))
           (if (<= x 5.8e+68) x (if (<= x 1.08e+178) t_1 x))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double tmp;
	if (x <= -4.1e+226) {
		tmp = x;
	} else if (x <= -2.3e+92) {
		tmp = t_1;
	} else if (x <= -8e-30) {
		tmp = t;
	} else if (x <= 3.2e-81) {
		tmp = y * (t / (a - z));
	} else if (x <= 5.8e+68) {
		tmp = x;
	} else if (x <= 1.08e+178) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (y / z)
    if (x <= (-4.1d+226)) then
        tmp = x
    else if (x <= (-2.3d+92)) then
        tmp = t_1
    else if (x <= (-8d-30)) then
        tmp = t
    else if (x <= 3.2d-81) then
        tmp = y * (t / (a - z))
    else if (x <= 5.8d+68) then
        tmp = x
    else if (x <= 1.08d+178) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double tmp;
	if (x <= -4.1e+226) {
		tmp = x;
	} else if (x <= -2.3e+92) {
		tmp = t_1;
	} else if (x <= -8e-30) {
		tmp = t;
	} else if (x <= 3.2e-81) {
		tmp = y * (t / (a - z));
	} else if (x <= 5.8e+68) {
		tmp = x;
	} else if (x <= 1.08e+178) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (y / z)
	tmp = 0
	if x <= -4.1e+226:
		tmp = x
	elif x <= -2.3e+92:
		tmp = t_1
	elif x <= -8e-30:
		tmp = t
	elif x <= 3.2e-81:
		tmp = y * (t / (a - z))
	elif x <= 5.8e+68:
		tmp = x
	elif x <= 1.08e+178:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(y / z))
	tmp = 0.0
	if (x <= -4.1e+226)
		tmp = x;
	elseif (x <= -2.3e+92)
		tmp = t_1;
	elseif (x <= -8e-30)
		tmp = t;
	elseif (x <= 3.2e-81)
		tmp = Float64(y * Float64(t / Float64(a - z)));
	elseif (x <= 5.8e+68)
		tmp = x;
	elseif (x <= 1.08e+178)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (y / z);
	tmp = 0.0;
	if (x <= -4.1e+226)
		tmp = x;
	elseif (x <= -2.3e+92)
		tmp = t_1;
	elseif (x <= -8e-30)
		tmp = t;
	elseif (x <= 3.2e-81)
		tmp = y * (t / (a - z));
	elseif (x <= 5.8e+68)
		tmp = x;
	elseif (x <= 1.08e+178)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.1e+226], x, If[LessEqual[x, -2.3e+92], t$95$1, If[LessEqual[x, -8e-30], t, If[LessEqual[x, 3.2e-81], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e+68], x, If[LessEqual[x, 1.08e+178], t$95$1, x]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
\mathbf{if}\;x \leq -4.1 \cdot 10^{+226}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -2.3 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -8 \cdot 10^{-30}:\\
\;\;\;\;t\\

\mathbf{elif}\;x \leq 3.2 \cdot 10^{-81}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\

\mathbf{elif}\;x \leq 5.8 \cdot 10^{+68}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 1.08 \cdot 10^{+178}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -4.09999999999999985e226 or 3.2e-81 < x < 5.80000000000000023e68 or 1.07999999999999996e178 < x

    1. Initial program 65.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 40.1%

      \[\leadsto \color{blue}{x} \]

    if -4.09999999999999985e226 < x < -2.29999999999999998e92 or 5.80000000000000023e68 < x < 1.07999999999999996e178

    1. Initial program 79.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 49.2%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    4. Taylor expanded in t around 0 44.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    5. Step-by-step derivation
      1. associate-*r/44.8%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot y\right)}{a - z}} \]
      2. mul-1-neg44.8%

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-rgt-neg-in44.8%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-y\right)}}{a - z} \]
    6. Simplified44.8%

      \[\leadsto \color{blue}{\frac{x \cdot \left(-y\right)}{a - z}} \]
    7. Taylor expanded in a around 0 42.4%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    8. Step-by-step derivation
      1. associate-/l*49.8%

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    9. Simplified49.8%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]

    if -2.29999999999999998e92 < x < -8.000000000000001e-30

    1. Initial program 80.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 40.4%

      \[\leadsto \color{blue}{t} \]

    if -8.000000000000001e-30 < x < 3.2e-81

    1. Initial program 91.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 65.5%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. *-commutative65.5%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
      2. associate-/l*73.1%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    5. Simplified73.1%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    6. Taylor expanded in y around inf 44.1%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. associate-*l/46.4%

        \[\leadsto \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative46.4%

        \[\leadsto \color{blue}{y \cdot \frac{t}{a - z}} \]
    8. Simplified46.4%

      \[\leadsto \color{blue}{y \cdot \frac{t}{a - z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification44.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.1 \cdot 10^{+226}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -2.3 \cdot 10^{+92}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;x \leq -8 \cdot 10^{-30}:\\ \;\;\;\;t\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{-81}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+68}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.08 \cdot 10^{+178}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 66.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{if}\;a \leq -2.3 \cdot 10^{+84}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-91}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-87}:\\ \;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- y z) (/ t (- a z)))))
   (if (<= a -2.3e+84)
     (+ x (* y (/ (- t x) a)))
     (if (<= a -4.8e-21)
       t_1
       (if (<= a -2.3e-91)
         (* y (/ (- t x) (- a z)))
         (if (<= a -2.2e-142)
           t_1
           (if (<= a 1.3e-87)
             (- t (/ (* y (- t x)) z))
             (- x (* (/ y a) (- x t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / (a - z));
	double tmp;
	if (a <= -2.3e+84) {
		tmp = x + (y * ((t - x) / a));
	} else if (a <= -4.8e-21) {
		tmp = t_1;
	} else if (a <= -2.3e-91) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= -2.2e-142) {
		tmp = t_1;
	} else if (a <= 1.3e-87) {
		tmp = t - ((y * (t - x)) / z);
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - z) * (t / (a - z))
    if (a <= (-2.3d+84)) then
        tmp = x + (y * ((t - x) / a))
    else if (a <= (-4.8d-21)) then
        tmp = t_1
    else if (a <= (-2.3d-91)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= (-2.2d-142)) then
        tmp = t_1
    else if (a <= 1.3d-87) then
        tmp = t - ((y * (t - x)) / z)
    else
        tmp = x - ((y / a) * (x - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / (a - z));
	double tmp;
	if (a <= -2.3e+84) {
		tmp = x + (y * ((t - x) / a));
	} else if (a <= -4.8e-21) {
		tmp = t_1;
	} else if (a <= -2.3e-91) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= -2.2e-142) {
		tmp = t_1;
	} else if (a <= 1.3e-87) {
		tmp = t - ((y * (t - x)) / z);
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - z) * (t / (a - z))
	tmp = 0
	if a <= -2.3e+84:
		tmp = x + (y * ((t - x) / a))
	elif a <= -4.8e-21:
		tmp = t_1
	elif a <= -2.3e-91:
		tmp = y * ((t - x) / (a - z))
	elif a <= -2.2e-142:
		tmp = t_1
	elif a <= 1.3e-87:
		tmp = t - ((y * (t - x)) / z)
	else:
		tmp = x - ((y / a) * (x - t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - z) * Float64(t / Float64(a - z)))
	tmp = 0.0
	if (a <= -2.3e+84)
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	elseif (a <= -4.8e-21)
		tmp = t_1;
	elseif (a <= -2.3e-91)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= -2.2e-142)
		tmp = t_1;
	elseif (a <= 1.3e-87)
		tmp = Float64(t - Float64(Float64(y * Float64(t - x)) / z));
	else
		tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - z) * (t / (a - z));
	tmp = 0.0;
	if (a <= -2.3e+84)
		tmp = x + (y * ((t - x) / a));
	elseif (a <= -4.8e-21)
		tmp = t_1;
	elseif (a <= -2.3e-91)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= -2.2e-142)
		tmp = t_1;
	elseif (a <= 1.3e-87)
		tmp = t - ((y * (t - x)) / z);
	else
		tmp = x - ((y / a) * (x - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.3e+84], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.8e-21], t$95$1, If[LessEqual[a, -2.3e-91], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.2e-142], t$95$1, If[LessEqual[a, 1.3e-87], N[(t - N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{+84}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\

\mathbf{elif}\;a \leq -4.8 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -2.3 \cdot 10^{-91}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

\mathbf{elif}\;a \leq -2.2 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.3 \cdot 10^{-87}:\\
\;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.2999999999999999e84

    1. Initial program 91.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 61.7%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*72.2%

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    5. Simplified72.2%

      \[\leadsto \color{blue}{x + y \cdot \frac{t - x}{a}} \]

    if -2.2999999999999999e84 < a < -4.7999999999999999e-21 or -2.29999999999999996e-91 < a < -2.20000000000000016e-142

    1. Initial program 75.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 46.7%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. *-commutative46.7%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
      2. associate-/l*64.2%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    5. Simplified64.2%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]

    if -4.7999999999999999e-21 < a < -2.29999999999999996e-91

    1. Initial program 99.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 92.7%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub92.8%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified92.8%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if -2.20000000000000016e-142 < a < 1.30000000000000001e-87

    1. Initial program 66.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 84.4%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+84.4%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--84.4%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub84.4%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg84.4%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg84.4%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--84.4%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*85.9%

        \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}} \]
    5. Simplified85.9%

      \[\leadsto \color{blue}{t - \left(t - x\right) \cdot \frac{y - a}{z}} \]
    6. Taylor expanded in y around inf 78.4%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]

    if 1.30000000000000001e-87 < a

    1. Initial program 84.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative84.7%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. remove-double-neg84.7%

        \[\leadsto \left(y - z\right) \cdot \frac{t - x}{a - z} + \color{blue}{\left(-\left(-x\right)\right)} \]
      3. unsub-neg84.7%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} - \left(-x\right)} \]
      4. *-commutative84.7%

        \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} - \left(-x\right) \]
      5. associate-*l/69.9%

        \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} - \left(-x\right) \]
      6. associate-/l*89.1%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} - \left(-x\right) \]
      7. fma-neg89.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, -\left(-x\right)\right)} \]
      8. remove-double-neg89.1%

        \[\leadsto \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, \color{blue}{x}\right) \]
    3. Simplified89.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine89.1%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    6. Applied egg-rr89.1%

      \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    7. Taylor expanded in z around 0 68.0%

      \[\leadsto \left(t - x\right) \cdot \color{blue}{\frac{y}{a}} + x \]
  3. Recombined 5 regimes into one program.
  4. Final simplification72.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+84}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-21}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-91}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-142}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-87}:\\ \;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 68.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{if}\;a \leq -2.2 \cdot 10^{+84}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-92}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-118}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-87}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- y z) (/ t (- a z)))))
   (if (<= a -2.2e+84)
     (+ x (* y (/ (- t x) a)))
     (if (<= a -1.3e-18)
       t_1
       (if (<= a -1.6e-92)
         (* y (/ (- t x) (- a z)))
         (if (<= a -1.5e-118)
           t_1
           (if (<= a 1.3e-87)
             (+ t (/ (- x t) (/ z y)))
             (- x (* (/ y a) (- x t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / (a - z));
	double tmp;
	if (a <= -2.2e+84) {
		tmp = x + (y * ((t - x) / a));
	} else if (a <= -1.3e-18) {
		tmp = t_1;
	} else if (a <= -1.6e-92) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= -1.5e-118) {
		tmp = t_1;
	} else if (a <= 1.3e-87) {
		tmp = t + ((x - t) / (z / y));
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - z) * (t / (a - z))
    if (a <= (-2.2d+84)) then
        tmp = x + (y * ((t - x) / a))
    else if (a <= (-1.3d-18)) then
        tmp = t_1
    else if (a <= (-1.6d-92)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= (-1.5d-118)) then
        tmp = t_1
    else if (a <= 1.3d-87) then
        tmp = t + ((x - t) / (z / y))
    else
        tmp = x - ((y / a) * (x - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / (a - z));
	double tmp;
	if (a <= -2.2e+84) {
		tmp = x + (y * ((t - x) / a));
	} else if (a <= -1.3e-18) {
		tmp = t_1;
	} else if (a <= -1.6e-92) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= -1.5e-118) {
		tmp = t_1;
	} else if (a <= 1.3e-87) {
		tmp = t + ((x - t) / (z / y));
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - z) * (t / (a - z))
	tmp = 0
	if a <= -2.2e+84:
		tmp = x + (y * ((t - x) / a))
	elif a <= -1.3e-18:
		tmp = t_1
	elif a <= -1.6e-92:
		tmp = y * ((t - x) / (a - z))
	elif a <= -1.5e-118:
		tmp = t_1
	elif a <= 1.3e-87:
		tmp = t + ((x - t) / (z / y))
	else:
		tmp = x - ((y / a) * (x - t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - z) * Float64(t / Float64(a - z)))
	tmp = 0.0
	if (a <= -2.2e+84)
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	elseif (a <= -1.3e-18)
		tmp = t_1;
	elseif (a <= -1.6e-92)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= -1.5e-118)
		tmp = t_1;
	elseif (a <= 1.3e-87)
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / y)));
	else
		tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - z) * (t / (a - z));
	tmp = 0.0;
	if (a <= -2.2e+84)
		tmp = x + (y * ((t - x) / a));
	elseif (a <= -1.3e-18)
		tmp = t_1;
	elseif (a <= -1.6e-92)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= -1.5e-118)
		tmp = t_1;
	elseif (a <= 1.3e-87)
		tmp = t + ((x - t) / (z / y));
	else
		tmp = x - ((y / a) * (x - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.2e+84], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.3e-18], t$95$1, If[LessEqual[a, -1.6e-92], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.5e-118], t$95$1, If[LessEqual[a, 1.3e-87], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{if}\;a \leq -2.2 \cdot 10^{+84}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\

\mathbf{elif}\;a \leq -1.3 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -1.6 \cdot 10^{-92}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

\mathbf{elif}\;a \leq -1.5 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.3 \cdot 10^{-87}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.1999999999999998e84

    1. Initial program 91.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 61.7%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*72.2%

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    5. Simplified72.2%

      \[\leadsto \color{blue}{x + y \cdot \frac{t - x}{a}} \]

    if -2.1999999999999998e84 < a < -1.3e-18 or -1.5999999999999998e-92 < a < -1.50000000000000009e-118

    1. Initial program 74.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 45.8%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. *-commutative45.8%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
      2. associate-/l*61.2%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    5. Simplified61.2%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]

    if -1.3e-18 < a < -1.5999999999999998e-92

    1. Initial program 99.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 92.7%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub92.8%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified92.8%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if -1.50000000000000009e-118 < a < 1.30000000000000001e-87

    1. Initial program 67.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 84.3%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+84.3%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--84.3%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub84.3%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg84.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg84.3%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--84.3%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*86.9%

        \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}} \]
    5. Simplified86.9%

      \[\leadsto \color{blue}{t - \left(t - x\right) \cdot \frac{y - a}{z}} \]
    6. Step-by-step derivation
      1. clear-num85.7%

        \[\leadsto t - \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{z}{y - a}}} \]
      2. un-div-inv86.8%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Applied egg-rr86.8%

      \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    8. Taylor expanded in y around inf 83.5%

      \[\leadsto t - \frac{t - x}{\color{blue}{\frac{z}{y}}} \]

    if 1.30000000000000001e-87 < a

    1. Initial program 84.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative84.7%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. remove-double-neg84.7%

        \[\leadsto \left(y - z\right) \cdot \frac{t - x}{a - z} + \color{blue}{\left(-\left(-x\right)\right)} \]
      3. unsub-neg84.7%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} - \left(-x\right)} \]
      4. *-commutative84.7%

        \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} - \left(-x\right) \]
      5. associate-*l/69.9%

        \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} - \left(-x\right) \]
      6. associate-/l*89.1%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} - \left(-x\right) \]
      7. fma-neg89.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, -\left(-x\right)\right)} \]
      8. remove-double-neg89.1%

        \[\leadsto \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, \color{blue}{x}\right) \]
    3. Simplified89.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine89.1%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    6. Applied egg-rr89.1%

      \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    7. Taylor expanded in z around 0 68.0%

      \[\leadsto \left(t - x\right) \cdot \color{blue}{\frac{y}{a}} + x \]
  3. Recombined 5 regimes into one program.
  4. Final simplification74.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{+84}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-18}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-92}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-118}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-87}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 68.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{if}\;a \leq -2.1 \cdot 10^{+84}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.42 \cdot 10^{-21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.58 \cdot 10^{-99}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-119}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-87}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- y z) (/ (- a z) t))))
   (if (<= a -2.1e+84)
     (+ x (* y (/ (- t x) a)))
     (if (<= a -1.42e-21)
       t_1
       (if (<= a -1.58e-99)
         (* y (/ (- t x) (- a z)))
         (if (<= a -4.6e-119)
           t_1
           (if (<= a 1.3e-87)
             (+ t (/ (- x t) (/ z y)))
             (- x (* (/ y a) (- x t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) / ((a - z) / t);
	double tmp;
	if (a <= -2.1e+84) {
		tmp = x + (y * ((t - x) / a));
	} else if (a <= -1.42e-21) {
		tmp = t_1;
	} else if (a <= -1.58e-99) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= -4.6e-119) {
		tmp = t_1;
	} else if (a <= 1.3e-87) {
		tmp = t + ((x - t) / (z / y));
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - z) / ((a - z) / t)
    if (a <= (-2.1d+84)) then
        tmp = x + (y * ((t - x) / a))
    else if (a <= (-1.42d-21)) then
        tmp = t_1
    else if (a <= (-1.58d-99)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= (-4.6d-119)) then
        tmp = t_1
    else if (a <= 1.3d-87) then
        tmp = t + ((x - t) / (z / y))
    else
        tmp = x - ((y / a) * (x - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) / ((a - z) / t);
	double tmp;
	if (a <= -2.1e+84) {
		tmp = x + (y * ((t - x) / a));
	} else if (a <= -1.42e-21) {
		tmp = t_1;
	} else if (a <= -1.58e-99) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= -4.6e-119) {
		tmp = t_1;
	} else if (a <= 1.3e-87) {
		tmp = t + ((x - t) / (z / y));
	} else {
		tmp = x - ((y / a) * (x - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - z) / ((a - z) / t)
	tmp = 0
	if a <= -2.1e+84:
		tmp = x + (y * ((t - x) / a))
	elif a <= -1.42e-21:
		tmp = t_1
	elif a <= -1.58e-99:
		tmp = y * ((t - x) / (a - z))
	elif a <= -4.6e-119:
		tmp = t_1
	elif a <= 1.3e-87:
		tmp = t + ((x - t) / (z / y))
	else:
		tmp = x - ((y / a) * (x - t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - z) / Float64(Float64(a - z) / t))
	tmp = 0.0
	if (a <= -2.1e+84)
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	elseif (a <= -1.42e-21)
		tmp = t_1;
	elseif (a <= -1.58e-99)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= -4.6e-119)
		tmp = t_1;
	elseif (a <= 1.3e-87)
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / y)));
	else
		tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - z) / ((a - z) / t);
	tmp = 0.0;
	if (a <= -2.1e+84)
		tmp = x + (y * ((t - x) / a));
	elseif (a <= -1.42e-21)
		tmp = t_1;
	elseif (a <= -1.58e-99)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= -4.6e-119)
		tmp = t_1;
	elseif (a <= 1.3e-87)
		tmp = t + ((x - t) / (z / y));
	else
		tmp = x - ((y / a) * (x - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.1e+84], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.42e-21], t$95$1, If[LessEqual[a, -1.58e-99], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.6e-119], t$95$1, If[LessEqual[a, 1.3e-87], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{if}\;a \leq -2.1 \cdot 10^{+84}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\

\mathbf{elif}\;a \leq -1.42 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -1.58 \cdot 10^{-99}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

\mathbf{elif}\;a \leq -4.6 \cdot 10^{-119}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.3 \cdot 10^{-87}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.10000000000000019e84

    1. Initial program 91.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 61.7%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*72.2%

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    5. Simplified72.2%

      \[\leadsto \color{blue}{x + y \cdot \frac{t - x}{a}} \]

    if -2.10000000000000019e84 < a < -1.42e-21 or -1.5800000000000001e-99 < a < -4.59999999999999987e-119

    1. Initial program 72.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative72.8%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. remove-double-neg72.8%

        \[\leadsto \left(y - z\right) \cdot \frac{t - x}{a - z} + \color{blue}{\left(-\left(-x\right)\right)} \]
      3. unsub-neg72.8%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} - \left(-x\right)} \]
      4. *-commutative72.8%

        \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} - \left(-x\right) \]
      5. associate-*l/52.3%

        \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} - \left(-x\right) \]
      6. associate-/l*73.1%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} - \left(-x\right) \]
      7. fma-neg73.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, -\left(-x\right)\right)} \]
      8. remove-double-neg73.0%

        \[\leadsto \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, \color{blue}{x}\right) \]
    3. Simplified73.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine73.1%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    6. Applied egg-rr73.1%

      \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    7. Taylor expanded in t around inf 61.9%

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    8. Step-by-step derivation
      1. div-sub61.9%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
      2. *-commutative61.9%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot t} \]
      3. associate-/r/59.1%

        \[\leadsto \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
    9. Simplified59.1%

      \[\leadsto \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]

    if -1.42e-21 < a < -1.5800000000000001e-99

    1. Initial program 99.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 93.7%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub93.8%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified93.8%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if -4.59999999999999987e-119 < a < 1.30000000000000001e-87

    1. Initial program 67.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 84.3%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+84.3%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--84.3%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub84.3%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg84.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg84.3%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--84.3%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*86.9%

        \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}} \]
    5. Simplified86.9%

      \[\leadsto \color{blue}{t - \left(t - x\right) \cdot \frac{y - a}{z}} \]
    6. Step-by-step derivation
      1. clear-num85.7%

        \[\leadsto t - \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{z}{y - a}}} \]
      2. un-div-inv86.8%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Applied egg-rr86.8%

      \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    8. Taylor expanded in y around inf 83.5%

      \[\leadsto t - \frac{t - x}{\color{blue}{\frac{z}{y}}} \]

    if 1.30000000000000001e-87 < a

    1. Initial program 84.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative84.7%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. remove-double-neg84.7%

        \[\leadsto \left(y - z\right) \cdot \frac{t - x}{a - z} + \color{blue}{\left(-\left(-x\right)\right)} \]
      3. unsub-neg84.7%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} - \left(-x\right)} \]
      4. *-commutative84.7%

        \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} - \left(-x\right) \]
      5. associate-*l/69.9%

        \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} - \left(-x\right) \]
      6. associate-/l*89.1%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} - \left(-x\right) \]
      7. fma-neg89.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, -\left(-x\right)\right)} \]
      8. remove-double-neg89.1%

        \[\leadsto \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, \color{blue}{x}\right) \]
    3. Simplified89.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine89.1%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    6. Applied egg-rr89.1%

      \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    7. Taylor expanded in z around 0 68.0%

      \[\leadsto \left(t - x\right) \cdot \color{blue}{\frac{y}{a}} + x \]
  3. Recombined 5 regimes into one program.
  4. Final simplification74.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+84}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.42 \cdot 10^{-21}:\\ \;\;\;\;\frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;a \leq -1.58 \cdot 10^{-99}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-119}:\\ \;\;\;\;\frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-87}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 33.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{z - a}\\ \mathbf{if}\;x \leq -3.6 \cdot 10^{+225}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -2.7 \cdot 10^{-47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 6.3 \cdot 10^{-80}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+69}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{+189}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ y (- z a)))))
   (if (<= x -3.6e+225)
     x
     (if (<= x -2.7e-47)
       t_1
       (if (<= x 6.3e-80)
         (* y (/ t (- a z)))
         (if (<= x 1.6e+69) x (if (<= x 1.45e+189) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / (z - a));
	double tmp;
	if (x <= -3.6e+225) {
		tmp = x;
	} else if (x <= -2.7e-47) {
		tmp = t_1;
	} else if (x <= 6.3e-80) {
		tmp = y * (t / (a - z));
	} else if (x <= 1.6e+69) {
		tmp = x;
	} else if (x <= 1.45e+189) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (y / (z - a))
    if (x <= (-3.6d+225)) then
        tmp = x
    else if (x <= (-2.7d-47)) then
        tmp = t_1
    else if (x <= 6.3d-80) then
        tmp = y * (t / (a - z))
    else if (x <= 1.6d+69) then
        tmp = x
    else if (x <= 1.45d+189) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / (z - a));
	double tmp;
	if (x <= -3.6e+225) {
		tmp = x;
	} else if (x <= -2.7e-47) {
		tmp = t_1;
	} else if (x <= 6.3e-80) {
		tmp = y * (t / (a - z));
	} else if (x <= 1.6e+69) {
		tmp = x;
	} else if (x <= 1.45e+189) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (y / (z - a))
	tmp = 0
	if x <= -3.6e+225:
		tmp = x
	elif x <= -2.7e-47:
		tmp = t_1
	elif x <= 6.3e-80:
		tmp = y * (t / (a - z))
	elif x <= 1.6e+69:
		tmp = x
	elif x <= 1.45e+189:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(y / Float64(z - a)))
	tmp = 0.0
	if (x <= -3.6e+225)
		tmp = x;
	elseif (x <= -2.7e-47)
		tmp = t_1;
	elseif (x <= 6.3e-80)
		tmp = Float64(y * Float64(t / Float64(a - z)));
	elseif (x <= 1.6e+69)
		tmp = x;
	elseif (x <= 1.45e+189)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (y / (z - a));
	tmp = 0.0;
	if (x <= -3.6e+225)
		tmp = x;
	elseif (x <= -2.7e-47)
		tmp = t_1;
	elseif (x <= 6.3e-80)
		tmp = y * (t / (a - z));
	elseif (x <= 1.6e+69)
		tmp = x;
	elseif (x <= 1.45e+189)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.6e+225], x, If[LessEqual[x, -2.7e-47], t$95$1, If[LessEqual[x, 6.3e-80], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+69], x, If[LessEqual[x, 1.45e+189], t$95$1, x]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z - a}\\
\mathbf{if}\;x \leq -3.6 \cdot 10^{+225}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq -2.7 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 6.3 \cdot 10^{-80}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\

\mathbf{elif}\;x \leq 1.6 \cdot 10^{+69}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 1.45 \cdot 10^{+189}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.5999999999999998e225 or 6.29999999999999966e-80 < x < 1.59999999999999992e69 or 1.4500000000000001e189 < x

    1. Initial program 65.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 40.1%

      \[\leadsto \color{blue}{x} \]

    if -3.5999999999999998e225 < x < -2.6999999999999998e-47 or 1.59999999999999992e69 < x < 1.4500000000000001e189

    1. Initial program 79.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 45.0%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    4. Taylor expanded in t around 0 40.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    5. Step-by-step derivation
      1. associate-*r/40.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot y\right)}{a - z}} \]
      2. mul-1-neg40.9%

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-rgt-neg-in40.9%

        \[\leadsto \frac{\color{blue}{x \cdot \left(-y\right)}}{a - z} \]
    6. Simplified40.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(-y\right)}{a - z}} \]
    7. Taylor expanded in x around 0 40.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    8. Step-by-step derivation
      1. mul-1-neg40.9%

        \[\leadsto \color{blue}{-\frac{x \cdot y}{a - z}} \]
      2. associate-*r/47.3%

        \[\leadsto -\color{blue}{x \cdot \frac{y}{a - z}} \]
      3. distribute-rgt-neg-in47.3%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{a - z}\right)} \]
      4. distribute-neg-frac247.3%

        \[\leadsto x \cdot \color{blue}{\frac{y}{-\left(a - z\right)}} \]
      5. sub-neg47.3%

        \[\leadsto x \cdot \frac{y}{-\color{blue}{\left(a + \left(-z\right)\right)}} \]
      6. distribute-neg-in47.3%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-z\right)\right)}} \]
      7. remove-double-neg47.3%

        \[\leadsto x \cdot \frac{y}{\left(-a\right) + \color{blue}{z}} \]
    9. Simplified47.3%

      \[\leadsto \color{blue}{x \cdot \frac{y}{\left(-a\right) + z}} \]

    if -2.6999999999999998e-47 < x < 6.29999999999999966e-80

    1. Initial program 91.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 66.3%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. *-commutative66.3%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
      2. associate-/l*74.1%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    5. Simplified74.1%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    6. Taylor expanded in y around inf 44.3%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. associate-*l/46.7%

        \[\leadsto \color{blue}{\frac{t}{a - z} \cdot y} \]
      2. *-commutative46.7%

        \[\leadsto \color{blue}{y \cdot \frac{t}{a - z}} \]
    8. Simplified46.7%

      \[\leadsto \color{blue}{y \cdot \frac{t}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.6 \cdot 10^{+225}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -2.7 \cdot 10^{-47}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;x \leq 6.3 \cdot 10^{-80}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+69}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{+189}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 72.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(t - x\right) \cdot \frac{a - y}{z}\\ \mathbf{if}\;z \leq -1.65 \cdot 10^{-59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.95 \cdot 10^{-128}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{-88}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{+49}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* (- t x) (/ (- a y) z)))))
   (if (<= z -1.65e-59)
     t_1
     (if (<= z 2.95e-128)
       (+ x (/ (* (- y z) (- t x)) a))
       (if (<= z 1.08e-88)
         (* y (/ (- t x) (- a z)))
         (if (<= z 8.6e+49) (- x (* (/ y a) (- x t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((t - x) * ((a - y) / z));
	double tmp;
	if (z <= -1.65e-59) {
		tmp = t_1;
	} else if (z <= 2.95e-128) {
		tmp = x + (((y - z) * (t - x)) / a);
	} else if (z <= 1.08e-88) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 8.6e+49) {
		tmp = x - ((y / a) * (x - 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 = t + ((t - x) * ((a - y) / z))
    if (z <= (-1.65d-59)) then
        tmp = t_1
    else if (z <= 2.95d-128) then
        tmp = x + (((y - z) * (t - x)) / a)
    else if (z <= 1.08d-88) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 8.6d+49) then
        tmp = x - ((y / a) * (x - 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 = t + ((t - x) * ((a - y) / z));
	double tmp;
	if (z <= -1.65e-59) {
		tmp = t_1;
	} else if (z <= 2.95e-128) {
		tmp = x + (((y - z) * (t - x)) / a);
	} else if (z <= 1.08e-88) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 8.6e+49) {
		tmp = x - ((y / a) * (x - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + ((t - x) * ((a - y) / z))
	tmp = 0
	if z <= -1.65e-59:
		tmp = t_1
	elif z <= 2.95e-128:
		tmp = x + (((y - z) * (t - x)) / a)
	elif z <= 1.08e-88:
		tmp = y * ((t - x) / (a - z))
	elif z <= 8.6e+49:
		tmp = x - ((y / a) * (x - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z)))
	tmp = 0.0
	if (z <= -1.65e-59)
		tmp = t_1;
	elseif (z <= 2.95e-128)
		tmp = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / a));
	elseif (z <= 1.08e-88)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 8.6e+49)
		tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + ((t - x) * ((a - y) / z));
	tmp = 0.0;
	if (z <= -1.65e-59)
		tmp = t_1;
	elseif (z <= 2.95e-128)
		tmp = x + (((y - z) * (t - x)) / a);
	elseif (z <= 1.08e-88)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 8.6e+49)
		tmp = x - ((y / a) * (x - t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e-59], t$95$1, If[LessEqual[z, 2.95e-128], N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.08e-88], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.6e+49], N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.95 \cdot 10^{-128}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a}\\

\mathbf{elif}\;z \leq 1.08 \cdot 10^{-88}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

\mathbf{elif}\;z \leq 8.6 \cdot 10^{+49}:\\
\;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.64999999999999991e-59 or 8.5999999999999998e49 < z

    1. Initial program 66.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 63.0%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+63.0%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--63.0%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub63.0%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg63.0%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg63.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--63.2%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*76.6%

        \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}} \]
    5. Simplified76.6%

      \[\leadsto \color{blue}{t - \left(t - x\right) \cdot \frac{y - a}{z}} \]

    if -1.64999999999999991e-59 < z < 2.95000000000000017e-128

    1. Initial program 94.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 80.4%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    4. Step-by-step derivation
      1. *-commutative80.4%

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a} \]
    5. Simplified80.4%

      \[\leadsto \color{blue}{x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a}} \]

    if 2.95000000000000017e-128 < z < 1.07999999999999995e-88

    1. Initial program 99.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 99.8%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub99.8%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified99.8%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if 1.07999999999999995e-88 < z < 8.5999999999999998e49

    1. Initial program 92.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative92.4%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. remove-double-neg92.4%

        \[\leadsto \left(y - z\right) \cdot \frac{t - x}{a - z} + \color{blue}{\left(-\left(-x\right)\right)} \]
      3. unsub-neg92.4%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} - \left(-x\right)} \]
      4. *-commutative92.4%

        \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} - \left(-x\right) \]
      5. associate-*l/78.6%

        \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} - \left(-x\right) \]
      6. associate-/l*90.6%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} - \left(-x\right) \]
      7. fma-neg90.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, -\left(-x\right)\right)} \]
      8. remove-double-neg90.6%

        \[\leadsto \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, \color{blue}{x}\right) \]
    3. Simplified90.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine90.6%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    6. Applied egg-rr90.6%

      \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    7. Taylor expanded in z around 0 59.6%

      \[\leadsto \left(t - x\right) \cdot \color{blue}{\frac{y}{a}} + x \]
  3. Recombined 4 regimes into one program.
  4. Final simplification76.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{-59}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\ \mathbf{elif}\;z \leq 2.95 \cdot 10^{-128}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq 1.08 \cdot 10^{-88}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{+49}:\\ \;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 71.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \left(t - x\right) \cdot \frac{a - y}{z}\\ \mathbf{if}\;z \leq -2 \cdot 10^{-59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-127}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{-48}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+50}:\\ \;\;\;\;x + \frac{z}{a - z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* (- t x) (/ (- a y) z)))))
   (if (<= z -2e-59)
     t_1
     (if (<= z 2.2e-127)
       (+ x (/ (* (- y z) (- t x)) a))
       (if (<= z 9.8e-48)
         (* y (/ (- t x) (- a z)))
         (if (<= z 1.5e+50) (+ x (* (/ z (- a z)) (- x t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((t - x) * ((a - y) / z));
	double tmp;
	if (z <= -2e-59) {
		tmp = t_1;
	} else if (z <= 2.2e-127) {
		tmp = x + (((y - z) * (t - x)) / a);
	} else if (z <= 9.8e-48) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1.5e+50) {
		tmp = x + ((z / (a - z)) * (x - 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 = t + ((t - x) * ((a - y) / z))
    if (z <= (-2d-59)) then
        tmp = t_1
    else if (z <= 2.2d-127) then
        tmp = x + (((y - z) * (t - x)) / a)
    else if (z <= 9.8d-48) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= 1.5d+50) then
        tmp = x + ((z / (a - z)) * (x - 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 = t + ((t - x) * ((a - y) / z));
	double tmp;
	if (z <= -2e-59) {
		tmp = t_1;
	} else if (z <= 2.2e-127) {
		tmp = x + (((y - z) * (t - x)) / a);
	} else if (z <= 9.8e-48) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= 1.5e+50) {
		tmp = x + ((z / (a - z)) * (x - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + ((t - x) * ((a - y) / z))
	tmp = 0
	if z <= -2e-59:
		tmp = t_1
	elif z <= 2.2e-127:
		tmp = x + (((y - z) * (t - x)) / a)
	elif z <= 9.8e-48:
		tmp = y * ((t - x) / (a - z))
	elif z <= 1.5e+50:
		tmp = x + ((z / (a - z)) * (x - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z)))
	tmp = 0.0
	if (z <= -2e-59)
		tmp = t_1;
	elseif (z <= 2.2e-127)
		tmp = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / a));
	elseif (z <= 9.8e-48)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= 1.5e+50)
		tmp = Float64(x + Float64(Float64(z / Float64(a - z)) * Float64(x - t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + ((t - x) * ((a - y) / z));
	tmp = 0.0;
	if (z <= -2e-59)
		tmp = t_1;
	elseif (z <= 2.2e-127)
		tmp = x + (((y - z) * (t - x)) / a);
	elseif (z <= 9.8e-48)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= 1.5e+50)
		tmp = x + ((z / (a - z)) * (x - t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e-59], t$95$1, If[LessEqual[z, 2.2e-127], N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.8e-48], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+50], N[(x + N[(N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{if}\;z \leq -2 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.2 \cdot 10^{-127}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a}\\

\mathbf{elif}\;z \leq 9.8 \cdot 10^{-48}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

\mathbf{elif}\;z \leq 1.5 \cdot 10^{+50}:\\
\;\;\;\;x + \frac{z}{a - z} \cdot \left(x - t\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.0000000000000001e-59 or 1.4999999999999999e50 < z

    1. Initial program 66.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 63.0%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+63.0%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--63.0%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub63.0%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg63.0%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg63.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--63.2%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*76.6%

        \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \frac{y - a}{z}} \]
    5. Simplified76.6%

      \[\leadsto \color{blue}{t - \left(t - x\right) \cdot \frac{y - a}{z}} \]

    if -2.0000000000000001e-59 < z < 2.2000000000000001e-127

    1. Initial program 94.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 80.4%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    4. Step-by-step derivation
      1. *-commutative80.4%

        \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}}{a} \]
    5. Simplified80.4%

      \[\leadsto \color{blue}{x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a}} \]

    if 2.2000000000000001e-127 < z < 9.8000000000000005e-48

    1. Initial program 99.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 87.5%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub87.5%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified87.5%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if 9.8000000000000005e-48 < z < 1.4999999999999999e50

    1. Initial program 90.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 56.4%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{z \cdot \left(t - x\right)}{a - z}} \]
    4. Step-by-step derivation
      1. mul-1-neg56.4%

        \[\leadsto x + \color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a - z}\right)} \]
      2. unsub-neg56.4%

        \[\leadsto \color{blue}{x - \frac{z \cdot \left(t - x\right)}{a - z}} \]
      3. *-commutative56.4%

        \[\leadsto x - \frac{\color{blue}{\left(t - x\right) \cdot z}}{a - z} \]
      4. associate-/l*64.2%

        \[\leadsto x - \color{blue}{\left(t - x\right) \cdot \frac{z}{a - z}} \]
    5. Simplified64.2%

      \[\leadsto \color{blue}{x - \left(t - x\right) \cdot \frac{z}{a - z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification77.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{-59}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-127}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{-48}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+50}:\\ \;\;\;\;x + \frac{z}{a - z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 52.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a - z}\\ t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -6.8 \cdot 10^{+178}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-154}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-238}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) (- a z)))) (t_2 (* t (- 1.0 (/ y z)))))
   (if (<= z -6.8e+178)
     t_2
     (if (<= z -2.65e-154)
       t_1
       (if (<= z -1.1e-238)
         (- x (* x (/ y a)))
         (if (<= z 2.45e+91) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / (a - z));
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (z <= -6.8e+178) {
		tmp = t_2;
	} else if (z <= -2.65e-154) {
		tmp = t_1;
	} else if (z <= -1.1e-238) {
		tmp = x - (x * (y / a));
	} else if (z <= 2.45e+91) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((t - x) / (a - z))
    t_2 = t * (1.0d0 - (y / z))
    if (z <= (-6.8d+178)) then
        tmp = t_2
    else if (z <= (-2.65d-154)) then
        tmp = t_1
    else if (z <= (-1.1d-238)) then
        tmp = x - (x * (y / a))
    else if (z <= 2.45d+91) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / (a - z));
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (z <= -6.8e+178) {
		tmp = t_2;
	} else if (z <= -2.65e-154) {
		tmp = t_1;
	} else if (z <= -1.1e-238) {
		tmp = x - (x * (y / a));
	} else if (z <= 2.45e+91) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / (a - z))
	t_2 = t * (1.0 - (y / z))
	tmp = 0
	if z <= -6.8e+178:
		tmp = t_2
	elif z <= -2.65e-154:
		tmp = t_1
	elif z <= -1.1e-238:
		tmp = x - (x * (y / a))
	elif z <= 2.45e+91:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	t_2 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -6.8e+178)
		tmp = t_2;
	elseif (z <= -2.65e-154)
		tmp = t_1;
	elseif (z <= -1.1e-238)
		tmp = Float64(x - Float64(x * Float64(y / a)));
	elseif (z <= 2.45e+91)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / (a - z));
	t_2 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -6.8e+178)
		tmp = t_2;
	elseif (z <= -2.65e-154)
		tmp = t_1;
	elseif (z <= -1.1e-238)
		tmp = x - (x * (y / a));
	elseif (z <= 2.45e+91)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e+178], t$95$2, If[LessEqual[z, -2.65e-154], t$95$1, If[LessEqual[z, -1.1e-238], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e+91], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a - z}\\
t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+178}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -2.65 \cdot 10^{-154}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.1 \cdot 10^{-238}:\\
\;\;\;\;x - x \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 2.45 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.8000000000000005e178 or 2.45000000000000015e91 < z

    1. Initial program 55.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 27.9%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. *-commutative27.9%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
      2. associate-/l*53.1%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    5. Simplified53.1%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    6. Taylor expanded in a around 0 25.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot \left(y - z\right)}{z}} \]
    7. Step-by-step derivation
      1. mul-1-neg25.2%

        \[\leadsto \color{blue}{-\frac{t \cdot \left(y - z\right)}{z}} \]
      2. associate-/l*57.8%

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. distribute-lft-neg-in57.8%

        \[\leadsto \color{blue}{\left(-t\right) \cdot \frac{y - z}{z}} \]
      4. div-sub57.8%

        \[\leadsto \left(-t\right) \cdot \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)} \]
      5. *-inverses57.8%

        \[\leadsto \left(-t\right) \cdot \left(\frac{y}{z} - \color{blue}{1}\right) \]
    8. Simplified57.8%

      \[\leadsto \color{blue}{\left(-t\right) \cdot \left(\frac{y}{z} - 1\right)} \]

    if -6.8000000000000005e178 < z < -2.6500000000000001e-154 or -1.09999999999999996e-238 < z < 2.45000000000000015e91

    1. Initial program 88.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 58.6%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub58.7%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified58.7%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if -2.6500000000000001e-154 < z < -1.09999999999999996e-238

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. remove-double-neg100.0%

        \[\leadsto \left(y - z\right) \cdot \frac{t - x}{a - z} + \color{blue}{\left(-\left(-x\right)\right)} \]
      3. unsub-neg100.0%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} - \left(-x\right)} \]
      4. *-commutative100.0%

        \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} - \left(-x\right) \]
      5. associate-*l/89.1%

        \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} - \left(-x\right) \]
      6. associate-/l*99.8%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} - \left(-x\right) \]
      7. fma-neg99.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, -\left(-x\right)\right)} \]
      8. remove-double-neg99.8%

        \[\leadsto \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, \color{blue}{x}\right) \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine99.8%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    6. Applied egg-rr99.8%

      \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    7. Taylor expanded in z around 0 89.1%

      \[\leadsto \left(t - x\right) \cdot \color{blue}{\frac{y}{a}} + x \]
    8. Taylor expanded in t around 0 72.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a}} + x \]
    9. Step-by-step derivation
      1. mul-1-neg72.5%

        \[\leadsto \color{blue}{\left(-\frac{x \cdot y}{a}\right)} + x \]
      2. associate-/l*83.3%

        \[\leadsto \left(-\color{blue}{x \cdot \frac{y}{a}}\right) + x \]
      3. distribute-lft-neg-out83.3%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{y}{a}} + x \]
      4. *-commutative83.3%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(-x\right)} + x \]
    10. Simplified83.3%

      \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(-x\right)} + x \]
  3. Recombined 3 regimes into one program.
  4. Final simplification60.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+178}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{-154}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-238}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+91}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 28: 54.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a - z}\\ t_2 := x - x \cdot \frac{y}{a}\\ \mathbf{if}\;x \leq -2.46 \cdot 10^{+185}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{+89}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-68}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+118}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) (- a z)))) (t_2 (- x (* x (/ y a)))))
   (if (<= x -2.46e+185)
     t_2
     (if (<= x -3.5e+89)
       t_1
       (if (<= x 3.6e-68)
         (* (- y z) (/ t (- a z)))
         (if (<= x 1.6e+118) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / (a - z));
	double t_2 = x - (x * (y / a));
	double tmp;
	if (x <= -2.46e+185) {
		tmp = t_2;
	} else if (x <= -3.5e+89) {
		tmp = t_1;
	} else if (x <= 3.6e-68) {
		tmp = (y - z) * (t / (a - z));
	} else if (x <= 1.6e+118) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((t - x) / (a - z))
    t_2 = x - (x * (y / a))
    if (x <= (-2.46d+185)) then
        tmp = t_2
    else if (x <= (-3.5d+89)) then
        tmp = t_1
    else if (x <= 3.6d-68) then
        tmp = (y - z) * (t / (a - z))
    else if (x <= 1.6d+118) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / (a - z));
	double t_2 = x - (x * (y / a));
	double tmp;
	if (x <= -2.46e+185) {
		tmp = t_2;
	} else if (x <= -3.5e+89) {
		tmp = t_1;
	} else if (x <= 3.6e-68) {
		tmp = (y - z) * (t / (a - z));
	} else if (x <= 1.6e+118) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / (a - z))
	t_2 = x - (x * (y / a))
	tmp = 0
	if x <= -2.46e+185:
		tmp = t_2
	elif x <= -3.5e+89:
		tmp = t_1
	elif x <= 3.6e-68:
		tmp = (y - z) * (t / (a - z))
	elif x <= 1.6e+118:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	t_2 = Float64(x - Float64(x * Float64(y / a)))
	tmp = 0.0
	if (x <= -2.46e+185)
		tmp = t_2;
	elseif (x <= -3.5e+89)
		tmp = t_1;
	elseif (x <= 3.6e-68)
		tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z)));
	elseif (x <= 1.6e+118)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / (a - z));
	t_2 = x - (x * (y / a));
	tmp = 0.0;
	if (x <= -2.46e+185)
		tmp = t_2;
	elseif (x <= -3.5e+89)
		tmp = t_1;
	elseif (x <= 3.6e-68)
		tmp = (y - z) * (t / (a - z));
	elseif (x <= 1.6e+118)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.46e+185], t$95$2, If[LessEqual[x, -3.5e+89], t$95$1, If[LessEqual[x, 3.6e-68], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+118], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a - z}\\
t_2 := x - x \cdot \frac{y}{a}\\
\mathbf{if}\;x \leq -2.46 \cdot 10^{+185}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -3.5 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 3.6 \cdot 10^{-68}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\

\mathbf{elif}\;x \leq 1.6 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.4600000000000001e185 or 1.60000000000000008e118 < x

    1. Initial program 60.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative60.8%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. remove-double-neg60.8%

        \[\leadsto \left(y - z\right) \cdot \frac{t - x}{a - z} + \color{blue}{\left(-\left(-x\right)\right)} \]
      3. unsub-neg60.8%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} - \left(-x\right)} \]
      4. *-commutative60.8%

        \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} - \left(-x\right) \]
      5. associate-*l/48.0%

        \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} - \left(-x\right) \]
      6. associate-/l*63.7%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} - \left(-x\right) \]
      7. fma-neg63.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, -\left(-x\right)\right)} \]
      8. remove-double-neg63.7%

        \[\leadsto \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, \color{blue}{x}\right) \]
    3. Simplified63.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine63.7%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    6. Applied egg-rr63.7%

      \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    7. Taylor expanded in z around 0 54.9%

      \[\leadsto \left(t - x\right) \cdot \color{blue}{\frac{y}{a}} + x \]
    8. Taylor expanded in t around 0 45.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a}} + x \]
    9. Step-by-step derivation
      1. mul-1-neg45.0%

        \[\leadsto \color{blue}{\left(-\frac{x \cdot y}{a}\right)} + x \]
      2. associate-/l*53.7%

        \[\leadsto \left(-\color{blue}{x \cdot \frac{y}{a}}\right) + x \]
      3. distribute-lft-neg-out53.7%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{y}{a}} + x \]
      4. *-commutative53.7%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(-x\right)} + x \]
    10. Simplified53.7%

      \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(-x\right)} + x \]

    if -2.4600000000000001e185 < x < -3.5000000000000001e89 or 3.60000000000000007e-68 < x < 1.60000000000000008e118

    1. Initial program 80.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 55.8%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub55.8%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified55.8%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if -3.5000000000000001e89 < x < 3.60000000000000007e-68

    1. Initial program 89.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 58.4%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. *-commutative58.4%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
      2. associate-/l*68.0%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    5. Simplified68.0%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.46 \cdot 10^{+185}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{+89}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-68}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+118}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 29: 55.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ \mathbf{if}\;x \leq -1.95 \cdot 10^{+177}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -6.6 \cdot 10^{+91}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{-67}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{+124}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* x (/ y a)))))
   (if (<= x -1.95e+177)
     t_1
     (if (<= x -6.6e+91)
       (* y (/ (- t x) (- a z)))
       (if (<= x 5.1e-67)
         (* (- y z) (/ t (- a z)))
         (if (<= x 6.6e+124) (* (- t x) (/ y (- a z))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double tmp;
	if (x <= -1.95e+177) {
		tmp = t_1;
	} else if (x <= -6.6e+91) {
		tmp = y * ((t - x) / (a - z));
	} else if (x <= 5.1e-67) {
		tmp = (y - z) * (t / (a - z));
	} else if (x <= 6.6e+124) {
		tmp = (t - x) * (y / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (x * (y / a))
    if (x <= (-1.95d+177)) then
        tmp = t_1
    else if (x <= (-6.6d+91)) then
        tmp = y * ((t - x) / (a - z))
    else if (x <= 5.1d-67) then
        tmp = (y - z) * (t / (a - z))
    else if (x <= 6.6d+124) then
        tmp = (t - x) * (y / (a - z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double tmp;
	if (x <= -1.95e+177) {
		tmp = t_1;
	} else if (x <= -6.6e+91) {
		tmp = y * ((t - x) / (a - z));
	} else if (x <= 5.1e-67) {
		tmp = (y - z) * (t / (a - z));
	} else if (x <= 6.6e+124) {
		tmp = (t - x) * (y / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (x * (y / a))
	tmp = 0
	if x <= -1.95e+177:
		tmp = t_1
	elif x <= -6.6e+91:
		tmp = y * ((t - x) / (a - z))
	elif x <= 5.1e-67:
		tmp = (y - z) * (t / (a - z))
	elif x <= 6.6e+124:
		tmp = (t - x) * (y / (a - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(x * Float64(y / a)))
	tmp = 0.0
	if (x <= -1.95e+177)
		tmp = t_1;
	elseif (x <= -6.6e+91)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (x <= 5.1e-67)
		tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z)));
	elseif (x <= 6.6e+124)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (x * (y / a));
	tmp = 0.0;
	if (x <= -1.95e+177)
		tmp = t_1;
	elseif (x <= -6.6e+91)
		tmp = y * ((t - x) / (a - z));
	elseif (x <= 5.1e-67)
		tmp = (y - z) * (t / (a - z));
	elseif (x <= 6.6e+124)
		tmp = (t - x) * (y / (a - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.95e+177], t$95$1, If[LessEqual[x, -6.6e+91], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-67], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.6e+124], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - x \cdot \frac{y}{a}\\
\mathbf{if}\;x \leq -1.95 \cdot 10^{+177}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -6.6 \cdot 10^{+91}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

\mathbf{elif}\;x \leq 5.1 \cdot 10^{-67}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\

\mathbf{elif}\;x \leq 6.6 \cdot 10^{+124}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.95e177 or 6.60000000000000029e124 < x

    1. Initial program 60.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative60.8%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. remove-double-neg60.8%

        \[\leadsto \left(y - z\right) \cdot \frac{t - x}{a - z} + \color{blue}{\left(-\left(-x\right)\right)} \]
      3. unsub-neg60.8%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} - \left(-x\right)} \]
      4. *-commutative60.8%

        \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} - \left(-x\right) \]
      5. associate-*l/48.0%

        \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} - \left(-x\right) \]
      6. associate-/l*63.7%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} - \left(-x\right) \]
      7. fma-neg63.7%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, -\left(-x\right)\right)} \]
      8. remove-double-neg63.7%

        \[\leadsto \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, \color{blue}{x}\right) \]
    3. Simplified63.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine63.7%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    6. Applied egg-rr63.7%

      \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    7. Taylor expanded in z around 0 54.9%

      \[\leadsto \left(t - x\right) \cdot \color{blue}{\frac{y}{a}} + x \]
    8. Taylor expanded in t around 0 45.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a}} + x \]
    9. Step-by-step derivation
      1. mul-1-neg45.0%

        \[\leadsto \color{blue}{\left(-\frac{x \cdot y}{a}\right)} + x \]
      2. associate-/l*53.7%

        \[\leadsto \left(-\color{blue}{x \cdot \frac{y}{a}}\right) + x \]
      3. distribute-lft-neg-out53.7%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{y}{a}} + x \]
      4. *-commutative53.7%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(-x\right)} + x \]
    10. Simplified53.7%

      \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(-x\right)} + x \]

    if -1.95e177 < x < -6.60000000000000034e91

    1. Initial program 78.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 71.7%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub71.7%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified71.7%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if -6.60000000000000034e91 < x < 5.09999999999999982e-67

    1. Initial program 89.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 58.4%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. *-commutative58.4%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
      2. associate-/l*68.0%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    5. Simplified68.0%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]

    if 5.09999999999999982e-67 < x < 6.60000000000000029e124

    1. Initial program 81.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative81.3%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
      2. remove-double-neg81.3%

        \[\leadsto \left(y - z\right) \cdot \frac{t - x}{a - z} + \color{blue}{\left(-\left(-x\right)\right)} \]
      3. unsub-neg81.3%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} - \left(-x\right)} \]
      4. *-commutative81.3%

        \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} - \left(-x\right) \]
      5. associate-*l/65.8%

        \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} - \left(-x\right) \]
      6. associate-/l*82.6%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} - \left(-x\right) \]
      7. fma-neg82.6%

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, -\left(-x\right)\right)} \]
      8. remove-double-neg82.6%

        \[\leadsto \mathsf{fma}\left(t - x, \frac{y - z}{a - z}, \color{blue}{x}\right) \]
    3. Simplified82.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine82.6%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    6. Applied egg-rr82.6%

      \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z} + x} \]
    7. Taylor expanded in y around inf 48.7%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    8. Step-by-step derivation
      1. div-sub48.7%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-*r/44.3%

        \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
      3. *-commutative44.3%

        \[\leadsto \frac{\color{blue}{\left(t - x\right) \cdot y}}{a - z} \]
      4. associate-*r/49.1%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a - z}} \]
      5. *-commutative49.1%

        \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    9. Simplified49.1%

      \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification61.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.95 \cdot 10^{+177}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -6.6 \cdot 10^{+91}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{-67}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{+124}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 30: 37.7% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.4e+106) t (if (<= z 3.6e+110) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.4e+106) {
		tmp = t;
	} else if (z <= 3.6e+110) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-3.4d+106)) then
        tmp = t
    else if (z <= 3.6d+110) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.4e+106) {
		tmp = t;
	} else if (z <= 3.6e+110) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.4e+106:
		tmp = t
	elif z <= 3.6e+110:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.4e+106)
		tmp = t;
	elseif (z <= 3.6e+110)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.4e+106)
		tmp = t;
	elseif (z <= 3.6e+110)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.4e+106], t, If[LessEqual[z, 3.6e+110], x, t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+106}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{+110}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.39999999999999994e106 or 3.5999999999999997e110 < z

    1. Initial program 58.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 52.8%

      \[\leadsto \color{blue}{t} \]

    if -3.39999999999999994e106 < z < 3.5999999999999997e110

    1. Initial program 88.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 31.2%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 31: 24.2% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 79.8%

    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
  2. Add Preprocessing
  3. Taylor expanded in z around inf 22.1%

    \[\leadsto \color{blue}{t} \]
  4. Final simplification22.1%

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024039 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))