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

Percentage Accurate: 68.5% → 89.5%
Time: 30.2s
Alternatives: 25
Speedup: 0.7×

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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 89.5% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+159} \lor \neg \left(z \leq 1.1 \cdot 10^{+120}\right):\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -2.6e+159) (not (<= z 1.1e+120)))
   (+ t (/ (- x t) (/ z (- y a))))
   (fma (/ (- y z) (- a z)) (- t x) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2.6e+159) || !(z <= 1.1e+120)) {
		tmp = t + ((x - t) / (z / (y - a)));
	} else {
		tmp = fma(((y - z) / (a - z)), (t - x), x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -2.6e+159) || !(z <= 1.1e+120))
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a))));
	else
		tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.6e+159], N[Not[LessEqual[z, 1.1e+120]], $MachinePrecision]], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.6e159 or 1.1000000000000001e120 < z

    1. Initial program 26.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e159 < z < 1.1000000000000001e120

    1. Initial program 84.9%

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

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

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

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

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

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

Alternative 2: 50.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{t \cdot y}{z}\\ t_2 := \frac{-t}{\frac{z}{y - z}}\\ t_3 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -2.9 \cdot 10^{+83}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -96000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-24}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-75}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-44}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a}\\ \mathbf{elif}\;z \leq 3.05 \cdot 10^{-7}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+102}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+146}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (/ (* t y) z)))
        (t_2 (/ (- t) (/ z (- y z))))
        (t_3 (* x (- 1.0 (/ y a)))))
   (if (<= z -2.9e+83)
     t_2
     (if (<= z -4.5e+60)
       (* x (/ (- y a) z))
       (if (<= z -96000000.0)
         t_1
         (if (<= z -1.35e-24)
           (* (- t x) (/ y a))
           (if (<= z -4.4e-27)
             t_1
             (if (<= z 1.8e-75)
               t_3
               (if (<= z 6e-44)
                 (/ (* t (- y z)) a)
                 (if (<= z 3.05e-7)
                   t_3
                   (if (<= z 7.8e+102)
                     (+ x (* t (/ y a)))
                     (if (<= z 7e+146) (* (/ y z) (- x t)) t_2))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((t * y) / z);
	double t_2 = -t / (z / (y - z));
	double t_3 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.9e+83) {
		tmp = t_2;
	} else if (z <= -4.5e+60) {
		tmp = x * ((y - a) / z);
	} else if (z <= -96000000.0) {
		tmp = t_1;
	} else if (z <= -1.35e-24) {
		tmp = (t - x) * (y / a);
	} else if (z <= -4.4e-27) {
		tmp = t_1;
	} else if (z <= 1.8e-75) {
		tmp = t_3;
	} else if (z <= 6e-44) {
		tmp = (t * (y - z)) / a;
	} else if (z <= 3.05e-7) {
		tmp = t_3;
	} else if (z <= 7.8e+102) {
		tmp = x + (t * (y / a));
	} else if (z <= 7e+146) {
		tmp = (y / z) * (x - t);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t - ((t * y) / z)
    t_2 = -t / (z / (y - z))
    t_3 = x * (1.0d0 - (y / a))
    if (z <= (-2.9d+83)) then
        tmp = t_2
    else if (z <= (-4.5d+60)) then
        tmp = x * ((y - a) / z)
    else if (z <= (-96000000.0d0)) then
        tmp = t_1
    else if (z <= (-1.35d-24)) then
        tmp = (t - x) * (y / a)
    else if (z <= (-4.4d-27)) then
        tmp = t_1
    else if (z <= 1.8d-75) then
        tmp = t_3
    else if (z <= 6d-44) then
        tmp = (t * (y - z)) / a
    else if (z <= 3.05d-7) then
        tmp = t_3
    else if (z <= 7.8d+102) then
        tmp = x + (t * (y / a))
    else if (z <= 7d+146) then
        tmp = (y / z) * (x - t)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((t * y) / z);
	double t_2 = -t / (z / (y - z));
	double t_3 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.9e+83) {
		tmp = t_2;
	} else if (z <= -4.5e+60) {
		tmp = x * ((y - a) / z);
	} else if (z <= -96000000.0) {
		tmp = t_1;
	} else if (z <= -1.35e-24) {
		tmp = (t - x) * (y / a);
	} else if (z <= -4.4e-27) {
		tmp = t_1;
	} else if (z <= 1.8e-75) {
		tmp = t_3;
	} else if (z <= 6e-44) {
		tmp = (t * (y - z)) / a;
	} else if (z <= 3.05e-7) {
		tmp = t_3;
	} else if (z <= 7.8e+102) {
		tmp = x + (t * (y / a));
	} else if (z <= 7e+146) {
		tmp = (y / z) * (x - t);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - ((t * y) / z)
	t_2 = -t / (z / (y - z))
	t_3 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -2.9e+83:
		tmp = t_2
	elif z <= -4.5e+60:
		tmp = x * ((y - a) / z)
	elif z <= -96000000.0:
		tmp = t_1
	elif z <= -1.35e-24:
		tmp = (t - x) * (y / a)
	elif z <= -4.4e-27:
		tmp = t_1
	elif z <= 1.8e-75:
		tmp = t_3
	elif z <= 6e-44:
		tmp = (t * (y - z)) / a
	elif z <= 3.05e-7:
		tmp = t_3
	elif z <= 7.8e+102:
		tmp = x + (t * (y / a))
	elif z <= 7e+146:
		tmp = (y / z) * (x - t)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(Float64(t * y) / z))
	t_2 = Float64(Float64(-t) / Float64(z / Float64(y - z)))
	t_3 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -2.9e+83)
		tmp = t_2;
	elseif (z <= -4.5e+60)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= -96000000.0)
		tmp = t_1;
	elseif (z <= -1.35e-24)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (z <= -4.4e-27)
		tmp = t_1;
	elseif (z <= 1.8e-75)
		tmp = t_3;
	elseif (z <= 6e-44)
		tmp = Float64(Float64(t * Float64(y - z)) / a);
	elseif (z <= 3.05e-7)
		tmp = t_3;
	elseif (z <= 7.8e+102)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	elseif (z <= 7e+146)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - ((t * y) / z);
	t_2 = -t / (z / (y - z));
	t_3 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -2.9e+83)
		tmp = t_2;
	elseif (z <= -4.5e+60)
		tmp = x * ((y - a) / z);
	elseif (z <= -96000000.0)
		tmp = t_1;
	elseif (z <= -1.35e-24)
		tmp = (t - x) * (y / a);
	elseif (z <= -4.4e-27)
		tmp = t_1;
	elseif (z <= 1.8e-75)
		tmp = t_3;
	elseif (z <= 6e-44)
		tmp = (t * (y - z)) / a;
	elseif (z <= 3.05e-7)
		tmp = t_3;
	elseif (z <= 7.8e+102)
		tmp = x + (t * (y / a));
	elseif (z <= 7e+146)
		tmp = (y / z) * (x - t);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(t * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-t) / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+83], t$95$2, If[LessEqual[z, -4.5e+60], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -96000000.0], t$95$1, If[LessEqual[z, -1.35e-24], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.4e-27], t$95$1, If[LessEqual[z, 1.8e-75], t$95$3, If[LessEqual[z, 6e-44], N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 3.05e-7], t$95$3, If[LessEqual[z, 7.8e+102], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+146], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -96000000:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.8 \cdot 10^{-75}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;z \leq 3.05 \cdot 10^{-7}:\\
\;\;\;\;t\_3\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if z < -2.89999999999999999e83 or 7.0000000000000002e146 < z

    1. Initial program 33.0%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac57.8%

        \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y - z}}} \]
    8. Simplified57.8%

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

    if -2.89999999999999999e83 < z < -4.50000000000000013e60

    1. Initial program 30.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000013e60 < z < -9.6e7 or -1.35000000000000003e-24 < z < -4.39999999999999974e-27

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{t \cdot y - \color{blue}{t \cdot a}}{z} \]
      10. distribute-lft-out--85.9%

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

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

      \[\leadsto t - \frac{\color{blue}{t \cdot y}}{z} \]
    10. Step-by-step derivation
      1. *-commutative84.2%

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
    11. Simplified84.2%

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

    if -9.6e7 < z < -1.35000000000000003e-24

    1. Initial program 86.6%

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

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

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

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

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

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

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

    if -4.39999999999999974e-27 < z < 1.8e-75 or 6.0000000000000005e-44 < z < 3.04999999999999991e-7

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

    if 1.8e-75 < z < 6.0000000000000005e-44

    1. Initial program 89.0%

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

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

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

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

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

    if 3.04999999999999991e-7 < z < 7.7999999999999997e102

    1. Initial program 61.3%

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

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

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

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

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

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

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

    if 7.7999999999999997e102 < z < 7.0000000000000002e146

    1. Initial program 36.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+83}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -96000000:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-24}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-44}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a}\\ \mathbf{elif}\;z \leq 3.05 \cdot 10^{-7}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+102}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+146}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 50.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-t}{\frac{z}{y - z}}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -9.8 \cdot 10^{+84}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.0002:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-25}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-27}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-44}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a}\\ \mathbf{elif}\;z \leq 2.85:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+103}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+146}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \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 -9.8e+84)
     t_1
     (if (<= z -2.3e+60)
       (* x (/ (- y a) z))
       (if (<= z -0.0002)
         (/ (- t) (/ (- a z) z))
         (if (<= z -4.4e-25)
           (* (- t x) (/ y a))
           (if (<= z -2.8e-27)
             (- t (/ (* t y) z))
             (if (<= z 3.2e-75)
               t_2
               (if (<= z 6e-44)
                 (/ (* t (- y z)) a)
                 (if (<= z 2.85)
                   t_2
                   (if (<= z 4e+103)
                     (+ x (* t (/ y a)))
                     (if (<= z 3.3e+146) (* (/ y z) (- x t)) 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 <= -9.8e+84) {
		tmp = t_1;
	} else if (z <= -2.3e+60) {
		tmp = x * ((y - a) / z);
	} else if (z <= -0.0002) {
		tmp = -t / ((a - z) / z);
	} else if (z <= -4.4e-25) {
		tmp = (t - x) * (y / a);
	} else if (z <= -2.8e-27) {
		tmp = t - ((t * y) / z);
	} else if (z <= 3.2e-75) {
		tmp = t_2;
	} else if (z <= 6e-44) {
		tmp = (t * (y - z)) / a;
	} else if (z <= 2.85) {
		tmp = t_2;
	} else if (z <= 4e+103) {
		tmp = x + (t * (y / a));
	} else if (z <= 3.3e+146) {
		tmp = (y / z) * (x - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = -t / (z / (y - z))
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-9.8d+84)) then
        tmp = t_1
    else if (z <= (-2.3d+60)) then
        tmp = x * ((y - a) / z)
    else if (z <= (-0.0002d0)) then
        tmp = -t / ((a - z) / z)
    else if (z <= (-4.4d-25)) then
        tmp = (t - x) * (y / a)
    else if (z <= (-2.8d-27)) then
        tmp = t - ((t * y) / z)
    else if (z <= 3.2d-75) then
        tmp = t_2
    else if (z <= 6d-44) then
        tmp = (t * (y - z)) / a
    else if (z <= 2.85d0) then
        tmp = t_2
    else if (z <= 4d+103) then
        tmp = x + (t * (y / a))
    else if (z <= 3.3d+146) then
        tmp = (y / z) * (x - t)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -t / (z / (y - z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -9.8e+84) {
		tmp = t_1;
	} else if (z <= -2.3e+60) {
		tmp = x * ((y - a) / z);
	} else if (z <= -0.0002) {
		tmp = -t / ((a - z) / z);
	} else if (z <= -4.4e-25) {
		tmp = (t - x) * (y / a);
	} else if (z <= -2.8e-27) {
		tmp = t - ((t * y) / z);
	} else if (z <= 3.2e-75) {
		tmp = t_2;
	} else if (z <= 6e-44) {
		tmp = (t * (y - z)) / a;
	} else if (z <= 2.85) {
		tmp = t_2;
	} else if (z <= 4e+103) {
		tmp = x + (t * (y / a));
	} else if (z <= 3.3e+146) {
		tmp = (y / z) * (x - t);
	} 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 <= -9.8e+84:
		tmp = t_1
	elif z <= -2.3e+60:
		tmp = x * ((y - a) / z)
	elif z <= -0.0002:
		tmp = -t / ((a - z) / z)
	elif z <= -4.4e-25:
		tmp = (t - x) * (y / a)
	elif z <= -2.8e-27:
		tmp = t - ((t * y) / z)
	elif z <= 3.2e-75:
		tmp = t_2
	elif z <= 6e-44:
		tmp = (t * (y - z)) / a
	elif z <= 2.85:
		tmp = t_2
	elif z <= 4e+103:
		tmp = x + (t * (y / a))
	elif z <= 3.3e+146:
		tmp = (y / z) * (x - t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(-t) / Float64(z / Float64(y - z)))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -9.8e+84)
		tmp = t_1;
	elseif (z <= -2.3e+60)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= -0.0002)
		tmp = Float64(Float64(-t) / Float64(Float64(a - z) / z));
	elseif (z <= -4.4e-25)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (z <= -2.8e-27)
		tmp = Float64(t - Float64(Float64(t * y) / z));
	elseif (z <= 3.2e-75)
		tmp = t_2;
	elseif (z <= 6e-44)
		tmp = Float64(Float64(t * Float64(y - z)) / a);
	elseif (z <= 2.85)
		tmp = t_2;
	elseif (z <= 4e+103)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	elseif (z <= 3.3e+146)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	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 <= -9.8e+84)
		tmp = t_1;
	elseif (z <= -2.3e+60)
		tmp = x * ((y - a) / z);
	elseif (z <= -0.0002)
		tmp = -t / ((a - z) / z);
	elseif (z <= -4.4e-25)
		tmp = (t - x) * (y / a);
	elseif (z <= -2.8e-27)
		tmp = t - ((t * y) / z);
	elseif (z <= 3.2e-75)
		tmp = t_2;
	elseif (z <= 6e-44)
		tmp = (t * (y - z)) / a;
	elseif (z <= 2.85)
		tmp = t_2;
	elseif (z <= 4e+103)
		tmp = x + (t * (y / a));
	elseif (z <= 3.3e+146)
		tmp = (y / z) * (x - t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.8e+84], t$95$1, If[LessEqual[z, -2.3e+60], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.0002], N[((-t) / N[(N[(a - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.4e-25], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.8e-27], N[(t - N[(N[(t * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e-75], t$95$2, If[LessEqual[z, 6e-44], N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 2.85], t$95$2, If[LessEqual[z, 4e+103], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+146], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -0.0002:\\
\;\;\;\;\frac{-t}{\frac{a - z}{z}}\\

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

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 2.85:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 9 regimes
  2. if z < -9.8e84 or 3.30000000000000016e146 < z

    1. Initial program 33.0%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac57.8%

        \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y - z}}} \]
    8. Simplified57.8%

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

    if -9.8e84 < z < -2.30000000000000017e60

    1. Initial program 30.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000017e60 < z < -2.0000000000000001e-4

    1. Initial program 91.0%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg68.8%

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

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

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

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

    if -2.0000000000000001e-4 < z < -4.4000000000000004e-25

    1. Initial program 76.5%

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

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

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

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

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

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

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

    if -4.4000000000000004e-25 < z < -2.8e-27

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot y - a \cdot t}{z}} \]
      9. *-commutative99.5%

        \[\leadsto t - \frac{t \cdot y - \color{blue}{t \cdot a}}{z} \]
      10. distribute-lft-out--99.5%

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

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

      \[\leadsto t - \frac{\color{blue}{t \cdot y}}{z} \]
    10. Step-by-step derivation
      1. *-commutative99.5%

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
    11. Simplified99.5%

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

    if -2.8e-27 < z < 3.19999999999999977e-75 or 6.0000000000000005e-44 < z < 2.85000000000000009

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

    if 3.19999999999999977e-75 < z < 6.0000000000000005e-44

    1. Initial program 89.0%

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

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

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

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

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

    if 2.85000000000000009 < z < 4e103

    1. Initial program 61.3%

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

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

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

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

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

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

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

    if 4e103 < z < 3.30000000000000016e146

    1. Initial program 36.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.8 \cdot 10^{+84}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.0002:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-25}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-27}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-44}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a}\\ \mathbf{elif}\;z \leq 2.85:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+103}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+146}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 49.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{-t}{\frac{z}{y - z}}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -1.52 \cdot 10^{+85}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.45 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.0042:\\ \;\;\;\;\frac{z \cdot \left(-t\right)}{a - z}\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-24}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-27}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-76}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-42}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a}\\ \mathbf{elif}\;z \leq 41000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+102}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+147}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \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.52e+85)
     t_1
     (if (<= z -2.45e+60)
       (* x (/ (- y a) z))
       (if (<= z -0.0042)
         (/ (* z (- t)) (- a z))
         (if (<= z -1.5e-24)
           (* (- t x) (/ y a))
           (if (<= z -4e-27)
             (- t (/ (* t y) z))
             (if (<= z 4e-76)
               t_2
               (if (<= z 1.05e-42)
                 (/ (* t (- y z)) a)
                 (if (<= z 41000.0)
                   t_2
                   (if (<= z 1.15e+102)
                     (+ x (* t (/ y a)))
                     (if (<= z 8e+147) (* (/ y z) (- x t)) 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.52e+85) {
		tmp = t_1;
	} else if (z <= -2.45e+60) {
		tmp = x * ((y - a) / z);
	} else if (z <= -0.0042) {
		tmp = (z * -t) / (a - z);
	} else if (z <= -1.5e-24) {
		tmp = (t - x) * (y / a);
	} else if (z <= -4e-27) {
		tmp = t - ((t * y) / z);
	} else if (z <= 4e-76) {
		tmp = t_2;
	} else if (z <= 1.05e-42) {
		tmp = (t * (y - z)) / a;
	} else if (z <= 41000.0) {
		tmp = t_2;
	} else if (z <= 1.15e+102) {
		tmp = x + (t * (y / a));
	} else if (z <= 8e+147) {
		tmp = (y / z) * (x - t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = -t / (z / (y - z))
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-1.52d+85)) then
        tmp = t_1
    else if (z <= (-2.45d+60)) then
        tmp = x * ((y - a) / z)
    else if (z <= (-0.0042d0)) then
        tmp = (z * -t) / (a - z)
    else if (z <= (-1.5d-24)) then
        tmp = (t - x) * (y / a)
    else if (z <= (-4d-27)) then
        tmp = t - ((t * y) / z)
    else if (z <= 4d-76) then
        tmp = t_2
    else if (z <= 1.05d-42) then
        tmp = (t * (y - z)) / a
    else if (z <= 41000.0d0) then
        tmp = t_2
    else if (z <= 1.15d+102) then
        tmp = x + (t * (y / a))
    else if (z <= 8d+147) then
        tmp = (y / z) * (x - t)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -t / (z / (y - z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -1.52e+85) {
		tmp = t_1;
	} else if (z <= -2.45e+60) {
		tmp = x * ((y - a) / z);
	} else if (z <= -0.0042) {
		tmp = (z * -t) / (a - z);
	} else if (z <= -1.5e-24) {
		tmp = (t - x) * (y / a);
	} else if (z <= -4e-27) {
		tmp = t - ((t * y) / z);
	} else if (z <= 4e-76) {
		tmp = t_2;
	} else if (z <= 1.05e-42) {
		tmp = (t * (y - z)) / a;
	} else if (z <= 41000.0) {
		tmp = t_2;
	} else if (z <= 1.15e+102) {
		tmp = x + (t * (y / a));
	} else if (z <= 8e+147) {
		tmp = (y / z) * (x - t);
	} 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.52e+85:
		tmp = t_1
	elif z <= -2.45e+60:
		tmp = x * ((y - a) / z)
	elif z <= -0.0042:
		tmp = (z * -t) / (a - z)
	elif z <= -1.5e-24:
		tmp = (t - x) * (y / a)
	elif z <= -4e-27:
		tmp = t - ((t * y) / z)
	elif z <= 4e-76:
		tmp = t_2
	elif z <= 1.05e-42:
		tmp = (t * (y - z)) / a
	elif z <= 41000.0:
		tmp = t_2
	elif z <= 1.15e+102:
		tmp = x + (t * (y / a))
	elif z <= 8e+147:
		tmp = (y / z) * (x - t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(-t) / Float64(z / Float64(y - z)))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -1.52e+85)
		tmp = t_1;
	elseif (z <= -2.45e+60)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= -0.0042)
		tmp = Float64(Float64(z * Float64(-t)) / Float64(a - z));
	elseif (z <= -1.5e-24)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (z <= -4e-27)
		tmp = Float64(t - Float64(Float64(t * y) / z));
	elseif (z <= 4e-76)
		tmp = t_2;
	elseif (z <= 1.05e-42)
		tmp = Float64(Float64(t * Float64(y - z)) / a);
	elseif (z <= 41000.0)
		tmp = t_2;
	elseif (z <= 1.15e+102)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	elseif (z <= 8e+147)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	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.52e+85)
		tmp = t_1;
	elseif (z <= -2.45e+60)
		tmp = x * ((y - a) / z);
	elseif (z <= -0.0042)
		tmp = (z * -t) / (a - z);
	elseif (z <= -1.5e-24)
		tmp = (t - x) * (y / a);
	elseif (z <= -4e-27)
		tmp = t - ((t * y) / z);
	elseif (z <= 4e-76)
		tmp = t_2;
	elseif (z <= 1.05e-42)
		tmp = (t * (y - z)) / a;
	elseif (z <= 41000.0)
		tmp = t_2;
	elseif (z <= 1.15e+102)
		tmp = x + (t * (y / a));
	elseif (z <= 8e+147)
		tmp = (y / z) * (x - t);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.52e+85], t$95$1, If[LessEqual[z, -2.45e+60], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.0042], N[(N[(z * (-t)), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5e-24], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e-27], N[(t - N[(N[(t * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-76], t$95$2, If[LessEqual[z, 1.05e-42], N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 41000.0], t$95$2, If[LessEqual[z, 1.15e+102], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+147], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -0.0042:\\
\;\;\;\;\frac{z \cdot \left(-t\right)}{a - z}\\

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

\mathbf{elif}\;z \leq -4 \cdot 10^{-27}:\\
\;\;\;\;t - \frac{t \cdot y}{z}\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-76}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 41000:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 9 regimes
  2. if z < -1.52e85 or 7.9999999999999998e147 < z

    1. Initial program 33.0%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac57.8%

        \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y - z}}} \]
    8. Simplified57.8%

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

    if -1.52e85 < z < -2.4500000000000001e60

    1. Initial program 30.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4500000000000001e60 < z < -0.00419999999999999974

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

    if -0.00419999999999999974 < z < -1.49999999999999998e-24

    1. Initial program 76.5%

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

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

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

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

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

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

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

    if -1.49999999999999998e-24 < z < -4.0000000000000002e-27

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot y - a \cdot t}{z}} \]
      9. *-commutative99.5%

        \[\leadsto t - \frac{t \cdot y - \color{blue}{t \cdot a}}{z} \]
      10. distribute-lft-out--99.5%

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

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

      \[\leadsto t - \frac{\color{blue}{t \cdot y}}{z} \]
    10. Step-by-step derivation
      1. *-commutative99.5%

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
    11. Simplified99.5%

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

    if -4.0000000000000002e-27 < z < 3.99999999999999971e-76 or 1.05000000000000003e-42 < z < 41000

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

    if 3.99999999999999971e-76 < z < 1.05000000000000003e-42

    1. Initial program 89.0%

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

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

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

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

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

    if 41000 < z < 1.1499999999999999e102

    1. Initial program 61.3%

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

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

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

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

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

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

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

    if 1.1499999999999999e102 < z < 7.9999999999999998e147

    1. Initial program 36.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.52 \cdot 10^{+85}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \mathbf{elif}\;z \leq -2.45 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.0042:\\ \;\;\;\;\frac{z \cdot \left(-t\right)}{a - z}\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-24}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-27}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-42}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a}\\ \mathbf{elif}\;z \leq 41000:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+102}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+147}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 48.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_3 := t - \frac{t \cdot y}{z}\\ \mathbf{if}\;z \leq -3 \cdot 10^{+88}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -65000000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-19}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-76}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-43}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-7}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+111}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+151}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z)))
        (t_2 (* x (- 1.0 (/ y a))))
        (t_3 (- t (/ (* t y) z))))
   (if (<= z -3e+88)
     t_3
     (if (<= z -2.7e+60)
       t_1
       (if (<= z -65000000.0)
         t_3
         (if (<= z -5.4e-19)
           (* (- t x) (/ y a))
           (if (<= z -4.4e-27)
             t_3
             (if (<= z 7.4e-76)
               t_2
               (if (<= z 6e-43)
                 (* y (/ (- t x) a))
                 (if (<= z 1.55e-7)
                   t_2
                   (if (<= z 3.9e+111)
                     (+ x (* t (/ y a)))
                     (if (<= z 2.05e+151) t_1 t_3))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = x * (1.0 - (y / a));
	double t_3 = t - ((t * y) / z);
	double tmp;
	if (z <= -3e+88) {
		tmp = t_3;
	} else if (z <= -2.7e+60) {
		tmp = t_1;
	} else if (z <= -65000000.0) {
		tmp = t_3;
	} else if (z <= -5.4e-19) {
		tmp = (t - x) * (y / a);
	} else if (z <= -4.4e-27) {
		tmp = t_3;
	} else if (z <= 7.4e-76) {
		tmp = t_2;
	} else if (z <= 6e-43) {
		tmp = y * ((t - x) / a);
	} else if (z <= 1.55e-7) {
		tmp = t_2;
	} else if (z <= 3.9e+111) {
		tmp = x + (t * (y / a));
	} else if (z <= 2.05e+151) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    t_2 = x * (1.0d0 - (y / a))
    t_3 = t - ((t * y) / z)
    if (z <= (-3d+88)) then
        tmp = t_3
    else if (z <= (-2.7d+60)) then
        tmp = t_1
    else if (z <= (-65000000.0d0)) then
        tmp = t_3
    else if (z <= (-5.4d-19)) then
        tmp = (t - x) * (y / a)
    else if (z <= (-4.4d-27)) then
        tmp = t_3
    else if (z <= 7.4d-76) then
        tmp = t_2
    else if (z <= 6d-43) then
        tmp = y * ((t - x) / a)
    else if (z <= 1.55d-7) then
        tmp = t_2
    else if (z <= 3.9d+111) then
        tmp = x + (t * (y / a))
    else if (z <= 2.05d+151) then
        tmp = t_1
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = x * (1.0 - (y / a));
	double t_3 = t - ((t * y) / z);
	double tmp;
	if (z <= -3e+88) {
		tmp = t_3;
	} else if (z <= -2.7e+60) {
		tmp = t_1;
	} else if (z <= -65000000.0) {
		tmp = t_3;
	} else if (z <= -5.4e-19) {
		tmp = (t - x) * (y / a);
	} else if (z <= -4.4e-27) {
		tmp = t_3;
	} else if (z <= 7.4e-76) {
		tmp = t_2;
	} else if (z <= 6e-43) {
		tmp = y * ((t - x) / a);
	} else if (z <= 1.55e-7) {
		tmp = t_2;
	} else if (z <= 3.9e+111) {
		tmp = x + (t * (y / a));
	} else if (z <= 2.05e+151) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = x * (1.0 - (y / a))
	t_3 = t - ((t * y) / z)
	tmp = 0
	if z <= -3e+88:
		tmp = t_3
	elif z <= -2.7e+60:
		tmp = t_1
	elif z <= -65000000.0:
		tmp = t_3
	elif z <= -5.4e-19:
		tmp = (t - x) * (y / a)
	elif z <= -4.4e-27:
		tmp = t_3
	elif z <= 7.4e-76:
		tmp = t_2
	elif z <= 6e-43:
		tmp = y * ((t - x) / a)
	elif z <= 1.55e-7:
		tmp = t_2
	elif z <= 3.9e+111:
		tmp = x + (t * (y / a))
	elif z <= 2.05e+151:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_3 = Float64(t - Float64(Float64(t * y) / z))
	tmp = 0.0
	if (z <= -3e+88)
		tmp = t_3;
	elseif (z <= -2.7e+60)
		tmp = t_1;
	elseif (z <= -65000000.0)
		tmp = t_3;
	elseif (z <= -5.4e-19)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (z <= -4.4e-27)
		tmp = t_3;
	elseif (z <= 7.4e-76)
		tmp = t_2;
	elseif (z <= 6e-43)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 1.55e-7)
		tmp = t_2;
	elseif (z <= 3.9e+111)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	elseif (z <= 2.05e+151)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = x * (1.0 - (y / a));
	t_3 = t - ((t * y) / z);
	tmp = 0.0;
	if (z <= -3e+88)
		tmp = t_3;
	elseif (z <= -2.7e+60)
		tmp = t_1;
	elseif (z <= -65000000.0)
		tmp = t_3;
	elseif (z <= -5.4e-19)
		tmp = (t - x) * (y / a);
	elseif (z <= -4.4e-27)
		tmp = t_3;
	elseif (z <= 7.4e-76)
		tmp = t_2;
	elseif (z <= 6e-43)
		tmp = y * ((t - x) / a);
	elseif (z <= 1.55e-7)
		tmp = t_2;
	elseif (z <= 3.9e+111)
		tmp = x + (t * (y / a));
	elseif (z <= 2.05e+151)
		tmp = t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t - N[(N[(t * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+88], t$95$3, If[LessEqual[z, -2.7e+60], t$95$1, If[LessEqual[z, -65000000.0], t$95$3, If[LessEqual[z, -5.4e-19], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.4e-27], t$95$3, If[LessEqual[z, 7.4e-76], t$95$2, If[LessEqual[z, 6e-43], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-7], t$95$2, If[LessEqual[z, 3.9e+111], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e+151], t$95$1, t$95$3]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.7 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -65000000:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 7.4 \cdot 10^{-76}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 1.55 \cdot 10^{-7}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 2.05 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -3.00000000000000005e88 or -2.6999999999999999e60 < z < -6.5e7 or -5.4000000000000002e-19 < z < -4.39999999999999974e-27 or 2.0499999999999999e151 < z

    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/60.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{t \cdot y - \color{blue}{t \cdot a}}{z} \]
      10. distribute-lft-out--52.7%

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

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

      \[\leadsto t - \frac{\color{blue}{t \cdot y}}{z} \]
    10. Step-by-step derivation
      1. *-commutative55.9%

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
    11. Simplified55.9%

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

    if -3.00000000000000005e88 < z < -2.6999999999999999e60 or 3.89999999999999979e111 < z < 2.0499999999999999e151

    1. Initial program 29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.5e7 < z < -5.4000000000000002e-19

    1. Initial program 86.6%

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

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

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

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

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

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

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

    if -4.39999999999999974e-27 < z < 7.40000000000000023e-76 or 6.00000000000000007e-43 < z < 1.55e-7

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

    if 7.40000000000000023e-76 < z < 6.00000000000000007e-43

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    12. Simplified67.9%

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

    if 1.55e-7 < z < 3.89999999999999979e111

    1. Initial program 63.1%

      \[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}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified81.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+88}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -65000000:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-19}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-27}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-43}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-7}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+111}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+151}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 48.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_3 := t - \frac{t \cdot y}{z}\\ \mathbf{if}\;z \leq -6 \cdot 10^{+88}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -45000000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-16}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-27}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-75}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-43}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-6}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+111}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{+149}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z)))
        (t_2 (* x (- 1.0 (/ y a))))
        (t_3 (- t (/ (* t y) z))))
   (if (<= z -6e+88)
     t_3
     (if (<= z -2.8e+60)
       t_1
       (if (<= z -45000000.0)
         t_3
         (if (<= z -7.8e-16)
           (* (- t x) (/ y a))
           (if (<= z -3.8e-27)
             t_3
             (if (<= z 2.6e-75)
               t_2
               (if (<= z 1.8e-43)
                 (/ t (/ a (- y z)))
                 (if (<= z 7.5e-6)
                   t_2
                   (if (<= z 2.35e+111)
                     (+ x (* t (/ y a)))
                     (if (<= z 1.06e+149) t_1 t_3))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = x * (1.0 - (y / a));
	double t_3 = t - ((t * y) / z);
	double tmp;
	if (z <= -6e+88) {
		tmp = t_3;
	} else if (z <= -2.8e+60) {
		tmp = t_1;
	} else if (z <= -45000000.0) {
		tmp = t_3;
	} else if (z <= -7.8e-16) {
		tmp = (t - x) * (y / a);
	} else if (z <= -3.8e-27) {
		tmp = t_3;
	} else if (z <= 2.6e-75) {
		tmp = t_2;
	} else if (z <= 1.8e-43) {
		tmp = t / (a / (y - z));
	} else if (z <= 7.5e-6) {
		tmp = t_2;
	} else if (z <= 2.35e+111) {
		tmp = x + (t * (y / a));
	} else if (z <= 1.06e+149) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    t_2 = x * (1.0d0 - (y / a))
    t_3 = t - ((t * y) / z)
    if (z <= (-6d+88)) then
        tmp = t_3
    else if (z <= (-2.8d+60)) then
        tmp = t_1
    else if (z <= (-45000000.0d0)) then
        tmp = t_3
    else if (z <= (-7.8d-16)) then
        tmp = (t - x) * (y / a)
    else if (z <= (-3.8d-27)) then
        tmp = t_3
    else if (z <= 2.6d-75) then
        tmp = t_2
    else if (z <= 1.8d-43) then
        tmp = t / (a / (y - z))
    else if (z <= 7.5d-6) then
        tmp = t_2
    else if (z <= 2.35d+111) then
        tmp = x + (t * (y / a))
    else if (z <= 1.06d+149) then
        tmp = t_1
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = x * (1.0 - (y / a));
	double t_3 = t - ((t * y) / z);
	double tmp;
	if (z <= -6e+88) {
		tmp = t_3;
	} else if (z <= -2.8e+60) {
		tmp = t_1;
	} else if (z <= -45000000.0) {
		tmp = t_3;
	} else if (z <= -7.8e-16) {
		tmp = (t - x) * (y / a);
	} else if (z <= -3.8e-27) {
		tmp = t_3;
	} else if (z <= 2.6e-75) {
		tmp = t_2;
	} else if (z <= 1.8e-43) {
		tmp = t / (a / (y - z));
	} else if (z <= 7.5e-6) {
		tmp = t_2;
	} else if (z <= 2.35e+111) {
		tmp = x + (t * (y / a));
	} else if (z <= 1.06e+149) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = x * (1.0 - (y / a))
	t_3 = t - ((t * y) / z)
	tmp = 0
	if z <= -6e+88:
		tmp = t_3
	elif z <= -2.8e+60:
		tmp = t_1
	elif z <= -45000000.0:
		tmp = t_3
	elif z <= -7.8e-16:
		tmp = (t - x) * (y / a)
	elif z <= -3.8e-27:
		tmp = t_3
	elif z <= 2.6e-75:
		tmp = t_2
	elif z <= 1.8e-43:
		tmp = t / (a / (y - z))
	elif z <= 7.5e-6:
		tmp = t_2
	elif z <= 2.35e+111:
		tmp = x + (t * (y / a))
	elif z <= 1.06e+149:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_3 = Float64(t - Float64(Float64(t * y) / z))
	tmp = 0.0
	if (z <= -6e+88)
		tmp = t_3;
	elseif (z <= -2.8e+60)
		tmp = t_1;
	elseif (z <= -45000000.0)
		tmp = t_3;
	elseif (z <= -7.8e-16)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (z <= -3.8e-27)
		tmp = t_3;
	elseif (z <= 2.6e-75)
		tmp = t_2;
	elseif (z <= 1.8e-43)
		tmp = Float64(t / Float64(a / Float64(y - z)));
	elseif (z <= 7.5e-6)
		tmp = t_2;
	elseif (z <= 2.35e+111)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	elseif (z <= 1.06e+149)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = x * (1.0 - (y / a));
	t_3 = t - ((t * y) / z);
	tmp = 0.0;
	if (z <= -6e+88)
		tmp = t_3;
	elseif (z <= -2.8e+60)
		tmp = t_1;
	elseif (z <= -45000000.0)
		tmp = t_3;
	elseif (z <= -7.8e-16)
		tmp = (t - x) * (y / a);
	elseif (z <= -3.8e-27)
		tmp = t_3;
	elseif (z <= 2.6e-75)
		tmp = t_2;
	elseif (z <= 1.8e-43)
		tmp = t / (a / (y - z));
	elseif (z <= 7.5e-6)
		tmp = t_2;
	elseif (z <= 2.35e+111)
		tmp = x + (t * (y / a));
	elseif (z <= 1.06e+149)
		tmp = t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t - N[(N[(t * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+88], t$95$3, If[LessEqual[z, -2.8e+60], t$95$1, If[LessEqual[z, -45000000.0], t$95$3, If[LessEqual[z, -7.8e-16], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.8e-27], t$95$3, If[LessEqual[z, 2.6e-75], t$95$2, If[LessEqual[z, 1.8e-43], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-6], t$95$2, If[LessEqual[z, 2.35e+111], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.06e+149], t$95$1, t$95$3]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.8 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -45000000:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;z \leq -3.8 \cdot 10^{-27}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{-75}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-6}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 1.06 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -6.00000000000000011e88 or -2.8e60 < z < -4.5e7 or -7.79999999999999954e-16 < z < -3.8e-27 or 1.05999999999999993e149 < z

    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/60.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{t \cdot y - \color{blue}{t \cdot a}}{z} \]
      10. distribute-lft-out--52.7%

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

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

      \[\leadsto t - \frac{\color{blue}{t \cdot y}}{z} \]
    10. Step-by-step derivation
      1. *-commutative55.9%

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
    11. Simplified55.9%

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

    if -6.00000000000000011e88 < z < -2.8e60 or 2.35000000000000004e111 < z < 1.05999999999999993e149

    1. Initial program 29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5e7 < z < -7.79999999999999954e-16

    1. Initial program 86.6%

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

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

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

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

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

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

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

    if -3.8e-27 < z < 2.6e-75 or 1.7999999999999999e-43 < z < 7.50000000000000019e-6

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

    if 2.6e-75 < z < 1.7999999999999999e-43

    1. Initial program 89.0%

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

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

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

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

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

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

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

    if 7.50000000000000019e-6 < z < 2.35000000000000004e111

    1. Initial program 63.1%

      \[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}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified81.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+88}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -45000000:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-16}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-27}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-43}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-6}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+111}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{+149}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 47.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_3 := t - \frac{t \cdot y}{z}\\ \mathbf{if}\;z \leq -2 \cdot 10^{+85}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -260000000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq -3.15 \cdot 10^{-24}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-27}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-43}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a}\\ \mathbf{elif}\;z \leq 0.0018:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+111}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+149}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z)))
        (t_2 (* x (- 1.0 (/ y a))))
        (t_3 (- t (/ (* t y) z))))
   (if (<= z -2e+85)
     t_3
     (if (<= z -2.65e+60)
       t_1
       (if (<= z -260000000.0)
         t_3
         (if (<= z -3.15e-24)
           (* (- t x) (/ y a))
           (if (<= z -3.4e-27)
             t_3
             (if (<= z 3.2e-75)
               t_2
               (if (<= z 1.8e-43)
                 (/ (* t (- y z)) a)
                 (if (<= z 0.0018)
                   t_2
                   (if (<= z 6.8e+111)
                     (+ x (* t (/ y a)))
                     (if (<= z 5.5e+149) t_1 t_3))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = x * (1.0 - (y / a));
	double t_3 = t - ((t * y) / z);
	double tmp;
	if (z <= -2e+85) {
		tmp = t_3;
	} else if (z <= -2.65e+60) {
		tmp = t_1;
	} else if (z <= -260000000.0) {
		tmp = t_3;
	} else if (z <= -3.15e-24) {
		tmp = (t - x) * (y / a);
	} else if (z <= -3.4e-27) {
		tmp = t_3;
	} else if (z <= 3.2e-75) {
		tmp = t_2;
	} else if (z <= 1.8e-43) {
		tmp = (t * (y - z)) / a;
	} else if (z <= 0.0018) {
		tmp = t_2;
	} else if (z <= 6.8e+111) {
		tmp = x + (t * (y / a));
	} else if (z <= 5.5e+149) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    t_2 = x * (1.0d0 - (y / a))
    t_3 = t - ((t * y) / z)
    if (z <= (-2d+85)) then
        tmp = t_3
    else if (z <= (-2.65d+60)) then
        tmp = t_1
    else if (z <= (-260000000.0d0)) then
        tmp = t_3
    else if (z <= (-3.15d-24)) then
        tmp = (t - x) * (y / a)
    else if (z <= (-3.4d-27)) then
        tmp = t_3
    else if (z <= 3.2d-75) then
        tmp = t_2
    else if (z <= 1.8d-43) then
        tmp = (t * (y - z)) / a
    else if (z <= 0.0018d0) then
        tmp = t_2
    else if (z <= 6.8d+111) then
        tmp = x + (t * (y / a))
    else if (z <= 5.5d+149) then
        tmp = t_1
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = x * (1.0 - (y / a));
	double t_3 = t - ((t * y) / z);
	double tmp;
	if (z <= -2e+85) {
		tmp = t_3;
	} else if (z <= -2.65e+60) {
		tmp = t_1;
	} else if (z <= -260000000.0) {
		tmp = t_3;
	} else if (z <= -3.15e-24) {
		tmp = (t - x) * (y / a);
	} else if (z <= -3.4e-27) {
		tmp = t_3;
	} else if (z <= 3.2e-75) {
		tmp = t_2;
	} else if (z <= 1.8e-43) {
		tmp = (t * (y - z)) / a;
	} else if (z <= 0.0018) {
		tmp = t_2;
	} else if (z <= 6.8e+111) {
		tmp = x + (t * (y / a));
	} else if (z <= 5.5e+149) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = x * (1.0 - (y / a))
	t_3 = t - ((t * y) / z)
	tmp = 0
	if z <= -2e+85:
		tmp = t_3
	elif z <= -2.65e+60:
		tmp = t_1
	elif z <= -260000000.0:
		tmp = t_3
	elif z <= -3.15e-24:
		tmp = (t - x) * (y / a)
	elif z <= -3.4e-27:
		tmp = t_3
	elif z <= 3.2e-75:
		tmp = t_2
	elif z <= 1.8e-43:
		tmp = (t * (y - z)) / a
	elif z <= 0.0018:
		tmp = t_2
	elif z <= 6.8e+111:
		tmp = x + (t * (y / a))
	elif z <= 5.5e+149:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_3 = Float64(t - Float64(Float64(t * y) / z))
	tmp = 0.0
	if (z <= -2e+85)
		tmp = t_3;
	elseif (z <= -2.65e+60)
		tmp = t_1;
	elseif (z <= -260000000.0)
		tmp = t_3;
	elseif (z <= -3.15e-24)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (z <= -3.4e-27)
		tmp = t_3;
	elseif (z <= 3.2e-75)
		tmp = t_2;
	elseif (z <= 1.8e-43)
		tmp = Float64(Float64(t * Float64(y - z)) / a);
	elseif (z <= 0.0018)
		tmp = t_2;
	elseif (z <= 6.8e+111)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	elseif (z <= 5.5e+149)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = x * (1.0 - (y / a));
	t_3 = t - ((t * y) / z);
	tmp = 0.0;
	if (z <= -2e+85)
		tmp = t_3;
	elseif (z <= -2.65e+60)
		tmp = t_1;
	elseif (z <= -260000000.0)
		tmp = t_3;
	elseif (z <= -3.15e-24)
		tmp = (t - x) * (y / a);
	elseif (z <= -3.4e-27)
		tmp = t_3;
	elseif (z <= 3.2e-75)
		tmp = t_2;
	elseif (z <= 1.8e-43)
		tmp = (t * (y - z)) / a;
	elseif (z <= 0.0018)
		tmp = t_2;
	elseif (z <= 6.8e+111)
		tmp = x + (t * (y / a));
	elseif (z <= 5.5e+149)
		tmp = t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t - N[(N[(t * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+85], t$95$3, If[LessEqual[z, -2.65e+60], t$95$1, If[LessEqual[z, -260000000.0], t$95$3, If[LessEqual[z, -3.15e-24], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.4e-27], t$95$3, If[LessEqual[z, 3.2e-75], t$95$2, If[LessEqual[z, 1.8e-43], N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 0.0018], t$95$2, If[LessEqual[z, 6.8e+111], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+149], t$95$1, t$95$3]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.65 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -260000000:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;z \leq -3.4 \cdot 10^{-27}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 0.0018:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -2e85 or -2.6499999999999998e60 < z < -2.6e8 or -3.1499999999999999e-24 < z < -3.3999999999999997e-27 or 5.49999999999999999e149 < z

    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/60.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{t \cdot y - \color{blue}{t \cdot a}}{z} \]
      10. distribute-lft-out--52.7%

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

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

      \[\leadsto t - \frac{\color{blue}{t \cdot y}}{z} \]
    10. Step-by-step derivation
      1. *-commutative55.9%

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
    11. Simplified55.9%

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

    if -2e85 < z < -2.6499999999999998e60 or 6.8000000000000003e111 < z < 5.49999999999999999e149

    1. Initial program 29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6e8 < z < -3.1499999999999999e-24

    1. Initial program 86.6%

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

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

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

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

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

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

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

    if -3.3999999999999997e-27 < z < 3.19999999999999977e-75 or 1.7999999999999999e-43 < z < 0.0018

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

    if 3.19999999999999977e-75 < z < 1.7999999999999999e-43

    1. Initial program 89.0%

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

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

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

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

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

    if 0.0018 < z < 6.8000000000000003e111

    1. Initial program 63.1%

      \[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}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified81.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+85}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -260000000:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq -3.15 \cdot 10^{-24}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-27}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-43}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a}\\ \mathbf{elif}\;z \leq 0.0018:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+111}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+149}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 47.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a}\\ t_2 := x \cdot \frac{y - a}{z}\\ t_3 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -5.6 \cdot 10^{+85}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{+60}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -0.0105:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-75}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+111}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+146}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) a)))
        (t_2 (* x (/ (- y a) z)))
        (t_3 (* x (- 1.0 (/ y a)))))
   (if (<= z -5.6e+85)
     t
     (if (<= z -2.5e+60)
       t_2
       (if (<= z -0.0105)
         t
         (if (<= z -9.6e-34)
           t_1
           (if (<= z 1.9e-75)
             t_3
             (if (<= z 6e-44)
               t_1
               (if (<= z 3.1e+111) t_3 (if (<= z 7e+146) t_2 t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double t_2 = x * ((y - a) / z);
	double t_3 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -5.6e+85) {
		tmp = t;
	} else if (z <= -2.5e+60) {
		tmp = t_2;
	} else if (z <= -0.0105) {
		tmp = t;
	} else if (z <= -9.6e-34) {
		tmp = t_1;
	} else if (z <= 1.9e-75) {
		tmp = t_3;
	} else if (z <= 6e-44) {
		tmp = t_1;
	} else if (z <= 3.1e+111) {
		tmp = t_3;
	} else if (z <= 7e+146) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = y * ((t - x) / a)
    t_2 = x * ((y - a) / z)
    t_3 = x * (1.0d0 - (y / a))
    if (z <= (-5.6d+85)) then
        tmp = t
    else if (z <= (-2.5d+60)) then
        tmp = t_2
    else if (z <= (-0.0105d0)) then
        tmp = t
    else if (z <= (-9.6d-34)) then
        tmp = t_1
    else if (z <= 1.9d-75) then
        tmp = t_3
    else if (z <= 6d-44) then
        tmp = t_1
    else if (z <= 3.1d+111) then
        tmp = t_3
    else if (z <= 7d+146) then
        tmp = t_2
    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 = y * ((t - x) / a);
	double t_2 = x * ((y - a) / z);
	double t_3 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -5.6e+85) {
		tmp = t;
	} else if (z <= -2.5e+60) {
		tmp = t_2;
	} else if (z <= -0.0105) {
		tmp = t;
	} else if (z <= -9.6e-34) {
		tmp = t_1;
	} else if (z <= 1.9e-75) {
		tmp = t_3;
	} else if (z <= 6e-44) {
		tmp = t_1;
	} else if (z <= 3.1e+111) {
		tmp = t_3;
	} else if (z <= 7e+146) {
		tmp = t_2;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / a)
	t_2 = x * ((y - a) / z)
	t_3 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -5.6e+85:
		tmp = t
	elif z <= -2.5e+60:
		tmp = t_2
	elif z <= -0.0105:
		tmp = t
	elif z <= -9.6e-34:
		tmp = t_1
	elif z <= 1.9e-75:
		tmp = t_3
	elif z <= 6e-44:
		tmp = t_1
	elif z <= 3.1e+111:
		tmp = t_3
	elif z <= 7e+146:
		tmp = t_2
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / a))
	t_2 = Float64(x * Float64(Float64(y - a) / z))
	t_3 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -5.6e+85)
		tmp = t;
	elseif (z <= -2.5e+60)
		tmp = t_2;
	elseif (z <= -0.0105)
		tmp = t;
	elseif (z <= -9.6e-34)
		tmp = t_1;
	elseif (z <= 1.9e-75)
		tmp = t_3;
	elseif (z <= 6e-44)
		tmp = t_1;
	elseif (z <= 3.1e+111)
		tmp = t_3;
	elseif (z <= 7e+146)
		tmp = t_2;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / a);
	t_2 = x * ((y - a) / z);
	t_3 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -5.6e+85)
		tmp = t;
	elseif (z <= -2.5e+60)
		tmp = t_2;
	elseif (z <= -0.0105)
		tmp = t;
	elseif (z <= -9.6e-34)
		tmp = t_1;
	elseif (z <= 1.9e-75)
		tmp = t_3;
	elseif (z <= 6e-44)
		tmp = t_1;
	elseif (z <= 3.1e+111)
		tmp = t_3;
	elseif (z <= 7e+146)
		tmp = t_2;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e+85], t, If[LessEqual[z, -2.5e+60], t$95$2, If[LessEqual[z, -0.0105], t, If[LessEqual[z, -9.6e-34], t$95$1, If[LessEqual[z, 1.9e-75], t$95$3, If[LessEqual[z, 6e-44], t$95$1, If[LessEqual[z, 3.1e+111], t$95$3, If[LessEqual[z, 7e+146], t$95$2, t]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.5 \cdot 10^{+60}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -0.0105:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -9.6 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.9 \cdot 10^{-75}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 6 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.1 \cdot 10^{+111}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 7 \cdot 10^{+146}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.5999999999999998e85 or -2.49999999999999987e60 < z < -0.0105000000000000007 or 7.0000000000000002e146 < z

    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/60.9%

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

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

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

    if -5.5999999999999998e85 < z < -2.49999999999999987e60 or 3.1e111 < z < 7.0000000000000002e146

    1. Initial program 29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.0105000000000000007 < z < -9.59999999999999965e-34 or 1.89999999999999997e-75 < z < 6.0000000000000005e-44

    1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    12. Simplified66.4%

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

    if -9.59999999999999965e-34 < z < 1.89999999999999997e-75 or 6.0000000000000005e-44 < z < 3.1e111

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.6 \cdot 10^{+85}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.0105:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-34}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-44}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+146}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 47.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -280000000:\\
\;\;\;\;t\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 2.35 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -6.5000000000000002e88 or -2.30000000000000017e60 < z < -2.8e8 or 1.45000000000000005e150 < z

    1. Initial program 38.2%

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

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

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

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

    if -6.5000000000000002e88 < z < -2.30000000000000017e60 or 2.35000000000000004e111 < z < 1.45000000000000005e150

    1. Initial program 29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8e8 < z < -1.8500000000000001e-28

    1. Initial program 91.9%

      \[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}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified99.9%

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

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

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

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

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

    if -1.8500000000000001e-28 < z < 3.19999999999999977e-75 or 6.0000000000000005e-44 < z < 2.35000000000000004e111

    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/96.3%

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

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

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

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

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

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

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

    if 3.19999999999999977e-75 < z < 6.0000000000000005e-44

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    12. Simplified67.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+88}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -280000000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-28}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-44}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+150}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 47.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := x \cdot \frac{y - a}{z}\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+88}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -160000000:\\ \;\;\;\;t + \frac{a}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-28}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 10^{-78}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-43}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+111}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+148}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* x (/ (- y a) z))))
   (if (<= z -1.8e+88)
     t
     (if (<= z -2.3e+60)
       t_2
       (if (<= z -160000000.0)
         (+ t (/ a (/ z t)))
         (if (<= z -3.9e-28)
           (* (- t x) (/ y a))
           (if (<= z 1e-78)
             t_1
             (if (<= z 1.8e-43)
               (* y (/ (- t x) a))
               (if (<= z 3.8e+111) t_1 (if (<= z 2.45e+148) t_2 t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = x * ((y - a) / z);
	double tmp;
	if (z <= -1.8e+88) {
		tmp = t;
	} else if (z <= -2.3e+60) {
		tmp = t_2;
	} else if (z <= -160000000.0) {
		tmp = t + (a / (z / t));
	} else if (z <= -3.9e-28) {
		tmp = (t - x) * (y / a);
	} else if (z <= 1e-78) {
		tmp = t_1;
	} else if (z <= 1.8e-43) {
		tmp = y * ((t - x) / a);
	} else if (z <= 3.8e+111) {
		tmp = t_1;
	} else if (z <= 2.45e+148) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    t_2 = x * ((y - a) / z)
    if (z <= (-1.8d+88)) then
        tmp = t
    else if (z <= (-2.3d+60)) then
        tmp = t_2
    else if (z <= (-160000000.0d0)) then
        tmp = t + (a / (z / t))
    else if (z <= (-3.9d-28)) then
        tmp = (t - x) * (y / a)
    else if (z <= 1d-78) then
        tmp = t_1
    else if (z <= 1.8d-43) then
        tmp = y * ((t - x) / a)
    else if (z <= 3.8d+111) then
        tmp = t_1
    else if (z <= 2.45d+148) then
        tmp = t_2
    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 t_2 = x * ((y - a) / z);
	double tmp;
	if (z <= -1.8e+88) {
		tmp = t;
	} else if (z <= -2.3e+60) {
		tmp = t_2;
	} else if (z <= -160000000.0) {
		tmp = t + (a / (z / t));
	} else if (z <= -3.9e-28) {
		tmp = (t - x) * (y / a);
	} else if (z <= 1e-78) {
		tmp = t_1;
	} else if (z <= 1.8e-43) {
		tmp = y * ((t - x) / a);
	} else if (z <= 3.8e+111) {
		tmp = t_1;
	} else if (z <= 2.45e+148) {
		tmp = t_2;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = x * ((y - a) / z)
	tmp = 0
	if z <= -1.8e+88:
		tmp = t
	elif z <= -2.3e+60:
		tmp = t_2
	elif z <= -160000000.0:
		tmp = t + (a / (z / t))
	elif z <= -3.9e-28:
		tmp = (t - x) * (y / a)
	elif z <= 1e-78:
		tmp = t_1
	elif z <= 1.8e-43:
		tmp = y * ((t - x) / a)
	elif z <= 3.8e+111:
		tmp = t_1
	elif z <= 2.45e+148:
		tmp = t_2
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(x * Float64(Float64(y - a) / z))
	tmp = 0.0
	if (z <= -1.8e+88)
		tmp = t;
	elseif (z <= -2.3e+60)
		tmp = t_2;
	elseif (z <= -160000000.0)
		tmp = Float64(t + Float64(a / Float64(z / t)));
	elseif (z <= -3.9e-28)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (z <= 1e-78)
		tmp = t_1;
	elseif (z <= 1.8e-43)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 3.8e+111)
		tmp = t_1;
	elseif (z <= 2.45e+148)
		tmp = t_2;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = x * ((y - a) / z);
	tmp = 0.0;
	if (z <= -1.8e+88)
		tmp = t;
	elseif (z <= -2.3e+60)
		tmp = t_2;
	elseif (z <= -160000000.0)
		tmp = t + (a / (z / t));
	elseif (z <= -3.9e-28)
		tmp = (t - x) * (y / a);
	elseif (z <= 1e-78)
		tmp = t_1;
	elseif (z <= 1.8e-43)
		tmp = y * ((t - x) / a);
	elseif (z <= 3.8e+111)
		tmp = t_1;
	elseif (z <= 2.45e+148)
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+88], t, If[LessEqual[z, -2.3e+60], t$95$2, If[LessEqual[z, -160000000.0], N[(t + N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.9e-28], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-78], t$95$1, If[LessEqual[z, 1.8e-43], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+111], t$95$1, If[LessEqual[z, 2.45e+148], t$95$2, t]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -160000000:\\
\;\;\;\;t + \frac{a}{\frac{z}{t}}\\

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

\mathbf{elif}\;z \leq 10^{-78}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.45 \cdot 10^{+148}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.8000000000000001e88 or 2.45e148 < z

    1. Initial program 33.0%

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

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

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

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

    if -1.8000000000000001e88 < z < -2.30000000000000017e60 or 3.79999999999999976e111 < z < 2.45e148

    1. Initial program 29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000017e60 < z < -1.6e8

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot y - a \cdot t}{z}} \]
      9. *-commutative80.8%

        \[\leadsto t - \frac{t \cdot y - \color{blue}{t \cdot a}}{z} \]
      10. distribute-lft-out--80.8%

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

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{a \cdot t}{z}} \]
    10. Step-by-step derivation
      1. sub-neg69.0%

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

        \[\leadsto t + \left(-\color{blue}{\left(-\frac{a \cdot t}{z}\right)}\right) \]
      3. remove-double-neg69.0%

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

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t}}} \]
    11. Simplified69.0%

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

    if -1.6e8 < z < -3.89999999999999999e-28

    1. Initial program 91.9%

      \[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}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified99.9%

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

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

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

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

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

    if -3.89999999999999999e-28 < z < 9.99999999999999999e-79 or 1.7999999999999999e-43 < z < 3.79999999999999976e111

    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/96.3%

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

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

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

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

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

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

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

    if 9.99999999999999999e-79 < z < 1.7999999999999999e-43

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    12. Simplified67.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+88}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -160000000:\\ \;\;\;\;t + \frac{a}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-28}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 10^{-78}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-43}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+148}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 47.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ \mathbf{if}\;z \leq -2.15 \cdot 10^{+87}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -50000000:\\ \;\;\;\;t + \frac{a}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-31}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-36}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 9.4 \cdot 10^{+111}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+150}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z))))
   (if (<= z -2.15e+87)
     t
     (if (<= z -2.3e+60)
       t_1
       (if (<= z -50000000.0)
         (+ t (/ a (/ z t)))
         (if (<= z -2.05e-31)
           (* (- t x) (/ y a))
           (if (<= z 3.2e-75)
             (* x (- 1.0 (/ y a)))
             (if (<= z 5e-36)
               (* y (/ (- t x) a))
               (if (<= z 9.4e+111)
                 (+ x (* t (/ y a)))
                 (if (<= z 2e+150) t_1 t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double tmp;
	if (z <= -2.15e+87) {
		tmp = t;
	} else if (z <= -2.3e+60) {
		tmp = t_1;
	} else if (z <= -50000000.0) {
		tmp = t + (a / (z / t));
	} else if (z <= -2.05e-31) {
		tmp = (t - x) * (y / a);
	} else if (z <= 3.2e-75) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 5e-36) {
		tmp = y * ((t - x) / a);
	} else if (z <= 9.4e+111) {
		tmp = x + (t * (y / a));
	} else if (z <= 2e+150) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    if (z <= (-2.15d+87)) then
        tmp = t
    else if (z <= (-2.3d+60)) then
        tmp = t_1
    else if (z <= (-50000000.0d0)) then
        tmp = t + (a / (z / t))
    else if (z <= (-2.05d-31)) then
        tmp = (t - x) * (y / a)
    else if (z <= 3.2d-75) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 5d-36) then
        tmp = y * ((t - x) / a)
    else if (z <= 9.4d+111) then
        tmp = x + (t * (y / a))
    else if (z <= 2d+150) then
        tmp = t_1
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double tmp;
	if (z <= -2.15e+87) {
		tmp = t;
	} else if (z <= -2.3e+60) {
		tmp = t_1;
	} else if (z <= -50000000.0) {
		tmp = t + (a / (z / t));
	} else if (z <= -2.05e-31) {
		tmp = (t - x) * (y / a);
	} else if (z <= 3.2e-75) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 5e-36) {
		tmp = y * ((t - x) / a);
	} else if (z <= 9.4e+111) {
		tmp = x + (t * (y / a));
	} else if (z <= 2e+150) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	tmp = 0
	if z <= -2.15e+87:
		tmp = t
	elif z <= -2.3e+60:
		tmp = t_1
	elif z <= -50000000.0:
		tmp = t + (a / (z / t))
	elif z <= -2.05e-31:
		tmp = (t - x) * (y / a)
	elif z <= 3.2e-75:
		tmp = x * (1.0 - (y / a))
	elif z <= 5e-36:
		tmp = y * ((t - x) / a)
	elif z <= 9.4e+111:
		tmp = x + (t * (y / a))
	elif z <= 2e+150:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	tmp = 0.0
	if (z <= -2.15e+87)
		tmp = t;
	elseif (z <= -2.3e+60)
		tmp = t_1;
	elseif (z <= -50000000.0)
		tmp = Float64(t + Float64(a / Float64(z / t)));
	elseif (z <= -2.05e-31)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (z <= 3.2e-75)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 5e-36)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 9.4e+111)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	elseif (z <= 2e+150)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	tmp = 0.0;
	if (z <= -2.15e+87)
		tmp = t;
	elseif (z <= -2.3e+60)
		tmp = t_1;
	elseif (z <= -50000000.0)
		tmp = t + (a / (z / t));
	elseif (z <= -2.05e-31)
		tmp = (t - x) * (y / a);
	elseif (z <= 3.2e-75)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 5e-36)
		tmp = y * ((t - x) / a);
	elseif (z <= 9.4e+111)
		tmp = x + (t * (y / a));
	elseif (z <= 2e+150)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.15e+87], t, If[LessEqual[z, -2.3e+60], t$95$1, If[LessEqual[z, -50000000.0], N[(t + N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.05e-31], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e-75], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-36], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.4e+111], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+150], t$95$1, t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -50000000:\\
