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

Percentage Accurate: 68.4% → 88.1%
Time: 26.1s
Alternatives: 27
Speedup: 0.7×

Specification

?
\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 27 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: 68.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 88.1% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+131}:\\ \;\;\;\;t + \frac{y - a}{{\left(\sqrt[3]{z}\right)}^{2}} \cdot \frac{x - t}{\sqrt[3]{z}}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+223}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1, t \cdot \frac{y - z}{z}, x \cdot \frac{y}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5e+131)
   (+ t (* (/ (- y a) (pow (cbrt z) 2.0)) (/ (- x t) (cbrt z))))
   (if (<= z 3.4e+223)
     (fma (- t x) (/ (- y z) (- a z)) x)
     (fma -1.0 (* t (/ (- y z) z)) (* x (/ y z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5e+131) {
		tmp = t + (((y - a) / pow(cbrt(z), 2.0)) * ((x - t) / cbrt(z)));
	} else if (z <= 3.4e+223) {
		tmp = fma((t - x), ((y - z) / (a - z)), x);
	} else {
		tmp = fma(-1.0, (t * ((y - z) / z)), (x * (y / z)));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5e+131)
		tmp = Float64(t + Float64(Float64(Float64(y - a) / (cbrt(z) ^ 2.0)) * Float64(Float64(x - t) / cbrt(z))));
	elseif (z <= 3.4e+223)
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x);
	else
		tmp = fma(-1.0, Float64(t * Float64(Float64(y - z) / z)), Float64(x * Float64(y / z)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e+131], N[(t + N[(N[(N[(y - a), $MachinePrecision] / N[Power[N[Power[z, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[Power[z, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e+223], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(-1.0 * N[(t * N[(N[(y - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+131}:\\
\;\;\;\;t + \frac{y - a}{{\left(\sqrt[3]{z}\right)}^{2}} \cdot \frac{x - t}{\sqrt[3]{z}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.99999999999999995e131

    1. Initial program 26.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y - a}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{t - x}{\sqrt[3]{z}}} \]
      4. pow292.1%

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

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

    if -4.99999999999999995e131 < z < 3.3999999999999998e223

    1. Initial program 78.7%

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

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

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

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

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

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

    if 3.3999999999999998e223 < z

    1. Initial program 27.2%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{-\frac{z}{t - x}}} \]
      2. distribute-neg-frac222.4%

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

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

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

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

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

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

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

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

Alternative 2: 87.6% accurate, 0.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.3e139

    1. Initial program 24.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(1, t, -\frac{y - a}{z} \cdot \left(t - x\right)\right) + \mathsf{fma}\left(-\frac{y - a}{z}, t - x, \frac{y - a}{z} \cdot \left(t - x\right)\right)} \]
    10. Step-by-step derivation
      1. distribute-rgt-neg-in87.2%

        \[\leadsto \mathsf{fma}\left(1, t, \color{blue}{\frac{y - a}{z} \cdot \left(-\left(t - x\right)\right)}\right) + \mathsf{fma}\left(-\frac{y - a}{z}, t - x, \frac{y - a}{z} \cdot \left(t - x\right)\right) \]
      2. distribute-neg-frac287.2%

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

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

        \[\leadsto \mathsf{fma}\left(1, t, \frac{y - a}{z} \cdot \left(-\left(t - x\right)\right)\right) + \mathsf{fma}\left(\frac{y - a}{-z}, t - x, \color{blue}{\left(y - a\right) \cdot \frac{t - x}{z}}\right) \]
    11. Simplified84.4%

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

    if -2.3e139 < z < 5.4999999999999999e222

    1. Initial program 78.5%

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

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

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

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

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

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

    if 5.4999999999999999e222 < z

    1. Initial program 27.2%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{-\frac{z}{t - x}}} \]
      2. distribute-neg-frac222.4%

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

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

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

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

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

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

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

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

Alternative 3: 90.8% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 72.4%

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

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

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

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

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

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

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

    1. Initial program 4.1%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 99.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}} \]
    6. Step-by-step derivation
      1. associate--l+99.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. associate-*r/99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 85.8% accurate, 0.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.79999999999999994e134

    1. Initial program 26.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.79999999999999994e134 < z < 1.4500000000000001e223

    1. Initial program 78.7%

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

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

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

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

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

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

    if 1.4500000000000001e223 < z

    1. Initial program 27.2%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{-\frac{z}{t - x}}} \]
      2. distribute-neg-frac222.4%

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

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

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

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

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

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

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

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

Alternative 5: 88.0% accurate, 0.2× speedup?

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

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

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

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

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

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


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

    1. Initial program 31.7%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 51.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}} \]
    6. Step-by-step derivation
      1. associate--l+51.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. associate-*r/51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999998e-306 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 9.9999999999999993e260

    1. Initial program 98.2%

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

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

    1. Initial program 4.1%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 99.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}} \]
    6. Step-by-step derivation
      1. associate--l+99.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. associate-*r/99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 34.9%

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

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

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

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

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

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

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

Alternative 6: 88.0% accurate, 0.2× speedup?

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

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

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

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

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

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


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

    1. Initial program 31.7%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 51.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}} \]
    6. Step-by-step derivation
      1. associate--l+51.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. associate-*r/51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999998e-306 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 9.9999999999999993e260

    1. Initial program 98.2%

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

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

    1. Initial program 4.1%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 99.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}} \]
    6. Step-by-step derivation
      1. associate--l+99.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. associate-*r/99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 34.9%

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

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

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

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

