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

Percentage Accurate: 68.2% → 89.2%
Time: 19.2s
Alternatives: 21
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 21 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.2% 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: 89.2% accurate, 0.2× speedup?

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

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

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

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

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

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


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

    1. Initial program 37.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-281 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 3.99999999999999994e307

    1. Initial program 97.0%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

    1. Initial program 38.6%

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

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

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

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

Alternative 2: 88.9% accurate, 0.2× speedup?

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

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

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

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

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


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

    1. Initial program 37.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 95.4%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.9% accurate, 0.2× speedup?

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

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

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

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

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


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

    1. Initial program 37.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 95.4%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 58.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ t_3 := \frac{x}{\frac{z - a}{y}}\\ \mathbf{if}\;t \leq -6.8 \cdot 10^{-37}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-180}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{-234}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-210}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq 3.95 \cdot 10^{-72}:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* x (/ y a))))
        (t_2 (* t (/ (- y z) (- a z))))
        (t_3 (/ x (/ (- z a) y))))
   (if (<= t -6.8e-37)
     t_2
     (if (<= t -3.3e-60)
       t_1
       (if (<= t -6.5e-180)
         t_3
         (if (<= t -9.5e-234)
           t_1
           (if (<= t 1.5e-210)
             t_3
             (if (<= t 3.95e-72) (- x (* y (/ x a))) t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double t_3 = x / ((z - a) / y);
	double tmp;
	if (t <= -6.8e-37) {
		tmp = t_2;
	} else if (t <= -3.3e-60) {
		tmp = t_1;
	} else if (t <= -6.5e-180) {
		tmp = t_3;
	} else if (t <= -9.5e-234) {
		tmp = t_1;
	} else if (t <= 1.5e-210) {
		tmp = t_3;
	} else if (t <= 3.95e-72) {
		tmp = x - (y * (x / a));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x - (x * (y / a))
    t_2 = t * ((y - z) / (a - z))
    t_3 = x / ((z - a) / y)
    if (t <= (-6.8d-37)) then
        tmp = t_2
    else if (t <= (-3.3d-60)) then
        tmp = t_1
    else if (t <= (-6.5d-180)) then
        tmp = t_3
    else if (t <= (-9.5d-234)) then
        tmp = t_1
    else if (t <= 1.5d-210) then
        tmp = t_3
    else if (t <= 3.95d-72) then
        tmp = x - (y * (x / a))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double t_3 = x / ((z - a) / y);
	double tmp;
	if (t <= -6.8e-37) {
		tmp = t_2;
	} else if (t <= -3.3e-60) {
		tmp = t_1;
	} else if (t <= -6.5e-180) {
		tmp = t_3;
	} else if (t <= -9.5e-234) {
		tmp = t_1;
	} else if (t <= 1.5e-210) {
		tmp = t_3;
	} else if (t <= 3.95e-72) {
		tmp = x - (y * (x / a));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (x * (y / a))
	t_2 = t * ((y - z) / (a - z))
	t_3 = x / ((z - a) / y)
	tmp = 0
	if t <= -6.8e-37:
		tmp = t_2
	elif t <= -3.3e-60:
		tmp = t_1
	elif t <= -6.5e-180:
		tmp = t_3
	elif t <= -9.5e-234:
		tmp = t_1
	elif t <= 1.5e-210:
		tmp = t_3
	elif t <= 3.95e-72:
		tmp = x - (y * (x / a))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(x * Float64(y / a)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_3 = Float64(x / Float64(Float64(z - a) / y))
	tmp = 0.0
	if (t <= -6.8e-37)
		tmp = t_2;
	elseif (t <= -3.3e-60)
		tmp = t_1;
	elseif (t <= -6.5e-180)
		tmp = t_3;
	elseif (t <= -9.5e-234)
		tmp = t_1;
	elseif (t <= 1.5e-210)
		tmp = t_3;
	elseif (t <= 3.95e-72)
		tmp = Float64(x - Float64(y * Float64(x / a)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (x * (y / a));
	t_2 = t * ((y - z) / (a - z));
	t_3 = x / ((z - a) / y);
	tmp = 0.0;
	if (t <= -6.8e-37)
		tmp = t_2;
	elseif (t <= -3.3e-60)
		tmp = t_1;
	elseif (t <= -6.5e-180)
		tmp = t_3;
	elseif (t <= -9.5e-234)
		tmp = t_1;
	elseif (t <= 1.5e-210)
		tmp = t_3;
	elseif (t <= 3.95e-72)
		tmp = x - (y * (x / a));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e-37], t$95$2, If[LessEqual[t, -3.3e-60], t$95$1, If[LessEqual[t, -6.5e-180], t$95$3, If[LessEqual[t, -9.5e-234], t$95$1, If[LessEqual[t, 1.5e-210], t$95$3, If[LessEqual[t, 3.95e-72], N[(x - N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -3.3 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -6.5 \cdot 10^{-180}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;t \leq 1.5 \cdot 10^{-210}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq 3.95 \cdot 10^{-72}:\\
\;\;\;\;x - y \cdot \frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.80000000000000037e-37 or 3.95000000000000003e-72 < t

    1. Initial program 65.7%

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

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

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

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

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

    if -6.80000000000000037e-37 < t < -3.2999999999999998e-60 or -6.50000000000000013e-180 < t < -9.4999999999999999e-234

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

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

    if -3.2999999999999998e-60 < t < -6.50000000000000013e-180 or -9.4999999999999999e-234 < t < 1.5000000000000001e-210

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{a - z}} \cdot \left(-x\right) \]
    9. Step-by-step derivation
      1. distribute-rgt-neg-out62.8%

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

        \[\leadsto \color{blue}{0 - \frac{y}{a - z} \cdot x} \]
      3. add-sqr-sqrt25.8%

        \[\leadsto 0 - \frac{y}{a - z} \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \]
      4. sqrt-unprod20.2%

        \[\leadsto 0 - \frac{y}{a - z} \cdot \color{blue}{\sqrt{x \cdot x}} \]
      5. sqr-neg20.2%

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

        \[\leadsto 0 - \frac{y}{a - z} \cdot \color{blue}{\left(\sqrt{-x} \cdot \sqrt{-x}\right)} \]
      7. add-sqr-sqrt2.7%

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

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

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

        \[\leadsto 0 - \color{blue}{\frac{-x}{\frac{a - z}{y}}} \]
      11. add-sqr-sqrt1.7%

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}{\frac{a - z}{y}} \]
      12. sqrt-unprod20.2%

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}{\frac{a - z}{y}} \]
      13. sqr-neg20.2%

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

        \[\leadsto 0 - \frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{\frac{a - z}{y}} \]
      15. add-sqr-sqrt62.9%

        \[\leadsto 0 - \frac{\color{blue}{x}}{\frac{a - z}{y}} \]
    10. Applied egg-rr62.9%

      \[\leadsto \color{blue}{0 - \frac{x}{\frac{a - z}{y}}} \]
    11. Step-by-step derivation
      1. neg-sub062.9%

        \[\leadsto \color{blue}{-\frac{x}{\frac{a - z}{y}}} \]
      2. distribute-neg-frac262.9%

        \[\leadsto \color{blue}{\frac{x}{-\frac{a - z}{y}}} \]
      3. distribute-neg-frac262.9%

        \[\leadsto \frac{x}{\color{blue}{\frac{a - z}{-y}}} \]
    12. Simplified62.9%

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

    if 1.5000000000000001e-210 < t < 3.95000000000000003e-72

    1. Initial program 74.6%

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

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

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

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

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{-1 \cdot x}{a}} \]
      2. neg-mul-163.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{-37}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{-60}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-180}:\\ \;\;\;\;\frac{x}{\frac{z - a}{y}}\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{-234}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-210}:\\ \;\;\;\;\frac{x}{\frac{z - a}{y}}\\ \mathbf{elif}\;t \leq 3.95 \cdot 10^{-72}:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 63.9% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 3.35 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.5000000000000004e-37 or 3.3499999999999999e-71 < t

    1. Initial program 65.7%

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

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

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

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

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

    if -7.5000000000000004e-37 < t < -1.3999999999999999e-59 or -1.14999999999999993e-170 < t < 3.3499999999999999e-71

    1. Initial program 75.1%

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

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

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

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

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

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

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

    if -1.3999999999999999e-59 < t < -1.14999999999999993e-170

    1. Initial program 75.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{-37}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -1.4 \cdot 10^{-59}:\\ \;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{-170}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z - a}\\ \mathbf{elif}\;t \leq 3.35 \cdot 10^{-71}:\\ \;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 65.1% accurate, 0.4× 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 -2 \cdot 10^{+102}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{-301}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-71}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 750:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* (- y z) (/ (- t x) a)))))
   (if (<= a -2e+102)
     t_2
     (if (<= a 7.2e-301)
       t_1
       (if (<= a 7.5e-71)
         (* y (/ (- t x) (- a z)))
         (if (<= a 750.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + ((y - z) * ((t - x) / a));
	double tmp;
	if (a <= -2e+102) {
		tmp = t_2;
	} else if (a <= 7.2e-301) {
		tmp = t_1;
	} else if (a <= 7.5e-71) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 750.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = x + ((y - z) * ((t - x) / a))
    if (a <= (-2d+102)) then
        tmp = t_2
    else if (a <= 7.2d-301) then
        tmp = t_1
    else if (a <= 7.5d-71) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 750.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + ((y - z) * ((t - x) / a));
	double tmp;
	if (a <= -2e+102) {
		tmp = t_2;
	} else if (a <= 7.2e-301) {
		tmp = t_1;
	} else if (a <= 7.5e-71) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 750.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + ((y - z) * ((t - x) / a))
	tmp = 0
	if a <= -2e+102:
		tmp = t_2
	elif a <= 7.2e-301:
		tmp = t_1
	elif a <= 7.5e-71:
		tmp = y * ((t - x) / (a - z))
	elif a <= 750.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a)))
	tmp = 0.0
	if (a <= -2e+102)
		tmp = t_2;
	elseif (a <= 7.2e-301)
		tmp = t_1;
	elseif (a <= 7.5e-71)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 750.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x + ((y - z) * ((t - x) / a));
	tmp = 0.0;
	if (a <= -2e+102)
		tmp = t_2;
	elseif (a <= 7.2e-301)
		tmp = t_1;
	elseif (a <= 7.5e-71)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 750.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e+102], t$95$2, If[LessEqual[a, 7.2e-301], t$95$1, If[LessEqual[a, 7.5e-71], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 750.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 7.2 \cdot 10^{-301}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.99999999999999995e102 or 750 < a

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

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

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

    if -1.99999999999999995e102 < a < 7.20000000000000015e-301 or 7.5000000000000004e-71 < a < 750

    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*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 x around 0 50.4%

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

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

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

    if 7.20000000000000015e-301 < a < 7.5000000000000004e-71

    1. Initial program 73.3%

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

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

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

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

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

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

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

Alternative 7: 59.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq 9 \cdot 10^{-301}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.7999999999999998e125 or 2.6e93 < a

    1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

    if -6.7999999999999998e125 < a < 9.00000000000000039e-301 or 6.0000000000000003e-70 < a < 2.6e93

    1. Initial program 66.6%

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

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

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

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

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

    if 9.00000000000000039e-301 < a < 6.0000000000000003e-70

    1. Initial program 73.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.8 \cdot 10^{+125}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-301}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-70}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+93}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 61.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq 5.6 \cdot 10^{-302}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8e113 or 1100 < a

    1. Initial program 69.9%

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

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

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

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

    if -8e113 < a < 5.6e-302 or 1.1000000000000001e-66 < a < 1100

    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*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 x around 0 49.6%

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

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

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

    if 5.6e-302 < a < 1.1000000000000001e-66

    1. Initial program 73.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8 \cdot 10^{+113}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-302}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-66}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1100:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 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 -8.5 \cdot 10^{+101}:\\ \;\;\;\;x - \frac{t}{a} \cdot \left(z - y\right)\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-300}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-71}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 960:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= a -8.5e+101)
     (- x (* (/ t a) (- z y)))
     (if (<= a 4.5e-300)
       t_1
       (if (<= a 3.8e-71)
         (* y (/ (- t x) (- a z)))
         (if (<= a 960.0) t_1 (- x (* y (/ (- x t) 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 <= -8.5e+101) {
		tmp = x - ((t / a) * (z - y));
	} else if (a <= 4.5e-300) {
		tmp = t_1;
	} else if (a <= 3.8e-71) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 960.0) {
		tmp = t_1;
	} else {
		tmp = x - (y * ((x - t) / 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 <= (-8.5d+101)) then
        tmp = x - ((t / a) * (z - y))
    else if (a <= 4.5d-300) then
        tmp = t_1
    else if (a <= 3.8d-71) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 960.0d0) then
        tmp = t_1
    else
        tmp = x - (y * ((x - t) / 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 <= -8.5e+101) {
		tmp = x - ((t / a) * (z - y));
	} else if (a <= 4.5e-300) {
		tmp = t_1;
	} else if (a <= 3.8e-71) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 960.0) {
		tmp = t_1;
	} else {
		tmp = x - (y * ((x - t) / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if a <= -8.5e+101:
		tmp = x - ((t / a) * (z - y))
	elif a <= 4.5e-300:
		tmp = t_1
	elif a <= 3.8e-71:
		tmp = y * ((t - x) / (a - z))
	elif a <= 960.0:
		tmp = t_1
	else:
		tmp = x - (y * ((x - t) / 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 <= -8.5e+101)
		tmp = Float64(x - Float64(Float64(t / a) * Float64(z - y)));
	elseif (a <= 4.5e-300)
		tmp = t_1;
	elseif (a <= 3.8e-71)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 960.0)
		tmp = t_1;
	else
		tmp = Float64(x - Float64(y * Float64(Float64(x - t) / 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 <= -8.5e+101)
		tmp = x - ((t / a) * (z - y));
	elseif (a <= 4.5e-300)
		tmp = t_1;
	elseif (a <= 3.8e-71)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 960.0)
		tmp = t_1;
	else
		tmp = x - (y * ((x - t) / 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, -8.5e+101], N[(x - N[(N[(t / a), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e-300], t$95$1, If[LessEqual[a, 3.8e-71], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 960.0], t$95$1, N[(x - N[(y * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

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

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

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


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

    1. Initial program 77.4%

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

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

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

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

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

    if -8.5000000000000001e101 < a < 4.5e-300 or 3.79999999999999992e-71 < a < 960

    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*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 x around 0 50.4%

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

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

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

    if 4.5e-300 < a < 3.79999999999999992e-71

    1. Initial program 73.3%

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

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

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

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

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

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

    if 960 < a

    1. Initial program 65.4%

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

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

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

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

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

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

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

Alternative 10: 62.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq 4.2 \cdot 10^{-301}:\\
\;\;\;\;t\_1\\

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

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

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


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

    1. Initial program 77.4%

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

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

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

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

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

    if -5.00000000000000046e105 < a < 4.1999999999999997e-301 or 1.44999999999999986e-70 < a < 6.2e9

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

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

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

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

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

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

    if 4.1999999999999997e-301 < a < 1.44999999999999986e-70

    1. Initial program 73.3%

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

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

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

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

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

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

    if 6.2e9 < a

    1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 37.0% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 3.1 \cdot 10^{+93}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.20000000000000033e103 or 3.10000000000000019e93 < a

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 - -1 \cdot \frac{z}{a}\right)} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv55.6%

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

        \[\leadsto x \cdot \left(1 + \color{blue}{1} \cdot \frac{z}{a}\right) \]
      3. *-lft-identity55.6%

        \[\leadsto x \cdot \left(1 + \color{blue}{\frac{z}{a}}\right) \]
    11. Simplified55.6%

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

    if -7.20000000000000033e103 < a < 6.19999999999999967e-302 or 5.5000000000000003e-68 < a < 3.10000000000000019e93

    1. Initial program 65.7%

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

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

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

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

    if 6.19999999999999967e-302 < a < 5.5000000000000003e-68

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+103}:\\ \;\;\;\;x \cdot \left(\frac{z}{a} + 1\right)\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-302}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-68}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+93}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{z}{a} + 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 37.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq 4.8 \cdot 10^{-302}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{+93}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.70000000000000033e103 or 2.6e93 < a

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 - -1 \cdot \frac{z}{a}\right)} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv55.6%

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

        \[\leadsto x \cdot \left(1 + \color{blue}{1} \cdot \frac{z}{a}\right) \]
      3. *-lft-identity55.6%

        \[\leadsto x \cdot \left(1 + \color{blue}{\frac{z}{a}}\right) \]
    11. Simplified55.6%

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

    if -6.70000000000000033e103 < a < 4.80000000000000044e-302 or 4.50000000000000015e-67 < a < 2.6e93

    1. Initial program 65.7%

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

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

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

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

    if 4.80000000000000044e-302 < a < 4.50000000000000015e-67

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.7 \cdot 10^{+103}:\\ \;\;\;\;x \cdot \left(\frac{z}{a} + 1\right)\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-302}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-67}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+93}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{z}{a} + 1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 52.6% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.5000000000000001e101 or 850 < a

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

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

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

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

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

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

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

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

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

    if -8.5000000000000001e101 < a < 4.1000000000000001e-299 or 2.5999999999999998e-205 < a < 850

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)}\right) \]
      3. sub-neg60.9%

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

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

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

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

    if 4.1000000000000001e-299 < a < 2.5999999999999998e-205

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.5 \cdot 10^{+101}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{-299}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-205}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 850:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 52.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq 1.8 \cdot 10^{-299}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.5000000000000001e101 or 1050 < a

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

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

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

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

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

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

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

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

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

    if -8.5000000000000001e101 < a < 1.8e-299 or 1.90000000000000013e-187 < a < 1050

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e-299 < a < 1.90000000000000013e-187

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.5 \cdot 10^{+101}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-299}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-187}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;a \leq 1050:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 36.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-58}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.7 \cdot 10^{-250}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 8 \cdot 10^{-268}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{-18}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.35000000000000003e117 or 6.20000000000000014e-18 < z

    1. Initial program 43.9%

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

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

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

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

    if -2.35000000000000003e117 < z < -2.60000000000000007e-58 or -2.70000000000000002e-250 < z < 7.99999999999999966e-268

    1. Initial program 74.0%

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

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

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

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

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

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

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

    if -2.60000000000000007e-58 < z < -2.70000000000000002e-250 or 7.99999999999999966e-268 < z < 6.20000000000000014e-18

    1. Initial program 94.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.35 \cdot 10^{+117}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-58}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-250}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-268}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 87.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.65 \cdot 10^{+81} \lor \neg \left(z \leq 6.5 \cdot 10^{+156}\right):\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.65000000000000014e81 or 6.50000000000000027e156 < z

    1. Initial program 38.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.65000000000000014e81 < z < 6.50000000000000027e156

    1. Initial program 84.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
  3. Recombined 2 regimes into one program.
  4. Final simplification89.7%

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