\;\;\;\;t + \frac{a}{\frac{z}{t}}\\

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

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

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

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

\mathbf{elif}\;z \leq 2 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if z < -2.15e87 or 1.99999999999999996e150 < z

    1. Initial program 33.0%

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

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

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

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

    if -2.15e87 < z < -2.30000000000000017e60 or 9.40000000000000015e111 < z < 1.99999999999999996e150

    1. Initial program 29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.30000000000000017e60 < z < -5e7

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot y - a \cdot t}{z}} \]
      9. *-commutative80.8%

        \[\leadsto t - \frac{t \cdot y - \color{blue}{t \cdot a}}{z} \]
      10. distribute-lft-out--80.8%

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

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{a \cdot t}{z}} \]
    10. Step-by-step derivation
      1. sub-neg69.0%

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

        \[\leadsto t + \left(-\color{blue}{\left(-\frac{a \cdot t}{z}\right)}\right) \]
      3. remove-double-neg69.0%

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

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t}}} \]
    11. Simplified69.0%

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

    if -5e7 < z < -2.0499999999999998e-31

    1. Initial program 91.9%

      \[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}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified99.9%

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

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

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

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

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

    if -2.0499999999999998e-31 < z < 3.19999999999999977e-75

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

    if 3.19999999999999977e-75 < z < 5.00000000000000004e-36

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000004e-36 < z < 9.40000000000000015e111

    1. Initial program 72.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{+87}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -50000000:\\ \;\;\;\;t + \frac{a}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-31}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-36}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 9.4 \cdot 10^{+111}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+150}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 52.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a - z}\\ t_2 := x + t \cdot \frac{y}{a}\\ \mathbf{if}\;y \leq -5 \cdot 10^{+99}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-10}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{-118}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-287}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-158}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;y \leq 1.46 \cdot 10^{+35}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) (- a z)))) (t_2 (+ x (* t (/ y a)))))
   (if (<= y -5e+99)
     t_1
     (if (<= y -8.2e-10)
       (- x (/ (* x y) a))
       (if (<= y -7.4e-118)
         t_1
         (if (<= y -4.1e-287)
           t_2
           (if (<= y 1.8e-158)
             (/ (- t) (/ (- a z) z))
             (if (<= y 1.46e+35) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / (a - z));
	double t_2 = x + (t * (y / a));
	double tmp;
	if (y <= -5e+99) {
		tmp = t_1;
	} else if (y <= -8.2e-10) {
		tmp = x - ((x * y) / a);
	} else if (y <= -7.4e-118) {
		tmp = t_1;
	} else if (y <= -4.1e-287) {
		tmp = t_2;
	} else if (y <= 1.8e-158) {
		tmp = -t / ((a - z) / z);
	} else if (y <= 1.46e+35) {
		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 = y * ((t - x) / (a - z))
    t_2 = x + (t * (y / a))
    if (y <= (-5d+99)) then
        tmp = t_1
    else if (y <= (-8.2d-10)) then
        tmp = x - ((x * y) / a)
    else if (y <= (-7.4d-118)) then
        tmp = t_1
    else if (y <= (-4.1d-287)) then
        tmp = t_2
    else if (y <= 1.8d-158) then
        tmp = -t / ((a - z) / z)
    else if (y <= 1.46d+35) 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 = y * ((t - x) / (a - z));
	double t_2 = x + (t * (y / a));
	double tmp;
	if (y <= -5e+99) {
		tmp = t_1;
	} else if (y <= -8.2e-10) {
		tmp = x - ((x * y) / a);
	} else if (y <= -7.4e-118) {
		tmp = t_1;
	} else if (y <= -4.1e-287) {
		tmp = t_2;
	} else if (y <= 1.8e-158) {
		tmp = -t / ((a - z) / z);
	} else if (y <= 1.46e+35) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / (a - z))
	t_2 = x + (t * (y / a))
	tmp = 0
	if y <= -5e+99:
		tmp = t_1
	elif y <= -8.2e-10:
		tmp = x - ((x * y) / a)
	elif y <= -7.4e-118:
		tmp = t_1
	elif y <= -4.1e-287:
		tmp = t_2
	elif y <= 1.8e-158:
		tmp = -t / ((a - z) / z)
	elif y <= 1.46e+35:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	t_2 = Float64(x + Float64(t * Float64(y / a)))
	tmp = 0.0
	if (y <= -5e+99)
		tmp = t_1;
	elseif (y <= -8.2e-10)
		tmp = Float64(x - Float64(Float64(x * y) / a));
	elseif (y <= -7.4e-118)
		tmp = t_1;
	elseif (y <= -4.1e-287)
		tmp = t_2;
	elseif (y <= 1.8e-158)
		tmp = Float64(Float64(-t) / Float64(Float64(a - z) / z));
	elseif (y <= 1.46e+35)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / (a - z));
	t_2 = x + (t * (y / a));
	tmp = 0.0;
	if (y <= -5e+99)
		tmp = t_1;
	elseif (y <= -8.2e-10)
		tmp = x - ((x * y) / a);
	elseif (y <= -7.4e-118)
		tmp = t_1;
	elseif (y <= -4.1e-287)
		tmp = t_2;
	elseif (y <= 1.8e-158)
		tmp = -t / ((a - z) / z);
	elseif (y <= 1.46e+35)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e+99], t$95$1, If[LessEqual[y, -8.2e-10], N[(x - N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.4e-118], t$95$1, If[LessEqual[y, -4.1e-287], t$95$2, If[LessEqual[y, 1.8e-158], N[((-t) / N[(N[(a - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.46e+35], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -7.4 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -4.1 \cdot 10^{-287}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 1.46 \cdot 10^{+35}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.00000000000000008e99 or -8.1999999999999996e-10 < y < -7.40000000000000029e-118 or 1.4599999999999999e35 < y

    1. Initial program 68.4%

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

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

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

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

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

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

    if -5.00000000000000008e99 < y < -8.1999999999999996e-10

    1. Initial program 67.5%

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

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

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

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

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

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

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

    if -7.40000000000000029e-118 < y < -4.1000000000000002e-287 or 1.79999999999999995e-158 < y < 1.4599999999999999e35

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

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

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

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

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

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

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

    if -4.1000000000000002e-287 < y < 1.79999999999999995e-158

    1. Initial program 63.1%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      3. distribute-neg-frac66.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+99}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;y \leq -8.2 \cdot 10^{-10}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{-118}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-287}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-158}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;y \leq 1.46 \cdot 10^{+35}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 53.4% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;y \leq -1.7 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -3.9 \cdot 10^{-287}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;y \leq 3.7 \cdot 10^{+34}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.75000000000000015e93 or -1.99999999999999991e-6 < y < -1.70000000000000017e-117 or 3.70000000000000009e34 < y

    1. Initial program 68.9%

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

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

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

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

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

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

    if -2.75000000000000015e93 < y < -1.99999999999999991e-6

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    10. Step-by-step derivation
      1. metadata-eval55.9%

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

        \[\leadsto x + \left(-1\right) \cdot \color{blue}{\frac{x}{\frac{a}{y}}} \]
      3. cancel-sign-sub-inv55.8%

        \[\leadsto \color{blue}{x - 1 \cdot \frac{x}{\frac{a}{y}}} \]
      4. *-lft-identity55.8%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
      5. associate-/r/55.9%

        \[\leadsto x - \color{blue}{\frac{x}{a} \cdot y} \]
      6. *-commutative55.9%

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

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

    if -1.70000000000000017e-117 < y < -3.9e-287 or 1.99999999999999998e-159 < y < 3.70000000000000009e34

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

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

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

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

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

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

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

    if -3.9e-287 < y < 1.99999999999999998e-159

    1. Initial program 63.1%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      3. distribute-neg-frac66.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.75 \cdot 10^{+93}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-6}:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{elif}\;y \leq -1.7 \cdot 10^{-117}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{-287}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-159}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+34}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 52.0% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2.55 \cdot 10^{+138} \lor \neg \left(a \leq 4.6 \cdot 10^{+264}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.44999999999999986e-51 or 2.5499999999999999e138 < a < 4.6000000000000003e264

    1. Initial program 72.5%

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

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

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

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

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

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

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

    if -1.44999999999999986e-51 < a < -6.1999999999999996e-268 or 8.79999999999999958e-210 < a < 1.05e-89

    1. Initial program 62.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{t \cdot y - a \cdot t}{z}} \]
      9. *-commutative58.4%

        \[\leadsto t - \frac{t \cdot y - \color{blue}{t \cdot a}}{z} \]
      10. distribute-lft-out--58.4%

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

      \[\leadsto \color{blue}{t - \frac{t \cdot \left(y - a\right)}{z}} \]
    9. Taylor expanded in y around inf 58.1%

      \[\leadsto t - \frac{\color{blue}{t \cdot y}}{z} \]
    10. Step-by-step derivation
      1. *-commutative58.1%

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
    11. Simplified58.1%

      \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]

    if -6.1999999999999996e-268 < a < 8.79999999999999958e-210

    1. Initial program 62.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/74.6%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified74.6%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 83.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+83.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/83.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/83.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-sub83.5%

        \[\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--83.5%

        \[\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/83.5%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. mul-1-neg83.5%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      8. distribute-rgt-out--83.5%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      9. unsub-neg83.5%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*95.5%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Simplified95.5%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    8. Taylor expanded in y around -inf 58.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right)}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg58.4%

        \[\leadsto \color{blue}{-\frac{y \cdot \left(t - x\right)}{z}} \]
      2. associate-/l*70.5%

        \[\leadsto -\color{blue}{\frac{y}{\frac{z}{t - x}}} \]
    10. Simplified70.5%

      \[\leadsto \color{blue}{-\frac{y}{\frac{z}{t - x}}} \]

    if 1.05e-89 < a < 2.5499999999999999e138 or 4.6000000000000003e264 < a

    1. Initial program 71.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/85.5%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified85.5%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 66.8%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
    6. Taylor expanded in x around inf 58.6%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg58.6%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{a}\right)}\right) \]
      2. unsub-neg58.6%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    8. Simplified58.6%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification60.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{-51}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-268}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;a \leq 8.8 \cdot 10^{-210}:\\ \;\;\;\;\frac{-y}{\frac{z}{t - x}}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-89}:\\ \;\;\;\;t - \frac{t \cdot y}{z}\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{+138} \lor \neg \left(a \leq 4.6 \cdot 10^{+264}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 65.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -1.02 \cdot 10^{+82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.00026:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+103}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+145}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= z -1.02e+82)
     t_1
     (if (<= z -4.2e+60)
       (* x (/ (- y a) z))
       (if (<= z -0.00026)
         t_1
         (if (<= z 7.5e+103)
           (+ x (* (- t x) (/ y a)))
           (if (<= z 1.35e+145)
             (* (/ y z) (- x t))
             (+ t (/ a (/ z (- t x)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.02e+82) {
		tmp = t_1;
	} else if (z <= -4.2e+60) {
		tmp = x * ((y - a) / z);
	} else if (z <= -0.00026) {
		tmp = t_1;
	} else if (z <= 7.5e+103) {
		tmp = x + ((t - x) * (y / a));
	} else if (z <= 1.35e+145) {
		tmp = (y / z) * (x - t);
	} else {
		tmp = t + (a / (z / (t - x)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (z <= (-1.02d+82)) then
        tmp = t_1
    else if (z <= (-4.2d+60)) then
        tmp = x * ((y - a) / z)
    else if (z <= (-0.00026d0)) then
        tmp = t_1
    else if (z <= 7.5d+103) then
        tmp = x + ((t - x) * (y / a))
    else if (z <= 1.35d+145) then
        tmp = (y / z) * (x - t)
    else
        tmp = t + (a / (z / (t - x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.02e+82) {
		tmp = t_1;
	} else if (z <= -4.2e+60) {
		tmp = x * ((y - a) / z);
	} else if (z <= -0.00026) {
		tmp = t_1;
	} else if (z <= 7.5e+103) {
		tmp = x + ((t - x) * (y / a));
	} else if (z <= 1.35e+145) {
		tmp = (y / z) * (x - t);
	} else {
		tmp = t + (a / (z / (t - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -1.02e+82:
		tmp = t_1
	elif z <= -4.2e+60:
		tmp = x * ((y - a) / z)
	elif z <= -0.00026:
		tmp = t_1
	elif z <= 7.5e+103:
		tmp = x + ((t - x) * (y / a))
	elif z <= 1.35e+145:
		tmp = (y / z) * (x - t)
	else:
		tmp = t + (a / (z / (t - x)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -1.02e+82)
		tmp = t_1;
	elseif (z <= -4.2e+60)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= -0.00026)
		tmp = t_1;
	elseif (z <= 7.5e+103)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	elseif (z <= 1.35e+145)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	else
		tmp = Float64(t + Float64(a / Float64(z / Float64(t - x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -1.02e+82)
		tmp = t_1;
	elseif (z <= -4.2e+60)
		tmp = x * ((y - a) / z);
	elseif (z <= -0.00026)
		tmp = t_1;
	elseif (z <= 7.5e+103)
		tmp = x + ((t - x) * (y / a));
	elseif (z <= 1.35e+145)
		tmp = (y / z) * (x - t);
	else
		tmp = t + (a / (z / (t - x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.02e+82], t$95$1, If[LessEqual[z, -4.2e+60], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.00026], t$95$1, If[LessEqual[z, 7.5e+103], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+145], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -4.2 \cdot 10^{+60}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

\mathbf{elif}\;z \leq -0.00026:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+103}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 1.35 \cdot 10^{+145}:\\
\;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\

\mathbf{else}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.0200000000000001e82 or -4.2000000000000002e60 < z < -2.59999999999999977e-4

    1. Initial program 45.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/70.1%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified70.1%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 43.4%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. div-inv43.3%

        \[\leadsto \color{blue}{\left(t \cdot \left(y - z\right)\right) \cdot \frac{1}{a - z}} \]
      2. *-commutative43.3%

        \[\leadsto \color{blue}{\left(\left(y - z\right) \cdot t\right)} \cdot \frac{1}{a - z} \]
      3. associate-*l*60.8%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \left(t \cdot \frac{1}{a - z}\right)} \]
      4. div-inv60.8%

        \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
      5. clear-num59.6%

        \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{t}}} \]
      6. div-inv59.6%

        \[\leadsto \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
      7. associate-/r/66.7%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    7. Applied egg-rr66.7%

      \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot t} \]

    if -1.0200000000000001e82 < z < -4.2000000000000002e60

    1. Initial program 34.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/67.0%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified67.0%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 53.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+53.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/53.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/53.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-sub53.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--53.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/53.9%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. mul-1-neg53.9%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      8. distribute-rgt-out--53.9%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      9. unsub-neg53.9%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*84.4%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Simplified84.4%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    8. Taylor expanded in t around 0 53.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-*r/84.6%

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    10. Simplified84.6%

      \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]

    if -2.59999999999999977e-4 < z < 7.49999999999999922e103

    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/96.1%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified96.1%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 81.1%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]

    if 7.49999999999999922e103 < z < 1.35000000000000011e145

    1. Initial program 40.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/63.5%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified63.5%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around -inf 41.7%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    6. Step-by-step derivation
      1. associate-*l/75.8%

        \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    7. Simplified75.8%

      \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    8. Taylor expanded in a around 0 75.9%

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y}{z}\right)} \cdot \left(t - x\right) \]
    9. Step-by-step derivation
      1. associate-*r/75.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{z}} \cdot \left(t - x\right) \]
      2. neg-mul-175.9%

        \[\leadsto \frac{\color{blue}{-y}}{z} \cdot \left(t - x\right) \]
    10. Simplified75.9%

      \[\leadsto \color{blue}{\frac{-y}{z}} \cdot \left(t - x\right) \]

    if 1.35000000000000011e145 < z

    1. Initial program 32.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/49.2%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified49.2%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 66.0%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    6. Step-by-step derivation
      1. associate--l+66.0%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/66.0%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/66.0%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub66.1%

        \[\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--66.1%

        \[\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/66.1%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. mul-1-neg66.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      8. distribute-rgt-out--66.2%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      9. unsub-neg66.2%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*88.8%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Simplified88.8%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    8. Taylor expanded in y around 0 54.5%

      \[\leadsto \color{blue}{t - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    9. Step-by-step derivation
      1. sub-neg54.5%

        \[\leadsto \color{blue}{t + \left(--1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. mul-1-neg54.5%

        \[\leadsto t + \left(-\color{blue}{\left(-\frac{a \cdot \left(t - x\right)}{z}\right)}\right) \]
      3. remove-double-neg54.5%

        \[\leadsto t + \color{blue}{\frac{a \cdot \left(t - x\right)}{z}} \]
      4. associate-/l*66.9%

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t - x}}} \]
    10. Simplified66.9%

      \[\leadsto \color{blue}{t + \frac{a}{\frac{z}{t - x}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification76.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{+82}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{+60}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -0.00026:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+103}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+145}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 36.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{z}\\ \mathbf{if}\;a \leq -4.2 \cdot 10^{-72}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-186}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-294}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ y z))))
   (if (<= a -4.2e-72)
     x
     (if (<= a -5.2e-186)
       t_1
       (if (<= a 3.2e-294) t (if (<= a 2.5e+19) t_1 x))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double tmp;
	if (a <= -4.2e-72) {
		tmp = x;
	} else if (a <= -5.2e-186) {
		tmp = t_1;
	} else if (a <= 3.2e-294) {
		tmp = t;
	} else if (a <= 2.5e+19) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (y / z)
    if (a <= (-4.2d-72)) then
        tmp = x
    else if (a <= (-5.2d-186)) then
        tmp = t_1
    else if (a <= 3.2d-294) then
        tmp = t
    else if (a <= 2.5d+19) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double tmp;
	if (a <= -4.2e-72) {
		tmp = x;
	} else if (a <= -5.2e-186) {
		tmp = t_1;
	} else if (a <= 3.2e-294) {
		tmp = t;
	} else if (a <= 2.5e+19) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (y / z)
	tmp = 0
	if a <= -4.2e-72:
		tmp = x
	elif a <= -5.2e-186:
		tmp = t_1
	elif a <= 3.2e-294:
		tmp = t
	elif a <= 2.5e+19:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(y / z))
	tmp = 0.0
	if (a <= -4.2e-72)
		tmp = x;
	elseif (a <= -5.2e-186)
		tmp = t_1;
	elseif (a <= 3.2e-294)
		tmp = t;
	elseif (a <= 2.5e+19)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (y / z);
	tmp = 0.0;
	if (a <= -4.2e-72)
		tmp = x;
	elseif (a <= -5.2e-186)
		tmp = t_1;
	elseif (a <= 3.2e-294)
		tmp = t;
	elseif (a <= 2.5e+19)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.2e-72], x, If[LessEqual[a, -5.2e-186], t$95$1, If[LessEqual[a, 3.2e-294], t, If[LessEqual[a, 2.5e+19], t$95$1, x]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
\mathbf{if}\;a \leq -4.2 \cdot 10^{-72}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -5.2 \cdot 10^{-186}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 3.2 \cdot 10^{-294}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 2.5 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.2e-72 or 2.5e19 < a

    1. Initial program 72.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/89.1%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified89.1%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 39.4%

      \[\leadsto \color{blue}{x} \]

    if -4.2e-72 < a < -5.19999999999999986e-186 or 3.20000000000000019e-294 < a < 2.5e19

    1. Initial program 63.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/70.9%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified70.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around -inf 57.2%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    6. Step-by-step derivation
      1. associate-*l/64.5%

        \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    7. Simplified64.5%

      \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    8. Taylor expanded in a around 0 52.5%

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y}{z}\right)} \cdot \left(t - x\right) \]
    9. Step-by-step derivation
      1. associate-*r/52.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{z}} \cdot \left(t - x\right) \]
      2. neg-mul-152.5%

        \[\leadsto \frac{\color{blue}{-y}}{z} \cdot \left(t - x\right) \]
    10. Simplified52.5%

      \[\leadsto \color{blue}{\frac{-y}{z}} \cdot \left(t - x\right) \]
    11. Taylor expanded in t around 0 39.5%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/46.9%

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    13. Simplified46.9%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]

    if -5.19999999999999986e-186 < a < 3.20000000000000019e-294

    1. Initial program 65.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/80.7%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified80.7%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 49.4%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification42.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{-72}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-186}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-294}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{+19}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 59.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+224}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;x \leq -3.4 \cdot 10^{+78}:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -2.2e+224)
   (* x (/ (- y a) z))
   (if (<= x -3.4e+78)
     (- x (* y (/ x a)))
     (if (<= x 2.7e+54) (* t (/ (- y z) (- a z))) (* x (- 1.0 (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -2.2e+224) {
		tmp = x * ((y - a) / z);
	} else if (x <= -3.4e+78) {
		tmp = x - (y * (x / a));
	} else if (x <= 2.7e+54) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = x * (1.0 - (y / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (x <= (-2.2d+224)) then
        tmp = x * ((y - a) / z)
    else if (x <= (-3.4d+78)) then
        tmp = x - (y * (x / a))
    else if (x <= 2.7d+54) then
        tmp = t * ((y - z) / (a - z))
    else
        tmp = x * (1.0d0 - (y / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -2.2e+224) {
		tmp = x * ((y - a) / z);
	} else if (x <= -3.4e+78) {
		tmp = x - (y * (x / a));
	} else if (x <= 2.7e+54) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = x * (1.0 - (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -2.2e+224:
		tmp = x * ((y - a) / z)
	elif x <= -3.4e+78:
		tmp = x - (y * (x / a))
	elif x <= 2.7e+54:
		tmp = t * ((y - z) / (a - z))
	else:
		tmp = x * (1.0 - (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -2.2e+224)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (x <= -3.4e+78)
		tmp = Float64(x - Float64(y * Float64(x / a)));
	elseif (x <= 2.7e+54)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	else
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -2.2e+224)
		tmp = x * ((y - a) / z);
	elseif (x <= -3.4e+78)
		tmp = x - (y * (x / a));
	elseif (x <= 2.7e+54)
		tmp = t * ((y - z) / (a - z));
	else
		tmp = x * (1.0 - (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.2e+224], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.4e+78], N[(x - N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e+54], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+224}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

\mathbf{elif}\;x \leq -3.4 \cdot 10^{+78}:\\
\;\;\;\;x - y \cdot \frac{x}{a}\\

\mathbf{elif}\;x \leq 2.7 \cdot 10^{+54}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.2e224

    1. Initial program 52.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/67.7%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified67.7%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 42.4%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    6. Step-by-step derivation
      1. associate--l+42.4%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/42.4%

        \[\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/42.4%

        \[\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-sub50.0%

        \[\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--50.0%

        \[\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/50.0%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. mul-1-neg50.0%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      8. distribute-rgt-out--50.2%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      9. unsub-neg50.2%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*76.7%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Simplified76.7%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    8. Taylor expanded in t around 0 43.6%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-*r/70.2%

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    10. Simplified70.2%

      \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]

    if -2.2e224 < x < -3.40000000000000007e78

    1. Initial program 76.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/88.3%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified88.3%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 76.4%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
    6. Taylor expanded in x around inf 70.5%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg70.5%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{a}\right)}\right) \]
      2. unsub-neg70.5%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    8. Simplified70.5%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)} \]
    9. Taylor expanded in y around 0 70.3%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    10. Step-by-step derivation
      1. metadata-eval70.3%

        \[\leadsto x + \color{blue}{\left(-1\right)} \cdot \frac{x \cdot y}{a} \]
      2. associate-/l*70.5%

        \[\leadsto x + \left(-1\right) \cdot \color{blue}{\frac{x}{\frac{a}{y}}} \]
      3. cancel-sign-sub-inv70.5%

        \[\leadsto \color{blue}{x - 1 \cdot \frac{x}{\frac{a}{y}}} \]
      4. *-lft-identity70.5%

        \[\leadsto x - \color{blue}{\frac{x}{\frac{a}{y}}} \]
      5. associate-/r/70.5%

        \[\leadsto x - \color{blue}{\frac{x}{a} \cdot y} \]
      6. *-commutative70.5%

        \[\leadsto x - \color{blue}{y \cdot \frac{x}{a}} \]
    11. Simplified70.5%

      \[\leadsto \color{blue}{x - y \cdot \frac{x}{a}} \]

    if -3.40000000000000007e78 < x < 2.70000000000000011e54

    1. Initial program 76.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/87.1%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified87.1%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 53.6%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. div-inv53.6%

        \[\leadsto \color{blue}{\left(t \cdot \left(y - z\right)\right) \cdot \frac{1}{a - z}} \]
      2. *-commutative53.6%

        \[\leadsto \color{blue}{\left(\left(y - z\right) \cdot t\right)} \cdot \frac{1}{a - z} \]
      3. associate-*l*57.6%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \left(t \cdot \frac{1}{a - z}\right)} \]
      4. div-inv57.7%

        \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
      5. clear-num57.3%

        \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{t}}} \]
      6. div-inv57.3%

        \[\leadsto \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
      7. associate-/r/65.2%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot t} \]
    7. Applied egg-rr65.2%

      \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot t} \]

    if 2.70000000000000011e54 < x

    1. Initial program 52.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/72.4%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified72.4%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 58.1%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
    6. Taylor expanded in x around inf 56.5%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg56.5%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{a}\right)}\right) \]
      2. unsub-neg56.5%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    8. Simplified56.5%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification64.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+224}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;x \leq -3.4 \cdot 10^{+78}:\\ \;\;\;\;x - y \cdot \frac{x}{a}\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 89.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+162} \lor \neg \left(z \leq 4.9 \cdot 10^{+121}\right):\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1.75e+162) (not (<= z 4.9e+121)))
   (+ t (/ (- x t) (/ z (- y a))))
   (+ x (* (- t x) (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.75e+162) || !(z <= 4.9e+121)) {
		tmp = t + ((x - t) / (z / (y - a)));
	} else {
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-1.75d+162)) .or. (.not. (z <= 4.9d+121))) then
        tmp = t + ((x - t) / (z / (y - a)))
    else
        tmp = x + ((t - x) * ((y - z) / (a - z)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.75e+162) || !(z <= 4.9e+121)) {
		tmp = t + ((x - t) / (z / (y - a)));
	} else {
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.75e+162) or not (z <= 4.9e+121):
		tmp = t + ((x - t) / (z / (y - a)))
	else:
		tmp = x + ((t - x) * ((y - z) / (a - z)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1.75e+162) || !(z <= 4.9e+121))
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a))));
	else
		tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(a - z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -1.75e+162) || ~((z <= 4.9e+121)))
		tmp = t + ((x - t) / (z / (y - a)));
	else
		tmp = x + ((t - x) * ((y - z) / (a - z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.75e+162], N[Not[LessEqual[z, 4.9e+121]], $MachinePrecision]], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+162} \lor \neg \left(z \leq 4.9 \cdot 10^{+121}\right):\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\