Alternative 7: 88.1% accurate, 0.2× speedup?

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

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

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

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

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

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


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

    1. Initial program 31.7%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 51.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}} \]
    6. Step-by-step derivation
      1. associate--l+51.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. associate-*r/51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999998e-306 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 9.9999999999999993e260

    1. Initial program 98.2%

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

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

    1. Initial program 4.1%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 99.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}} \]
    6. Step-by-step derivation
      1. associate--l+99.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. associate-*r/99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 34.9%

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

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

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

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

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

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

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

Alternative 8: 90.7% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.1%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 99.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}} \]
    6. Step-by-step derivation
      1. associate--l+99.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. associate-*r/99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 37.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;a \leq -1.6 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.15 \cdot 10^{-185}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.25 \cdot 10^{-209}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-133}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+15}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y (- a z)))))
   (if (<= a -1.6e+28)
     x
     (if (<= a -2.15e-185)
       t
       (if (<= a 2.25e-209)
         (* x (/ y z))
         (if (<= a 1.65e-133)
           t
           (if (<= a 4.5e-42)
             t_1
             (if (<= a 4e+15) t (if (<= a 8e+175) t_1 x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (a <= -1.6e+28) {
		tmp = x;
	} else if (a <= -2.15e-185) {
		tmp = t;
	} else if (a <= 2.25e-209) {
		tmp = x * (y / z);
	} else if (a <= 1.65e-133) {
		tmp = t;
	} else if (a <= 4.5e-42) {
		tmp = t_1;
	} else if (a <= 4e+15) {
		tmp = t;
	} else if (a <= 8e+175) {
		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 = t * (y / (a - z))
    if (a <= (-1.6d+28)) then
        tmp = x
    else if (a <= (-2.15d-185)) then
        tmp = t
    else if (a <= 2.25d-209) then
        tmp = x * (y / z)
    else if (a <= 1.65d-133) then
        tmp = t
    else if (a <= 4.5d-42) then
        tmp = t_1
    else if (a <= 4d+15) then
        tmp = t
    else if (a <= 8d+175) 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 = t * (y / (a - z));
	double tmp;
	if (a <= -1.6e+28) {
		tmp = x;
	} else if (a <= -2.15e-185) {
		tmp = t;
	} else if (a <= 2.25e-209) {
		tmp = x * (y / z);
	} else if (a <= 1.65e-133) {
		tmp = t;
	} else if (a <= 4.5e-42) {
		tmp = t_1;
	} else if (a <= 4e+15) {
		tmp = t;
	} else if (a <= 8e+175) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / (a - z))
	tmp = 0
	if a <= -1.6e+28:
		tmp = x
	elif a <= -2.15e-185:
		tmp = t
	elif a <= 2.25e-209:
		tmp = x * (y / z)
	elif a <= 1.65e-133:
		tmp = t
	elif a <= 4.5e-42:
		tmp = t_1
	elif a <= 4e+15:
		tmp = t
	elif a <= 8e+175:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (a <= -1.6e+28)
		tmp = x;
	elseif (a <= -2.15e-185)
		tmp = t;
	elseif (a <= 2.25e-209)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 1.65e-133)
		tmp = t;
	elseif (a <= 4.5e-42)
		tmp = t_1;
	elseif (a <= 4e+15)
		tmp = t;
	elseif (a <= 8e+175)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / (a - z));
	tmp = 0.0;
	if (a <= -1.6e+28)
		tmp = x;
	elseif (a <= -2.15e-185)
		tmp = t;
	elseif (a <= 2.25e-209)
		tmp = x * (y / z);
	elseif (a <= 1.65e-133)
		tmp = t;
	elseif (a <= 4.5e-42)
		tmp = t_1;
	elseif (a <= 4e+15)
		tmp = t;
	elseif (a <= 8e+175)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.6e+28], x, If[LessEqual[a, -2.15e-185], t, If[LessEqual[a, 2.25e-209], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.65e-133], t, If[LessEqual[a, 4.5e-42], t$95$1, If[LessEqual[a, 4e+15], t, If[LessEqual[a, 8e+175], t$95$1, x]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.15 \cdot 10^{-185}:\\
\;\;\;\;t\\

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

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

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

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

\mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.6e28 or 7.9999999999999995e175 < a

    1. Initial program 73.9%

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

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

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

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

    if -1.6e28 < a < -2.15e-185 or 2.2499999999999999e-209 < a < 1.65000000000000005e-133 or 4.5e-42 < a < 4e15

    1. Initial program 52.8%

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

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

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

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

    if -2.15e-185 < a < 2.2499999999999999e-209

    1. Initial program 59.1%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{-\frac{z}{t - x}}} \]
      2. distribute-neg-frac261.8%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    12. Simplified54.5%

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

    if 1.65000000000000005e-133 < a < 4.5e-42 or 4e15 < a < 7.9999999999999995e175

    1. Initial program 76.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.15 \cdot 10^{-185}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.25 \cdot 10^{-209}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-133}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-42}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+15}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 36.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{z}\\ \mathbf{if}\;a \leq -1.6 \cdot 10^{+29}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-187}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-209}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{-133}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{-43}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 120000000:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ y z))))
   (if (<= a -1.6e+29)
     x
     (if (<= a -2.25e-187)
       t
       (if (<= a 9.5e-209)
         t_1
         (if (<= a 5.3e-133)
           t
           (if (<= a 6.4e-43)
             t_1
             (if (<= a 120000000.0)
               t
               (if (<= a 8e+175) (* t (/ y a)) x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double tmp;
	if (a <= -1.6e+29) {
		tmp = x;
	} else if (a <= -2.25e-187) {
		tmp = t;
	} else if (a <= 9.5e-209) {
		tmp = t_1;
	} else if (a <= 5.3e-133) {
		tmp = t;
	} else if (a <= 6.4e-43) {
		tmp = t_1;
	} else if (a <= 120000000.0) {
		tmp = t;
	} else if (a <= 8e+175) {
		tmp = t * (y / 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 = x * (y / z)
    if (a <= (-1.6d+29)) then
        tmp = x
    else if (a <= (-2.25d-187)) then
        tmp = t
    else if (a <= 9.5d-209) then
        tmp = t_1
    else if (a <= 5.3d-133) then
        tmp = t
    else if (a <= 6.4d-43) then
        tmp = t_1
    else if (a <= 120000000.0d0) then
        tmp = t
    else if (a <= 8d+175) then
        tmp = t * (y / 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 = x * (y / z);
	double tmp;
	if (a <= -1.6e+29) {
		tmp = x;
	} else if (a <= -2.25e-187) {
		tmp = t;
	} else if (a <= 9.5e-209) {
		tmp = t_1;
	} else if (a <= 5.3e-133) {
		tmp = t;
	} else if (a <= 6.4e-43) {
		tmp = t_1;
	} else if (a <= 120000000.0) {
		tmp = t;
	} else if (a <= 8e+175) {
		tmp = t * (y / a);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (y / z)
	tmp = 0
	if a <= -1.6e+29:
		tmp = x
	elif a <= -2.25e-187:
		tmp = t
	elif a <= 9.5e-209:
		tmp = t_1
	elif a <= 5.3e-133:
		tmp = t
	elif a <= 6.4e-43:
		tmp = t_1
	elif a <= 120000000.0:
		tmp = t
	elif a <= 8e+175:
		tmp = t * (y / a)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(y / z))
	tmp = 0.0
	if (a <= -1.6e+29)
		tmp = x;
	elseif (a <= -2.25e-187)
		tmp = t;
	elseif (a <= 9.5e-209)
		tmp = t_1;
	elseif (a <= 5.3e-133)
		tmp = t;
	elseif (a <= 6.4e-43)
		tmp = t_1;
	elseif (a <= 120000000.0)
		tmp = t;
	elseif (a <= 8e+175)
		tmp = Float64(t * Float64(y / a));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (y / z);
	tmp = 0.0;
	if (a <= -1.6e+29)
		tmp = x;
	elseif (a <= -2.25e-187)
		tmp = t;
	elseif (a <= 9.5e-209)
		tmp = t_1;
	elseif (a <= 5.3e-133)
		tmp = t;
	elseif (a <= 6.4e-43)
		tmp = t_1;
	elseif (a <= 120000000.0)
		tmp = t;
	elseif (a <= 8e+175)
		tmp = t * (y / a);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.6e+29], x, If[LessEqual[a, -2.25e-187], t, If[LessEqual[a, 9.5e-209], t$95$1, If[LessEqual[a, 5.3e-133], t, If[LessEqual[a, 6.4e-43], t$95$1, If[LessEqual[a, 120000000.0], t, If[LessEqual[a, 8e+175], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.25 \cdot 10^{-187}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 9.5 \cdot 10^{-209}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.3 \cdot 10^{-133}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 6.4 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.59999999999999993e29 or 7.9999999999999995e175 < a

    1. Initial program 73.9%

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

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

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

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

    if -1.59999999999999993e29 < a < -2.2499999999999999e-187 or 9.50000000000000028e-209 < a < 5.29999999999999983e-133 or 6.3999999999999997e-43 < a < 1.2e8

    1. Initial program 53.5%

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

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

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

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

    if -2.2499999999999999e-187 < a < 9.50000000000000028e-209 or 5.29999999999999983e-133 < a < 6.3999999999999997e-43

    1. Initial program 62.5%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{-\frac{z}{t - x}}} \]
      2. distribute-neg-frac253.4%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    12. Simplified49.1%

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

    if 1.2e8 < a < 7.9999999999999995e175

    1. Initial program 78.6%

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{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*33.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+29}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-187}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{-209}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{-133}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{-43}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 120000000:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 58.6% 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}\\ t_3 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;x \leq -3 \cdot 10^{+105}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -1.95 \cdot 10^{-50}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-44}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+56}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+71}:\\ \;\;\;\;t\_3\\ \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))))
        (t_3 (* t (/ (- y z) (- a z)))))
   (if (<= x -3e+105)
     t_2
     (if (<= x -1.95e-50)
       t_1
       (if (<= x 4.5e-44)
         t_3
         (if (<= x 1.05e+56) t_1 (if (<= x 1.6e+71) t_3 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 t_3 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -3e+105) {
		tmp = t_2;
	} else if (x <= -1.95e-50) {
		tmp = t_1;
	} else if (x <= 4.5e-44) {
		tmp = t_3;
	} else if (x <= 1.05e+56) {
		tmp = t_1;
	} else if (x <= 1.6e+71) {
		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 * ((t - x) / (a - z))
    t_2 = x - (x * (y / a))
    t_3 = t * ((y - z) / (a - z))
    if (x <= (-3d+105)) then
        tmp = t_2
    else if (x <= (-1.95d-50)) then
        tmp = t_1
    else if (x <= 4.5d-44) then
        tmp = t_3
    else if (x <= 1.05d+56) then
        tmp = t_1
    else if (x <= 1.6d+71) 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 * ((t - x) / (a - z));
	double t_2 = x - (x * (y / a));
	double t_3 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -3e+105) {
		tmp = t_2;
	} else if (x <= -1.95e-50) {
		tmp = t_1;
	} else if (x <= 4.5e-44) {
		tmp = t_3;
	} else if (x <= 1.05e+56) {
		tmp = t_1;
	} else if (x <= 1.6e+71) {
		tmp = t_3;
	} 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))
	t_3 = t * ((y - z) / (a - z))
	tmp = 0
	if x <= -3e+105:
		tmp = t_2
	elif x <= -1.95e-50:
		tmp = t_1
	elif x <= 4.5e-44:
		tmp = t_3
	elif x <= 1.05e+56:
		tmp = t_1
	elif x <= 1.6e+71:
		tmp = t_3
	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)))
	t_3 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (x <= -3e+105)
		tmp = t_2;
	elseif (x <= -1.95e-50)
		tmp = t_1;
	elseif (x <= 4.5e-44)
		tmp = t_3;
	elseif (x <= 1.05e+56)
		tmp = t_1;
	elseif (x <= 1.6e+71)
		tmp = t_3;
	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));
	t_3 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (x <= -3e+105)
		tmp = t_2;
	elseif (x <= -1.95e-50)
		tmp = t_1;
	elseif (x <= 4.5e-44)
		tmp = t_3;
	elseif (x <= 1.05e+56)
		tmp = t_1;
	elseif (x <= 1.6e+71)
		tmp = t_3;
	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]}, Block[{t$95$3 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3e+105], t$95$2, If[LessEqual[x, -1.95e-50], t$95$1, If[LessEqual[x, 4.5e-44], t$95$3, If[LessEqual[x, 1.05e+56], t$95$1, If[LessEqual[x, 1.6e+71], t$95$3, 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}\\
t_3 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;x \leq -3 \cdot 10^{+105}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -1.95 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 4.5 \cdot 10^{-44}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;x \leq 1.05 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.6 \cdot 10^{+71}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.0000000000000001e105 or 1.60000000000000012e71 < x

    1. Initial program 50.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    10. Step-by-step derivation
      1. mul-1-neg48.3%

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

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

        \[\leadsto \color{blue}{x - x \cdot \frac{y}{a}} \]
    11. Simplified56.2%

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

    if -3.0000000000000001e105 < x < -1.9500000000000001e-50 or 4.4999999999999999e-44 < x < 1.05000000000000009e56

    1. Initial program 71.4%

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

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

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

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

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

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

    if -1.9500000000000001e-50 < x < 4.4999999999999999e-44 or 1.05000000000000009e56 < x < 1.60000000000000012e71

    1. Initial program 78.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3 \cdot 10^{+105}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -1.95 \cdot 10^{-50}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-44}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{+56}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+71}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 82.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -1.55 \cdot 10^{-174}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 2.25 \cdot 10^{+223}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 26.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35e134 < z < -1.5499999999999999e-174 or 1e-276 < z < 2.25e223

    1. Initial program 74.7%

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

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

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

    if -1.5499999999999999e-174 < z < 1e-276

    1. Initial program 95.1%

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

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

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

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

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

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

    if 2.25e223 < z

    1. Initial program 27.2%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 78.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}} \]
    6. Step-by-step derivation
      1. associate--l+78.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. associate-*r/78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 82.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -1.95 \cdot 10^{-175}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.7 \cdot 10^{+223}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 26.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1e133 < z < -1.94999999999999999e-175 or 1.35e-227 < z < 1.6999999999999999e223

    1. Initial program 73.1%

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

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

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

    if -1.94999999999999999e-175 < z < 1.35e-227

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

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

    if 1.6999999999999999e223 < z

    1. Initial program 27.2%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 78.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}} \]
    6. Step-by-step derivation
      1. associate--l+78.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. associate-*r/78.7%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+133}:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot x}{z}\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-175}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-227}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{1}{\frac{a - z}{y}}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+223}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 82.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -3.6 \cdot 10^{-175}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+223}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 26.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45000000000000005e131 < z < -3.6e-175 or 1.00000000000000003e-228 < z < 2.6000000000000002e223

    1. Initial program 73.1%

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

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

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

    if -3.6e-175 < z < 1.00000000000000003e-228

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

    if 2.6000000000000002e223 < z

    1. Initial program 27.2%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 78.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}} \]
    6. Step-by-step derivation
      1. associate--l+78.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. associate-*r/78.7%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+131}:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot x}{z}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-175}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 10^{-228}:\\ \;\;\;\;x + \frac{-1}{\frac{\frac{a - z}{y}}{x - t}}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+223}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 41.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-184}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-209}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-133}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.7e+24)
   x
   (if (<= a -5.1e-184)
     t
     (if (<= a 9.2e-209)
       (* y (/ (- x t) z))
       (if (<= a 1.3e-133) t (if (<= a 2.2e+54) (* t (/ y (- a z))) x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.7e+24) {
		tmp = x;
	} else if (a <= -5.1e-184) {
		tmp = t;
	} else if (a <= 9.2e-209) {
		tmp = y * ((x - t) / z);
	} else if (a <= 1.3e-133) {
		tmp = t;
	} else if (a <= 2.2e+54) {
		tmp = t * (y / (a - z));
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-2.7d+24)) then
        tmp = x
    else if (a <= (-5.1d-184)) then
        tmp = t
    else if (a <= 9.2d-209) then
        tmp = y * ((x - t) / z)
    else if (a <= 1.3d-133) then
        tmp = t
    else if (a <= 2.2d+54) then
        tmp = t * (y / (a - z))
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.7e+24) {
		tmp = x;
	} else if (a <= -5.1e-184) {
		tmp = t;
	} else if (a <= 9.2e-209) {
		tmp = y * ((x - t) / z);
	} else if (a <= 1.3e-133) {
		tmp = t;
	} else if (a <= 2.2e+54) {
		tmp = t * (y / (a - z));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.7e+24:
		tmp = x
	elif a <= -5.1e-184:
		tmp = t
	elif a <= 9.2e-209:
		tmp = y * ((x - t) / z)
	elif a <= 1.3e-133:
		tmp = t
	elif a <= 2.2e+54:
		tmp = t * (y / (a - z))
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.7e+24)
		tmp = x;
	elseif (a <= -5.1e-184)
		tmp = t;
	elseif (a <= 9.2e-209)
		tmp = Float64(y * Float64(Float64(x - t) / z));
	elseif (a <= 1.3e-133)
		tmp = t;
	elseif (a <= 2.2e+54)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.7e+24)
		tmp = x;
	elseif (a <= -5.1e-184)
		tmp = t;
	elseif (a <= 9.2e-209)
		tmp = y * ((x - t) / z);
	elseif (a <= 1.3e-133)
		tmp = t;
	elseif (a <= 2.2e+54)
		tmp = t * (y / (a - z));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.7e+24], x, If[LessEqual[a, -5.1e-184], t, If[LessEqual[a, 9.2e-209], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e-133], t, If[LessEqual[a, 2.2e+54], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -5.1 \cdot 10^{-184}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.3 \cdot 10^{-133}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.7e24 or 2.1999999999999999e54 < a

    1. Initial program 73.6%

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

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

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

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

    if -2.7e24 < a < -5.0999999999999998e-184 or 9.1999999999999999e-209 < a < 1.3e-133

    1. Initial program 57.3%

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

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

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

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

    if -5.0999999999999998e-184 < a < 9.1999999999999999e-209

    1. Initial program 59.1%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{-\frac{z}{t - x}}} \]
      2. distribute-neg-frac261.8%

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

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

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

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

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

    if 1.3e-133 < a < 2.1999999999999999e54

    1. Initial program 66.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-184}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-209}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-133}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 59.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+67} \lor \neg \left(x \leq -7 \cdot 10^{-34} \lor \neg \left(x \leq -1.3 \cdot 10^{-55}\right) \land x \leq 1.5 \cdot 10^{+19}\right):\\
