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

Percentage Accurate: 68.6% → 91.0%
Time: 15.5s
Alternatives: 20
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 20 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.6% 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: 91.0% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-279}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+289}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 36.6%

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2.00000000000000011e-279 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.00000000000000031e289

    1. Initial program 98.3%

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

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

    1. Initial program 4.2%

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

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

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

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

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

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

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

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

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

Alternative 2: 90.0% accurate, 0.1× speedup?

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

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

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


\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))) < -2.00000000000000011e-279 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

    1. Initial program 4.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.5% accurate, 0.3× speedup?

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

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

    1. Initial program 4.2%

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

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

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

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

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

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

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

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

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

Alternative 4: 71.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \leq -5.8 \cdot 10^{-124}:\\
\;\;\;\;t\_1\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -4.7999999999999999e30 or 1050 < a

    1. Initial program 66.9%

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

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

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

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

    if -4.7999999999999999e30 < a < -5.8000000000000004e-124 or -7.5000000000000004e-151 < a < -9.1999999999999995e-224

    1. Initial program 73.7%

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

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

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

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

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

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

    if -5.8000000000000004e-124 < a < -7.5000000000000004e-151

    1. Initial program 70.5%

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

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

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

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

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

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

    if -9.1999999999999995e-224 < a < 4.69999999999999984e-176

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.69999999999999984e-176 < a < 1050

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + y \cdot \color{blue}{\frac{1}{\frac{z}{x - t}}} \]
      2. un-div-inv73.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+30}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-124}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-151}:\\ \;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\ \mathbf{elif}\;a \leq -9.2 \cdot 10^{-224}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{-176}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1050:\\ \;\;\;\;t + \left(x - t\right) \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 71.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \leq -5.8 \cdot 10^{-124}:\\