\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.75000000000000009e162 or 4.8999999999999998e121 < z

    1. Initial program 26.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/50.8%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified50.8%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 66.0%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    6. Step-by-step derivation
      1. associate--l+66.0%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/66.0%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/66.0%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub66.1%

        \[\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--66.1%

        \[\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/66.1%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. mul-1-neg66.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      8. distribute-rgt-out--66.1%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      9. unsub-neg66.1%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*90.7%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Simplified90.7%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]

    if -1.75000000000000009e162 < z < 4.8999999999999998e121

    1. Initial program 84.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/94.1%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified94.1%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification93.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+162} \lor \neg \left(z \leq 4.9 \cdot 10^{+121}\right):\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 48.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+161}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{+147}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.35e+161)
   t
   (if (<= z 6.2e+111)
     (* x (- 1.0 (/ y a)))
     (if (<= z 8.4e+147) (* x (/ (- y a) z)) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.35e+161) {
		tmp = t;
	} else if (z <= 6.2e+111) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 8.4e+147) {
		tmp = x * ((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 <= (-1.35d+161)) then
        tmp = t
    else if (z <= 6.2d+111) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 8.4d+147) then
        tmp = x * ((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 <= -1.35e+161) {
		tmp = t;
	} else if (z <= 6.2e+111) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 8.4e+147) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.35e+161:
		tmp = t
	elif z <= 6.2e+111:
		tmp = x * (1.0 - (y / a))
	elif z <= 8.4e+147:
		tmp = x * ((y - a) / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.35e+161)
		tmp = t;
	elseif (z <= 6.2e+111)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 8.4e+147)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.35e+161)
		tmp = t;
	elseif (z <= 6.2e+111)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 8.4e+147)
		tmp = x * ((y - a) / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e+161], t, If[LessEqual[z, 6.2e+111], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.4e+147], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+161}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+111}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