\;\;\;\;x - x \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.3e67 or -7e-34 < x < -1.2999999999999999e-55 or 1.5e19 < x

    1. Initial program 56.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    10. Step-by-step derivation
      1. mul-1-neg48.6%

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

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

        \[\leadsto \color{blue}{x - x \cdot \frac{y}{a}} \]
    11. Simplified55.4%

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

    if -1.3e67 < x < -7e-34 or -1.2999999999999999e-55 < x < 1.5e19

    1. Initial program 76.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{+67} \lor \neg \left(x \leq -7 \cdot 10^{-34} \lor \neg \left(x \leq -1.3 \cdot 10^{-55}\right) \land x \leq 1.5 \cdot 10^{+19}\right):\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 63.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -4 \cdot 10^{-192}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.85e17 or 2.9e10 < a

    1. Initial program 75.6%

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

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

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

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

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

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

    if -1.85e17 < a < -4.0000000000000004e-192 or -2.39999999999999993e-222 < a < 2.9e10

    1. Initial program 58.7%

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

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

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

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

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

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

    if -4.0000000000000004e-192 < a < -2.39999999999999993e-222

    1. Initial program 36.9%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{-\frac{z}{t - x}}} \]
      2. distribute-neg-frac256.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.85 \cdot 10^{+17}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-192}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-222}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 29000000000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 63.1% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -1.76 \cdot 10^{-16}:\\
