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

Percentage Accurate: 68.3% → 88.2%
Time: 18.7s
Alternatives: 22
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 22 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 88.2% accurate, 0.2× speedup?

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

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

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

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

\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))) < -inf.0 or 5.0000000000000003e-260 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

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

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

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

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

    1. Initial program 97.7%

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

    if -5.00000000000000027e-250 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000003e-260

    1. Initial program 12.8%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified5.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 99.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+99.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/99.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/99.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-neg99.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-sub99.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-neg99.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--99.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/99.0%

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

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

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

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

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

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

Alternative 2: 89.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-250} \lor \neg \left(t\_1 \leq 5 \cdot 10^{-260}\right):\\ \;\;\;\;x + \frac{x - t}{\frac{z - a}{y - z}}\\ \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) (- x t)) (- a z)))))
   (if (or (<= t_1 -5e-250) (not (<= t_1 5e-260)))
     (+ x (/ (- x t) (/ (- z a) (- y z))))
     (+ t (/ (* (- t x) (- a y)) z)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((y - z) * (x - t)) / (a - z));
	double tmp;
	if ((t_1 <= -5e-250) || !(t_1 <= 5e-260)) {
		tmp = x + ((x - t) / ((z - a) / (y - z)));
	} 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) * (x - t)) / (a - z))
    if ((t_1 <= (-5d-250)) .or. (.not. (t_1 <= 5d-260))) then
        tmp = x + ((x - t) / ((z - a) / (y - z)))
    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) * (x - t)) / (a - z));
	double tmp;
	if ((t_1 <= -5e-250) || !(t_1 <= 5e-260)) {
		tmp = x + ((x - t) / ((z - a) / (y - z)));
	} else {
		tmp = t + (((t - x) * (a - y)) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (((y - z) * (x - t)) / (a - z))
	tmp = 0
	if (t_1 <= -5e-250) or not (t_1 <= 5e-260):
		tmp = x + ((x - t) / ((z - a) / (y - z)))
	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(x - t)) / Float64(a - z)))
	tmp = 0.0
	if ((t_1 <= -5e-250) || !(t_1 <= 5e-260))
		tmp = Float64(x + Float64(Float64(x - t) / Float64(Float64(z - a) / Float64(y - z))));
	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) * (x - t)) / (a - z));
	tmp = 0.0;
	if ((t_1 <= -5e-250) || ~((t_1 <= 5e-260)))
		tmp = x + ((x - t) / ((z - a) / (y - z)));
	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[(x - t), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-250], N[Not[LessEqual[t$95$1, 5e-260]], $MachinePrecision]], N[(x + N[(N[(x - t), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(y - z), $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(x - t\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-250} \lor \neg \left(t\_1 \leq 5 \cdot 10^{-260}\right):\\
\;\;\;\;x + \frac{x - t}{\frac{z - a}{y - z}}\\

\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))) < -5.00000000000000027e-250 or 5.0000000000000003e-260 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

    if -5.00000000000000027e-250 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000003e-260

    1. Initial program 12.8%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified5.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 99.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+99.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/99.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/99.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-neg99.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-sub99.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-neg99.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--99.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/99.0%

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

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

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

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

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

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

Alternative 3: 89.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-250}:\\ \;\;\;\;x + \frac{t - x}{\frac{z}{z - y} - \frac{a}{z - y}}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-260}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{x - t}{\frac{z - a}{y - z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ (* (- y z) (- x t)) (- a z)))))
   (if (<= t_1 -5e-250)
     (+ x (/ (- t x) (- (/ z (- z y)) (/ a (- z y)))))
     (if (<= t_1 5e-260)
       (+ t (/ (* (- t x) (- a y)) z))
       (+ x (/ (- x t) (/ (- z a) (- y z))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((y - z) * (x - t)) / (a - z));
	double tmp;
	if (t_1 <= -5e-250) {
		tmp = x + ((t - x) / ((z / (z - y)) - (a / (z - y))));
	} else if (t_1 <= 5e-260) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else {
		tmp = x + ((x - t) / ((z - 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) * (x - t)) / (a - z))
    if (t_1 <= (-5d-250)) then
        tmp = x + ((t - x) / ((z / (z - y)) - (a / (z - y))))
    else if (t_1 <= 5d-260) then
        tmp = t + (((t - x) * (a - y)) / z)
    else
        tmp = x + ((x - t) / ((z - 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) * (x - t)) / (a - z));
	double tmp;
	if (t_1 <= -5e-250) {
		tmp = x + ((t - x) / ((z / (z - y)) - (a / (z - y))));
	} else if (t_1 <= 5e-260) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else {
		tmp = x + ((x - t) / ((z - a) / (y - z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (((y - z) * (x - t)) / (a - z))
	tmp = 0
	if t_1 <= -5e-250:
		tmp = x + ((t - x) / ((z / (z - y)) - (a / (z - y))))
	elif t_1 <= 5e-260:
		tmp = t + (((t - x) * (a - y)) / z)
	else:
		tmp = x + ((x - t) / ((z - a) / (y - z)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(Float64(y - z) * Float64(x - t)) / Float64(a - z)))
	tmp = 0.0
	if (t_1 <= -5e-250)
		tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(z / Float64(z - y)) - Float64(a / Float64(z - y)))));
	elseif (t_1 <= 5e-260)
		tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z));
	else
		tmp = Float64(x + Float64(Float64(x - t) / Float64(Float64(z - a) / Float64(y - z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (((y - z) * (x - t)) / (a - z));
	tmp = 0.0;
	if (t_1 <= -5e-250)
		tmp = x + ((t - x) / ((z / (z - y)) - (a / (z - y))));
	elseif (t_1 <= 5e-260)
		tmp = t + (((t - x) * (a - y)) / z);
	else
		tmp = x + ((x - t) / ((z - 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[(x - t), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-250], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(z / N[(z - y), $MachinePrecision]), $MachinePrecision] - N[(a / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-260], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(x - t), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


\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))) < -5.00000000000000027e-250

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    7. Step-by-step derivation
      1. div-sub90.5%

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

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

    if -5.00000000000000027e-250 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000003e-260

    1. Initial program 12.8%

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified5.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 99.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+99.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/99.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/99.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-neg99.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-sub99.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-neg99.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--99.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/99.0%

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

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

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

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

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

    if 5.0000000000000003e-260 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    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*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. Step-by-step derivation
      1. *-commutative86.0%

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

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

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

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

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

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

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

Alternative 4: 85.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.7 \cdot 10^{+17} \lor \neg \left(x \leq 2.7 \cdot 10^{-86}\right):\\
\;\;\;\;x \cdot \left(\left(1 - \frac{z}{z - a}\right) + \left(t \cdot \frac{y - z}{x \cdot \left(a - z\right)} + \frac{y}{z - a}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.7e17 or 2.69999999999999992e-86 < x

    1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.7e17 < x < 2.69999999999999992e-86

    1. Initial program 82.4%

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

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

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

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

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

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

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

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

Alternative 5: 67.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x - \left(t - x\right) \cdot \frac{z - y}{a}\\ \mathbf{if}\;a \leq -2.15 \cdot 10^{+17}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-199}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-246}:\\ \;\;\;\;y \cdot \frac{x - t}{z - a}\\ \mathbf{elif}\;a \leq 3.05 \cdot 10^{+24}:\\ \;\;\;\;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 (* (- t x) (/ (- z y) a)))))
   (if (<= a -2.15e+17)
     t_2
     (if (<= a -3.8e-199)
       t_1
       (if (<= a 1.1e-246)
         (* y (/ (- x t) (- z a)))
         (if (<= a 3.05e+24) 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 - ((t - x) * ((z - y) / a));
	double tmp;
	if (a <= -2.15e+17) {
		tmp = t_2;
	} else if (a <= -3.8e-199) {
		tmp = t_1;
	} else if (a <= 1.1e-246) {
		tmp = y * ((x - t) / (z - a));
	} else if (a <= 3.05e+24) {
		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 - ((t - x) * ((z - y) / a))
    if (a <= (-2.15d+17)) then
        tmp = t_2
    else if (a <= (-3.8d-199)) then
        tmp = t_1
    else if (a <= 1.1d-246) then
        tmp = y * ((x - t) / (z - a))
    else if (a <= 3.05d+24) 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 - ((t - x) * ((z - y) / a));
	double tmp;
	if (a <= -2.15e+17) {
		tmp = t_2;
	} else if (a <= -3.8e-199) {
		tmp = t_1;
	} else if (a <= 1.1e-246) {
		tmp = y * ((x - t) / (z - a));
	} else if (a <= 3.05e+24) {
		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 - ((t - x) * ((z - y) / a))
	tmp = 0
	if a <= -2.15e+17:
		tmp = t_2
	elif a <= -3.8e-199:
		tmp = t_1
	elif a <= 1.1e-246:
		tmp = y * ((x - t) / (z - a))
	elif a <= 3.05e+24:
		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(Float64(t - x) * Float64(Float64(z - y) / a)))
	tmp = 0.0
	if (a <= -2.15e+17)
		tmp = t_2;
	elseif (a <= -3.8e-199)
		tmp = t_1;
	elseif (a <= 1.1e-246)
		tmp = Float64(y * Float64(Float64(x - t) / Float64(z - a)));
	elseif (a <= 3.05e+24)
		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 - ((t - x) * ((z - y) / a));
	tmp = 0.0;
	if (a <= -2.15e+17)
		tmp = t_2;
	elseif (a <= -3.8e-199)
		tmp = t_1;
	elseif (a <= 1.1e-246)
		tmp = y * ((x - t) / (z - a));
	elseif (a <= 3.05e+24)
		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[(N[(t - x), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.15e+17], t$95$2, If[LessEqual[a, -3.8e-199], t$95$1, If[LessEqual[a, 1.1e-246], N[(y * N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.05e+24], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;a \leq 3.05 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.15e17 or 3.05000000000000003e24 < a

    1. Initial program 72.1%

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

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

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

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

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

    if -2.15e17 < a < -3.7999999999999998e-199 or 1.09999999999999999e-246 < a < 3.05000000000000003e24

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

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

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

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

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

    if -3.7999999999999998e-199 < a < 1.09999999999999999e-246

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.15 \cdot 10^{+17}:\\ \;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-199}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-246}:\\ \;\;\;\;y \cdot \frac{x - t}{z - a}\\ \mathbf{elif}\;a \leq 3.05 \cdot 10^{+24}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 62.6% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 2.9 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.2e125 or 2.89999999999999988e41 < a

    1. Initial program 69.4%

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

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

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

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

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

    if -6.2e125 < a < -3.80000000000000025e-203 or 1.6500000000000001e-248 < a < 2.89999999999999988e41

    1. Initial program 71.2%

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

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

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

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

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

    if -3.80000000000000025e-203 < a < 1.6500000000000001e-248

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+125}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-203}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-248}:\\ \;\;\;\;y \cdot \frac{x - t}{z - a}\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+41}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 62.7% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 4.1 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 71.1%

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

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

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

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

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

    if -5.6000000000000002e125 < a < -3.1000000000000002e-193 or 1.04999999999999997e-246 < a < 4.0999999999999998e35

    1. Initial program 70.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 x around 0 54.4%

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

    if -3.1000000000000002e-193 < a < 1.04999999999999997e-246

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

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

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

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

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

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

    if 4.0999999999999998e35 < 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*86.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+125}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-193}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-246}:\\ \;\;\;\;y \cdot \frac{x - t}{z - a}\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 46.8% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.2600000000000001e172 or 3.80000000000000011e87 < z

    1. Initial program 36.5%

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

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

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

    if -1.2600000000000001e172 < z < -2.7999999999999999e41

    1. Initial program 66.6%

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

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

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

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

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

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

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

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

    if -2.7999999999999999e41 < z < -1.95e8

    1. Initial program 58.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*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 y around -inf 27.2%

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

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

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

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

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

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

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

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

    if -1.95e8 < z < 3.80000000000000011e87

    1. Initial program 87.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.26 \cdot 10^{+172}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{+41}:\\ \;\;\;\;\frac{y}{a - z} \cdot t\\ \mathbf{elif}\;z \leq -195000000:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+87}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 46.8% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.2600000000000001e172

    1. Initial program 29.7%

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

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

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

    if -1.2600000000000001e172 < z < -7.60000000000000009e40

    1. Initial program 66.6%

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

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

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

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

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

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

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

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

    if -7.60000000000000009e40 < z < -2.25e8

    1. Initial program 58.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*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 y around -inf 27.2%

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

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

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

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

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

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

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

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

    if -2.25e8 < z < 9.49999999999999979e84

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

    if 9.49999999999999979e84 < z

    1. Initial program 41.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t}{z}} \]
    13. Simplified51.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.26 \cdot 10^{+172}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{+40}:\\ \;\;\;\;\frac{y}{a - z} \cdot t\\ \mathbf{elif}\;z \leq -225000000:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+84}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t + a \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 52.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -7.8 \cdot 10^{+134}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-223}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-114}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+98}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t + a \cdot \frac{t}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* t (/ y a)))))
   (if (<= z -7.8e+134)
     t
     (if (<= z 1.65e-223)
       t_1
       (if (<= z 6.2e-114)
         (* x (- 1.0 (/ y a)))
         (if (<= z 3.2e+98) t_1 (+ t (* a (/ t z)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * (y / a));
	double tmp;
	if (z <= -7.8e+134) {
		tmp = t;
	} else if (z <= 1.65e-223) {
		tmp = t_1;
	} else if (z <= 6.2e-114) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 3.2e+98) {
		tmp = t_1;
	} else {
		tmp = t + (a * (t / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (t * (y / a))
    if (z <= (-7.8d+134)) then
        tmp = t
    else if (z <= 1.65d-223) then
        tmp = t_1
    else if (z <= 6.2d-114) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 3.2d+98) then
        tmp = t_1
    else
        tmp = t + (a * (t / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * (y / a));
	double tmp;
	if (z <= -7.8e+134) {
		tmp = t;
	} else if (z <= 1.65e-223) {
		tmp = t_1;
	} else if (z <= 6.2e-114) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 3.2e+98) {
		tmp = t_1;
	} else {
		tmp = t + (a * (t / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t * (y / a))
	tmp = 0
	if z <= -7.8e+134:
		tmp = t
	elif z <= 1.65e-223:
		tmp = t_1
	elif z <= 6.2e-114:
		tmp = x * (1.0 - (y / a))
	elif z <= 3.2e+98:
		tmp = t_1
	else:
		tmp = t + (a * (t / z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t * Float64(y / a)))
	tmp = 0.0
	if (z <= -7.8e+134)
		tmp = t;
	elseif (z <= 1.65e-223)
		tmp = t_1;
	elseif (z <= 6.2e-114)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 3.2e+98)
		tmp = t_1;
	else
		tmp = Float64(t + Float64(a * Float64(t / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t * (y / a));
	tmp = 0.0;
	if (z <= -7.8e+134)
		tmp = t;
	elseif (z <= 1.65e-223)
		tmp = t_1;
	elseif (z <= 6.2e-114)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 3.2e+98)
		tmp = t_1;
	else
		tmp = t + (a * (t / z));
	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, -7.8e+134], t, If[LessEqual[z, 1.65e-223], t$95$1, If[LessEqual[z, 6.2e-114], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+98], t$95$1, N[(t + N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{-223}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 34.0%

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

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

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

    if -7.79999999999999967e134 < z < 1.64999999999999997e-223 or 6.2e-114 < z < 3.2000000000000002e98

    1. Initial program 82.8%

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

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

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

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

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

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

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

    if 1.64999999999999997e-223 < z < 6.2e-114

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

    if 3.2000000000000002e98 < z

    1. Initial program 39.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t}{z}} \]
    13. Simplified50.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+134}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-223}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-114}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+98}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + a \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 54.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 3.4 \cdot 10^{-224}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.89999999999999967e100 or 2.5999999999999999e95 < z

    1. Initial program 41.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{-1 \cdot z}{a - z}} \]
      6. neg-mul-152.4%

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

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

    if -4.89999999999999967e100 < z < 3.39999999999999992e-224 or 5.29999999999999973e-114 < z < 2.5999999999999999e95

    1. Initial program 83.1%

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

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

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

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

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

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

    if 3.39999999999999992e-224 < z < 5.29999999999999973e-114

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.9 \cdot 10^{+100}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-224}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{-114}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+95}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 53.1% 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 -7.8 \cdot 10^{+29}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-208}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-261}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+35}:\\ \;\;\;\;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 -7.8e+29)
     t_2
     (if (<= a -7e-208)
       t_1
       (if (<= a 1.15e-261)
         (* x (/ y (- z a)))
         (if (<= a 1.6e+35) 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 <= -7.8e+29) {
		tmp = t_2;
	} else if (a <= -7e-208) {
		tmp = t_1;
	} else if (a <= 1.15e-261) {
		tmp = x * (y / (z - a));
	} else if (a <= 1.6e+35) {
		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 <= (-7.8d+29)) then
        tmp = t_2
    else if (a <= (-7d-208)) then
        tmp = t_1
    else if (a <= 1.15d-261) then
        tmp = x * (y / (z - a))
    else if (a <= 1.6d+35) 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 <= -7.8e+29) {
		tmp = t_2;
	} else if (a <= -7e-208) {
		tmp = t_1;
	} else if (a <= 1.15e-261) {
		tmp = x * (y / (z - a));
	} else if (a <= 1.6e+35) {
		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 <= -7.8e+29:
		tmp = t_2
	elif a <= -7e-208:
		tmp = t_1
	elif a <= 1.15e-261:
		tmp = x * (y / (z - a))
	elif a <= 1.6e+35:
		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 <= -7.8e+29)
		tmp = t_2;
	elseif (a <= -7e-208)
		tmp = t_1;
	elseif (a <= 1.15e-261)
		tmp = Float64(x * Float64(y / Float64(z - a)));
	elseif (a <= 1.6e+35)
		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 <= -7.8e+29)
		tmp = t_2;
	elseif (a <= -7e-208)
		tmp = t_1;
	elseif (a <= 1.15e-261)
		tmp = x * (y / (z - a));
	elseif (a <= 1.6e+35)
		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, -7.8e+29], t$95$2, If[LessEqual[a, -7e-208], t$95$1, If[LessEqual[a, 1.15e-261], N[(x * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e+35], 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 -7.8 \cdot 10^{+29}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;a \leq 1.6 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.79999999999999937e29 or 1.59999999999999991e35 < a

    1. Initial program 70.7%

      \[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. Taylor expanded in z around 0 59.9%

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

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

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

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

    if -7.79999999999999937e29 < a < -6.99999999999999982e-208 or 1.15e-261 < a < 1.59999999999999991e35

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

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

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

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

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

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

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

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

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

    if -6.99999999999999982e-208 < a < 1.15e-261

    1. Initial program 65.8%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg47.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.8 \cdot 10^{+29}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-208}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-261}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 55.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 -1.35 \cdot 10^{+30}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -2.45 \cdot 10^{-236}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-251}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+35}:\\ \;\;\;\;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 -1.35e+30)
     t_2
     (if (<= a -2.45e-236)
       t_1
       (if (<= a 3.1e-251) (/ (* y (- x t)) z) (if (<= a 1.2e+35) 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 <= -1.35e+30) {
		tmp = t_2;
	} else if (a <= -2.45e-236) {
		tmp = t_1;
	} else if (a <= 3.1e-251) {
		tmp = (y * (x - t)) / z;
	} else if (a <= 1.2e+35) {
		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 <= (-1.35d+30)) then
        tmp = t_2
    else if (a <= (-2.45d-236)) then
        tmp = t_1
    else if (a <= 3.1d-251) then
        tmp = (y * (x - t)) / z
    else if (a <= 1.2d+35) 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 <= -1.35e+30) {
		tmp = t_2;
	} else if (a <= -2.45e-236) {
		tmp = t_1;
	} else if (a <= 3.1e-251) {
		tmp = (y * (x - t)) / z;
	} else if (a <= 1.2e+35) {
		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 <= -1.35e+30:
		tmp = t_2
	elif a <= -2.45e-236:
		tmp = t_1
	elif a <= 3.1e-251:
		tmp = (y * (x - t)) / z
	elif a <= 1.2e+35:
		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 <= -1.35e+30)
		tmp = t_2;
	elseif (a <= -2.45e-236)
		tmp = t_1;
	elseif (a <= 3.1e-251)
		tmp = Float64(Float64(y * Float64(x - t)) / z);
	elseif (a <= 1.2e+35)
		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 <= -1.35e+30)
		tmp = t_2;
	elseif (a <= -2.45e-236)
		tmp = t_1;
	elseif (a <= 3.1e-251)
		tmp = (y * (x - t)) / z;
	elseif (a <= 1.2e+35)
		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, -1.35e+30], t$95$2, If[LessEqual[a, -2.45e-236], t$95$1, If[LessEqual[a, 3.1e-251], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.2e+35], 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 -1.35 \cdot 10^{+30}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -2.45 \cdot 10^{-236}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.2 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.3499999999999999e30 or 1.20000000000000007e35 < a

    1. Initial program 70.7%

      \[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. Taylor expanded in z around 0 59.9%

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

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

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

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

    if -1.3499999999999999e30 < a < -2.4499999999999998e-236 or 3.10000000000000003e-251 < a < 1.20000000000000007e35

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

    if -2.4499999999999998e-236 < a < 3.10000000000000003e-251

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{+30}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -2.45 \cdot 10^{-236}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-251}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 74.1% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.8e13 or 3.1e19 < a

    1. Initial program 72.1%

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

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

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

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

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

    if -1.8e13 < a < 2.7499999999999999e-151

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

    if 2.7499999999999999e-151 < a < 3.1e19

    1. Initial program 75.5%

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

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

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

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

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

Alternative 15: 57.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;x \leq -7 \cdot 10^{-71} \lor \neg \left(x \leq 2.35 \cdot 10^{-23}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -9.0000000000000009e186

    1. Initial program 44.0%

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

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

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

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

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

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

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

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

    if -9.0000000000000009e186 < x < -6.9999999999999998e-71 or 2.35e-23 < x

    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*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 z around 0 49.2%

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

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

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

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

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

    if -6.9999999999999998e-71 < x < 2.35e-23

    1. Initial program 79.1%

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

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

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

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

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

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

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

Alternative 16: 57.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;x \leq -1.56 \cdot 10^{-65} \lor \neg \left(x \leq 2.35 \cdot 10^{-23}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.7499999999999999e187

    1. Initial program 44.0%

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

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

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

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

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

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

    if -1.7499999999999999e187 < x < -1.55999999999999993e-65 or 2.35e-23 < x

    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*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 z around 0 49.2%

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

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

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

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

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

    if -1.55999999999999993e-65 < x < 2.35e-23

    1. Initial program 79.1%

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

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

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

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

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

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

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

Alternative 17: 83.2% accurate, 0.6× speedup?

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

\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 a < -1.75e-78 or 1.74999999999999992e-116 < a

    1. Initial program 72.2%

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

    if -1.75e-78 < a < 1.74999999999999992e-116

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 47.0% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.1000000000000001e-90 or 8.00000000000000034e36 < a

    1. Initial program 69.8%

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

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

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

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

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

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

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

    if -7.1000000000000001e-90 < a < 1.6499999999999999e-184

    1. Initial program 67.4%

      \[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 y around -inf 57.4%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg41.5%

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

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

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

    if 1.6499999999999999e-184 < a < 8.00000000000000034e36

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t}{z}} \]
    13. Simplified46.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.1 \cdot 10^{-90}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-184}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+36}:\\ \;\;\;\;t + a \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 37.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -2.9 \cdot 10^{-157}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 2.2 \cdot 10^{+46}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.39999999999999958e123 or 2.2e46 < a

    1. Initial program 69.7%

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

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

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

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

    if -9.39999999999999958e123 < a < -2.89999999999999988e-157 or 8.1999999999999996e-183 < a < 2.2e46

    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*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 z around inf 34.9%

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

    if -2.89999999999999988e-157 < a < 8.1999999999999996e-183

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.4 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-157}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-183}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{+46}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 37.1% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 5 \cdot 10^{+41}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.2000000000000001e126 or 5.00000000000000022e41 < a

    1. Initial program 69.4%

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

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

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

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

    if -7.2000000000000001e126 < a < -2.5999999999999999e-189

    1. Initial program 66.5%

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

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

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

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

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

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

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

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

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

    if -2.5999999999999999e-189 < a < 2.69999999999999988e-185

    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*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 y around -inf 60.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified45.7%

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

    if 2.69999999999999988e-185 < a < 5.00000000000000022e41

    1. Initial program 77.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+126}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{-189}:\\ \;\;\;\;\frac{y}{a - z} \cdot t\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-185}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{+41}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 38.3% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -9.4 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{+42}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -9.4e+123) x (if (<= a 7.2e+42) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -9.4e+123) {
		tmp = x;
	} else if (a <= 7.2e+42) {
		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.4d+123)) then
        tmp = x
    else if (a <= 7.2d+42) 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.4e+123) {
		tmp = x;
	} else if (a <= 7.2e+42) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -9.4e+123:
		tmp = x
	elif a <= 7.2e+42:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -9.4e+123)
		tmp = x;
	elseif (a <= 7.2e+42)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -9.4e+123)
		tmp = x;
	elseif (a <= 7.2e+42)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.4e+123], x, If[LessEqual[a, 7.2e+42], t, x]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.39999999999999958e123 or 7.2000000000000002e42 < a

    1. Initial program 69.7%

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

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

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

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

    if -9.39999999999999958e123 < a < 7.2000000000000002e42

    1. Initial program 70.4%

      \[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 z around inf 30.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.4 \cdot 10^{+123}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{+42}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 24.6% 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 70.1%

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

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

    \[\leadsto \color{blue}{t} \]
  6. Final simplification21.9%

    \[\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 2024059 
(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))))