\mathbf{elif}\;z \leq 8.4 \cdot 10^{+147}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3499999999999999e161 or 8.40000000000000024e147 < z

    1. Initial program 27.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/52.9%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified52.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 52.4%

      \[\leadsto \color{blue}{t} \]

    if -1.3499999999999999e161 < z < 6.2000000000000001e111

    1. Initial program 85.7%

      \[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}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified94.0%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 73.0%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
    6. Taylor expanded in x around inf 58.8%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg58.8%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{a}\right)}\right) \]
      2. unsub-neg58.8%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    8. Simplified58.8%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)} \]

    if 6.2000000000000001e111 < z < 8.40000000000000024e147

    1. Initial program 28.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/51.4%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified51.4%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 53.2%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    6. Step-by-step derivation
      1. associate--l+53.2%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/53.2%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/53.2%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub53.3%

        \[\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--53.3%

        \[\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/53.3%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. mul-1-neg53.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      8. distribute-rgt-out--53.3%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      9. unsub-neg53.3%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*87.0%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Simplified87.0%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    8. Taylor expanded in t around 0 53.1%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-*r/75.8%

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    10. Simplified75.8%

      \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+161}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+111}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{+147}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 75.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -320000000 \lor \neg \left(z \leq 4.2 \cdot 10^{+112}\right):\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -320000000.0) (not (<= z 4.2e+112)))
   (- t (/ y (/ z (- t x))))
   (+ x (/ y (/ (- a z) (- t x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -320000000.0) || !(z <= 4.2e+112)) {
		tmp = t - (y / (z / (t - x)));
	} else {
		tmp = x + (y / ((a - z) / (t - x)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-320000000.0d0)) .or. (.not. (z <= 4.2d+112))) then
        tmp = t - (y / (z / (t - x)))
    else
        tmp = x + (y / ((a - z) / (t - x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -320000000.0) || !(z <= 4.2e+112)) {
		tmp = t - (y / (z / (t - x)));
	} else {
		tmp = x + (y / ((a - z) / (t - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -320000000.0) or not (z <= 4.2e+112):
		tmp = t - (y / (z / (t - x)))
	else:
		tmp = x + (y / ((a - z) / (t - x)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -320000000.0) || !(z <= 4.2e+112))
		tmp = Float64(t - Float64(y / Float64(z / Float64(t - x))));
	else
		tmp = Float64(x + Float64(y / Float64(Float64(a - z) / Float64(t - x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -320000000.0) || ~((z <= 4.2e+112)))
		tmp = t - (y / (z / (t - x)));
	else
		tmp = x + (y / ((a - z) / (t - x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -320000000.0], N[Not[LessEqual[z, 4.2e+112]], $MachinePrecision]], N[(t - N[(y / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -320000000 \lor \neg \left(z \leq 4.2 \cdot 10^{+112}\right):\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.2e8 or 4.1999999999999998e112 < z

    1. Initial program 36.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/59.7%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified59.7%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 64.2%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    6. Step-by-step derivation
      1. associate--l+64.2%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/64.2%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/64.2%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub64.2%

        \[\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.2%

        \[\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.2%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. mul-1-neg64.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      8. distribute-rgt-out--64.2%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      9. unsub-neg64.2%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*85.5%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Simplified85.5%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    8. Taylor expanded in y around inf 60.4%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*75.7%

        \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{t - x}}} \]
    10. Simplified75.7%

      \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{t - x}}} \]

    if -3.2e8 < z < 4.1999999999999998e112

    1. Initial program 89.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num88.9%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
      2. associate-/r/88.9%

        \[\leadsto x + \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} \]
    4. Applied egg-rr88.9%

      \[\leadsto x + \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} \]
    5. Taylor expanded in y around inf 82.4%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    6. Step-by-step derivation
      1. associate-/l*85.7%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
    7. Simplified85.7%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification81.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -320000000 \lor \neg \left(z \leq 4.2 \cdot 10^{+112}\right):\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 79.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -210000000 \lor \neg \left(z \leq 1.6 \cdot 10^{+117}\right):\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -210000000.0) (not (<= z 1.6e+117)))
   (+ t (/ (- x t) (/ z (- y a))))
   (+ x (/ y (/ (- a z) (- t x))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -210000000.0) || !(z <= 1.6e+117)) {
		tmp = t + ((x - t) / (z / (y - a)));
	} else {
		tmp = x + (y / ((a - z) / (t - x)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-210000000.0d0)) .or. (.not. (z <= 1.6d+117))) then
        tmp = t + ((x - t) / (z / (y - a)))
    else
        tmp = x + (y / ((a - z) / (t - x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -210000000.0) || !(z <= 1.6e+117)) {
		tmp = t + ((x - t) / (z / (y - a)));
	} else {
		tmp = x + (y / ((a - z) / (t - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -210000000.0) or not (z <= 1.6e+117):
		tmp = t + ((x - t) / (z / (y - a)))
	else:
		tmp = x + (y / ((a - z) / (t - x)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -210000000.0) || !(z <= 1.6e+117))
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a))));
	else
		tmp = Float64(x + Float64(y / Float64(Float64(a - z) / Float64(t - x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -210000000.0) || ~((z <= 1.6e+117)))
		tmp = t + ((x - t) / (z / (y - a)));
	else
		tmp = x + (y / ((a - z) / (t - x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -210000000.0], N[Not[LessEqual[z, 1.6e+117]], $MachinePrecision]], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -210000000 \lor \neg \left(z \leq 1.6 \cdot 10^{+117}\right):\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1e8 or 1.60000000000000002e117 < z

    1. Initial program 36.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/58.5%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified58.5%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 65.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+65.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/65.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/65.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-sub65.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--65.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/65.9%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. mul-1-neg65.9%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      8. distribute-rgt-out--66.0%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      9. unsub-neg66.0%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*86.1%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Simplified86.1%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]

    if -2.1e8 < z < 1.60000000000000002e117

    1. Initial program 88.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num88.0%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
      2. associate-/r/88.0%

        \[\leadsto x + \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} \]
    4. Applied egg-rr88.0%

      \[\leadsto x + \color{blue}{\frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right)\right)} \]
    5. Taylor expanded in y around inf 81.0%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    6. Step-by-step derivation
      1. associate-/l*85.3%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
    7. Simplified85.3%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification85.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -210000000 \lor \neg \left(z \leq 1.6 \cdot 10^{+117}\right):\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 48.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+158}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.85 \cdot 10^{+112}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+147}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -8.5e+158)
   t
   (if (<= z 2.85e+112)
     (* x (- 1.0 (/ y a)))
     (if (<= z 4.6e+147) (* x (/ y z)) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -8.5e+158) {
		tmp = t;
	} else if (z <= 2.85e+112) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 4.6e+147) {
		tmp = x * (y / 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.5d+158)) then
        tmp = t
    else if (z <= 2.85d+112) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 4.6d+147) then
        tmp = x * (y / 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.5e+158) {
		tmp = t;
	} else if (z <= 2.85e+112) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 4.6e+147) {
		tmp = x * (y / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -8.5e+158:
		tmp = t
	elif z <= 2.85e+112:
		tmp = x * (1.0 - (y / a))
	elif z <= 4.6e+147:
		tmp = x * (y / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -8.5e+158)
		tmp = t;
	elseif (z <= 2.85e+112)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 4.6e+147)
		tmp = Float64(x * Float64(y / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -8.5e+158)
		tmp = t;
	elseif (z <= 2.85e+112)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 4.6e+147)
		tmp = x * (y / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.5e+158], t, If[LessEqual[z, 2.85e+112], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+147], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+158}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 2.85 \cdot 10^{+112}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