\;\;\;\;t \cdot \frac{z}{z - a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.80000000000000004e86 or 3.8e21 < z

    1. Initial program 37.1%

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

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

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

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

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

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

    if -2.80000000000000004e86 < z < -1.38e10

    1. Initial program 62.9%

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

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

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

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

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

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

    if -1.38e10 < z < -1.76e-16

    1. Initial program 35.2%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg100.0%

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

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

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

    if -1.76e-16 < z < 3.8e21

    1. Initial program 92.7%

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

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

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

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

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

Alternative 19: 69.3% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.39999999999999997e-22 or 1.45e13 < a

    1. Initial program 76.2%

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

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

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

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

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

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

    if -1.39999999999999997e-22 < a < 2.2000000000000001e-133 or 2.20000000000000012e-89 < a < 1.45e13

    1. Initial program 53.5%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 75.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}} \]
    6. Step-by-step derivation
      1. associate--l+75.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. associate-*r/75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.2000000000000001e-133 < a < 2.20000000000000012e-89

    1. Initial program 78.2%

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

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

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

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

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

Alternative 20: 64.6% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 26.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8000000000000001e130 < z < -2.04999999999999998e23

    1. Initial program 56.5%

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

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

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

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

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

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

    if -2.04999999999999998e23 < z < 46

    1. Initial program 92.8%

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

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

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

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

    if 46 < z

    1. Initial program 43.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    10. Simplified64.0%

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

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