\;\;\;\;t\_1\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -6.9999999999999998e26 or 150 < a

    1. Initial program 66.9%

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

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

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

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

    if -6.9999999999999998e26 < a < -5.8000000000000004e-124 or -8.4999999999999997e-150 < a < -2.25000000000000006e-226

    1. Initial program 73.7%

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

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

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

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

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

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

    if -5.8000000000000004e-124 < a < -8.4999999999999997e-150

    1. Initial program 70.5%

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

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

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

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

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

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

    if -2.25000000000000006e-226 < a < 2.6000000000000001e-40

    1. Initial program 69.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.6000000000000001e-40 < a < 150

    1. Initial program 45.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + y \cdot \color{blue}{\frac{x - t}{z}} \]
    13. Simplified84.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{+26}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-124}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-150}:\\ \;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-226}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-40}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;a \leq 150:\\ \;\;\;\;t - y \cdot \frac{t - x}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 55.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \leq -1 \cdot 10^{-231}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{-107}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 1.2 \cdot 10^{+209}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.85000000000000002e146 or 1.19999999999999998e209 < a

    1. Initial program 65.2%

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

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

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

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

    if -1.85000000000000002e146 < a < -9.9999999999999999e-232 or -1.2499999999999999e-281 < a < 2.6000000000000001e-107 or 1.25e-59 < a < 1.19999999999999998e209

    1. Initial program 67.2%

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

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

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

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

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

    if -9.9999999999999999e-232 < a < -1.2499999999999999e-281 or 2.6000000000000001e-107 < a < 1.25e-59

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.85 \cdot 10^{+146}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-231}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-281}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-107}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-59}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+209}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 67.9% accurate, 0.3× speedup?

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -9.5000000000000003e29

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

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

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

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

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

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

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

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

    if -9.5000000000000003e29 < a < -8.50000000000000059e-120 or -9.6e-150 < a < -4.99999999999999996e-221

    1. Initial program 73.7%

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

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

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

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

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

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

    if -8.50000000000000059e-120 < a < -9.6e-150

    1. Initial program 70.5%

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

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

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

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

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

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

    if -4.99999999999999996e-221 < a < 4.69999999999999984e-176

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.69999999999999984e-176 < a < 0.0115

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + y \cdot \color{blue}{\frac{x - t}{z}} \]
    13. Simplified74.4%

      \[\leadsto \color{blue}{t + y \cdot \frac{x - t}{z}} \]
    14. Step-by-step derivation
      1. clear-num74.2%

        \[\leadsto t + y \cdot \color{blue}{\frac{1}{\frac{z}{x - t}}} \]
      2. un-div-inv74.3%

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

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

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

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

    if 0.0115 < a

    1. Initial program 67.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{+29}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-120}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-150}:\\ \;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-221}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 4.7 \cdot 10^{-176}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 0.0115:\\ \;\;\;\;t + \left(x - t\right) \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 48.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -1 \cdot 10^{-231}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{-107}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 27000000000:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.9e48 or 2.7e10 < a

    1. Initial program 66.7%

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

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

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

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

    if -1.9e48 < a < -9.9999999999999999e-232 or -1.10000000000000002e-281 < a < 2.6000000000000001e-107 or 1.25e-59 < a < 2.7e10

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot y}{z}} \]
    12. Step-by-step derivation
      1. *-rgt-identity51.9%

        \[\leadsto \color{blue}{t \cdot 1} + -1 \cdot \frac{t \cdot y}{z} \]
      2. mul-1-neg51.9%

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

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

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

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

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

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

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

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

    if -9.9999999999999999e-232 < a < -1.10000000000000002e-281 or 2.6000000000000001e-107 < a < 1.25e-59

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{+48}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-231}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-281}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-107}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-59}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 27000000000:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 48.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -1 \cdot 10^{-231}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 2.2 \cdot 10^{-107}:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.8000000000000005e42 or 2.95e10 < a

    1. Initial program 66.7%

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

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

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

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

    if -8.8000000000000005e42 < a < -9.9999999999999999e-232 or -1.10000000000000002e-281 < a < 2.20000000000000012e-107

    1. Initial program 70.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot y}{z}} \]
    12. Step-by-step derivation
      1. *-rgt-identity52.6%

        \[\leadsto \color{blue}{t \cdot 1} + -1 \cdot \frac{t \cdot y}{z} \]
      2. mul-1-neg52.6%

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

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

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

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

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

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

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

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

    if -9.9999999999999999e-232 < a < -1.10000000000000002e-281 or 2.20000000000000012e-107 < a < 1.25e-59

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

    if 1.25e-59 < a < 2.95e10

    1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + y \cdot \color{blue}{\frac{x - t}{z}} \]
    13. Simplified73.7%

      \[\leadsto \color{blue}{t + y \cdot \frac{x - t}{z}} \]
    14. Taylor expanded in x around 0 57.2%

      \[\leadsto t + y \cdot \color{blue}{\left(-1 \cdot \frac{t}{z}\right)} \]
    15. Step-by-step derivation
      1. neg-mul-157.2%

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

        \[\leadsto t + y \cdot \color{blue}{\frac{t}{-z}} \]
    16. Simplified57.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.8 \cdot 10^{+42}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-231}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-281}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-107}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-59}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 29500000000:\\ \;\;\;\;t - y \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 56.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-161}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 4.6 \cdot 10^{-80}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.7 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.9999999999999996e158 or 1.6999999999999999e47 < y

    1. Initial program 70.9%

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

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

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

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

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

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

    if -4.9999999999999996e158 < y < 8.50000000000000054e-161 or 4.5999999999999996e-80 < y < 1.6999999999999999e47

    1. Initial program 64.9%

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

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

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

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

    if 8.50000000000000054e-161 < y < 4.5999999999999996e-80

    1. Initial program 80.5%

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+158}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-161}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-80}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+47}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 62.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;a \leq -2.1 \cdot 10^{+148}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-118}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 30000000000:\\ \;\;\;\;t - y \cdot \frac{t - x}{z}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+208}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= a -2.1e+148)
     x
     (if (<= a -3.6e-118)
       t_1
       (if (<= a 30000000000.0)
         (- t (* y (/ (- t x) z)))
         (if (<= a 6.2e+208) t_1 x))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (a <= -2.1e+148) {
		tmp = x;
	} else if (a <= -3.6e-118) {
		tmp = t_1;
	} else if (a <= 30000000000.0) {
		tmp = t - (y * ((t - x) / z));
	} else if (a <= 6.2e+208) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (a <= (-2.1d+148)) then
        tmp = x
    else if (a <= (-3.6d-118)) then
        tmp = t_1
    else if (a <= 30000000000.0d0) then
        tmp = t - (y * ((t - x) / z))
    else if (a <= 6.2d+208) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (a <= -2.1e+148) {
		tmp = x;
	} else if (a <= -3.6e-118) {
		tmp = t_1;
	} else if (a <= 30000000000.0) {
		tmp = t - (y * ((t - x) / z));
	} else if (a <= 6.2e+208) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if a <= -2.1e+148:
		tmp = x
	elif a <= -3.6e-118:
		tmp = t_1
	elif a <= 30000000000.0:
		tmp = t - (y * ((t - x) / z))
	elif a <= 6.2e+208:
		tmp = t_1
	else:
		tmp = x
	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 <= -2.1e+148)
		tmp = x;
	elseif (a <= -3.6e-118)
		tmp = t_1;
	elseif (a <= 30000000000.0)
		tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z)));
	elseif (a <= 6.2e+208)
		tmp = t_1;
	else
		tmp = x;
	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 <= -2.1e+148)
		tmp = x;
	elseif (a <= -3.6e-118)
		tmp = t_1;
	elseif (a <= 30000000000.0)
		tmp = t - (y * ((t - x) / z));
	elseif (a <= 6.2e+208)
		tmp = t_1;
	else
		tmp = x;
	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, -2.1e+148], x, If[LessEqual[a, -3.6e-118], t$95$1, If[LessEqual[a, 30000000000.0], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.2e+208], t$95$1, x]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.09999999999999999e148 or 6.19999999999999961e208 < a

    1. Initial program 65.2%

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

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

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

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

    if -2.09999999999999999e148 < a < -3.6000000000000002e-118 or 3e10 < a < 6.19999999999999961e208

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

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

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

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

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

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

    if -3.6000000000000002e-118 < a < 3e10

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + y \cdot \color{blue}{\frac{x - t}{z}} \]
    13. Simplified76.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+148}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-118}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 30000000000:\\ \;\;\;\;t - y \cdot \frac{t - x}{z}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+208}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 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 -1.8 \cdot 10^{+145}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-121}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 55000000000:\\ \;\;\;\;t + \left(x - t\right) \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+209}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= a -1.8e+145)
     x
     (if (<= a -2e-121)
       t_1
       (if (<= a 55000000000.0)
         (+ t (* (- x t) (/ y z)))
         (if (<= a 1.6e+209) t_1 x))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (a <= -1.8e+145) {
		tmp = x;
	} else if (a <= -2e-121) {
		tmp = t_1;
	} else if (a <= 55000000000.0) {
		tmp = t + ((x - t) * (y / z));
	} else if (a <= 1.6e+209) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (a <= (-1.8d+145)) then
        tmp = x
    else if (a <= (-2d-121)) then
        tmp = t_1
    else if (a <= 55000000000.0d0) then
        tmp = t + ((x - t) * (y / z))
    else if (a <= 1.6d+209) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (a <= -1.8e+145) {
		tmp = x;
	} else if (a <= -2e-121) {
		tmp = t_1;
	} else if (a <= 55000000000.0) {
		tmp = t + ((x - t) * (y / z));
	} else if (a <= 1.6e+209) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if a <= -1.8e+145:
		tmp = x
	elif a <= -2e-121:
		tmp = t_1
	elif a <= 55000000000.0:
		tmp = t + ((x - t) * (y / z))
	elif a <= 1.6e+209:
		tmp = t_1
	else:
		tmp = x
	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 <= -1.8e+145)
		tmp = x;
	elseif (a <= -2e-121)
		tmp = t_1;
	elseif (a <= 55000000000.0)
		tmp = Float64(t + Float64(Float64(x - t) * Float64(y / z)));
	elseif (a <= 1.6e+209)
		tmp = t_1;
	else
		tmp = x;
	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 <= -1.8e+145)
		tmp = x;
	elseif (a <= -2e-121)
		tmp = t_1;
	elseif (a <= 55000000000.0)
		tmp = t + ((x - t) * (y / z));
	elseif (a <= 1.6e+209)
		tmp = t_1;
	else
		tmp = x;
	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, -1.8e+145], x, If[LessEqual[a, -2e-121], t$95$1, If[LessEqual[a, 55000000000.0], N[(t + N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e+209], t$95$1, x]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2 \cdot 10^{-121}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.79999999999999987e145 or 1.6e209 < a

    1. Initial program 65.2%

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

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

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

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

    if -1.79999999999999987e145 < a < -2e-121 or 5.5e10 < a < 1.6e209

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

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

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

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

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

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

    if -2e-121 < a < 5.5e10

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + y \cdot \color{blue}{\frac{x - t}{z}} \]
    13. Simplified76.0%

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

        \[\leadsto t + y \cdot \color{blue}{\frac{1}{\frac{z}{x - t}}} \]
      2. un-div-inv76.0%

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

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

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

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

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

Alternative 13: 48.5% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.42e48 or 1.4e7 < a

    1. Initial program 66.7%

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

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

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

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

    if -1.42e48 < a < 1.74999999999999993e-107 or 1.25e-59 < a < 1.4e7

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot y}{z}} \]
    12. Step-by-step derivation
      1. *-rgt-identity51.7%

        \[\leadsto \color{blue}{t \cdot 1} + -1 \cdot \frac{t \cdot y}{z} \]
      2. mul-1-neg51.7%

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

        \[\leadsto t \cdot 1 + \left(-\color{blue}{t \cdot \frac{y}{z}}\right) \]
      4. distribute-rgt-neg-in57.0%

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

        \[\leadsto t \cdot 1 + t \cdot \color{blue}{\left(-1 \cdot \frac{y}{z}\right)} \]
      6. distribute-lft-in57.0%

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

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

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

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

    if 1.74999999999999993e-107 < a < 1.25e-59

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.42 \cdot 10^{+48}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.75 \cdot 10^{-107}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-59}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 14000000:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 70.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.7999999999999999e27 or 0.00235000000000000009 < a

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

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

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

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

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

    if -2.7999999999999999e27 < a < -4.9999999999999999e-122

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

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

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

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

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

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

    if -4.9999999999999999e-122 < a < 0.00235000000000000009

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + y \cdot \color{blue}{\frac{x - t}{z}} \]
    13. Simplified77.4%

      \[\leadsto \color{blue}{t + y \cdot \frac{x - t}{z}} \]
    14. Step-by-step derivation
      1. clear-num77.3%

        \[\leadsto t + y \cdot \color{blue}{\frac{1}{\frac{z}{x - t}}} \]
      2. un-div-inv77.3%

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

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

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

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

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