\mathbf{elif}\;z \leq 4.6 \cdot 10^{+147}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.49999999999999978e158 or 4.5999999999999998e147 < z

    1. Initial program 27.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/52.9%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified52.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 52.4%

      \[\leadsto \color{blue}{t} \]

    if -8.49999999999999978e158 < z < 2.85000000000000016e112

    1. Initial program 85.7%

      \[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}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified94.0%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 73.0%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
    6. Taylor expanded in x around inf 58.8%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg58.8%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y}{a}\right)}\right) \]
      2. unsub-neg58.8%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]
    8. Simplified58.8%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y}{a}\right)} \]

    if 2.85000000000000016e112 < z < 4.5999999999999998e147

    1. Initial program 28.7%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/51.4%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified51.4%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around -inf 42.4%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    6. Step-by-step derivation
      1. associate-*l/76.5%

        \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    7. Simplified76.5%

      \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    8. Taylor expanded in a around 0 76.5%

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y}{z}\right)} \cdot \left(t - x\right) \]
    9. Step-by-step derivation
      1. associate-*r/76.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot y}{z}} \cdot \left(t - x\right) \]
      2. neg-mul-176.5%

        \[\leadsto \frac{\color{blue}{-y}}{z} \cdot \left(t - x\right) \]
    10. Simplified76.5%

      \[\leadsto \color{blue}{\frac{-y}{z}} \cdot \left(t - x\right) \]
    11. Taylor expanded in t around 0 42.0%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/64.7%

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    13. Simplified64.7%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+158}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.85 \cdot 10^{+112}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+147}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 68.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -90000000 \lor \neg \left(z \leq 2.35 \cdot 10^{+111}\right):\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -90000000.0) (not (<= z 2.35e+111)))
   (- t (/ y (/ z (- t x))))
   (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -90000000.0) || !(z <= 2.35e+111)) {
		tmp = t - (y / (z / (t - x)));
	} else {
		tmp = x + ((t - x) * (y / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-90000000.0d0)) .or. (.not. (z <= 2.35d+111))) then
        tmp = t - (y / (z / (t - x)))
    else
        tmp = x + ((t - x) * (y / 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 <= -90000000.0) || !(z <= 2.35e+111)) {
		tmp = t - (y / (z / (t - x)));
	} else {
		tmp = x + ((t - x) * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -90000000.0) or not (z <= 2.35e+111):
		tmp = t - (y / (z / (t - x)))
	else:
		tmp = x + ((t - x) * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -90000000.0) || !(z <= 2.35e+111))
		tmp = Float64(t - Float64(y / Float64(z / Float64(t - x))));
	else
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -90000000.0) || ~((z <= 2.35e+111)))
		tmp = t - (y / (z / (t - x)));
	else
		tmp = x + ((t - x) * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -90000000.0], N[Not[LessEqual[z, 2.35e+111]], $MachinePrecision]], N[(t - N[(y / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -90000000 \lor \neg \left(z \leq 2.35 \cdot 10^{+111}\right):\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\

\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9e7 or 2.35000000000000004e111 < z

    1. Initial program 36.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/59.7%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified59.7%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 64.2%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    6. Step-by-step derivation
      1. associate--l+64.2%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/64.2%

        \[\leadsto t + \left(\color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z}} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      3. associate-*r/64.2%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. div-sub64.2%

        \[\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.2%

        \[\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.2%

        \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. mul-1-neg64.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      8. distribute-rgt-out--64.2%

        \[\leadsto t + \left(-\frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z}\right) \]
      9. unsub-neg64.2%

        \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      10. associate-/l*85.5%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    7. Simplified85.5%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    8. Taylor expanded in y around inf 60.4%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*75.7%

        \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{t - x}}} \]
    10. Simplified75.7%

      \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{t - x}}} \]

    if -9e7 < z < 2.35000000000000004e111

    1. Initial program 89.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/96.2%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified96.2%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 79.8%

      \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -90000000 \lor \neg \left(z \leq 2.35 \cdot 10^{+111}\right):\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 38.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{-28}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+111}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -8.8e-28) t (if (<= z 2.6e+111) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -8.8e-28) {
		tmp = t;
	} else if (z <= 2.6e+111) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-8.8d-28)) then
        tmp = t
    else if (z <= 2.6d+111) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -8.8e-28) {
		tmp = t;
	} else if (z <= 2.6e+111) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -8.8e-28:
		tmp = t
	elif z <= 2.6e+111:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -8.8e-28)
		tmp = t;
	elseif (z <= 2.6e+111)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -8.8e-28)
		tmp = t;
	elseif (z <= 2.6e+111)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.8e-28], t, If[LessEqual[z, 2.6e+111], x, t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{-28}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+111}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.79999999999999984e-28 or 2.5999999999999999e111 < z

    1. Initial program 42.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/63.7%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified63.7%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 40.9%

      \[\leadsto \color{blue}{t} \]

    if -8.79999999999999984e-28 < z < 2.5999999999999999e111

    1. Initial program 88.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-*l/95.9%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    3. Simplified95.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 39.6%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{-28}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+111}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 25.8% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 68.8%

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Step-by-step derivation
    1. associate-*l/82.1%

      \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
  3. Simplified82.1%

    \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot \left(t - x\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in z around inf 21.4%

    \[\leadsto \color{blue}{t} \]
  6. Final simplification21.4%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 84.0% 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 2024036 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (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))))