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

Percentage Accurate: 68.2% → 91.1%
Time: 26.3s
Alternatives: 25
Speedup: 1.0×

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 25 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: 91.1% accurate, 0.1× speedup?

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

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

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+281}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 40.3%

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

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

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

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

    1. Initial program 99.7%

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 97.0%

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

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

    1. Initial program 42.1%

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

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

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

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

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

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

Alternative 2: 91.1% accurate, 0.2× speedup?

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

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

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

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

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

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


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

    1. Initial program 41.2%

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.9999999999999993e-246 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.00000000000000016e281

    1. Initial program 98.2%

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 91.1% accurate, 0.2× speedup?

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

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

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

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

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

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


\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 or 5.00000000000000016e281 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 41.2%

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

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

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

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

    1. Initial program 99.7%

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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))) < 5.00000000000000016e281

    1. Initial program 97.0%

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

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

Alternative 4: 91.1% accurate, 0.2× speedup?

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

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

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

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

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

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


\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 or 5.00000000000000016e281 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 41.2%

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

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

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

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

    1. Initial program 99.7%

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 97.0%

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

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

Alternative 5: 46.0% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;z \leq -7.2 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 4.7 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -2.30000000000000002e163 or 9.79999999999999992e89 < z

    1. Initial program 35.6%

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

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

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

    if -2.30000000000000002e163 < z < -2.75e45

    1. Initial program 49.3%

      \[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 x around -inf 39.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. associate-*r*39.3%

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

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

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

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

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

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

    if -2.75e45 < z < -7.1999999999999996e-104 or -9.9999999999999993e-273 < z < 4.69999999999999989e-26

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

    if -7.1999999999999996e-104 < z < -9.9999999999999993e-273

    1. Initial program 97.1%

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

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

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

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

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

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

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

    if 4.69999999999999989e-26 < z < 8.5000000000000003e34

    1. Initial program 81.6%

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

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

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

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

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

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

    if 8.5000000000000003e34 < z < 9.79999999999999992e89

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+163}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.75 \cdot 10^{+45}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-104}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-272}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+34}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 49.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := t \cdot \frac{z - y}{z}\\ \mathbf{if}\;z \leq -5.8 \cdot 10^{+150}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{+21}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-132}:\\ \;\;\;\;\frac{y \cdot t}{a - z}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-190}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-275}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-26}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* t (/ (- z y) z))))
   (if (<= z -5.8e+150)
     t_2
     (if (<= z -7.2e+21)
       (* y (/ (- x t) z))
       (if (<= z -3.1e-75)
         t_1
         (if (<= z -9.2e-132)
           (/ (* y t) (- a z))
           (if (<= z -6.2e-190)
             t_1
             (if (<= z -1.16e-275)
               (* y (/ (- t x) a))
               (if (<= z 3.9e-26) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t * ((z - y) / z);
	double tmp;
	if (z <= -5.8e+150) {
		tmp = t_2;
	} else if (z <= -7.2e+21) {
		tmp = y * ((x - t) / z);
	} else if (z <= -3.1e-75) {
		tmp = t_1;
	} else if (z <= -9.2e-132) {
		tmp = (y * t) / (a - z);
	} else if (z <= -6.2e-190) {
		tmp = t_1;
	} else if (z <= -1.16e-275) {
		tmp = y * ((t - x) / a);
	} else if (z <= 3.9e-26) {
		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 * (1.0d0 - (y / a))
    t_2 = t * ((z - y) / z)
    if (z <= (-5.8d+150)) then
        tmp = t_2
    else if (z <= (-7.2d+21)) then
        tmp = y * ((x - t) / z)
    else if (z <= (-3.1d-75)) then
        tmp = t_1
    else if (z <= (-9.2d-132)) then
        tmp = (y * t) / (a - z)
    else if (z <= (-6.2d-190)) then
        tmp = t_1
    else if (z <= (-1.16d-275)) then
        tmp = y * ((t - x) / a)
    else if (z <= 3.9d-26) 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 * (1.0 - (y / a));
	double t_2 = t * ((z - y) / z);
	double tmp;
	if (z <= -5.8e+150) {
		tmp = t_2;
	} else if (z <= -7.2e+21) {
		tmp = y * ((x - t) / z);
	} else if (z <= -3.1e-75) {
		tmp = t_1;
	} else if (z <= -9.2e-132) {
		tmp = (y * t) / (a - z);
	} else if (z <= -6.2e-190) {
		tmp = t_1;
	} else if (z <= -1.16e-275) {
		tmp = y * ((t - x) / a);
	} else if (z <= 3.9e-26) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = t * ((z - y) / z)
	tmp = 0
	if z <= -5.8e+150:
		tmp = t_2
	elif z <= -7.2e+21:
		tmp = y * ((x - t) / z)
	elif z <= -3.1e-75:
		tmp = t_1
	elif z <= -9.2e-132:
		tmp = (y * t) / (a - z)
	elif z <= -6.2e-190:
		tmp = t_1
	elif z <= -1.16e-275:
		tmp = y * ((t - x) / a)
	elif z <= 3.9e-26:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(t * Float64(Float64(z - y) / z))
	tmp = 0.0
	if (z <= -5.8e+150)
		tmp = t_2;
	elseif (z <= -7.2e+21)
		tmp = Float64(y * Float64(Float64(x - t) / z));
	elseif (z <= -3.1e-75)
		tmp = t_1;
	elseif (z <= -9.2e-132)
		tmp = Float64(Float64(y * t) / Float64(a - z));
	elseif (z <= -6.2e-190)
		tmp = t_1;
	elseif (z <= -1.16e-275)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 3.9e-26)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = t * ((z - y) / z);
	tmp = 0.0;
	if (z <= -5.8e+150)
		tmp = t_2;
	elseif (z <= -7.2e+21)
		tmp = y * ((x - t) / z);
	elseif (z <= -3.1e-75)
		tmp = t_1;
	elseif (z <= -9.2e-132)
		tmp = (y * t) / (a - z);
	elseif (z <= -6.2e-190)
		tmp = t_1;
	elseif (z <= -1.16e-275)
		tmp = y * ((t - x) / a);
	elseif (z <= 3.9e-26)
		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[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e+150], t$95$2, If[LessEqual[z, -7.2e+21], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.1e-75], t$95$1, If[LessEqual[z, -9.2e-132], N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-190], t$95$1, If[LessEqual[z, -1.16e-275], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.9e-26], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -3.1 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq -6.2 \cdot 10^{-190}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.9 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -5.80000000000000022e150 or 3.89999999999999986e-26 < z

    1. Initial program 47.5%

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

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

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

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

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

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

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

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

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

    if -5.80000000000000022e150 < z < -7.2e21

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

    if -7.2e21 < z < -3.10000000000000007e-75 or -9.20000000000000012e-132 < z < -6.19999999999999987e-190 or -1.15999999999999995e-275 < z < 3.89999999999999986e-26

    1. Initial program 93.4%

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

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

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

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

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

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

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

    if -3.10000000000000007e-75 < z < -9.20000000000000012e-132

    1. Initial program 100.0%

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

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

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

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

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

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

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

    if -6.19999999999999987e-190 < z < -1.15999999999999995e-275

    1. Initial program 99.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+150}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{+21}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-132}:\\ \;\;\;\;\frac{y \cdot t}{a - z}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-190}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{-275}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 34.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.9 \cdot 10^{-55}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-154}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{-244}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.35 \cdot 10^{-276}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-300}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-188}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{+66}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -5.9e-55)
   (* t (/ y (- a z)))
   (if (<= y -4.4e-154)
     x
     (if (<= y -8.5e-244)
       t
       (if (<= y -2.35e-276)
         x
         (if (<= y -5e-300)
           t
           (if (<= y 8e-188) x (if (<= y 1.12e+66) t (* x (/ y z))))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -5.9e-55) {
		tmp = t * (y / (a - z));
	} else if (y <= -4.4e-154) {
		tmp = x;
	} else if (y <= -8.5e-244) {
		tmp = t;
	} else if (y <= -2.35e-276) {
		tmp = x;
	} else if (y <= -5e-300) {
		tmp = t;
	} else if (y <= 8e-188) {
		tmp = x;
	} else if (y <= 1.12e+66) {
		tmp = t;
	} else {
		tmp = x * (y / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (y <= (-5.9d-55)) then
        tmp = t * (y / (a - z))
    else if (y <= (-4.4d-154)) then
        tmp = x
    else if (y <= (-8.5d-244)) then
        tmp = t
    else if (y <= (-2.35d-276)) then
        tmp = x
    else if (y <= (-5d-300)) then
        tmp = t
    else if (y <= 8d-188) then
        tmp = x
    else if (y <= 1.12d+66) then
        tmp = t
    else
        tmp = x * (y / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -5.9e-55) {
		tmp = t * (y / (a - z));
	} else if (y <= -4.4e-154) {
		tmp = x;
	} else if (y <= -8.5e-244) {
		tmp = t;
	} else if (y <= -2.35e-276) {
		tmp = x;
	} else if (y <= -5e-300) {
		tmp = t;
	} else if (y <= 8e-188) {
		tmp = x;
	} else if (y <= 1.12e+66) {
		tmp = t;
	} else {
		tmp = x * (y / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -5.9e-55:
		tmp = t * (y / (a - z))
	elif y <= -4.4e-154:
		tmp = x
	elif y <= -8.5e-244:
		tmp = t
	elif y <= -2.35e-276:
		tmp = x
	elif y <= -5e-300:
		tmp = t
	elif y <= 8e-188:
		tmp = x
	elif y <= 1.12e+66:
		tmp = t
	else:
		tmp = x * (y / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -5.9e-55)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (y <= -4.4e-154)
		tmp = x;
	elseif (y <= -8.5e-244)
		tmp = t;
	elseif (y <= -2.35e-276)
		tmp = x;
	elseif (y <= -5e-300)
		tmp = t;
	elseif (y <= 8e-188)
		tmp = x;
	elseif (y <= 1.12e+66)
		tmp = t;
	else
		tmp = Float64(x * Float64(y / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -5.9e-55)
		tmp = t * (y / (a - z));
	elseif (y <= -4.4e-154)
		tmp = x;
	elseif (y <= -8.5e-244)
		tmp = t;
	elseif (y <= -2.35e-276)
		tmp = x;
	elseif (y <= -5e-300)
		tmp = t;
	elseif (y <= 8e-188)
		tmp = x;
	elseif (y <= 1.12e+66)
		tmp = t;
	else
		tmp = x * (y / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.9e-55], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.4e-154], x, If[LessEqual[y, -8.5e-244], t, If[LessEqual[y, -2.35e-276], x, If[LessEqual[y, -5e-300], t, If[LessEqual[y, 8e-188], x, If[LessEqual[y, 1.12e+66], t, N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.9 \cdot 10^{-55}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\

\mathbf{elif}\;y \leq -4.4 \cdot 10^{-154}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq -2.35 \cdot 10^{-276}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq -5 \cdot 10^{-300}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 8 \cdot 10^{-188}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.12 \cdot 10^{+66}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.8999999999999998e-55

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

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

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

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

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

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

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

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

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

    if -5.8999999999999998e-55 < y < -4.40000000000000015e-154 or -8.4999999999999999e-244 < y < -2.34999999999999982e-276 or -4.99999999999999996e-300 < y < 7.9999999999999996e-188

    1. Initial program 81.8%

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

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

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

    if -4.40000000000000015e-154 < y < -8.4999999999999999e-244 or -2.34999999999999982e-276 < y < -4.99999999999999996e-300 or 7.9999999999999996e-188 < y < 1.12e66

    1. Initial program 72.8%

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

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

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

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

    if 1.12e66 < y

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.9 \cdot 10^{-55}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -4.4 \cdot 10^{-154}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -8.5 \cdot 10^{-244}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.35 \cdot 10^{-276}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -5 \cdot 10^{-300}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-188}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{+66}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 48.8% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;z \leq -8.6 \cdot 10^{-104}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 2.7 \cdot 10^{-26}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.9e152 or 2.69999999999999982e-26 < z

    1. Initial program 47.5%

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

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

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

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

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

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

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

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

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

    if -1.9e152 < z < -2.2499999999999999e-4

    1. Initial program 60.8%

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

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

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

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

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

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

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

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

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

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

    if -2.2499999999999999e-4 < z < -7e-45

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

    if -7e-45 < z < -8.6000000000000002e-104 or -2.39999999999999982e-273 < z < 2.69999999999999982e-26

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

    if -8.6000000000000002e-104 < z < -2.39999999999999982e-273

    1. Initial program 97.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+152}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -0.000225:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-45}:\\ \;\;\;\;\frac{z \cdot t}{z - a}\\ \mathbf{elif}\;z \leq -8.6 \cdot 10^{-104}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-273}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 71.9% accurate, 0.4× speedup?

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

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

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

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

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.34999999999999998e47 or 3.49999999999999986e87 < z < 4.3999999999999996e152

    1. Initial program 33.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.34999999999999998e47 < z < -2.2999999999999999e-125

    1. Initial program 91.1%

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{\sqrt{y - z} \cdot \sqrt{y - z}}}{\frac{a - z}{t - x}} \]
      2. div-inv60.3%

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

        \[\leadsto x + \color{blue}{\frac{\sqrt{y - z}}{a - z} \cdot \frac{\sqrt{y - z}}{\frac{1}{t - x}}} \]
      4. sub-neg60.2%

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

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

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

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

        \[\leadsto x + \frac{\sqrt{y - z}}{a - z} \cdot \frac{\sqrt{y - z}}{\frac{1}{t + \color{blue}{\sqrt{x} \cdot \sqrt{x}}}} \]
      9. add-sqr-sqrt51.4%

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{\sqrt{y - z}}{a - z} \cdot \sqrt{y - z}}{\frac{1}{t + x}}} \]
      2. *-commutative51.4%

        \[\leadsto x + \frac{\color{blue}{\sqrt{y - z} \cdot \frac{\sqrt{y - z}}{a - z}}}{\frac{1}{t + x}} \]
      3. associate-*r/51.4%

        \[\leadsto x + \frac{\color{blue}{\frac{\sqrt{y - z} \cdot \sqrt{y - z}}{a - z}}}{\frac{1}{t + x}} \]
      4. rem-square-sqrt79.9%

        \[\leadsto x + \frac{\frac{\color{blue}{y - z}}{a - z}}{\frac{1}{t + x}} \]
    10. Simplified79.9%

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

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

    if -2.2999999999999999e-125 < z < 3.1999999999999998e-76

    1. Initial program 95.7%

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

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

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

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

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

    if 3.1999999999999998e-76 < z < 3.49999999999999986e87

    1. Initial program 84.4%

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

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

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

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

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

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

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

    if 4.3999999999999996e152 < z

    1. Initial program 44.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+47}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-125}:\\ \;\;\;\;x + \frac{t \cdot \left(z - y\right)}{z - a}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-76}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+87}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+152}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 57.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -1620000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -8.4 \cdot 10^{-119}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-178}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-302}:\\ \;\;\;\;y \cdot \frac{x}{z - a}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-81}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= t -1620000.0)
     t_2
     (if (<= t -8.4e-119)
       t_1
       (if (<= t -3.8e-178)
         t_2
         (if (<= t -8.5e-302)
           (* y (/ x (- z a)))
           (if (<= t 2.2e-81) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -1620000.0) {
		tmp = t_2;
	} else if (t <= -8.4e-119) {
		tmp = t_1;
	} else if (t <= -3.8e-178) {
		tmp = t_2;
	} else if (t <= -8.5e-302) {
		tmp = y * (x / (z - a));
	} else if (t <= 2.2e-81) {
		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 * (1.0d0 - (y / a))
    t_2 = t * ((y - z) / (a - z))
    if (t <= (-1620000.0d0)) then
        tmp = t_2
    else if (t <= (-8.4d-119)) then
        tmp = t_1
    else if (t <= (-3.8d-178)) then
        tmp = t_2
    else if (t <= (-8.5d-302)) then
        tmp = y * (x / (z - a))
    else if (t <= 2.2d-81) 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 * (1.0 - (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -1620000.0) {
		tmp = t_2;
	} else if (t <= -8.4e-119) {
		tmp = t_1;
	} else if (t <= -3.8e-178) {
		tmp = t_2;
	} else if (t <= -8.5e-302) {
		tmp = y * (x / (z - a));
	} else if (t <= 2.2e-81) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if t <= -1620000.0:
		tmp = t_2
	elif t <= -8.4e-119:
		tmp = t_1
	elif t <= -3.8e-178:
		tmp = t_2
	elif t <= -8.5e-302:
		tmp = y * (x / (z - a))
	elif t <= 2.2e-81:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (t <= -1620000.0)
		tmp = t_2;
	elseif (t <= -8.4e-119)
		tmp = t_1;
	elseif (t <= -3.8e-178)
		tmp = t_2;
	elseif (t <= -8.5e-302)
		tmp = Float64(y * Float64(x / Float64(z - a)));
	elseif (t <= 2.2e-81)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (t <= -1620000.0)
		tmp = t_2;
	elseif (t <= -8.4e-119)
		tmp = t_1;
	elseif (t <= -3.8e-178)
		tmp = t_2;
	elseif (t <= -8.5e-302)
		tmp = y * (x / (z - a));
	elseif (t <= 2.2e-81)
		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[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1620000.0], t$95$2, If[LessEqual[t, -8.4e-119], t$95$1, If[LessEqual[t, -3.8e-178], t$95$2, If[LessEqual[t, -8.5e-302], N[(y * N[(x / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e-81], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -8.4 \cdot 10^{-119}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -3.8 \cdot 10^{-178}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 2.2 \cdot 10^{-81}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.62e6 or -8.4e-119 < t < -3.80000000000000015e-178 or 2.1999999999999999e-81 < t

    1. Initial program 71.4%

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

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

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

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

    if -1.62e6 < t < -8.4e-119 or -8.5000000000000005e-302 < t < 2.1999999999999999e-81

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

    if -3.80000000000000015e-178 < t < -8.5000000000000005e-302

    1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1620000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -8.4 \cdot 10^{-119}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-178}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-302}:\\ \;\;\;\;y \cdot \frac{x}{z - a}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-81}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 57.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -205000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-119}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-179}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -2.95 \cdot 10^{-297}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-82}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= t -205000.0)
     t_2
     (if (<= t -1.1e-119)
       t_1
       (if (<= t -8.2e-179)
         t_2
         (if (<= t -2.95e-297)
           (* y (/ (- t x) (- a z)))
           (if (<= t 6.2e-82) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -205000.0) {
		tmp = t_2;
	} else if (t <= -1.1e-119) {
		tmp = t_1;
	} else if (t <= -8.2e-179) {
		tmp = t_2;
	} else if (t <= -2.95e-297) {
		tmp = y * ((t - x) / (a - z));
	} else if (t <= 6.2e-82) {
		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 * (1.0d0 - (y / a))
    t_2 = t * ((y - z) / (a - z))
    if (t <= (-205000.0d0)) then
        tmp = t_2
    else if (t <= (-1.1d-119)) then
        tmp = t_1
    else if (t <= (-8.2d-179)) then
        tmp = t_2
    else if (t <= (-2.95d-297)) then
        tmp = y * ((t - x) / (a - z))
    else if (t <= 6.2d-82) 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 * (1.0 - (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -205000.0) {
		tmp = t_2;
	} else if (t <= -1.1e-119) {
		tmp = t_1;
	} else if (t <= -8.2e-179) {
		tmp = t_2;
	} else if (t <= -2.95e-297) {
		tmp = y * ((t - x) / (a - z));
	} else if (t <= 6.2e-82) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if t <= -205000.0:
		tmp = t_2
	elif t <= -1.1e-119:
		tmp = t_1
	elif t <= -8.2e-179:
		tmp = t_2
	elif t <= -2.95e-297:
		tmp = y * ((t - x) / (a - z))
	elif t <= 6.2e-82:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (t <= -205000.0)
		tmp = t_2;
	elseif (t <= -1.1e-119)
		tmp = t_1;
	elseif (t <= -8.2e-179)
		tmp = t_2;
	elseif (t <= -2.95e-297)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (t <= 6.2e-82)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (t <= -205000.0)
		tmp = t_2;
	elseif (t <= -1.1e-119)
		tmp = t_1;
	elseif (t <= -8.2e-179)
		tmp = t_2;
	elseif (t <= -2.95e-297)
		tmp = y * ((t - x) / (a - z));
	elseif (t <= 6.2e-82)
		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[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -205000.0], t$95$2, If[LessEqual[t, -1.1e-119], t$95$1, If[LessEqual[t, -8.2e-179], t$95$2, If[LessEqual[t, -2.95e-297], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e-82], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -205000 or -1.1e-119 < t < -8.2e-179 or 6.19999999999999999e-82 < t

    1. Initial program 71.4%

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

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

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

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

    if -205000 < t < -1.1e-119 or -2.9499999999999999e-297 < t < 6.19999999999999999e-82

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

    if -8.2e-179 < t < -2.9499999999999999e-297

    1. Initial program 59.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -205000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-119}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-179}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -2.95 \cdot 10^{-297}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-82}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 48.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+160}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.96 \cdot 10^{+43}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+34}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -8.6e+160)
   t
   (if (<= z -1.96e+43)
     (* x (/ (- y a) z))
     (if (<= z 4.1e-26)
       (* x (- 1.0 (/ y a)))
       (if (<= z 1.75e+34)
         (* t (/ (- y z) a))
         (if (<= z 8.2e+89) (* t (/ y (- a z))) t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -8.6e+160) {
		tmp = t;
	} else if (z <= -1.96e+43) {
		tmp = x * ((y - a) / z);
	} else if (z <= 4.1e-26) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 1.75e+34) {
		tmp = t * ((y - z) / a);
	} else if (z <= 8.2e+89) {
		tmp = t * (y / (a - z));
	} 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 <= (-8.6d+160)) then
        tmp = t
    else if (z <= (-1.96d+43)) then
        tmp = x * ((y - a) / z)
    else if (z <= 4.1d-26) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 1.75d+34) then
        tmp = t * ((y - z) / a)
    else if (z <= 8.2d+89) then
        tmp = t * (y / (a - z))
    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 <= -8.6e+160) {
		tmp = t;
	} else if (z <= -1.96e+43) {
		tmp = x * ((y - a) / z);
	} else if (z <= 4.1e-26) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 1.75e+34) {
		tmp = t * ((y - z) / a);
	} else if (z <= 8.2e+89) {
		tmp = t * (y / (a - z));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -8.6e+160:
		tmp = t
	elif z <= -1.96e+43:
		tmp = x * ((y - a) / z)
	elif z <= 4.1e-26:
		tmp = x * (1.0 - (y / a))
	elif z <= 1.75e+34:
		tmp = t * ((y - z) / a)
	elif z <= 8.2e+89:
		tmp = t * (y / (a - z))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -8.6e+160)
		tmp = t;
	elseif (z <= -1.96e+43)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= 4.1e-26)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 1.75e+34)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= 8.2e+89)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -8.6e+160)
		tmp = t;
	elseif (z <= -1.96e+43)
		tmp = x * ((y - a) / z);
	elseif (z <= 4.1e-26)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 1.75e+34)
		tmp = t * ((y - z) / a);
	elseif (z <= 8.2e+89)
		tmp = t * (y / (a - z));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.6e+160], t, If[LessEqual[z, -1.96e+43], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e-26], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+34], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+89], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -8.59999999999999978e160 or 8.1999999999999997e89 < z

    1. Initial program 35.6%

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

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

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

    if -8.59999999999999978e160 < z < -1.9600000000000001e43

    1. Initial program 49.3%

      \[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 x around -inf 39.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. associate-*r*39.3%

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

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

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

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

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

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

    if -1.9600000000000001e43 < z < 4.0999999999999999e-26

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

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

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

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

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

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

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

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

    if 4.0999999999999999e-26 < z < 1.74999999999999999e34

    1. Initial program 81.6%

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

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

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

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

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

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

    if 1.74999999999999999e34 < z < 8.1999999999999997e89

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.6 \cdot 10^{+160}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.96 \cdot 10^{+43}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+34}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 48.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+34}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -7e+34)
   t
   (if (<= z 4.1e-26)
     (* x (- 1.0 (/ y a)))
     (if (<= z 4.5e+35)
       (* t (/ (- y z) a))
       (if (<= z 6.8e+89) (* t (/ y (- a z))) t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -7e+34) {
		tmp = t;
	} else if (z <= 4.1e-26) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 4.5e+35) {
		tmp = t * ((y - z) / a);
	} else if (z <= 6.8e+89) {
		tmp = t * (y / (a - z));
	} 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 <= (-7d+34)) then
        tmp = t
    else if (z <= 4.1d-26) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 4.5d+35) then
        tmp = t * ((y - z) / a)
    else if (z <= 6.8d+89) then
        tmp = t * (y / (a - z))
    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 <= -7e+34) {
		tmp = t;
	} else if (z <= 4.1e-26) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 4.5e+35) {
		tmp = t * ((y - z) / a);
	} else if (z <= 6.8e+89) {
		tmp = t * (y / (a - z));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -7e+34:
		tmp = t
	elif z <= 4.1e-26:
		tmp = x * (1.0 - (y / a))
	elif z <= 4.5e+35:
		tmp = t * ((y - z) / a)
	elif z <= 6.8e+89:
		tmp = t * (y / (a - z))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -7e+34)
		tmp = t;
	elseif (z <= 4.1e-26)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 4.5e+35)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= 6.8e+89)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -7e+34)
		tmp = t;
	elseif (z <= 4.1e-26)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 4.5e+35)
		tmp = t * ((y - z) / a);
	elseif (z <= 6.8e+89)
		tmp = t * (y / (a - z));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7e+34], t, If[LessEqual[z, 4.1e-26], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+35], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+89], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.99999999999999996e34 or 6.8000000000000004e89 < z

    1. Initial program 39.0%

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

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

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

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

    if -6.99999999999999996e34 < z < 4.0999999999999999e-26

    1. Initial program 94.1%

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

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

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

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

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

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

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

    if 4.0999999999999999e-26 < z < 4.4999999999999997e35

    1. Initial program 81.6%

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

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

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

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

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

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

    if 4.4999999999999997e35 < z < 6.8000000000000004e89

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+34}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+89}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 50.6% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 4.7 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.58e38 or 4.69999999999999989e-26 < z

    1. Initial program 48.1%

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. distribute-rgt-neg-in49.2%

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

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

    if -1.58e38 < z < -9.5000000000000002e-104 or -1.79999999999999998e-278 < z < 4.69999999999999989e-26

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

    if -9.5000000000000002e-104 < z < -1.79999999999999998e-278

    1. Initial program 97.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.58 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-104}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-278}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 71.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -1.45 \cdot 10^{-133} \lor \neg \left(z \leq 9.5 \cdot 10^{-72}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\

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


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

    1. Initial program 26.6%

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

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

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

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

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

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

    if -9.49999999999999998e138 < z < -1.4499999999999999e-133 or 9.4999999999999998e-72 < z

    1. Initial program 68.1%

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

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

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

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

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

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

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

    if -1.4499999999999999e-133 < z < 9.4999999999999998e-72

    1. Initial program 95.7%

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

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

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

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

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

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

Alternative 16: 70.6% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.15e49 or 0.92000000000000004 < z

    1. Initial program 46.6%

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

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

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

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

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

    if -2.15e49 < z < -1.5000000000000001e-126

    1. Initial program 88.7%

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{\sqrt{y - z} \cdot \sqrt{y - z}}}{\frac{a - z}{t - x}} \]
      2. div-inv58.5%

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

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

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

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

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

        \[\leadsto x + \frac{\sqrt{y - z}}{a - z} \cdot \frac{\sqrt{y - z}}{\frac{1}{t + \sqrt{\color{blue}{x \cdot x}}}} \]
      8. sqrt-unprod23.6%

        \[\leadsto x + \frac{\sqrt{y - z}}{a - z} \cdot \frac{\sqrt{y - z}}{\frac{1}{t + \color{blue}{\sqrt{x} \cdot \sqrt{x}}}} \]
      9. add-sqr-sqrt49.9%

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{\sqrt{y - z}}{a - z} \cdot \sqrt{y - z}}{\frac{1}{t + x}}} \]
      2. *-commutative49.9%

        \[\leadsto x + \frac{\color{blue}{\sqrt{y - z} \cdot \frac{\sqrt{y - z}}{a - z}}}{\frac{1}{t + x}} \]
      3. associate-*r/49.9%

        \[\leadsto x + \frac{\color{blue}{\frac{\sqrt{y - z} \cdot \sqrt{y - z}}{a - z}}}{\frac{1}{t + x}} \]
      4. rem-square-sqrt77.5%

        \[\leadsto x + \frac{\frac{\color{blue}{y - z}}{a - z}}{\frac{1}{t + x}} \]
    10. Simplified77.5%

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

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

    if -1.5000000000000001e-126 < z < 0.92000000000000004

    1. Initial program 94.5%

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

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

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

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

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

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