Alternative 17: 52.8% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.8999999999999998e145 or 9.3999999999999997e61 < z

    1. Initial program 38.7%

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

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

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

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

    if -3.8999999999999998e145 < z < -1.35e7

    1. Initial program 50.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    11. Step-by-step derivation
      1. clear-num40.8%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y - a}}} \]
      2. un-div-inv40.8%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    12. Applied egg-rr40.8%

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

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

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

    if -1.35e7 < z < 9.3999999999999997e61

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

Alternative 18: 37.0% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 2.8 \cdot 10^{+93}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.40000000000000009e102 or 2.79999999999999989e93 < a

    1. Initial program 72.4%

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

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

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

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

    if -1.40000000000000009e102 < a < 6.4999999999999995e-302 or 3.40000000000000003e-71 < a < 2.79999999999999989e93

    1. Initial program 65.7%

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

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

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

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

    if 6.4999999999999995e-302 < a < 3.40000000000000003e-71

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+102}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-302}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-71}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+93}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 73.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{+102} \lor \neg \left(a \leq 1420\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.01999999999999999e102 or 1420 < a

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

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

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

    if -1.01999999999999999e102 < a < 1420

    1. Initial program 68.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 37.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-6}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 3.6 \cdot 10^{-19}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.1999999999999999e-6 or 3.6000000000000001e-19 < z

    1. Initial program 46.4%

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

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

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

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

    if -3.1999999999999999e-6 < z < 3.6000000000000001e-19

    1. Initial program 93.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{-6}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-19}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 25.2% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 69.4%

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

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

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

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

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 84.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024067 
(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))))