Alternative 15: 70.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+30}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -3.7 \cdot 10^{-117}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 0.0054:\\ \;\;\;\;t + \left(x - t\right) \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.6e+30)
   (+ x (/ (- y z) (/ a t)))
   (if (<= a -3.7e-117)
     (* t (/ (- y z) (- a z)))
     (if (<= a 0.0054) (+ t (* (- x t) (/ y z))) (+ x (* y (/ (- t x) a)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.6e+30) {
		tmp = x + ((y - z) / (a / t));
	} else if (a <= -3.7e-117) {
		tmp = t * ((y - z) / (a - z));
	} else if (a <= 0.0054) {
		tmp = t + ((x - t) * (y / z));
	} else {
		tmp = x + (y * ((t - x) / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1.6d+30)) then
        tmp = x + ((y - z) / (a / t))
    else if (a <= (-3.7d-117)) then
        tmp = t * ((y - z) / (a - z))
    else if (a <= 0.0054d0) then
        tmp = t + ((x - t) * (y / z))
    else
        tmp = x + (y * ((t - x) / a))
    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.6e+30) {
		tmp = x + ((y - z) / (a / t));
	} else if (a <= -3.7e-117) {
		tmp = t * ((y - z) / (a - z));
	} else if (a <= 0.0054) {
		tmp = t + ((x - t) * (y / z));
	} else {
		tmp = x + (y * ((t - x) / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.6e+30:
		tmp = x + ((y - z) / (a / t))
	elif a <= -3.7e-117:
		tmp = t * ((y - z) / (a - z))
	elif a <= 0.0054:
		tmp = t + ((x - t) * (y / z))
	else:
		tmp = x + (y * ((t - x) / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.6e+30)
		tmp = Float64(x + Float64(Float64(y - z) / Float64(a / t)));
	elseif (a <= -3.7e-117)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif (a <= 0.0054)
		tmp = Float64(t + Float64(Float64(x - t) * Float64(y / z)));
	else
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.6e+30)
		tmp = x + ((y - z) / (a / t));
	elseif (a <= -3.7e-117)
		tmp = t * ((y - z) / (a - z));
	elseif (a <= 0.0054)
		tmp = t + ((x - t) * (y / z));
	else
		tmp = x + (y * ((t - x) / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e+30], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.7e-117], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.0054], N[(t + N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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

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


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

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

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

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

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

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

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

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

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

    if -1.59999999999999986e30 < a < -3.7000000000000002e-117

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

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

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

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

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

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

    if -3.7000000000000002e-117 < a < 0.0054000000000000003

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + y \cdot \color{blue}{\frac{x - t}{z}} \]
    13. Simplified77.4%

      \[\leadsto \color{blue}{t + y \cdot \frac{x - t}{z}} \]
    14. Step-by-step derivation
      1. clear-num77.3%

        \[\leadsto t + y \cdot \color{blue}{\frac{1}{\frac{z}{x - t}}} \]
      2. un-div-inv77.3%

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

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

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

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

    if 0.0054000000000000003 < a

    1. Initial program 67.6%

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

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

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

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

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

Alternative 16: 82.0% accurate, 0.6× speedup?

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

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

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

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

    if -9.5000000000000002e-222 < a < 9.4999999999999998e-51

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 -9.5 \cdot 10^{-222} \lor \neg \left(a \leq 9.5 \cdot 10^{-51}\right):\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 37.0% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.2 \cdot 10^{+141}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.20000000000000027e46 or 2.2e141 < z

    1. Initial program 37.8%

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

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

    if -5.20000000000000027e46 < z < 1.4e-291

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

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

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

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

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

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

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

    if 1.4e-291 < z < 2.2e141

    1. Initial program 84.1%

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+46}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-291}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+141}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 39.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6.9 \cdot 10^{+40}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 23000000000:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -6.9e+40) x (if (<= a 23000000000.0) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -6.9e+40) {
		tmp = x;
	} else if (a <= 23000000000.0) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-6.9d+40)) then
        tmp = x
    else if (a <= 23000000000.0d0) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -6.9e+40) {
		tmp = x;
	} else if (a <= 23000000000.0) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -6.9e+40:
		tmp = x
	elif a <= 23000000000.0:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -6.9e+40)
		tmp = x;
	elseif (a <= 23000000000.0)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -6.9e+40)
		tmp = x;
	elseif (a <= 23000000000.0)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.9e+40], x, If[LessEqual[a, 23000000000.0], t, x]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.9000000000000003e40 or 2.3e10 < a

    1. Initial program 66.7%

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

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

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

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

    if -6.9000000000000003e40 < a < 2.3e10

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

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

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

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

Alternative 19: 2.8% accurate, 13.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
def code(x, y, z, t, a):
	return 0.0
function code(x, y, z, t, a)
	return 0.0
end
function tmp = code(x, y, z, t, a)
	tmp = 0.0;
end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto x + \frac{\color{blue}{x \cdot \left(y - z\right)}}{z} \]
  9. Step-by-step derivation
    1. *-commutative17.2%

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

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

    \[\leadsto \color{blue}{x + -1 \cdot x} \]
  12. Step-by-step derivation
    1. distribute-rgt1-in2.7%

      \[\leadsto \color{blue}{\left(-1 + 1\right) \cdot x} \]
    2. metadata-eval2.7%

      \[\leadsto \color{blue}{0} \cdot x \]
    3. mul0-lft2.7%

      \[\leadsto \color{blue}{0} \]
  13. Simplified2.7%

    \[\leadsto \color{blue}{0} \]
  14. Final simplification2.7%

    \[\leadsto 0 \]
  15. Add Preprocessing

Alternative 20: 25.5% 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 68.0%

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

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

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

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

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 83.7% 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 2024077 
(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))))