Alternative 17: 69.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+34} \lor \neg \left(z \leq 0.92\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.0000000000000001e34 or 0.92000000000000004 < z

    1. Initial program 46.7%

      \[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 0 38.7%

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

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

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

    if -9.0000000000000001e34 < z < 0.92000000000000004

    1. Initial program 93.7%

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

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

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

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

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

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

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

Alternative 18: 31.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -100000000000:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

\mathbf{elif}\;y \leq 9.2 \cdot 10^{+66}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.5000000000000001e188

    1. Initial program 62.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot t}{z}} \]
      2. neg-mul-151.7%

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

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

    if -4.5000000000000001e188 < y < -1e11

    1. Initial program 79.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Step-by-step derivation
      1. clear-num37.0%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. un-div-inv37.0%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    10. Applied egg-rr37.0%

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

    if -1e11 < y < 9.2e66

    1. Initial program 74.9%

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

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

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

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

    if 9.2e66 < y

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

Alternative 19: 64.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-45} \lor \neg \left(z \leq 4.4 \cdot 10^{-26}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.69999999999999985e-45 or 4.4000000000000002e-26 < z

    1. Initial program 51.6%

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

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

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

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

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

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

    if -2.69999999999999985e-45 < z < 4.4000000000000002e-26

    1. Initial program 95.9%

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

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

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

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

Alternative 20: 31.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9000000000000 \lor \neg \left(y \leq 2.55 \cdot 10^{+130}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9e12 or 2.5499999999999998e130 < y

    1. Initial program 72.0%

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

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

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

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

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

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

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

    if -9e12 < y < 2.5499999999999998e130

    1. Initial program 71.8%

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

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

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

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

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

Alternative 21: 32.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -32000000000:\\
\;\;\;\;t \cdot \frac{y}{a}\\

\mathbf{elif}\;y \leq 8.2 \cdot 10^{+65}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.2e10

    1. Initial program 72.1%

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

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

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

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

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

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

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

    if -3.2e10 < y < 8.2000000000000003e65

    1. Initial program 74.9%

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

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

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

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

    if 8.2000000000000003e65 < y

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

Alternative 22: 32.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -52000000000000:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

\mathbf{elif}\;y \leq 6.5 \cdot 10^{+65}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.2e13

    1. Initial program 72.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Step-by-step derivation
      1. clear-num35.2%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    10. Applied egg-rr35.2%

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

    if -5.2e13 < y < 6.5000000000000003e65

    1. Initial program 74.9%

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

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

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

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

    if 6.5000000000000003e65 < y

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

Alternative 23: 80.9% accurate, 1.0× speedup?

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

\\
x + \left(z - y\right) \cdot \frac{x - t}{a - z}
\end{array}
Derivation
  1. Initial program 71.8%

    \[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. Final simplification81.9%

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

Alternative 24: 32.2% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-29}:\\
\;\;\;\;t\\

\mathbf{elif}\;t \leq 105:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.89999999999999988e-29 or 105 < t

    1. Initial program 70.3%

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

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

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

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

    if -1.89999999999999988e-29 < t < 105

    1. Initial program 73.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{-29}:\\ \;\;\;\;t\\ \mathbf{elif}\;t \leq 105:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 25.4% 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 71.8%

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

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

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 84.5% 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 2024046 
(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))))