Alternative 21: 70.1% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.05e117

    1. Initial program 25.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 71.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}} \]
    6. Step-by-step derivation
      1. associate--l+71.4%

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg71.4%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--71.4%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
    7. Simplified71.4%

      \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
    8. Taylor expanded in t around 0 78.6%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot \left(y - a\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-*r/78.6%

        \[\leadsto t - \color{blue}{\frac{-1 \cdot \left(x \cdot \left(y - a\right)\right)}{z}} \]
      2. associate-*r*78.6%

        \[\leadsto t - \frac{\color{blue}{\left(-1 \cdot x\right) \cdot \left(y - a\right)}}{z} \]
      3. neg-mul-178.6%

        \[\leadsto t - \frac{\color{blue}{\left(-x\right)} \cdot \left(y - a\right)}{z} \]
    10. Simplified78.6%

      \[\leadsto t - \color{blue}{\frac{\left(-x\right) \cdot \left(y - a\right)}{z}} \]

    if -2.05e117 < z < 4.3e43

    1. Initial program 86.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*88.3%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified88.3%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 71.8%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*77.1%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a}} \]
    7. Simplified77.1%

      \[\leadsto \color{blue}{x + \left(t - x\right) \cdot \frac{y - z}{a}} \]

    if 4.3e43 < z

    1. Initial program 37.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*56.4%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified56.4%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 63.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}} \]
    6. Step-by-step derivation
      1. associate--l+63.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. associate-*r/63.2%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/63.2%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. mul-1-neg63.2%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub63.2%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg63.2%

        \[\leadsto t + \frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \color{blue}{-1 \cdot \left(a \cdot \left(t - x\right)\right)}}{z} \]
      7. distribute-lft-out--63.2%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      8. associate-*r/63.2%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      9. mul-1-neg63.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg63.2%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--63.3%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
    7. Simplified63.3%

      \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
    8. Taylor expanded in y around inf 63.7%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*68.3%

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    10. Simplified68.3%

      \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+117}:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot x}{z}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+43}:\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 73.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{-22}:\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;a \leq 60:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.8e-22)
   (+ x (* (- x t) (/ (- z y) a)))
   (if (<= a 60.0)
     (+ t (/ (* (- y a) (- x t)) z))
     (+ x (/ (- y z) (/ a (- t x)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.8e-22) {
		tmp = x + ((x - t) * ((z - y) / a));
	} else if (a <= 60.0) {
		tmp = t + (((y - a) * (x - t)) / z);
	} else {
		tmp = x + ((y - z) / (a / (t - 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.8d-22)) then
        tmp = x + ((x - t) * ((z - y) / a))
    else if (a <= 60.0d0) then
        tmp = t + (((y - a) * (x - t)) / z)
    else
        tmp = x + ((y - z) / (a / (t - 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.8e-22) {
		tmp = x + ((x - t) * ((z - y) / a));
	} else if (a <= 60.0) {
		tmp = t + (((y - a) * (x - t)) / z);
	} else {
		tmp = x + ((y - z) / (a / (t - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.8e-22:
		tmp = x + ((x - t) * ((z - y) / a))
	elif a <= 60.0:
		tmp = t + (((y - a) * (x - t)) / z)
	else:
		tmp = x + ((y - z) / (a / (t - x)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.8e-22)
		tmp = Float64(x + Float64(Float64(x - t) * Float64(Float64(z - y) / a)));
	elseif (a <= 60.0)
		tmp = Float64(t + Float64(Float64(Float64(y - a) * Float64(x - t)) / z));
	else
		tmp = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.8e-22)
		tmp = x + ((x - t) * ((z - y) / a));
	elseif (a <= 60.0)
		tmp = t + (((y - a) * (x - t)) / z);
	else
		tmp = x + ((y - z) / (a / (t - x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.8e-22], N[(x + N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 60.0], N[(t + N[(N[(N[(y - a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{-22}:\\
\;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\

\mathbf{elif}\;a \leq 60:\\
\;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.7999999999999999e-22

    1. Initial program 76.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*84.8%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified84.8%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 68.7%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*78.0%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a}} \]
    7. Simplified78.0%

      \[\leadsto \color{blue}{x + \left(t - x\right) \cdot \frac{y - z}{a}} \]

    if -1.7999999999999999e-22 < a < 60

    1. Initial program 55.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*59.5%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified59.5%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 73.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}} \]
    6. Step-by-step derivation
      1. associate--l+73.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. associate-*r/73.5%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/73.5%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. mul-1-neg73.5%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub73.5%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg73.5%

        \[\leadsto t + \frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \color{blue}{-1 \cdot \left(a \cdot \left(t - x\right)\right)}}{z} \]
      7. distribute-lft-out--73.5%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      8. associate-*r/73.5%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      9. mul-1-neg73.5%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg73.5%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--73.5%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
    7. Simplified73.5%

      \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]

    if 60 < a

    1. Initial program 75.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*94.4%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified94.4%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num94.4%

        \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{t - x}}} \]
      2. un-div-inv94.5%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    6. Applied egg-rr94.5%

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    7. Taylor expanded in a around inf 82.2%

      \[\leadsto x + \frac{y - z}{\color{blue}{\frac{a}{t - x}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification77.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{-22}:\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;a \leq 60:\\ \;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 69.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.06 \cdot 10^{-22} \lor \neg \left(a \leq 5.5 \cdot 10^{+15}\right):\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -1.06e-22) (not (<= a 5.5e+15)))
   (+ x (* y (/ (- t x) a)))
   (+ t (* y (/ (- x t) z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -1.06e-22) || !(a <= 5.5e+15)) {
		tmp = x + (y * ((t - x) / a));
	} else {
		tmp = t + (y * ((x - t) / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((a <= (-1.06d-22)) .or. (.not. (a <= 5.5d+15))) then
        tmp = x + (y * ((t - x) / a))
    else
        tmp = t + (y * ((x - t) / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -1.06e-22) || !(a <= 5.5e+15)) {
		tmp = x + (y * ((t - x) / a));
	} else {
		tmp = t + (y * ((x - t) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -1.06e-22) or not (a <= 5.5e+15):
		tmp = x + (y * ((t - x) / a))
	else:
		tmp = t + (y * ((x - t) / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -1.06e-22) || !(a <= 5.5e+15))
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	else
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -1.06e-22) || ~((a <= 5.5e+15)))
		tmp = x + (y * ((t - x) / a));
	else
		tmp = t + (y * ((x - t) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.06e-22], N[Not[LessEqual[a, 5.5e+15]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.06 \cdot 10^{-22} \lor \neg \left(a \leq 5.5 \cdot 10^{+15}\right):\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\

\mathbf{else}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.06000000000000008e-22 or 5.5e15 < a

    1. Initial program 76.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*89.5%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified89.5%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 66.7%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-/l*73.2%

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    7. Simplified73.2%

      \[\leadsto \color{blue}{x + y \cdot \frac{t - x}{a}} \]

    if -1.06000000000000008e-22 < a < 5.5e15

    1. Initial program 55.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*59.5%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified59.5%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 73.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}} \]
    6. Step-by-step derivation
      1. associate--l+73.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. associate-*r/73.5%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/73.5%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. mul-1-neg73.5%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub73.5%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg73.5%

        \[\leadsto t + \frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \color{blue}{-1 \cdot \left(a \cdot \left(t - x\right)\right)}}{z} \]
      7. distribute-lft-out--73.5%

        \[\leadsto t + \frac{\color{blue}{-1 \cdot \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right)}}{z} \]
      8. associate-*r/73.5%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      9. mul-1-neg73.5%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg73.5%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--73.5%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
    7. Simplified73.5%

      \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
    8. Taylor expanded in y around inf 68.5%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*72.4%

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    10. Simplified72.4%

      \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.06 \cdot 10^{-22} \lor \neg \left(a \leq 5.5 \cdot 10^{+15}\right):\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 55.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+91} \lor \neg \left(z \leq 4.1 \cdot 10^{+44}\right):\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -5.4e+91) (not (<= z 4.1e+44)))
   (* t (/ z (- z a)))
   (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -5.4e+91) || !(z <= 4.1e+44)) {
		tmp = t * (z / (z - a));
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-5.4d+91)) .or. (.not. (z <= 4.1d+44))) then
        tmp = t * (z / (z - a))
    else
        tmp = x + (t * (y / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -5.4e+91) || !(z <= 4.1e+44)) {
		tmp = t * (z / (z - a));
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -5.4e+91) or not (z <= 4.1e+44):
		tmp = t * (z / (z - a))
	else:
		tmp = x + (t * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -5.4e+91) || !(z <= 4.1e+44))
		tmp = Float64(t * Float64(z / Float64(z - a)));
	else
		tmp = Float64(x + Float64(t * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -5.4e+91) || ~((z <= 4.1e+44)))
		tmp = t * (z / (z - a));
	else
		tmp = x + (t * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.4e+91], N[Not[LessEqual[z, 4.1e+44]], $MachinePrecision]], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+91} \lor \neg \left(z \leq 4.1 \cdot 10^{+44}\right):\\
\;\;\;\;t \cdot \frac{z}{z - a}\\

\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.4e91 or 4.09999999999999965e44 < z

    1. Initial program 33.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*55.0%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified55.0%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 33.7%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Taylor expanded in y around 0 28.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg28.7%

        \[\leadsto \color{blue}{-\frac{t \cdot z}{a - z}} \]
      2. associate-/l*50.0%

        \[\leadsto -\color{blue}{t \cdot \frac{z}{a - z}} \]
    8. Simplified50.0%

      \[\leadsto \color{blue}{-t \cdot \frac{z}{a - z}} \]

    if -5.4e91 < z < 4.09999999999999965e44

    1. Initial program 86.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*88.1%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified88.1%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 69.2%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    6. Taylor expanded in t around inf 57.4%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*59.6%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified59.6%

      \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification55.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+91} \lor \neg \left(z \leq 4.1 \cdot 10^{+44}\right):\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 53.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+89}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+75}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.3e+89) t (if (<= z 3.1e+75) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.3e+89) {
		tmp = t;
	} else if (z <= 3.1e+75) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-4.3d+89)) then
        tmp = t
    else if (z <= 3.1d+75) then
        tmp = x + (t * (y / a))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.3e+89) {
		tmp = t;
	} else if (z <= 3.1e+75) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.3e+89:
		tmp = t
	elif z <= 3.1e+75:
		tmp = x + (t * (y / a))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.3e+89)
		tmp = t;
	elseif (z <= 3.1e+75)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4.3e+89)
		tmp = t;
	elseif (z <= 3.1e+75)
		tmp = x + (t * (y / a));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.3e+89], t, If[LessEqual[z, 3.1e+75], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+89}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 3.1 \cdot 10^{+75}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.3000000000000002e89 or 3.1000000000000001e75 < z

    1. Initial program 31.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*52.5%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified52.5%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 48.9%

      \[\leadsto \color{blue}{t} \]

    if -4.3000000000000002e89 < z < 3.1000000000000001e75

    1. Initial program 85.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*87.8%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified87.8%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 66.0%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    6. Taylor expanded in t around inf 55.4%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*57.5%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified57.5%

      \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification54.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+89}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+75}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 39.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 165000000:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.9e+23) x (if (<= a 165000000.0) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.9e+23) {
		tmp = x;
	} else if (a <= 165000000.0) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1.9d+23)) then
        tmp = x
    else if (a <= 165000000.0d0) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.9e+23) {
		tmp = x;
	} else if (a <= 165000000.0) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.9e+23:
		tmp = x
	elif a <= 165000000.0:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.9e+23)
		tmp = x;
	elseif (a <= 165000000.0)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.9e+23)
		tmp = x;
	elseif (a <= 165000000.0)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.9e+23], x, If[LessEqual[a, 165000000.0], t, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+23}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 165000000:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.89999999999999987e23 or 1.65e8 < a

    1. Initial program 75.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*90.2%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified90.2%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 45.1%

      \[\leadsto \color{blue}{x} \]

    if -1.89999999999999987e23 < a < 1.65e8

    1. Initial program 57.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*60.8%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified60.8%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 38.5%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{+23}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 165000000:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 24.7% 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 66.5%

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Step-by-step derivation
    1. associate-/l*75.5%

      \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
  3. Simplified75.5%

    \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
  4. Add Preprocessing
  5. Taylor expanded in z around inf 23.7%

    \[\leadsto \color{blue}{t} \]
  6. Final simplification23.7%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 84.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (* (/ y z) (- t x)))))
   (if (< z -1.2536131056095036e+188)
     t_1
     (if (< z 4.446702369113811e+64)
       (+ x (/ (- y z) (/ (- a z) (- t x))))
       t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t - ((y / z) * (t - x))
    if (z < (-1.2536131056095036d+188)) then
        tmp = t_1
    else if (z < 4.446702369113811d+64) then
        tmp = x + ((y - z) / ((a - z) / (t - x)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - ((y / z) * (t - x))
	tmp = 0
	if z < -1.2536131056095036e+188:
		tmp = t_1
	elif z < 4.446702369113811e+64:
		tmp = x + ((y - z) / ((a - z) / (t - x)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x)))
	tmp = 0.0
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - ((y / z) * (t - x));
	tmp = 0.0;
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024055 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :alt
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))