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

Percentage Accurate: 68.0% → 90.2%
Time: 16.6s
Alternatives: 24
Speedup: 0.6×

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 24 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.0% 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: 90.2% accurate, 0.1× speedup?

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

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

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

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


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

    1. Initial program 73.1%

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

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

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

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

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

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

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

    1. Initial program 7.8%

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

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

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

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

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 87.5% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 10^{+173}:\\
\;\;\;\;t\_2\\

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


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

    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*87.9%

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

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

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

    1. Initial program 7.8%

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

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

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

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

    1. Initial program 97.3%

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

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

Alternative 3: 90.2% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{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))) < -9.99999999999999925e-208 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 7.8%

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

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

      \[\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}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification92.2%

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

Alternative 4: 64.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + z \cdot \frac{x - t}{a}\\ \mathbf{if}\;a \leq -9 \cdot 10^{+142}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-178}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-88}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1950000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.15 \cdot 10^{+38}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 10^{+136}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \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 (* z (/ (- x t) a)))))
   (if (<= a -9e+142)
     t_2
     (if (<= a -4.5e-178)
       t_1
       (if (<= a 6.8e-88)
         (+ t (* y (/ (- x t) z)))
         (if (<= a 1950000000.0)
           t_1
           (if (<= a 3.15e+38)
             (* x (/ (- y a) z))
             (if (<= a 1e+136) (/ t (/ (- a z) (- y z))) 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 + (z * ((x - t) / a));
	double tmp;
	if (a <= -9e+142) {
		tmp = t_2;
	} else if (a <= -4.5e-178) {
		tmp = t_1;
	} else if (a <= 6.8e-88) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 1950000000.0) {
		tmp = t_1;
	} else if (a <= 3.15e+38) {
		tmp = x * ((y - a) / z);
	} else if (a <= 1e+136) {
		tmp = t / ((a - z) / (y - z));
	} 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 + (z * ((x - t) / a))
    if (a <= (-9d+142)) then
        tmp = t_2
    else if (a <= (-4.5d-178)) then
        tmp = t_1
    else if (a <= 6.8d-88) then
        tmp = t + (y * ((x - t) / z))
    else if (a <= 1950000000.0d0) then
        tmp = t_1
    else if (a <= 3.15d+38) then
        tmp = x * ((y - a) / z)
    else if (a <= 1d+136) then
        tmp = t / ((a - z) / (y - z))
    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 + (z * ((x - t) / a));
	double tmp;
	if (a <= -9e+142) {
		tmp = t_2;
	} else if (a <= -4.5e-178) {
		tmp = t_1;
	} else if (a <= 6.8e-88) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 1950000000.0) {
		tmp = t_1;
	} else if (a <= 3.15e+38) {
		tmp = x * ((y - a) / z);
	} else if (a <= 1e+136) {
		tmp = t / ((a - z) / (y - z));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + (z * ((x - t) / a))
	tmp = 0
	if a <= -9e+142:
		tmp = t_2
	elif a <= -4.5e-178:
		tmp = t_1
	elif a <= 6.8e-88:
		tmp = t + (y * ((x - t) / z))
	elif a <= 1950000000.0:
		tmp = t_1
	elif a <= 3.15e+38:
		tmp = x * ((y - a) / z)
	elif a <= 1e+136:
		tmp = t / ((a - z) / (y - z))
	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(z * Float64(Float64(x - t) / a)))
	tmp = 0.0
	if (a <= -9e+142)
		tmp = t_2;
	elseif (a <= -4.5e-178)
		tmp = t_1;
	elseif (a <= 6.8e-88)
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	elseif (a <= 1950000000.0)
		tmp = t_1;
	elseif (a <= 3.15e+38)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (a <= 1e+136)
		tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z)));
	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 + (z * ((x - t) / a));
	tmp = 0.0;
	if (a <= -9e+142)
		tmp = t_2;
	elseif (a <= -4.5e-178)
		tmp = t_1;
	elseif (a <= 6.8e-88)
		tmp = t + (y * ((x - t) / z));
	elseif (a <= 1950000000.0)
		tmp = t_1;
	elseif (a <= 3.15e+38)
		tmp = x * ((y - a) / z);
	elseif (a <= 1e+136)
		tmp = t / ((a - z) / (y - z));
	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[(z * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9e+142], t$95$2, If[LessEqual[a, -4.5e-178], t$95$1, If[LessEqual[a, 6.8e-88], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1950000000.0], t$95$1, If[LessEqual[a, 3.15e+38], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e+136], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -8.9999999999999998e142 or 1.00000000000000006e136 < a

    1. Initial program 67.9%

      \[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. *-commutative94.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.9999999999999998e142 < a < -4.49999999999999978e-178 or 6.79999999999999949e-88 < a < 1.95e9

    1. Initial program 67.9%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified79.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 58.5%

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

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

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

    if -4.49999999999999978e-178 < a < 6.79999999999999949e-88

    1. Initial program 61.6%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified66.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 83.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+83.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/83.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/83.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-neg83.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-sub83.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-neg83.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--83.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/83.7%

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

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

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

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

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

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

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

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

    if 1.95e9 < a < 3.15000000000000001e38

    1. Initial program 61.4%

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

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

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

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

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/56.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/56.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-neg56.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-sub56.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-neg56.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--56.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/56.0%

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

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

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

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

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

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

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

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

    if 3.15000000000000001e38 < a < 1.00000000000000006e136

    1. Initial program 69.5%

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    8. Step-by-step derivation
      1. remove-double-div60.3%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{1}{\frac{y - z}{a - z}}}} \]
      2. div-inv60.5%

        \[\leadsto \color{blue}{\frac{t}{\frac{1}{\frac{y - z}{a - z}}}} \]
      3. clear-num60.6%

        \[\leadsto \frac{t}{\color{blue}{\frac{a - z}{y - z}}} \]
    9. Applied egg-rr60.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{+142}:\\ \;\;\;\;x + z \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-178}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-88}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1950000000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 3.15 \cdot 10^{+38}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 10^{+136}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{x - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 64.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + z \cdot \frac{x - t}{a}\\ \mathbf{if}\;a \leq -8 \cdot 10^{+143}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-179}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-88}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 3300000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+31}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+135}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \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 (* z (/ (- x t) a)))))
   (if (<= a -8e+143)
     t_2
     (if (<= a -2.05e-179)
       t_1
       (if (<= a 4.2e-88)
         (+ t (* y (/ (- x t) z)))
         (if (<= a 3300000000.0)
           t_1
           (if (<= a 1.8e+31)
             (* x (+ (/ (- z y) (- a z)) 1.0))
             (if (<= a 1.45e+135) (/ t (/ (- a z) (- y z))) 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 + (z * ((x - t) / a));
	double tmp;
	if (a <= -8e+143) {
		tmp = t_2;
	} else if (a <= -2.05e-179) {
		tmp = t_1;
	} else if (a <= 4.2e-88) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 3300000000.0) {
		tmp = t_1;
	} else if (a <= 1.8e+31) {
		tmp = x * (((z - y) / (a - z)) + 1.0);
	} else if (a <= 1.45e+135) {
		tmp = t / ((a - z) / (y - z));
	} 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 + (z * ((x - t) / a))
    if (a <= (-8d+143)) then
        tmp = t_2
    else if (a <= (-2.05d-179)) then
        tmp = t_1
    else if (a <= 4.2d-88) then
        tmp = t + (y * ((x - t) / z))
    else if (a <= 3300000000.0d0) then
        tmp = t_1
    else if (a <= 1.8d+31) then
        tmp = x * (((z - y) / (a - z)) + 1.0d0)
    else if (a <= 1.45d+135) then
        tmp = t / ((a - z) / (y - z))
    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 + (z * ((x - t) / a));
	double tmp;
	if (a <= -8e+143) {
		tmp = t_2;
	} else if (a <= -2.05e-179) {
		tmp = t_1;
	} else if (a <= 4.2e-88) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 3300000000.0) {
		tmp = t_1;
	} else if (a <= 1.8e+31) {
		tmp = x * (((z - y) / (a - z)) + 1.0);
	} else if (a <= 1.45e+135) {
		tmp = t / ((a - z) / (y - z));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + (z * ((x - t) / a))
	tmp = 0
	if a <= -8e+143:
		tmp = t_2
	elif a <= -2.05e-179:
		tmp = t_1
	elif a <= 4.2e-88:
		tmp = t + (y * ((x - t) / z))
	elif a <= 3300000000.0:
		tmp = t_1
	elif a <= 1.8e+31:
		tmp = x * (((z - y) / (a - z)) + 1.0)
	elif a <= 1.45e+135:
		tmp = t / ((a - z) / (y - z))
	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(z * Float64(Float64(x - t) / a)))
	tmp = 0.0
	if (a <= -8e+143)
		tmp = t_2;
	elseif (a <= -2.05e-179)
		tmp = t_1;
	elseif (a <= 4.2e-88)
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	elseif (a <= 3300000000.0)
		tmp = t_1;
	elseif (a <= 1.8e+31)
		tmp = Float64(x * Float64(Float64(Float64(z - y) / Float64(a - z)) + 1.0));
	elseif (a <= 1.45e+135)
		tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z)));
	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 + (z * ((x - t) / a));
	tmp = 0.0;
	if (a <= -8e+143)
		tmp = t_2;
	elseif (a <= -2.05e-179)
		tmp = t_1;
	elseif (a <= 4.2e-88)
		tmp = t + (y * ((x - t) / z));
	elseif (a <= 3300000000.0)
		tmp = t_1;
	elseif (a <= 1.8e+31)
		tmp = x * (((z - y) / (a - z)) + 1.0);
	elseif (a <= 1.45e+135)
		tmp = t / ((a - z) / (y - z));
	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[(z * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8e+143], t$95$2, If[LessEqual[a, -2.05e-179], t$95$1, If[LessEqual[a, 4.2e-88], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3300000000.0], t$95$1, If[LessEqual[a, 1.8e+31], N[(x * N[(N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.45e+135], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.05 \cdot 10^{-179}:\\
\;\;\;\;t\_1\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -8.0000000000000002e143 or 1.4499999999999999e135 < a

    1. Initial program 67.9%

      \[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. *-commutative94.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000002e143 < a < -2.05e-179 or 4.1999999999999999e-88 < a < 3.3e9

    1. Initial program 67.2%

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

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

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

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

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

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

    if -2.05e-179 < a < 4.1999999999999999e-88

    1. Initial program 61.6%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified66.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 83.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+83.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/83.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/83.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-neg83.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-sub83.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-neg83.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--83.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/83.7%

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

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

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

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

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

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

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

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

    if 3.3e9 < a < 1.79999999999999998e31

    1. Initial program 72.3%

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

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

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

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

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

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

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

    if 1.79999999999999998e31 < a < 1.4499999999999999e135

    1. Initial program 67.6%

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    8. Step-by-step derivation
      1. remove-double-div59.3%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{1}{\frac{y - z}{a - z}}}} \]
      2. div-inv59.5%

        \[\leadsto \color{blue}{\frac{t}{\frac{1}{\frac{y - z}{a - z}}}} \]
      3. clear-num59.6%

        \[\leadsto \frac{t}{\color{blue}{\frac{a - z}{y - z}}} \]
    9. Applied egg-rr59.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{+143}:\\ \;\;\;\;x + z \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-179}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-88}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 3300000000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+31}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+135}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{x - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 35.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{z}\\ t_2 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;a \leq -3.9 \cdot 10^{+145}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-179}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-229}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-168}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-24}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+135}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ y z))) (t_2 (* t (/ y (- a z)))))
   (if (<= a -3.9e+145)
     x
     (if (<= a -8.6e-179)
       t_2
       (if (<= a 2.3e-229)
         t_1
         (if (<= a 8.2e-168)
           t_2
           (if (<= a 2.5e-88)
             t_1
             (if (<= a 2.4e-24) t_2 (if (<= a 1.1e+135) t x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double t_2 = t * (y / (a - z));
	double tmp;
	if (a <= -3.9e+145) {
		tmp = x;
	} else if (a <= -8.6e-179) {
		tmp = t_2;
	} else if (a <= 2.3e-229) {
		tmp = t_1;
	} else if (a <= 8.2e-168) {
		tmp = t_2;
	} else if (a <= 2.5e-88) {
		tmp = t_1;
	} else if (a <= 2.4e-24) {
		tmp = t_2;
	} else if (a <= 1.1e+135) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (y / z)
    t_2 = t * (y / (a - z))
    if (a <= (-3.9d+145)) then
        tmp = x
    else if (a <= (-8.6d-179)) then
        tmp = t_2
    else if (a <= 2.3d-229) then
        tmp = t_1
    else if (a <= 8.2d-168) then
        tmp = t_2
    else if (a <= 2.5d-88) then
        tmp = t_1
    else if (a <= 2.4d-24) then
        tmp = t_2
    else if (a <= 1.1d+135) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double t_2 = t * (y / (a - z));
	double tmp;
	if (a <= -3.9e+145) {
		tmp = x;
	} else if (a <= -8.6e-179) {
		tmp = t_2;
	} else if (a <= 2.3e-229) {
		tmp = t_1;
	} else if (a <= 8.2e-168) {
		tmp = t_2;
	} else if (a <= 2.5e-88) {
		tmp = t_1;
	} else if (a <= 2.4e-24) {
		tmp = t_2;
	} else if (a <= 1.1e+135) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (y / z)
	t_2 = t * (y / (a - z))
	tmp = 0
	if a <= -3.9e+145:
		tmp = x
	elif a <= -8.6e-179:
		tmp = t_2
	elif a <= 2.3e-229:
		tmp = t_1
	elif a <= 8.2e-168:
		tmp = t_2
	elif a <= 2.5e-88:
		tmp = t_1
	elif a <= 2.4e-24:
		tmp = t_2
	elif a <= 1.1e+135:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(y / z))
	t_2 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (a <= -3.9e+145)
		tmp = x;
	elseif (a <= -8.6e-179)
		tmp = t_2;
	elseif (a <= 2.3e-229)
		tmp = t_1;
	elseif (a <= 8.2e-168)
		tmp = t_2;
	elseif (a <= 2.5e-88)
		tmp = t_1;
	elseif (a <= 2.4e-24)
		tmp = t_2;
	elseif (a <= 1.1e+135)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (y / z);
	t_2 = t * (y / (a - z));
	tmp = 0.0;
	if (a <= -3.9e+145)
		tmp = x;
	elseif (a <= -8.6e-179)
		tmp = t_2;
	elseif (a <= 2.3e-229)
		tmp = t_1;
	elseif (a <= 8.2e-168)
		tmp = t_2;
	elseif (a <= 2.5e-88)
		tmp = t_1;
	elseif (a <= 2.4e-24)
		tmp = t_2;
	elseif (a <= 1.1e+135)
		tmp = t;
	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]}, Block[{t$95$2 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.9e+145], x, If[LessEqual[a, -8.6e-179], t$95$2, If[LessEqual[a, 2.3e-229], t$95$1, If[LessEqual[a, 8.2e-168], t$95$2, If[LessEqual[a, 2.5e-88], t$95$1, If[LessEqual[a, 2.4e-24], t$95$2, If[LessEqual[a, 1.1e+135], t, x]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq 2.3 \cdot 10^{-229}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 8.2 \cdot 10^{-168}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 2.4 \cdot 10^{-24}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{+135}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.8999999999999998e145 or 1.1e135 < a

    1. Initial program 67.9%

      \[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. Taylor expanded in a around inf 65.0%

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

    if -3.8999999999999998e145 < a < -8.60000000000000052e-179 or 2.29999999999999996e-229 < a < 8.1999999999999996e-168 or 2.50000000000000004e-88 < a < 2.3999999999999998e-24

    1. Initial program 68.9%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified78.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 58.1%

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

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

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

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

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

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

    if -8.60000000000000052e-179 < a < 2.29999999999999996e-229 or 8.1999999999999996e-168 < a < 2.50000000000000004e-88

    1. Initial program 60.9%

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

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

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

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

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

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

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

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

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

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

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

    if 2.3999999999999998e-24 < a < 1.1e135

    1. Initial program 62.6%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified74.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 29.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{+145}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-179}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-229}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-168}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-24}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+135}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 34.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{z}\\ t_2 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;a \leq -1.4 \cdot 10^{+144}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-177}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{-225}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-169}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{-88}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-25}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 10^{+135}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ y z))) (t_2 (* t (/ y (- a z)))))
   (if (<= a -1.4e+144)
     x
     (if (<= a -1.15e-177)
       (* t (/ (- y z) a))
       (if (<= a 1.32e-225)
         t_1
         (if (<= a 5.4e-169)
           t_2
           (if (<= a 1.95e-88)
             t_1
             (if (<= a 6.5e-25) t_2 (if (<= a 1e+135) t x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double t_2 = t * (y / (a - z));
	double tmp;
	if (a <= -1.4e+144) {
		tmp = x;
	} else if (a <= -1.15e-177) {
		tmp = t * ((y - z) / a);
	} else if (a <= 1.32e-225) {
		tmp = t_1;
	} else if (a <= 5.4e-169) {
		tmp = t_2;
	} else if (a <= 1.95e-88) {
		tmp = t_1;
	} else if (a <= 6.5e-25) {
		tmp = t_2;
	} else if (a <= 1e+135) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (y / z)
    t_2 = t * (y / (a - z))
    if (a <= (-1.4d+144)) then
        tmp = x
    else if (a <= (-1.15d-177)) then
        tmp = t * ((y - z) / a)
    else if (a <= 1.32d-225) then
        tmp = t_1
    else if (a <= 5.4d-169) then
        tmp = t_2
    else if (a <= 1.95d-88) then
        tmp = t_1
    else if (a <= 6.5d-25) then
        tmp = t_2
    else if (a <= 1d+135) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double t_2 = t * (y / (a - z));
	double tmp;
	if (a <= -1.4e+144) {
		tmp = x;
	} else if (a <= -1.15e-177) {
		tmp = t * ((y - z) / a);
	} else if (a <= 1.32e-225) {
		tmp = t_1;
	} else if (a <= 5.4e-169) {
		tmp = t_2;
	} else if (a <= 1.95e-88) {
		tmp = t_1;
	} else if (a <= 6.5e-25) {
		tmp = t_2;
	} else if (a <= 1e+135) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (y / z)
	t_2 = t * (y / (a - z))
	tmp = 0
	if a <= -1.4e+144:
		tmp = x
	elif a <= -1.15e-177:
		tmp = t * ((y - z) / a)
	elif a <= 1.32e-225:
		tmp = t_1
	elif a <= 5.4e-169:
		tmp = t_2
	elif a <= 1.95e-88:
		tmp = t_1
	elif a <= 6.5e-25:
		tmp = t_2
	elif a <= 1e+135:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(y / z))
	t_2 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (a <= -1.4e+144)
		tmp = x;
	elseif (a <= -1.15e-177)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (a <= 1.32e-225)
		tmp = t_1;
	elseif (a <= 5.4e-169)
		tmp = t_2;
	elseif (a <= 1.95e-88)
		tmp = t_1;
	elseif (a <= 6.5e-25)
		tmp = t_2;
	elseif (a <= 1e+135)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (y / z);
	t_2 = t * (y / (a - z));
	tmp = 0.0;
	if (a <= -1.4e+144)
		tmp = x;
	elseif (a <= -1.15e-177)
		tmp = t * ((y - z) / a);
	elseif (a <= 1.32e-225)
		tmp = t_1;
	elseif (a <= 5.4e-169)
		tmp = t_2;
	elseif (a <= 1.95e-88)
		tmp = t_1;
	elseif (a <= 6.5e-25)
		tmp = t_2;
	elseif (a <= 1e+135)
		tmp = t;
	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]}, Block[{t$95$2 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e+144], x, If[LessEqual[a, -1.15e-177], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.32e-225], t$95$1, If[LessEqual[a, 5.4e-169], t$95$2, If[LessEqual[a, 1.95e-88], t$95$1, If[LessEqual[a, 6.5e-25], t$95$2, If[LessEqual[a, 1e+135], t, x]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;a \leq 5.4 \cdot 10^{-169}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 1.95 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 6.5 \cdot 10^{-25}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.40000000000000003e144 or 9.99999999999999962e134 < a

    1. Initial program 67.9%

      \[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. Taylor expanded in a around inf 65.0%

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

    if -1.40000000000000003e144 < a < -1.15000000000000011e-177

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

    if -1.15000000000000011e-177 < a < 1.32e-225 or 5.4000000000000003e-169 < a < 1.94999999999999996e-88

    1. Initial program 60.9%

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

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

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

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

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

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

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

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

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

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

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

    if 1.32e-225 < a < 5.4000000000000003e-169 or 1.94999999999999996e-88 < a < 6.5e-25

    1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

    if 6.5e-25 < a < 9.99999999999999962e134

    1. Initial program 62.6%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified74.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 29.5%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification48.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+144}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-177}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{-225}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-169}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 10^{+135}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 72.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + \frac{x - t}{\frac{a}{z - y}}\\ \mathbf{if}\;a \leq -0.105:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-178}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-88}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 14000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+38}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \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 (/ (- x t) (/ a (- z y))))))
   (if (<= a -0.105)
     t_2
     (if (<= a -4.5e-178)
       t_1
       (if (<= a 4.4e-88)
         (+ t (* y (/ (- x t) z)))
         (if (<= a 14000000000.0)
           t_1
           (if (<= a 3.1e+38) (* x (+ (/ (- z y) (- a z)) 1.0)) 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 + ((x - t) / (a / (z - y)));
	double tmp;
	if (a <= -0.105) {
		tmp = t_2;
	} else if (a <= -4.5e-178) {
		tmp = t_1;
	} else if (a <= 4.4e-88) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 14000000000.0) {
		tmp = t_1;
	} else if (a <= 3.1e+38) {
		tmp = x * (((z - y) / (a - z)) + 1.0);
	} 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 + ((x - t) / (a / (z - y)))
    if (a <= (-0.105d0)) then
        tmp = t_2
    else if (a <= (-4.5d-178)) then
        tmp = t_1
    else if (a <= 4.4d-88) then
        tmp = t + (y * ((x - t) / z))
    else if (a <= 14000000000.0d0) then
        tmp = t_1
    else if (a <= 3.1d+38) then
        tmp = x * (((z - y) / (a - z)) + 1.0d0)
    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 + ((x - t) / (a / (z - y)));
	double tmp;
	if (a <= -0.105) {
		tmp = t_2;
	} else if (a <= -4.5e-178) {
		tmp = t_1;
	} else if (a <= 4.4e-88) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 14000000000.0) {
		tmp = t_1;
	} else if (a <= 3.1e+38) {
		tmp = x * (((z - y) / (a - z)) + 1.0);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + ((x - t) / (a / (z - y)))
	tmp = 0
	if a <= -0.105:
		tmp = t_2
	elif a <= -4.5e-178:
		tmp = t_1
	elif a <= 4.4e-88:
		tmp = t + (y * ((x - t) / z))
	elif a <= 14000000000.0:
		tmp = t_1
	elif a <= 3.1e+38:
		tmp = x * (((z - y) / (a - z)) + 1.0)
	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(Float64(x - t) / Float64(a / Float64(z - y))))
	tmp = 0.0
	if (a <= -0.105)
		tmp = t_2;
	elseif (a <= -4.5e-178)
		tmp = t_1;
	elseif (a <= 4.4e-88)
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	elseif (a <= 14000000000.0)
		tmp = t_1;
	elseif (a <= 3.1e+38)
		tmp = Float64(x * Float64(Float64(Float64(z - y) / Float64(a - z)) + 1.0));
	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 + ((x - t) / (a / (z - y)));
	tmp = 0.0;
	if (a <= -0.105)
		tmp = t_2;
	elseif (a <= -4.5e-178)
		tmp = t_1;
	elseif (a <= 4.4e-88)
		tmp = t + (y * ((x - t) / z));
	elseif (a <= 14000000000.0)
		tmp = t_1;
	elseif (a <= 3.1e+38)
		tmp = x * (((z - y) / (a - z)) + 1.0);
	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[(N[(x - t), $MachinePrecision] / N[(a / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.105], t$95$2, If[LessEqual[a, -4.5e-178], t$95$1, If[LessEqual[a, 4.4e-88], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 14000000000.0], t$95$1, If[LessEqual[a, 3.1e+38], N[(x * N[(N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -0.104999999999999996 or 3.10000000000000018e38 < a

    1. Initial program 68.6%

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

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

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

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

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

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

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

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

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

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

    if -0.104999999999999996 < a < -4.49999999999999978e-178 or 4.4000000000000001e-88 < a < 1.4e10

    1. Initial program 65.7%

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

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

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

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

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

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

    if -4.49999999999999978e-178 < a < 4.4000000000000001e-88

    1. Initial program 61.6%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified66.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 83.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+83.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/83.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/83.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-neg83.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-sub83.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-neg83.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--83.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/83.7%

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

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

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

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

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

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

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

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

    if 1.4e10 < a < 3.10000000000000018e38

    1. Initial program 67.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.105:\\ \;\;\;\;x + \frac{x - t}{\frac{a}{z - y}}\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-178}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-88}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 14000000000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+38}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{x - t}{\frac{a}{z - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 73.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + \frac{x - t}{\frac{a}{z - y}}\\ \mathbf{if}\;a \leq -7 \cdot 10^{-5}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-177}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-88}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 2150000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+105}:\\ \;\;\;\;x - \frac{x - t}{\frac{a - z}{y}}\\ \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 (/ (- x t) (/ a (- z y))))))
   (if (<= a -7e-5)
     t_2
     (if (<= a -1.1e-177)
       t_1
       (if (<= a 3.2e-88)
         (+ t (* y (/ (- x t) z)))
         (if (<= a 2150000000.0)
           t_1
           (if (<= a 9.5e+105) (- x (/ (- x t) (/ (- a z) y))) 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 + ((x - t) / (a / (z - y)));
	double tmp;
	if (a <= -7e-5) {
		tmp = t_2;
	} else if (a <= -1.1e-177) {
		tmp = t_1;
	} else if (a <= 3.2e-88) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 2150000000.0) {
		tmp = t_1;
	} else if (a <= 9.5e+105) {
		tmp = x - ((x - t) / ((a - z) / y));
	} 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 + ((x - t) / (a / (z - y)))
    if (a <= (-7d-5)) then
        tmp = t_2
    else if (a <= (-1.1d-177)) then
        tmp = t_1
    else if (a <= 3.2d-88) then
        tmp = t + (y * ((x - t) / z))
    else if (a <= 2150000000.0d0) then
        tmp = t_1
    else if (a <= 9.5d+105) then
        tmp = x - ((x - t) / ((a - z) / y))
    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 + ((x - t) / (a / (z - y)));
	double tmp;
	if (a <= -7e-5) {
		tmp = t_2;
	} else if (a <= -1.1e-177) {
		tmp = t_1;
	} else if (a <= 3.2e-88) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 2150000000.0) {
		tmp = t_1;
	} else if (a <= 9.5e+105) {
		tmp = x - ((x - t) / ((a - z) / y));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + ((x - t) / (a / (z - y)))
	tmp = 0
	if a <= -7e-5:
		tmp = t_2
	elif a <= -1.1e-177:
		tmp = t_1
	elif a <= 3.2e-88:
		tmp = t + (y * ((x - t) / z))
	elif a <= 2150000000.0:
		tmp = t_1
	elif a <= 9.5e+105:
		tmp = x - ((x - t) / ((a - z) / y))
	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(Float64(x - t) / Float64(a / Float64(z - y))))
	tmp = 0.0
	if (a <= -7e-5)
		tmp = t_2;
	elseif (a <= -1.1e-177)
		tmp = t_1;
	elseif (a <= 3.2e-88)
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	elseif (a <= 2150000000.0)
		tmp = t_1;
	elseif (a <= 9.5e+105)
		tmp = Float64(x - Float64(Float64(x - t) / Float64(Float64(a - z) / y)));
	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 + ((x - t) / (a / (z - y)));
	tmp = 0.0;
	if (a <= -7e-5)
		tmp = t_2;
	elseif (a <= -1.1e-177)
		tmp = t_1;
	elseif (a <= 3.2e-88)
		tmp = t + (y * ((x - t) / z));
	elseif (a <= 2150000000.0)
		tmp = t_1;
	elseif (a <= 9.5e+105)
		tmp = x - ((x - t) / ((a - z) / y));
	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[(N[(x - t), $MachinePrecision] / N[(a / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7e-5], t$95$2, If[LessEqual[a, -1.1e-177], t$95$1, If[LessEqual[a, 3.2e-88], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2150000000.0], t$95$1, If[LessEqual[a, 9.5e+105], N[(x - N[(N[(x - t), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.1 \cdot 10^{-177}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -6.9999999999999994e-5 or 9.4999999999999995e105 < a

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

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

    if -6.9999999999999994e-5 < a < -1.10000000000000006e-177 or 3.20000000000000012e-88 < a < 2.15e9

    1. Initial program 65.7%

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

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

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

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

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

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

    if -1.10000000000000006e-177 < a < 3.20000000000000012e-88

    1. Initial program 61.6%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified66.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 83.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+83.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/83.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/83.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-neg83.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-sub83.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-neg83.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--83.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/83.7%

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

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

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

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

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

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

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

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

    if 2.15e9 < a < 9.4999999999999995e105

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{-5}:\\ \;\;\;\;x + \frac{x - t}{\frac{a}{z - y}}\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-177}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-88}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 2150000000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+105}:\\ \;\;\;\;x - \frac{x - t}{\frac{a - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{x - t}{\frac{a}{z - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 73.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + \frac{x - t}{\frac{a}{z - y}}\\ \mathbf{if}\;a \leq -0.055:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-179}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-88}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;a \leq 3200000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+106}:\\ \;\;\;\;x - \frac{x - t}{\frac{a - z}{y}}\\ \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 (/ (- x t) (/ a (- z y))))))
   (if (<= a -0.055)
     t_2
     (if (<= a -2.6e-179)
       t_1
       (if (<= a 1.7e-88)
         (+ t (/ (* (- t x) (- a y)) z))
         (if (<= a 3200000000.0)
           t_1
           (if (<= a 7e+106) (- x (/ (- x t) (/ (- a z) y))) 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 + ((x - t) / (a / (z - y)));
	double tmp;
	if (a <= -0.055) {
		tmp = t_2;
	} else if (a <= -2.6e-179) {
		tmp = t_1;
	} else if (a <= 1.7e-88) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else if (a <= 3200000000.0) {
		tmp = t_1;
	} else if (a <= 7e+106) {
		tmp = x - ((x - t) / ((a - z) / y));
	} 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 + ((x - t) / (a / (z - y)))
    if (a <= (-0.055d0)) then
        tmp = t_2
    else if (a <= (-2.6d-179)) then
        tmp = t_1
    else if (a <= 1.7d-88) then
        tmp = t + (((t - x) * (a - y)) / z)
    else if (a <= 3200000000.0d0) then
        tmp = t_1
    else if (a <= 7d+106) then
        tmp = x - ((x - t) / ((a - z) / y))
    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 + ((x - t) / (a / (z - y)));
	double tmp;
	if (a <= -0.055) {
		tmp = t_2;
	} else if (a <= -2.6e-179) {
		tmp = t_1;
	} else if (a <= 1.7e-88) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else if (a <= 3200000000.0) {
		tmp = t_1;
	} else if (a <= 7e+106) {
		tmp = x - ((x - t) / ((a - z) / y));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + ((x - t) / (a / (z - y)))
	tmp = 0
	if a <= -0.055:
		tmp = t_2
	elif a <= -2.6e-179:
		tmp = t_1
	elif a <= 1.7e-88:
		tmp = t + (((t - x) * (a - y)) / z)
	elif a <= 3200000000.0:
		tmp = t_1
	elif a <= 7e+106:
		tmp = x - ((x - t) / ((a - z) / y))
	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(Float64(x - t) / Float64(a / Float64(z - y))))
	tmp = 0.0
	if (a <= -0.055)
		tmp = t_2;
	elseif (a <= -2.6e-179)
		tmp = t_1;
	elseif (a <= 1.7e-88)
		tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z));
	elseif (a <= 3200000000.0)
		tmp = t_1;
	elseif (a <= 7e+106)
		tmp = Float64(x - Float64(Float64(x - t) / Float64(Float64(a - z) / y)));
	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 + ((x - t) / (a / (z - y)));
	tmp = 0.0;
	if (a <= -0.055)
		tmp = t_2;
	elseif (a <= -2.6e-179)
		tmp = t_1;
	elseif (a <= 1.7e-88)
		tmp = t + (((t - x) * (a - y)) / z);
	elseif (a <= 3200000000.0)
		tmp = t_1;
	elseif (a <= 7e+106)
		tmp = x - ((x - t) / ((a - z) / y));
	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[(N[(x - t), $MachinePrecision] / N[(a / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.055], t$95$2, If[LessEqual[a, -2.6e-179], t$95$1, If[LessEqual[a, 1.7e-88], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3200000000.0], t$95$1, If[LessEqual[a, 7e+106], N[(x - N[(N[(x - t), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -0.0550000000000000003 or 6.99999999999999962e106 < a

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

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

    if -0.0550000000000000003 < a < -2.60000000000000005e-179 or 1.69999999999999987e-88 < a < 3.2e9

    1. Initial program 65.7%

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

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

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

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

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

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

    if -2.60000000000000005e-179 < a < 1.69999999999999987e-88

    1. Initial program 61.6%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified66.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 83.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+83.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/83.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/83.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-neg83.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-sub83.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-neg83.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--83.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/83.7%

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

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

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

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

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

    if 3.2e9 < a < 6.99999999999999962e106

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.055:\\ \;\;\;\;x + \frac{x - t}{\frac{a}{z - y}}\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-179}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-88}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;a \leq 3200000000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+106}:\\ \;\;\;\;x - \frac{x - t}{\frac{a - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{x - t}{\frac{a}{z - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 64.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := t + y \cdot \frac{x - t}{z}\\ \mathbf{if}\;a \leq -7.2 \cdot 10^{+129}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-179}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-88}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+112}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ t (* y (/ (- x t) z)))))
   (if (<= a -7.2e+129)
     (+ x (/ (* y (- t x)) a))
     (if (<= a -2.6e-179)
       t_1
       (if (<= a 6.8e-88)
         t_2
         (if (<= a 2.1e+14)
           t_1
           (if (<= a 9.5e+112) t_2 (+ x (* t (/ y a))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = t + (y * ((x - t) / z));
	double tmp;
	if (a <= -7.2e+129) {
		tmp = x + ((y * (t - x)) / a);
	} else if (a <= -2.6e-179) {
		tmp = t_1;
	} else if (a <= 6.8e-88) {
		tmp = t_2;
	} else if (a <= 2.1e+14) {
		tmp = t_1;
	} else if (a <= 9.5e+112) {
		tmp = t_2;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = t + (y * ((x - t) / z))
    if (a <= (-7.2d+129)) then
        tmp = x + ((y * (t - x)) / a)
    else if (a <= (-2.6d-179)) then
        tmp = t_1
    else if (a <= 6.8d-88) then
        tmp = t_2
    else if (a <= 2.1d+14) then
        tmp = t_1
    else if (a <= 9.5d+112) then
        tmp = t_2
    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 t_1 = t * ((y - z) / (a - z));
	double t_2 = t + (y * ((x - t) / z));
	double tmp;
	if (a <= -7.2e+129) {
		tmp = x + ((y * (t - x)) / a);
	} else if (a <= -2.6e-179) {
		tmp = t_1;
	} else if (a <= 6.8e-88) {
		tmp = t_2;
	} else if (a <= 2.1e+14) {
		tmp = t_1;
	} else if (a <= 9.5e+112) {
		tmp = t_2;
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = t + (y * ((x - t) / z))
	tmp = 0
	if a <= -7.2e+129:
		tmp = x + ((y * (t - x)) / a)
	elif a <= -2.6e-179:
		tmp = t_1
	elif a <= 6.8e-88:
		tmp = t_2
	elif a <= 2.1e+14:
		tmp = t_1
	elif a <= 9.5e+112:
		tmp = t_2
	else:
		tmp = x + (t * (y / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(t + Float64(y * Float64(Float64(x - t) / z)))
	tmp = 0.0
	if (a <= -7.2e+129)
		tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a));
	elseif (a <= -2.6e-179)
		tmp = t_1;
	elseif (a <= 6.8e-88)
		tmp = t_2;
	elseif (a <= 2.1e+14)
		tmp = t_1;
	elseif (a <= 9.5e+112)
		tmp = t_2;
	else
		tmp = Float64(x + Float64(t * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = t + (y * ((x - t) / z));
	tmp = 0.0;
	if (a <= -7.2e+129)
		tmp = x + ((y * (t - x)) / a);
	elseif (a <= -2.6e-179)
		tmp = t_1;
	elseif (a <= 6.8e-88)
		tmp = t_2;
	elseif (a <= 2.1e+14)
		tmp = t_1;
	elseif (a <= 9.5e+112)
		tmp = t_2;
	else
		tmp = x + (t * (y / a));
	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[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.2e+129], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.6e-179], t$95$1, If[LessEqual[a, 6.8e-88], t$95$2, If[LessEqual[a, 2.1e+14], t$95$1, If[LessEqual[a, 9.5e+112], t$95$2, N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq 6.8 \cdot 10^{-88}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 2.1 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 9.5 \cdot 10^{+112}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.2000000000000002e129

    1. Initial program 72.7%

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

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

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

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

    if -7.2000000000000002e129 < a < -2.60000000000000005e-179 or 6.79999999999999949e-88 < a < 2.1e14

    1. Initial program 67.9%

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

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

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

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

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

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

    if -2.60000000000000005e-179 < a < 6.79999999999999949e-88 or 2.1e14 < a < 9.5000000000000008e112

    1. Initial program 63.0%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified67.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.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+75.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/75.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/75.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-neg75.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-sub75.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-neg75.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--75.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/75.6%

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

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

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

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

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

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

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

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

    if 9.5000000000000008e112 < a

    1. Initial program 63.4%

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified68.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+129}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-179}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-88}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+14}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+112}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 63.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + z \cdot \frac{x - t}{a}\\ \mathbf{if}\;a \leq -1.5 \cdot 10^{+144}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-177}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-88}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 13600000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+129}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \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 (* z (/ (- x t) a)))))
   (if (<= a -1.5e+144)
     t_2
     (if (<= a -1.2e-177)
       t_1
       (if (<= a 6.8e-88)
         (+ t (* y (/ (- x t) z)))
         (if (<= a 13600000000.0)
           t_1
           (if (<= a 9.2e+129) (* y (/ (- t x) (- a z))) 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 + (z * ((x - t) / a));
	double tmp;
	if (a <= -1.5e+144) {
		tmp = t_2;
	} else if (a <= -1.2e-177) {
		tmp = t_1;
	} else if (a <= 6.8e-88) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 13600000000.0) {
		tmp = t_1;
	} else if (a <= 9.2e+129) {
		tmp = y * ((t - x) / (a - z));
	} 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 + (z * ((x - t) / a))
    if (a <= (-1.5d+144)) then
        tmp = t_2
    else if (a <= (-1.2d-177)) then
        tmp = t_1
    else if (a <= 6.8d-88) then
        tmp = t + (y * ((x - t) / z))
    else if (a <= 13600000000.0d0) then
        tmp = t_1
    else if (a <= 9.2d+129) then
        tmp = y * ((t - x) / (a - z))
    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 + (z * ((x - t) / a));
	double tmp;
	if (a <= -1.5e+144) {
		tmp = t_2;
	} else if (a <= -1.2e-177) {
		tmp = t_1;
	} else if (a <= 6.8e-88) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 13600000000.0) {
		tmp = t_1;
	} else if (a <= 9.2e+129) {
		tmp = y * ((t - x) / (a - z));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + (z * ((x - t) / a))
	tmp = 0
	if a <= -1.5e+144:
		tmp = t_2
	elif a <= -1.2e-177:
		tmp = t_1
	elif a <= 6.8e-88:
		tmp = t + (y * ((x - t) / z))
	elif a <= 13600000000.0:
		tmp = t_1
	elif a <= 9.2e+129:
		tmp = y * ((t - x) / (a - z))
	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(z * Float64(Float64(x - t) / a)))
	tmp = 0.0
	if (a <= -1.5e+144)
		tmp = t_2;
	elseif (a <= -1.2e-177)
		tmp = t_1;
	elseif (a <= 6.8e-88)
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	elseif (a <= 13600000000.0)
		tmp = t_1;
	elseif (a <= 9.2e+129)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	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 + (z * ((x - t) / a));
	tmp = 0.0;
	if (a <= -1.5e+144)
		tmp = t_2;
	elseif (a <= -1.2e-177)
		tmp = t_1;
	elseif (a <= 6.8e-88)
		tmp = t + (y * ((x - t) / z));
	elseif (a <= 13600000000.0)
		tmp = t_1;
	elseif (a <= 9.2e+129)
		tmp = y * ((t - x) / (a - z));
	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[(z * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.5e+144], t$95$2, If[LessEqual[a, -1.2e-177], t$95$1, If[LessEqual[a, 6.8e-88], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 13600000000.0], t$95$1, If[LessEqual[a, 9.2e+129], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-177}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.49999999999999995e144 or 9.19999999999999961e129 < a

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{z \cdot \frac{t - x}{a}} \]
    10. Simplified75.3%

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

    if -1.49999999999999995e144 < a < -1.1999999999999999e-177 or 6.79999999999999949e-88 < a < 1.36e10

    1. Initial program 67.2%

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

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

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

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

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

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

    if -1.1999999999999999e-177 < a < 6.79999999999999949e-88

    1. Initial program 61.6%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified66.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 83.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+83.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/83.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/83.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-neg83.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-sub83.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-neg83.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--83.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/83.7%

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

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

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

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

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

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

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

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

    if 1.36e10 < a < 9.19999999999999961e129

    1. Initial program 67.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.5 \cdot 10^{+144}:\\ \;\;\;\;x + z \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-177}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-88}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 13600000000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+129}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{x - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 35.3% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq 6.2 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 7.6 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.39999999999999999e143 or 7.59999999999999997e134 < a

    1. Initial program 67.9%

      \[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. Taylor expanded in a around inf 65.0%

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

    if -1.39999999999999999e143 < a < -1.1999999999999999e-177

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

    if -1.1999999999999999e-177 < a < 6.1999999999999995e-88 or 7.4000000000000003e-6 < a < 7.59999999999999997e134

    1. Initial program 62.4%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified68.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 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.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-neg73.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--73.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/73.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    10. Simplified43.7%

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

    if 6.1999999999999995e-88 < a < 7.4000000000000003e-6

    1. Initial program 70.8%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified82.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 70.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+143}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-177}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{-6}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{+134}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 68.5% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.19999999999999968e-108 or 1.22e39 < a

    1. Initial program 68.6%

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

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

    if -5.19999999999999968e-108 < a < 6.79999999999999949e-88

    1. Initial program 61.7%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 79.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+79.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/79.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/79.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-neg79.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-sub81.3%

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

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

        \[\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/81.3%

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

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

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

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

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

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

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

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

    if 6.79999999999999949e-88 < a < 3.2e9

    1. Initial program 63.6%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified78.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 63.2%

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

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

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

    if 3.2e9 < a < 1.22e39

    1. Initial program 67.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.2 \cdot 10^{-108}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-88}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 3200000000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{+39}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 57.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x - x \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -2.2 \cdot 10^{+131}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-135}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.7 \cdot 10^{-89}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+134}:\\ \;\;\;\;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 (* x (/ y a)))))
   (if (<= a -2.2e+131)
     t_2
     (if (<= a 1.7e-135)
       t_1
       (if (<= a 5.7e-89) (* x (/ (- y a) z)) (if (<= a 8.5e+134) 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 - (x * (y / a));
	double tmp;
	if (a <= -2.2e+131) {
		tmp = t_2;
	} else if (a <= 1.7e-135) {
		tmp = t_1;
	} else if (a <= 5.7e-89) {
		tmp = x * ((y - a) / z);
	} else if (a <= 8.5e+134) {
		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 - (x * (y / a))
    if (a <= (-2.2d+131)) then
        tmp = t_2
    else if (a <= 1.7d-135) then
        tmp = t_1
    else if (a <= 5.7d-89) then
        tmp = x * ((y - a) / z)
    else if (a <= 8.5d+134) 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 - (x * (y / a));
	double tmp;
	if (a <= -2.2e+131) {
		tmp = t_2;
	} else if (a <= 1.7e-135) {
		tmp = t_1;
	} else if (a <= 5.7e-89) {
		tmp = x * ((y - a) / z);
	} else if (a <= 8.5e+134) {
		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 - (x * (y / a))
	tmp = 0
	if a <= -2.2e+131:
		tmp = t_2
	elif a <= 1.7e-135:
		tmp = t_1
	elif a <= 5.7e-89:
		tmp = x * ((y - a) / z)
	elif a <= 8.5e+134:
		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(x * Float64(y / a)))
	tmp = 0.0
	if (a <= -2.2e+131)
		tmp = t_2;
	elseif (a <= 1.7e-135)
		tmp = t_1;
	elseif (a <= 5.7e-89)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (a <= 8.5e+134)
		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 - (x * (y / a));
	tmp = 0.0;
	if (a <= -2.2e+131)
		tmp = t_2;
	elseif (a <= 1.7e-135)
		tmp = t_1;
	elseif (a <= 5.7e-89)
		tmp = x * ((y - a) / z);
	elseif (a <= 8.5e+134)
		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[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.2e+131], t$95$2, If[LessEqual[a, 1.7e-135], t$95$1, If[LessEqual[a, 5.7e-89], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e+134], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 1.7 \cdot 10^{-135}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.1999999999999999e131 or 8.50000000000000024e134 < a

    1. Initial program 67.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{x \cdot y}{a}} \]
      3. associate-/l*71.2%

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

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

    if -2.1999999999999999e131 < a < 1.69999999999999995e-135 or 5.7000000000000002e-89 < a < 8.50000000000000024e134

    1. Initial program 66.1%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified74.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 50.4%

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

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

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

    if 1.69999999999999995e-135 < a < 5.7000000000000002e-89

    1. Initial program 56.7%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 82.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+82.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/82.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/82.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-neg82.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-sub82.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-neg82.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--82.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/82.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    10. Simplified73.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{+131}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-135}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 5.7 \cdot 10^{-89}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+134}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 52.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+178}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -4.2 \cdot 10^{+51} \lor \neg \left(z \leq -3.4 \cdot 10^{-52}\right) \land z \leq 9.5 \cdot 10^{+39}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


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

    1. Initial program 30.9%

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

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

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

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

    if -1.09999999999999999e178 < z < -4.2000000000000002e51 or -3.40000000000000017e-52 < z < 9.50000000000000011e39

    1. Initial program 77.7%

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

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

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

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

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

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

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

    if -4.2000000000000002e51 < z < -3.40000000000000017e-52 or 9.50000000000000011e39 < z

    1. Initial program 55.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    9. Step-by-step derivation
      1. mul-1-neg36.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+178}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{+51} \lor \neg \left(z \leq -3.4 \cdot 10^{-52}\right) \land z \leq 9.5 \cdot 10^{+39}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 51.1% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.12000000000000001e178 or 1.8999999999999999e194 < z

    1. Initial program 29.9%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified61.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 60.1%

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

    if -1.12000000000000001e178 < z < 2.5999999999999999e44 or 1.00000000000000001e78 < z < 1.8999999999999999e194

    1. Initial program 75.1%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified85.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 49.7%

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified49.1%

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

    if 2.5999999999999999e44 < z < 1.00000000000000001e78

    1. Initial program 64.1%

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

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

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

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

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

        \[\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/76.3%

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

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

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

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

        \[\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/76.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    10. Simplified63.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{+178}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+44}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 10^{+78}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+194}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 51.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+178}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+44}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+77}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+194}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.15e+178)
   t
   (if (<= z 2.2e+44)
     (+ x (* t (/ y a)))
     (if (<= z 9.5e+77)
       (* x (/ (- y a) z))
       (if (<= z 1.9e+194) (+ x (/ t (/ a y))) t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.15e+178) {
		tmp = t;
	} else if (z <= 2.2e+44) {
		tmp = x + (t * (y / a));
	} else if (z <= 9.5e+77) {
		tmp = x * ((y - a) / z);
	} else if (z <= 1.9e+194) {
		tmp = x + (t / (a / y));
	} 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 <= (-1.15d+178)) then
        tmp = t
    else if (z <= 2.2d+44) then
        tmp = x + (t * (y / a))
    else if (z <= 9.5d+77) then
        tmp = x * ((y - a) / z)
    else if (z <= 1.9d+194) then
        tmp = x + (t / (a / y))
    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 <= -1.15e+178) {
		tmp = t;
	} else if (z <= 2.2e+44) {
		tmp = x + (t * (y / a));
	} else if (z <= 9.5e+77) {
		tmp = x * ((y - a) / z);
	} else if (z <= 1.9e+194) {
		tmp = x + (t / (a / y));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.15e+178:
		tmp = t
	elif z <= 2.2e+44:
		tmp = x + (t * (y / a))
	elif z <= 9.5e+77:
		tmp = x * ((y - a) / z)
	elif z <= 1.9e+194:
		tmp = x + (t / (a / y))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.15e+178)
		tmp = t;
	elseif (z <= 2.2e+44)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	elseif (z <= 9.5e+77)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= 1.9e+194)
		tmp = Float64(x + Float64(t / Float64(a / y)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.15e+178)
		tmp = t;
	elseif (z <= 2.2e+44)
		tmp = x + (t * (y / a));
	elseif (z <= 9.5e+77)
		tmp = x * ((y - a) / z);
	elseif (z <= 1.9e+194)
		tmp = x + (t / (a / y));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+178], t, If[LessEqual[z, 2.2e+44], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+77], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+194], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+178}:\\
\;\;\;\;t\\

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

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

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+194}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.15e178 or 1.8999999999999999e194 < z

    1. Initial program 29.9%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified61.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 60.1%

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

    if -1.15e178 < z < 2.19999999999999996e44

    1. Initial program 78.3%

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified51.7%

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

    if 2.19999999999999996e44 < z < 9.4999999999999998e77

    1. Initial program 64.1%

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

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

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

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

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

        \[\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/76.3%

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

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

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

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

        \[\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/76.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    10. Simplified63.7%

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

    if 9.4999999999999998e77 < z < 1.8999999999999999e194

    1. Initial program 56.9%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    9. Step-by-step derivation
      1. clear-num33.6%

        \[\leadsto x + t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. un-div-inv33.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+178}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+44}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+77}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+194}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 53.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{z - y}{z}\\ t_2 := x + t \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -0.22:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-184}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.7 \cdot 10^{-89}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{+84}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- z y) z))) (t_2 (+ x (* t (/ y a)))))
   (if (<= a -0.22)
     t_2
     (if (<= a 4.5e-184)
       t_1
       (if (<= a 5.7e-89) (* x (/ (- y a) z)) (if (<= a 7.2e+84) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((z - y) / z);
	double t_2 = x + (t * (y / a));
	double tmp;
	if (a <= -0.22) {
		tmp = t_2;
	} else if (a <= 4.5e-184) {
		tmp = t_1;
	} else if (a <= 5.7e-89) {
		tmp = x * ((y - a) / z);
	} else if (a <= 7.2e+84) {
		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 * ((z - y) / z)
    t_2 = x + (t * (y / a))
    if (a <= (-0.22d0)) then
        tmp = t_2
    else if (a <= 4.5d-184) then
        tmp = t_1
    else if (a <= 5.7d-89) then
        tmp = x * ((y - a) / z)
    else if (a <= 7.2d+84) 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 * ((z - y) / z);
	double t_2 = x + (t * (y / a));
	double tmp;
	if (a <= -0.22) {
		tmp = t_2;
	} else if (a <= 4.5e-184) {
		tmp = t_1;
	} else if (a <= 5.7e-89) {
		tmp = x * ((y - a) / z);
	} else if (a <= 7.2e+84) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((z - y) / z)
	t_2 = x + (t * (y / a))
	tmp = 0
	if a <= -0.22:
		tmp = t_2
	elif a <= 4.5e-184:
		tmp = t_1
	elif a <= 5.7e-89:
		tmp = x * ((y - a) / z)
	elif a <= 7.2e+84:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(z - y) / z))
	t_2 = Float64(x + Float64(t * Float64(y / a)))
	tmp = 0.0
	if (a <= -0.22)
		tmp = t_2;
	elseif (a <= 4.5e-184)
		tmp = t_1;
	elseif (a <= 5.7e-89)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (a <= 7.2e+84)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((z - y) / z);
	t_2 = x + (t * (y / a));
	tmp = 0.0;
	if (a <= -0.22)
		tmp = t_2;
	elseif (a <= 4.5e-184)
		tmp = t_1;
	elseif (a <= 5.7e-89)
		tmp = x * ((y - a) / z);
	elseif (a <= 7.2e+84)
		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[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.22], t$95$2, If[LessEqual[a, 4.5e-184], t$95$1, If[LessEqual[a, 5.7e-89], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.2e+84], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;a \leq 7.2 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -0.220000000000000001 or 7.1999999999999999e84 < a

    1. Initial program 67.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified61.6%

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

    if -0.220000000000000001 < a < 4.5000000000000001e-184 or 5.7000000000000002e-89 < a < 7.1999999999999999e84

    1. Initial program 66.3%

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

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

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

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

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

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

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

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

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

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

    if 4.5000000000000001e-184 < a < 5.7000000000000002e-89

    1. Initial program 58.3%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified66.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 70.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+70.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/70.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/70.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-neg70.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-sub71.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-neg71.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--71.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/71.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    10. Simplified53.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.22:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-184}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 5.7 \cdot 10^{-89}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{+84}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 60.7% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.8e60 or 2.79999999999999996e166 < x

    1. Initial program 46.6%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified71.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 51.3%

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

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

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

        \[\leadsto \color{blue}{x - \frac{x \cdot y}{a}} \]
      3. associate-/l*58.1%

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

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

    if -4.8e60 < x < 1.0000000000000001e44

    1. Initial program 78.9%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified86.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 55.1%

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

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

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

    if 1.0000000000000001e44 < x < 2.79999999999999996e166

    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*73.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.8 \cdot 10^{+60}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq 10^{+44}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{+166}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 83.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{-177} \lor \neg \left(a \leq 4 \cdot 10^{-73}\right):\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \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.2e-177) (not (<= a 4e-73)))
   (+ x (* (- y z) (/ (- t x) (- a z))))
   (+ t (* y (/ (- x t) z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -1.2e-177) || !(a <= 4e-73)) {
		tmp = x + ((y - z) * ((t - x) / (a - z)));
	} 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.2d-177)) .or. (.not. (a <= 4d-73))) then
        tmp = x + ((y - z) * ((t - x) / (a - z)))
    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.2e-177) || !(a <= 4e-73)) {
		tmp = x + ((y - z) * ((t - x) / (a - z)));
	} else {
		tmp = t + (y * ((x - t) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -1.2e-177) or not (a <= 4e-73):
		tmp = x + ((y - z) * ((t - x) / (a - z)))
	else:
		tmp = t + (y * ((x - t) / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -1.2e-177) || !(a <= 4e-73))
		tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))));
	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.2e-177) || ~((a <= 4e-73)))
		tmp = x + ((y - z) * ((t - x) / (a - z)));
	else
		tmp = t + (y * ((x - t) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.2e-177], N[Not[LessEqual[a, 4e-73]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $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.2 \cdot 10^{-177} \lor \neg \left(a \leq 4 \cdot 10^{-73}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.1999999999999999e-177 or 3.99999999999999999e-73 < a

    1. Initial program 68.2%

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

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

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

    if -1.1999999999999999e-177 < a < 3.99999999999999999e-73

    1. Initial program 60.5%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 82.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+82.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/82.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/82.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-neg82.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-sub83.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-neg83.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--83.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/83.0%

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

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

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

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

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

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

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

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

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

Alternative 22: 36.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -9.8 \cdot 10^{-14}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+134}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -9.8e-14)
   x
   (if (<= a 1.7e-88) (* x (/ y z)) (if (<= a 8.5e+134) t x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -9.8e-14) {
		tmp = x;
	} else if (a <= 1.7e-88) {
		tmp = x * (y / z);
	} else if (a <= 8.5e+134) {
		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 <= (-9.8d-14)) then
        tmp = x
    else if (a <= 1.7d-88) then
        tmp = x * (y / z)
    else if (a <= 8.5d+134) 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 <= -9.8e-14) {
		tmp = x;
	} else if (a <= 1.7e-88) {
		tmp = x * (y / z);
	} else if (a <= 8.5e+134) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -9.8e-14:
		tmp = x
	elif a <= 1.7e-88:
		tmp = x * (y / z)
	elif a <= 8.5e+134:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -9.8e-14)
		tmp = x;
	elseif (a <= 1.7e-88)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 8.5e+134)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -9.8e-14)
		tmp = x;
	elseif (a <= 1.7e-88)
		tmp = x * (y / z);
	elseif (a <= 8.5e+134)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.8e-14], x, If[LessEqual[a, 1.7e-88], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e+134], t, x]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.8 \cdot 10^{-14}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 8.5 \cdot 10^{+134}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.79999999999999989e-14 or 8.50000000000000024e134 < a

    1. Initial program 69.2%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified91.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 51.2%

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

    if -9.79999999999999989e-14 < a < 1.69999999999999987e-88

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

    if 1.69999999999999987e-88 < a < 8.50000000000000024e134

    1. Initial program 66.7%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified77.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 26.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.8 \cdot 10^{-14}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+134}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 38.3% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.65 \cdot 10^{-6}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{+134}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.65e-6) x (if (<= a 7.6e+134) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.65e-6) {
		tmp = x;
	} else if (a <= 7.6e+134) {
		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.65d-6)) then
        tmp = x
    else if (a <= 7.6d+134) 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.65e-6) {
		tmp = x;
	} else if (a <= 7.6e+134) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.65e-6:
		tmp = x
	elif a <= 7.6e+134:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.65e-6)
		tmp = x;
	elseif (a <= 7.6e+134)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.65e-6)
		tmp = x;
	elseif (a <= 7.6e+134)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.65e-6], x, If[LessEqual[a, 7.6e+134], t, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{-6}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 7.6 \cdot 10^{+134}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.65000000000000008e-6 or 7.59999999999999997e134 < a

    1. Initial program 68.7%

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

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

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

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

    if -1.65000000000000008e-6 < a < 7.59999999999999997e134

    1. Initial program 64.2%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified70.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 29.7%

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

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

Alternative 24: 25.8% 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.1%

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

      \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
  3. Simplified80.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 21.8%

    \[\leadsto \color{blue}{t} \]
  6. Final simplification21.8%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 84.2% 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 2024078 
(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))))