Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.2% → 94.8%
Time: 23.5s
Alternatives: 30
Speedup: 0.3×

Specification

?
\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(y - z\right) \cdot \frac{t - x}{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 30 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: 80.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 94.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-262}:\\ \;\;\;\;x + \frac{t - x}{\frac{z - a}{z - y}}\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_1 -4e-262)
     (+ x (/ (- t x) (/ (- z a) (- z y))))
     (if (<= t_1 0.0)
       (+ t (* (/ (- t x) z) (- a y)))
       (fma (- t x) (/ (- y z) (- a z)) x)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -4e-262) {
		tmp = x + ((t - x) / ((z - a) / (z - y)));
	} else if (t_1 <= 0.0) {
		tmp = t + (((t - x) / z) * (a - y));
	} else {
		tmp = fma((t - x), ((y - z) / (a - z)), x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if (t_1 <= -4e-262)
		tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(z - a) / Float64(z - y))));
	elseif (t_1 <= 0.0)
		tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y)));
	else
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e-262], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.00000000000000005e-262

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

    1. Initial program 3.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 90.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}} \]
    4. Step-by-step derivation
      1. associate--l+90.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. distribute-lft-out--90.2%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 91.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, -\left(-x\right)\right)} \]
      8. remove-double-neg96.4%

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

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

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

Alternative 2: 54.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + x \cdot \frac{y}{z}\\ t_2 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;z \leq -1800:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-62}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-145}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-145}:\\ \;\;\;\;z \cdot \frac{t}{-a}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-216}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-233}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-260}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+37}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+128}:\\ \;\;\;\;\frac{t \cdot \left(z - y\right)}{z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+152} \lor \neg \left(z \leq 2.8 \cdot 10^{+223}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y - a}{\frac{z}{x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* x (/ y z)))) (t_2 (+ x (/ (* y t) a))))
   (if (<= z -1800.0)
     t_1
     (if (<= z -9.6e-62)
       (- x (* z (/ t a)))
       (if (<= z -1.25e-145)
         t_2
         (if (<= z -1.2e-145)
           (* z (/ t (- a)))
           (if (<= z -6e-216)
             (- x (* x (/ y a)))
             (if (<= z -2.1e-233)
               (* (- t x) (/ y a))
               (if (<= z -7.8e-260)
                 (* x (- 1.0 (/ y a)))
                 (if (<= z 2.2e+37)
                   t_2
                   (if (<= z 1.35e+128)
                     (/ (* t (- z y)) z)
                     (if (or (<= z 1.3e+152) (not (<= z 2.8e+223)))
                       t_1
                       (/ (- y a) (/ z x))))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (x * (y / z));
	double t_2 = x + ((y * t) / a);
	double tmp;
	if (z <= -1800.0) {
		tmp = t_1;
	} else if (z <= -9.6e-62) {
		tmp = x - (z * (t / a));
	} else if (z <= -1.25e-145) {
		tmp = t_2;
	} else if (z <= -1.2e-145) {
		tmp = z * (t / -a);
	} else if (z <= -6e-216) {
		tmp = x - (x * (y / a));
	} else if (z <= -2.1e-233) {
		tmp = (t - x) * (y / a);
	} else if (z <= -7.8e-260) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 2.2e+37) {
		tmp = t_2;
	} else if (z <= 1.35e+128) {
		tmp = (t * (z - y)) / z;
	} else if ((z <= 1.3e+152) || !(z <= 2.8e+223)) {
		tmp = t_1;
	} else {
		tmp = (y - a) / (z / x);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t + (x * (y / z))
    t_2 = x + ((y * t) / a)
    if (z <= (-1800.0d0)) then
        tmp = t_1
    else if (z <= (-9.6d-62)) then
        tmp = x - (z * (t / a))
    else if (z <= (-1.25d-145)) then
        tmp = t_2
    else if (z <= (-1.2d-145)) then
        tmp = z * (t / -a)
    else if (z <= (-6d-216)) then
        tmp = x - (x * (y / a))
    else if (z <= (-2.1d-233)) then
        tmp = (t - x) * (y / a)
    else if (z <= (-7.8d-260)) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 2.2d+37) then
        tmp = t_2
    else if (z <= 1.35d+128) then
        tmp = (t * (z - y)) / z
    else if ((z <= 1.3d+152) .or. (.not. (z <= 2.8d+223))) then
        tmp = t_1
    else
        tmp = (y - a) / (z / 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 + (x * (y / z));
	double t_2 = x + ((y * t) / a);
	double tmp;
	if (z <= -1800.0) {
		tmp = t_1;
	} else if (z <= -9.6e-62) {
		tmp = x - (z * (t / a));
	} else if (z <= -1.25e-145) {
		tmp = t_2;
	} else if (z <= -1.2e-145) {
		tmp = z * (t / -a);
	} else if (z <= -6e-216) {
		tmp = x - (x * (y / a));
	} else if (z <= -2.1e-233) {
		tmp = (t - x) * (y / a);
	} else if (z <= -7.8e-260) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 2.2e+37) {
		tmp = t_2;
	} else if (z <= 1.35e+128) {
		tmp = (t * (z - y)) / z;
	} else if ((z <= 1.3e+152) || !(z <= 2.8e+223)) {
		tmp = t_1;
	} else {
		tmp = (y - a) / (z / x);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (x * (y / z))
	t_2 = x + ((y * t) / a)
	tmp = 0
	if z <= -1800.0:
		tmp = t_1
	elif z <= -9.6e-62:
		tmp = x - (z * (t / a))
	elif z <= -1.25e-145:
		tmp = t_2
	elif z <= -1.2e-145:
		tmp = z * (t / -a)
	elif z <= -6e-216:
		tmp = x - (x * (y / a))
	elif z <= -2.1e-233:
		tmp = (t - x) * (y / a)
	elif z <= -7.8e-260:
		tmp = x * (1.0 - (y / a))
	elif z <= 2.2e+37:
		tmp = t_2
	elif z <= 1.35e+128:
		tmp = (t * (z - y)) / z
	elif (z <= 1.3e+152) or not (z <= 2.8e+223):
		tmp = t_1
	else:
		tmp = (y - a) / (z / x)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(x * Float64(y / z)))
	t_2 = Float64(x + Float64(Float64(y * t) / a))
	tmp = 0.0
	if (z <= -1800.0)
		tmp = t_1;
	elseif (z <= -9.6e-62)
		tmp = Float64(x - Float64(z * Float64(t / a)));
	elseif (z <= -1.25e-145)
		tmp = t_2;
	elseif (z <= -1.2e-145)
		tmp = Float64(z * Float64(t / Float64(-a)));
	elseif (z <= -6e-216)
		tmp = Float64(x - Float64(x * Float64(y / a)));
	elseif (z <= -2.1e-233)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (z <= -7.8e-260)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 2.2e+37)
		tmp = t_2;
	elseif (z <= 1.35e+128)
		tmp = Float64(Float64(t * Float64(z - y)) / z);
	elseif ((z <= 1.3e+152) || !(z <= 2.8e+223))
		tmp = t_1;
	else
		tmp = Float64(Float64(y - a) / Float64(z / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (x * (y / z));
	t_2 = x + ((y * t) / a);
	tmp = 0.0;
	if (z <= -1800.0)
		tmp = t_1;
	elseif (z <= -9.6e-62)
		tmp = x - (z * (t / a));
	elseif (z <= -1.25e-145)
		tmp = t_2;
	elseif (z <= -1.2e-145)
		tmp = z * (t / -a);
	elseif (z <= -6e-216)
		tmp = x - (x * (y / a));
	elseif (z <= -2.1e-233)
		tmp = (t - x) * (y / a);
	elseif (z <= -7.8e-260)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 2.2e+37)
		tmp = t_2;
	elseif (z <= 1.35e+128)
		tmp = (t * (z - y)) / z;
	elseif ((z <= 1.3e+152) || ~((z <= 2.8e+223)))
		tmp = t_1;
	else
		tmp = (y - a) / (z / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1800.0], t$95$1, If[LessEqual[z, -9.6e-62], N[(x - N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.25e-145], t$95$2, If[LessEqual[z, -1.2e-145], N[(z * N[(t / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6e-216], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.1e-233], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.8e-260], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+37], t$95$2, If[LessEqual[z, 1.35e+128], N[(N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[z, 1.3e+152], N[Not[LessEqual[z, 2.8e+223]], $MachinePrecision]], t$95$1, N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + x \cdot \frac{y}{z}\\
t_2 := x + \frac{y \cdot t}{a}\\
\mathbf{if}\;z \leq -1800:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -9.6 \cdot 10^{-62}:\\
\;\;\;\;x - z \cdot \frac{t}{a}\\

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-145}:\\
\;\;\;\;t\_2\\

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

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

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

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

\mathbf{elif}\;z \leq 2.2 \cdot 10^{+37}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+152} \lor \neg \left(z \leq 2.8 \cdot 10^{+223}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 9 regimes
  2. if z < -1800 or 1.35000000000000001e128 < z < 1.3e152 or 2.7999999999999999e223 < z

    1. Initial program 67.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 69.1%

      \[\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}} \]
    4. Step-by-step derivation
      1. associate--l+69.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    8. Simplified82.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto t - x \cdot \color{blue}{\frac{y}{-z}} \]
    14. Simplified74.3%

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

    if -1800 < z < -9.59999999999999934e-62

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if -9.59999999999999934e-62 < z < -1.2499999999999999e-145 or -7.79999999999999945e-260 < z < 2.2000000000000001e37

    1. Initial program 94.4%

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

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

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

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

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

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

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

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

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

    if -1.2499999999999999e-145 < z < -1.20000000000000008e-145

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 98.4%

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{z}{a}} \]
      3. distribute-lft-neg-in100.0%

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

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

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

        \[\leadsto \color{blue}{-\frac{t \cdot z}{a}} \]
      2. distribute-frac-neg298.4%

        \[\leadsto \color{blue}{\frac{t \cdot z}{-a}} \]
      3. *-commutative98.4%

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

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

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

    if -1.20000000000000008e-145 < z < -6.00000000000000025e-216

    1. Initial program 90.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 80.7%

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

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

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

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

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

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

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

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

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

    if -6.00000000000000025e-216 < z < -2.0999999999999999e-233

    1. Initial program 99.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 99.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{y}{a} + \left(-\color{blue}{x \cdot \frac{y}{a}}\right) \]
      5. distribute-lft-neg-out99.6%

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

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

        \[\leadsto \frac{y}{a} \cdot \color{blue}{\left(t - x\right)} \]
      8. *-commutative99.6%

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

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

    if -2.0999999999999999e-233 < z < -7.79999999999999945e-260

    1. Initial program 99.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 100.0%

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

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

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

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

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

    if 2.2000000000000001e37 < z < 1.35000000000000001e128

    1. Initial program 75.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 64.0%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot t\right) \cdot \left(y - z\right)}}{z} \]
      3. *-commutative59.2%

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

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

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

    if 1.3e152 < z < 2.7999999999999999e223

    1. Initial program 59.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 10.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{x}}{a - z} \cdot \left(y - z\right) \]
      7. cancel-sign-sub7.0%

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

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

        \[\leadsto x - \color{blue}{\left(y - z\right) \cdot \frac{-x}{a - z}} \]
      10. add-sqr-sqrt1.4%

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

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

        \[\leadsto x - \left(y - z\right) \cdot \frac{\sqrt{\color{blue}{x \cdot x}}}{a - z} \]
      13. sqrt-unprod9.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1800:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-62}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-145}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-145}:\\ \;\;\;\;z \cdot \frac{t}{-a}\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-216}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-233}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-260}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+37}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+128}:\\ \;\;\;\;\frac{t \cdot \left(z - y\right)}{z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+152} \lor \neg \left(z \leq 2.8 \cdot 10^{+223}\right):\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y - a}{\frac{z}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 58.4% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := y \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;x \leq -5.1 \cdot 10^{+100}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{+70}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{+53}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -3.4 \cdot 10^{+32}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;x \leq -3 \cdot 10^{-40}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -1.55 \cdot 10^{-56}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{-86}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 1.46 \cdot 10^{+32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.16 \cdot 10^{+103}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{+180}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (* y (/ (- t x) (- a z)))))
   (if (<= x -5.1e+100)
     (- x (/ x (/ a y)))
     (if (<= x -5.5e+70)
       t_1
       (if (<= x -3.5e+53)
         t_2
         (if (<= x -3.4e+32)
           (+ t (* x (/ y z)))
           (if (<= x -3e-40)
             t_2
             (if (<= x -1.55e-56)
               t_1
               (if (<= x -1.15e-86)
                 t_2
                 (if (<= x 1.46e+32)
                   t_1
                   (if (<= x 1.16e+103)
                     (- x (* z (/ t a)))
                     (if (<= x 2.1e+180) t_2 (- x (* x (/ y a)))))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = y * ((t - x) / (a - z));
	double tmp;
	if (x <= -5.1e+100) {
		tmp = x - (x / (a / y));
	} else if (x <= -5.5e+70) {
		tmp = t_1;
	} else if (x <= -3.5e+53) {
		tmp = t_2;
	} else if (x <= -3.4e+32) {
		tmp = t + (x * (y / z));
	} else if (x <= -3e-40) {
		tmp = t_2;
	} else if (x <= -1.55e-56) {
		tmp = t_1;
	} else if (x <= -1.15e-86) {
		tmp = t_2;
	} else if (x <= 1.46e+32) {
		tmp = t_1;
	} else if (x <= 1.16e+103) {
		tmp = x - (z * (t / a));
	} else if (x <= 2.1e+180) {
		tmp = t_2;
	} else {
		tmp = x - (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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = y * ((t - x) / (a - z))
    if (x <= (-5.1d+100)) then
        tmp = x - (x / (a / y))
    else if (x <= (-5.5d+70)) then
        tmp = t_1
    else if (x <= (-3.5d+53)) then
        tmp = t_2
    else if (x <= (-3.4d+32)) then
        tmp = t + (x * (y / z))
    else if (x <= (-3d-40)) then
        tmp = t_2
    else if (x <= (-1.55d-56)) then
        tmp = t_1
    else if (x <= (-1.15d-86)) then
        tmp = t_2
    else if (x <= 1.46d+32) then
        tmp = t_1
    else if (x <= 1.16d+103) then
        tmp = x - (z * (t / a))
    else if (x <= 2.1d+180) then
        tmp = t_2
    else
        tmp = x - (x * (y / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = y * ((t - x) / (a - z));
	double tmp;
	if (x <= -5.1e+100) {
		tmp = x - (x / (a / y));
	} else if (x <= -5.5e+70) {
		tmp = t_1;
	} else if (x <= -3.5e+53) {
		tmp = t_2;
	} else if (x <= -3.4e+32) {
		tmp = t + (x * (y / z));
	} else if (x <= -3e-40) {
		tmp = t_2;
	} else if (x <= -1.55e-56) {
		tmp = t_1;
	} else if (x <= -1.15e-86) {
		tmp = t_2;
	} else if (x <= 1.46e+32) {
		tmp = t_1;
	} else if (x <= 1.16e+103) {
		tmp = x - (z * (t / a));
	} else if (x <= 2.1e+180) {
		tmp = t_2;
	} else {
		tmp = x - (x * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = y * ((t - x) / (a - z))
	tmp = 0
	if x <= -5.1e+100:
		tmp = x - (x / (a / y))
	elif x <= -5.5e+70:
		tmp = t_1
	elif x <= -3.5e+53:
		tmp = t_2
	elif x <= -3.4e+32:
		tmp = t + (x * (y / z))
	elif x <= -3e-40:
		tmp = t_2
	elif x <= -1.55e-56:
		tmp = t_1
	elif x <= -1.15e-86:
		tmp = t_2
	elif x <= 1.46e+32:
		tmp = t_1
	elif x <= 1.16e+103:
		tmp = x - (z * (t / a))
	elif x <= 2.1e+180:
		tmp = t_2
	else:
		tmp = x - (x * (y / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	tmp = 0.0
	if (x <= -5.1e+100)
		tmp = Float64(x - Float64(x / Float64(a / y)));
	elseif (x <= -5.5e+70)
		tmp = t_1;
	elseif (x <= -3.5e+53)
		tmp = t_2;
	elseif (x <= -3.4e+32)
		tmp = Float64(t + Float64(x * Float64(y / z)));
	elseif (x <= -3e-40)
		tmp = t_2;
	elseif (x <= -1.55e-56)
		tmp = t_1;
	elseif (x <= -1.15e-86)
		tmp = t_2;
	elseif (x <= 1.46e+32)
		tmp = t_1;
	elseif (x <= 1.16e+103)
		tmp = Float64(x - Float64(z * Float64(t / a)));
	elseif (x <= 2.1e+180)
		tmp = t_2;
	else
		tmp = Float64(x - Float64(x * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = y * ((t - x) / (a - z));
	tmp = 0.0;
	if (x <= -5.1e+100)
		tmp = x - (x / (a / y));
	elseif (x <= -5.5e+70)
		tmp = t_1;
	elseif (x <= -3.5e+53)
		tmp = t_2;
	elseif (x <= -3.4e+32)
		tmp = t + (x * (y / z));
	elseif (x <= -3e-40)
		tmp = t_2;
	elseif (x <= -1.55e-56)
		tmp = t_1;
	elseif (x <= -1.15e-86)
		tmp = t_2;
	elseif (x <= 1.46e+32)
		tmp = t_1;
	elseif (x <= 1.16e+103)
		tmp = x - (z * (t / a));
	elseif (x <= 2.1e+180)
		tmp = t_2;
	else
		tmp = x - (x * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.1e+100], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.5e+70], t$95$1, If[LessEqual[x, -3.5e+53], t$95$2, If[LessEqual[x, -3.4e+32], N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3e-40], t$95$2, If[LessEqual[x, -1.55e-56], t$95$1, If[LessEqual[x, -1.15e-86], t$95$2, If[LessEqual[x, 1.46e+32], t$95$1, If[LessEqual[x, 1.16e+103], N[(x - N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.1e+180], t$95$2, N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -5.5 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -3.5 \cdot 10^{+53}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;x \leq -3 \cdot 10^{-40}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -1.55 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -1.15 \cdot 10^{-86}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 1.46 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 2.1 \cdot 10^{+180}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -5.1000000000000001e100

    1. Initial program 82.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 74.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - x \cdot \frac{y}{a}} \]
    9. Step-by-step derivation
      1. clear-num62.4%

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

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

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

    if -5.1000000000000001e100 < x < -5.49999999999999986e70 or -3.0000000000000002e-40 < x < -1.54999999999999994e-56 or -1.14999999999999998e-86 < x < 1.46000000000000005e32

    1. Initial program 86.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 64.5%

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

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

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

    if -5.49999999999999986e70 < x < -3.50000000000000019e53 or -3.39999999999999979e32 < x < -3.0000000000000002e-40 or -1.54999999999999994e-56 < x < -1.14999999999999998e-86 or 1.1600000000000001e103 < x < 2.1e180

    1. Initial program 79.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 61.9%

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

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

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

    if -3.50000000000000019e53 < x < -3.39999999999999979e32

    1. Initial program 35.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    11. Simplified100.0%

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

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    13. Step-by-step derivation
      1. mul-1-neg99.5%

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

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

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

        \[\leadsto t - x \cdot \color{blue}{\frac{y}{-z}} \]
    14. Simplified100.0%

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

    if 1.46000000000000005e32 < x < 1.1600000000000001e103

    1. Initial program 99.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 61.0%

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

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

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

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

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

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

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

    if 2.1e180 < x

    1. Initial program 78.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 69.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.1 \cdot 10^{+100}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq -5.5 \cdot 10^{+70}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{+53}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq -3.4 \cdot 10^{+32}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;x \leq -3 \cdot 10^{-40}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq -1.55 \cdot 10^{-56}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{-86}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 1.46 \cdot 10^{+32}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.16 \cdot 10^{+103}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{+180}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 41.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;y \leq -3.4 \cdot 10^{+34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-19}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{-83}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-107}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-107}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+49}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{+117} \lor \neg \left(y \leq 2.25 \cdot 10^{+117}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y (- a z)))))
   (if (<= y -3.4e+34)
     t_1
     (if (<= y -9e-19)
       (+ x t)
       (if (<= y -2.2e-26)
         (/ z (/ a t))
         (if (<= y -3.7e-83)
           t
           (if (<= y -1.1e-107)
             x
             (if (<= y -1.05e-107)
               (* t (/ y a))
               (if (<= y 3e+49)
                 (+ x t)
                 (if (or (<= y 2.15e+117) (not (<= y 2.25e+117)))
                   t_1
                   t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (y <= -3.4e+34) {
		tmp = t_1;
	} else if (y <= -9e-19) {
		tmp = x + t;
	} else if (y <= -2.2e-26) {
		tmp = z / (a / t);
	} else if (y <= -3.7e-83) {
		tmp = t;
	} else if (y <= -1.1e-107) {
		tmp = x;
	} else if (y <= -1.05e-107) {
		tmp = t * (y / a);
	} else if (y <= 3e+49) {
		tmp = x + t;
	} else if ((y <= 2.15e+117) || !(y <= 2.25e+117)) {
		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 = t * (y / (a - z))
    if (y <= (-3.4d+34)) then
        tmp = t_1
    else if (y <= (-9d-19)) then
        tmp = x + t
    else if (y <= (-2.2d-26)) then
        tmp = z / (a / t)
    else if (y <= (-3.7d-83)) then
        tmp = t
    else if (y <= (-1.1d-107)) then
        tmp = x
    else if (y <= (-1.05d-107)) then
        tmp = t * (y / a)
    else if (y <= 3d+49) then
        tmp = x + t
    else if ((y <= 2.15d+117) .or. (.not. (y <= 2.25d+117))) 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 = t * (y / (a - z));
	double tmp;
	if (y <= -3.4e+34) {
		tmp = t_1;
	} else if (y <= -9e-19) {
		tmp = x + t;
	} else if (y <= -2.2e-26) {
		tmp = z / (a / t);
	} else if (y <= -3.7e-83) {
		tmp = t;
	} else if (y <= -1.1e-107) {
		tmp = x;
	} else if (y <= -1.05e-107) {
		tmp = t * (y / a);
	} else if (y <= 3e+49) {
		tmp = x + t;
	} else if ((y <= 2.15e+117) || !(y <= 2.25e+117)) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / (a - z))
	tmp = 0
	if y <= -3.4e+34:
		tmp = t_1
	elif y <= -9e-19:
		tmp = x + t
	elif y <= -2.2e-26:
		tmp = z / (a / t)
	elif y <= -3.7e-83:
		tmp = t
	elif y <= -1.1e-107:
		tmp = x
	elif y <= -1.05e-107:
		tmp = t * (y / a)
	elif y <= 3e+49:
		tmp = x + t
	elif (y <= 2.15e+117) or not (y <= 2.25e+117):
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (y <= -3.4e+34)
		tmp = t_1;
	elseif (y <= -9e-19)
		tmp = Float64(x + t);
	elseif (y <= -2.2e-26)
		tmp = Float64(z / Float64(a / t));
	elseif (y <= -3.7e-83)
		tmp = t;
	elseif (y <= -1.1e-107)
		tmp = x;
	elseif (y <= -1.05e-107)
		tmp = Float64(t * Float64(y / a));
	elseif (y <= 3e+49)
		tmp = Float64(x + t);
	elseif ((y <= 2.15e+117) || !(y <= 2.25e+117))
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / (a - z));
	tmp = 0.0;
	if (y <= -3.4e+34)
		tmp = t_1;
	elseif (y <= -9e-19)
		tmp = x + t;
	elseif (y <= -2.2e-26)
		tmp = z / (a / t);
	elseif (y <= -3.7e-83)
		tmp = t;
	elseif (y <= -1.1e-107)
		tmp = x;
	elseif (y <= -1.05e-107)
		tmp = t * (y / a);
	elseif (y <= 3e+49)
		tmp = x + t;
	elseif ((y <= 2.15e+117) || ~((y <= 2.25e+117)))
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.4e+34], t$95$1, If[LessEqual[y, -9e-19], N[(x + t), $MachinePrecision], If[LessEqual[y, -2.2e-26], N[(z / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.7e-83], t, If[LessEqual[y, -1.1e-107], x, If[LessEqual[y, -1.05e-107], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+49], N[(x + t), $MachinePrecision], If[Or[LessEqual[y, 2.15e+117], N[Not[LessEqual[y, 2.25e+117]], $MachinePrecision]], t$95$1, t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -9 \cdot 10^{-19}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;y \leq -3.7 \cdot 10^{-83}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-107}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 3 \cdot 10^{+49}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;y \leq 2.15 \cdot 10^{+117} \lor \neg \left(y \leq 2.25 \cdot 10^{+117}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -3.3999999999999999e34 or 3.0000000000000002e49 < y < 2.14999999999999999e117 or 2.25e117 < y

    1. Initial program 89.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 80.1%

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

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

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

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

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

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

    if -3.3999999999999999e34 < y < -9.00000000000000026e-19 or -1.05e-107 < y < 3.0000000000000002e49

    1. Initial program 78.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 57.9%

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

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

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

        \[\leadsto x - \color{blue}{z \cdot \frac{t - x}{a - z}} \]
    5. Simplified69.9%

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

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

      \[\leadsto \color{blue}{x - -1 \cdot t} \]
    8. Step-by-step derivation
      1. sub-neg52.0%

        \[\leadsto \color{blue}{x + \left(--1 \cdot t\right)} \]
      2. neg-mul-152.0%

        \[\leadsto x + \left(-\color{blue}{\left(-t\right)}\right) \]
      3. remove-double-neg52.0%

        \[\leadsto x + \color{blue}{t} \]
    9. Simplified52.0%

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

    if -9.00000000000000026e-19 < y < -2.2000000000000001e-26

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 54.8%

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{z}{a}} \]
      3. distribute-lft-neg-in0.1%

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

      \[\leadsto \color{blue}{\left(-t\right) \cdot \frac{z}{a}} \]
    8. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)} \cdot \frac{z}{a} \]
      2. sqrt-unprod100.0%

        \[\leadsto \color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}} \cdot \frac{z}{a} \]
      3. sqr-neg100.0%

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

        \[\leadsto \color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)} \cdot \frac{z}{a} \]
      5. add-sqr-sqrt52.4%

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

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

        \[\leadsto \color{blue}{\frac{t}{a} \cdot z} \]
      8. *-commutative100.0%

        \[\leadsto \color{blue}{z \cdot \frac{t}{a}} \]
      9. clear-num100.0%

        \[\leadsto z \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      10. un-div-inv100.0%

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{t}}} \]
    9. Applied egg-rr100.0%

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

    if -2.2000000000000001e-26 < y < -3.69999999999999995e-83 or 2.14999999999999999e117 < y < 2.25e117

    1. Initial program 83.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 61.3%

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

    if -3.69999999999999995e-83 < y < -1.10000000000000006e-107

    1. Initial program 87.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 78.4%

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

    if -1.10000000000000006e-107 < y < -1.05e-107

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 100.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+34}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-19}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-26}:\\ \;\;\;\;\frac{z}{\frac{a}{t}}\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{-83}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-107}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -1.05 \cdot 10^{-107}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+49}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{+117} \lor \neg \left(y \leq 2.25 \cdot 10^{+117}\right):\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 58.7% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + x \cdot \frac{y}{z}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;x \leq -5 \cdot 10^{+106}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{+68}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -3.8 \cdot 10^{+56}:\\ \;\;\;\;y \cdot \frac{x}{z - a}\\ \mathbf{elif}\;x \leq -2.35 \cdot 10^{+26}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{+31}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{+102}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+151}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{+225}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{+230}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* x (/ y z)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= x -5e+106)
     (- x (/ x (/ a y)))
     (if (<= x -7.5e+68)
       t_2
       (if (<= x -3.8e+56)
         (* y (/ x (- z a)))
         (if (<= x -2.35e+26)
           t_1
           (if (<= x 2.5e+31)
             t_2
             (if (<= x 3.2e+102)
               (- x (* z (/ t a)))
               (if (<= x 9e+151)
                 (* x (/ (- y a) z))
                 (if (<= x 4.2e+225)
                   (* x (- 1.0 (/ y a)))
                   (if (<= x 3.6e+230) t_1 (- x (* x (/ y a))))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (x * (y / z));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -5e+106) {
		tmp = x - (x / (a / y));
	} else if (x <= -7.5e+68) {
		tmp = t_2;
	} else if (x <= -3.8e+56) {
		tmp = y * (x / (z - a));
	} else if (x <= -2.35e+26) {
		tmp = t_1;
	} else if (x <= 2.5e+31) {
		tmp = t_2;
	} else if (x <= 3.2e+102) {
		tmp = x - (z * (t / a));
	} else if (x <= 9e+151) {
		tmp = x * ((y - a) / z);
	} else if (x <= 4.2e+225) {
		tmp = x * (1.0 - (y / a));
	} else if (x <= 3.6e+230) {
		tmp = t_1;
	} else {
		tmp = x - (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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t + (x * (y / z))
    t_2 = t * ((y - z) / (a - z))
    if (x <= (-5d+106)) then
        tmp = x - (x / (a / y))
    else if (x <= (-7.5d+68)) then
        tmp = t_2
    else if (x <= (-3.8d+56)) then
        tmp = y * (x / (z - a))
    else if (x <= (-2.35d+26)) then
        tmp = t_1
    else if (x <= 2.5d+31) then
        tmp = t_2
    else if (x <= 3.2d+102) then
        tmp = x - (z * (t / a))
    else if (x <= 9d+151) then
        tmp = x * ((y - a) / z)
    else if (x <= 4.2d+225) then
        tmp = x * (1.0d0 - (y / a))
    else if (x <= 3.6d+230) then
        tmp = t_1
    else
        tmp = x - (x * (y / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (x * (y / z));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -5e+106) {
		tmp = x - (x / (a / y));
	} else if (x <= -7.5e+68) {
		tmp = t_2;
	} else if (x <= -3.8e+56) {
		tmp = y * (x / (z - a));
	} else if (x <= -2.35e+26) {
		tmp = t_1;
	} else if (x <= 2.5e+31) {
		tmp = t_2;
	} else if (x <= 3.2e+102) {
		tmp = x - (z * (t / a));
	} else if (x <= 9e+151) {
		tmp = x * ((y - a) / z);
	} else if (x <= 4.2e+225) {
		tmp = x * (1.0 - (y / a));
	} else if (x <= 3.6e+230) {
		tmp = t_1;
	} else {
		tmp = x - (x * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (x * (y / z))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if x <= -5e+106:
		tmp = x - (x / (a / y))
	elif x <= -7.5e+68:
		tmp = t_2
	elif x <= -3.8e+56:
		tmp = y * (x / (z - a))
	elif x <= -2.35e+26:
		tmp = t_1
	elif x <= 2.5e+31:
		tmp = t_2
	elif x <= 3.2e+102:
		tmp = x - (z * (t / a))
	elif x <= 9e+151:
		tmp = x * ((y - a) / z)
	elif x <= 4.2e+225:
		tmp = x * (1.0 - (y / a))
	elif x <= 3.6e+230:
		tmp = t_1
	else:
		tmp = x - (x * (y / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(x * Float64(y / z)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (x <= -5e+106)
		tmp = Float64(x - Float64(x / Float64(a / y)));
	elseif (x <= -7.5e+68)
		tmp = t_2;
	elseif (x <= -3.8e+56)
		tmp = Float64(y * Float64(x / Float64(z - a)));
	elseif (x <= -2.35e+26)
		tmp = t_1;
	elseif (x <= 2.5e+31)
		tmp = t_2;
	elseif (x <= 3.2e+102)
		tmp = Float64(x - Float64(z * Float64(t / a)));
	elseif (x <= 9e+151)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (x <= 4.2e+225)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (x <= 3.6e+230)
		tmp = t_1;
	else
		tmp = Float64(x - Float64(x * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (x * (y / z));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (x <= -5e+106)
		tmp = x - (x / (a / y));
	elseif (x <= -7.5e+68)
		tmp = t_2;
	elseif (x <= -3.8e+56)
		tmp = y * (x / (z - a));
	elseif (x <= -2.35e+26)
		tmp = t_1;
	elseif (x <= 2.5e+31)
		tmp = t_2;
	elseif (x <= 3.2e+102)
		tmp = x - (z * (t / a));
	elseif (x <= 9e+151)
		tmp = x * ((y - a) / z);
	elseif (x <= 4.2e+225)
		tmp = x * (1.0 - (y / a));
	elseif (x <= 3.6e+230)
		tmp = t_1;
	else
		tmp = x - (x * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5e+106], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.5e+68], t$95$2, If[LessEqual[x, -3.8e+56], N[(y * N[(x / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.35e+26], t$95$1, If[LessEqual[x, 2.5e+31], t$95$2, If[LessEqual[x, 3.2e+102], N[(x - N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9e+151], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e+225], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e+230], t$95$1, N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -7.5 \cdot 10^{+68}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;x \leq -2.35 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 2.5 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\

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

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

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

\mathbf{elif}\;x \leq 3.6 \cdot 10^{+230}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if x < -4.9999999999999998e106

    1. Initial program 82.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 74.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - x \cdot \frac{y}{a}} \]
    9. Step-by-step derivation
      1. clear-num62.4%

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

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

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

    if -4.9999999999999998e106 < x < -7.49999999999999959e68 or -2.3499999999999999e26 < x < 2.50000000000000013e31

    1. Initial program 88.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 58.8%

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

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

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

    if -7.49999999999999959e68 < x < -3.79999999999999996e56

    1. Initial program 83.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 83.5%

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

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

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

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

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

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

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

    if -3.79999999999999996e56 < x < -2.3499999999999999e26 or 4.2e225 < x < 3.60000000000000019e230

    1. Initial program 19.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 88.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}} \]
    4. Step-by-step derivation
      1. associate--l+88.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. distribute-lft-out--88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    11. Simplified100.0%

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

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    13. Step-by-step derivation
      1. mul-1-neg63.0%

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

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

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

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

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

    if 2.50000000000000013e31 < x < 3.1999999999999999e102

    1. Initial program 99.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 61.0%

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

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

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

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

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

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

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

    if 3.1999999999999999e102 < x < 8.9999999999999997e151

    1. Initial program 55.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 47.5%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{\color{blue}{-1 \cdot a - -1 \cdot y}}{z} \]
      5. sub-neg65.3%

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

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

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

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

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

    if 8.9999999999999997e151 < x < 4.2e225

    1. Initial program 82.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 58.9%

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

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

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

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

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

    if 3.60000000000000019e230 < x

    1. Initial program 82.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 82.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{+106}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{+68}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq -3.8 \cdot 10^{+56}:\\ \;\;\;\;y \cdot \frac{x}{z - a}\\ \mathbf{elif}\;x \leq -2.35 \cdot 10^{+26}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{+31}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{+102}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+151}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{+225}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{+230}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 57.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + x \cdot \frac{y}{z}\\ t_2 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;z \leq -7300:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7.4 \cdot 10^{-60}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-145}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-145}:\\ \;\;\;\;z \cdot \frac{t}{-a}\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-217}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-233}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-261}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-20}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* x (/ y z)))) (t_2 (+ x (/ (* y t) a))))
   (if (<= z -7300.0)
     t_1
     (if (<= z -7.4e-60)
       (- x (* z (/ t a)))
       (if (<= z -1.25e-145)
         t_2
         (if (<= z -1.2e-145)
           (* z (/ t (- a)))
           (if (<= z -9.2e-217)
             (- x (* x (/ y a)))
             (if (<= z -8.2e-233)
               (* (- t x) (/ y a))
               (if (<= z -2.7e-261)
                 (* x (- 1.0 (/ y a)))
                 (if (<= z 4.2e-20) t_2 t_1))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (x * (y / z));
	double t_2 = x + ((y * t) / a);
	double tmp;
	if (z <= -7300.0) {
		tmp = t_1;
	} else if (z <= -7.4e-60) {
		tmp = x - (z * (t / a));
	} else if (z <= -1.25e-145) {
		tmp = t_2;
	} else if (z <= -1.2e-145) {
		tmp = z * (t / -a);
	} else if (z <= -9.2e-217) {
		tmp = x - (x * (y / a));
	} else if (z <= -8.2e-233) {
		tmp = (t - x) * (y / a);
	} else if (z <= -2.7e-261) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 4.2e-20) {
		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 / z))
    t_2 = x + ((y * t) / a)
    if (z <= (-7300.0d0)) then
        tmp = t_1
    else if (z <= (-7.4d-60)) then
        tmp = x - (z * (t / a))
    else if (z <= (-1.25d-145)) then
        tmp = t_2
    else if (z <= (-1.2d-145)) then
        tmp = z * (t / -a)
    else if (z <= (-9.2d-217)) then
        tmp = x - (x * (y / a))
    else if (z <= (-8.2d-233)) then
        tmp = (t - x) * (y / a)
    else if (z <= (-2.7d-261)) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 4.2d-20) 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 / z));
	double t_2 = x + ((y * t) / a);
	double tmp;
	if (z <= -7300.0) {
		tmp = t_1;
	} else if (z <= -7.4e-60) {
		tmp = x - (z * (t / a));
	} else if (z <= -1.25e-145) {
		tmp = t_2;
	} else if (z <= -1.2e-145) {
		tmp = z * (t / -a);
	} else if (z <= -9.2e-217) {
		tmp = x - (x * (y / a));
	} else if (z <= -8.2e-233) {
		tmp = (t - x) * (y / a);
	} else if (z <= -2.7e-261) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 4.2e-20) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (x * (y / z))
	t_2 = x + ((y * t) / a)
	tmp = 0
	if z <= -7300.0:
		tmp = t_1
	elif z <= -7.4e-60:
		tmp = x - (z * (t / a))
	elif z <= -1.25e-145:
		tmp = t_2
	elif z <= -1.2e-145:
		tmp = z * (t / -a)
	elif z <= -9.2e-217:
		tmp = x - (x * (y / a))
	elif z <= -8.2e-233:
		tmp = (t - x) * (y / a)
	elif z <= -2.7e-261:
		tmp = x * (1.0 - (y / a))
	elif z <= 4.2e-20:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(x * Float64(y / z)))
	t_2 = Float64(x + Float64(Float64(y * t) / a))
	tmp = 0.0
	if (z <= -7300.0)
		tmp = t_1;
	elseif (z <= -7.4e-60)
		tmp = Float64(x - Float64(z * Float64(t / a)));
	elseif (z <= -1.25e-145)
		tmp = t_2;
	elseif (z <= -1.2e-145)
		tmp = Float64(z * Float64(t / Float64(-a)));
	elseif (z <= -9.2e-217)
		tmp = Float64(x - Float64(x * Float64(y / a)));
	elseif (z <= -8.2e-233)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (z <= -2.7e-261)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 4.2e-20)
		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 / z));
	t_2 = x + ((y * t) / a);
	tmp = 0.0;
	if (z <= -7300.0)
		tmp = t_1;
	elseif (z <= -7.4e-60)
		tmp = x - (z * (t / a));
	elseif (z <= -1.25e-145)
		tmp = t_2;
	elseif (z <= -1.2e-145)
		tmp = z * (t / -a);
	elseif (z <= -9.2e-217)
		tmp = x - (x * (y / a));
	elseif (z <= -8.2e-233)
		tmp = (t - x) * (y / a);
	elseif (z <= -2.7e-261)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 4.2e-20)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7300.0], t$95$1, If[LessEqual[z, -7.4e-60], N[(x - N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.25e-145], t$95$2, If[LessEqual[z, -1.2e-145], N[(z * N[(t / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.2e-217], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.2e-233], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.7e-261], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-20], t$95$2, t$95$1]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + x \cdot \frac{y}{z}\\
t_2 := x + \frac{y \cdot t}{a}\\
\mathbf{if}\;z \leq -7300:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -7.4 \cdot 10^{-60}:\\
\;\;\;\;x - z \cdot \frac{t}{a}\\

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-145}:\\
\;\;\;\;t\_2\\

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

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

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

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

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-20}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if z < -7300 or 4.1999999999999998e-20 < z

    1. Initial program 71.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 64.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}} \]
    4. Step-by-step derivation
      1. associate--l+64.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. distribute-lft-out--64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    13. Step-by-step derivation
      1. mul-1-neg58.0%

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

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

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

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

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

    if -7300 < z < -7.4000000000000005e-60

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

    if -7.4000000000000005e-60 < z < -1.2499999999999999e-145 or -2.6999999999999999e-261 < z < 4.1999999999999998e-20

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

    if -1.2499999999999999e-145 < z < -1.20000000000000008e-145

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 98.4%

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{z}{a}} \]
      3. distribute-lft-neg-in100.0%

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

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

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

        \[\leadsto \color{blue}{-\frac{t \cdot z}{a}} \]
      2. distribute-frac-neg298.4%

        \[\leadsto \color{blue}{\frac{t \cdot z}{-a}} \]
      3. *-commutative98.4%

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

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

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

    if -1.20000000000000008e-145 < z < -9.20000000000000019e-217

    1. Initial program 90.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 80.7%

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

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

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

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

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

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

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

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

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

    if -9.20000000000000019e-217 < z < -8.2000000000000009e-233

    1. Initial program 99.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 99.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{y}{a} + \left(-\color{blue}{x \cdot \frac{y}{a}}\right) \]
      5. distribute-lft-neg-out99.6%

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

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

        \[\leadsto \frac{y}{a} \cdot \color{blue}{\left(t - x\right)} \]
      8. *-commutative99.6%

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

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

    if -8.2000000000000009e-233 < z < -2.6999999999999999e-261

    1. Initial program 99.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 100.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7300:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -7.4 \cdot 10^{-60}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-145}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-145}:\\ \;\;\;\;z \cdot \frac{t}{-a}\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-217}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-233}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-261}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-20}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 49.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+40}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -16200:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -8000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-48}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-293}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-77}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-44}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+42}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* y t) a))))
   (if (<= z -1.4e+40)
     t
     (if (<= z -16200.0)
       (- x (* x (/ y a)))
       (if (<= z -8000.0)
         t
         (if (<= z -5.4e-48)
           (- x (* z (/ t a)))
           (if (<= z 8.2e-293)
             (* x (- 1.0 (/ y a)))
             (if (<= z 4.5e-77)
               t_1
               (if (<= z 4e-44)
                 (* y (/ (- t x) a))
                 (if (<= z 2.45e+42) t_1 t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y * t) / a);
	double tmp;
	if (z <= -1.4e+40) {
		tmp = t;
	} else if (z <= -16200.0) {
		tmp = x - (x * (y / a));
	} else if (z <= -8000.0) {
		tmp = t;
	} else if (z <= -5.4e-48) {
		tmp = x - (z * (t / a));
	} else if (z <= 8.2e-293) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 4.5e-77) {
		tmp = t_1;
	} else if (z <= 4e-44) {
		tmp = y * ((t - x) / a);
	} else if (z <= 2.45e+42) {
		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 * t) / a)
    if (z <= (-1.4d+40)) then
        tmp = t
    else if (z <= (-16200.0d0)) then
        tmp = x - (x * (y / a))
    else if (z <= (-8000.0d0)) then
        tmp = t
    else if (z <= (-5.4d-48)) then
        tmp = x - (z * (t / a))
    else if (z <= 8.2d-293) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 4.5d-77) then
        tmp = t_1
    else if (z <= 4d-44) then
        tmp = y * ((t - x) / a)
    else if (z <= 2.45d+42) 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 * t) / a);
	double tmp;
	if (z <= -1.4e+40) {
		tmp = t;
	} else if (z <= -16200.0) {
		tmp = x - (x * (y / a));
	} else if (z <= -8000.0) {
		tmp = t;
	} else if (z <= -5.4e-48) {
		tmp = x - (z * (t / a));
	} else if (z <= 8.2e-293) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 4.5e-77) {
		tmp = t_1;
	} else if (z <= 4e-44) {
		tmp = y * ((t - x) / a);
	} else if (z <= 2.45e+42) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y * t) / a)
	tmp = 0
	if z <= -1.4e+40:
		tmp = t
	elif z <= -16200.0:
		tmp = x - (x * (y / a))
	elif z <= -8000.0:
		tmp = t
	elif z <= -5.4e-48:
		tmp = x - (z * (t / a))
	elif z <= 8.2e-293:
		tmp = x * (1.0 - (y / a))
	elif z <= 4.5e-77:
		tmp = t_1
	elif z <= 4e-44:
		tmp = y * ((t - x) / a)
	elif z <= 2.45e+42:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y * t) / a))
	tmp = 0.0
	if (z <= -1.4e+40)
		tmp = t;
	elseif (z <= -16200.0)
		tmp = Float64(x - Float64(x * Float64(y / a)));
	elseif (z <= -8000.0)
		tmp = t;
	elseif (z <= -5.4e-48)
		tmp = Float64(x - Float64(z * Float64(t / a)));
	elseif (z <= 8.2e-293)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 4.5e-77)
		tmp = t_1;
	elseif (z <= 4e-44)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 2.45e+42)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y * t) / a);
	tmp = 0.0;
	if (z <= -1.4e+40)
		tmp = t;
	elseif (z <= -16200.0)
		tmp = x - (x * (y / a));
	elseif (z <= -8000.0)
		tmp = t;
	elseif (z <= -5.4e-48)
		tmp = x - (z * (t / a));
	elseif (z <= 8.2e-293)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 4.5e-77)
		tmp = t_1;
	elseif (z <= 4e-44)
		tmp = y * ((t - x) / a);
	elseif (z <= 2.45e+42)
		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 * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+40], t, If[LessEqual[z, -16200.0], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8000.0], t, If[LessEqual[z, -5.4e-48], N[(x - N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-293], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-77], t$95$1, If[LessEqual[z, 4e-44], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e+42], t$95$1, t]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq -5.4 \cdot 10^{-48}:\\
\;\;\;\;x - z \cdot \frac{t}{a}\\

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 2.45 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.4000000000000001e40 or -16200 < z < -8e3 or 2.4500000000000001e42 < z

    1. Initial program 66.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 52.3%

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

    if -1.4000000000000001e40 < z < -16200

    1. Initial program 83.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 83.9%

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

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

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

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

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

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

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

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

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

    if -8e3 < z < -5.40000000000000023e-48

    1. Initial program 99.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 67.7%

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

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

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

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

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

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

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

    if -5.40000000000000023e-48 < z < 8.19999999999999975e-293

    1. Initial program 95.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 73.5%

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

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

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

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

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

    if 8.19999999999999975e-293 < z < 4.5000000000000001e-77 or 3.99999999999999981e-44 < z < 2.4500000000000001e42

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

    if 4.5000000000000001e-77 < z < 3.99999999999999981e-44

    1. Initial program 99.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+40}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -16200:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -8000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-48}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-293}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-77}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-44}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+42}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 46.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{+42}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -58000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7.1 \cdot 10^{-15}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-109}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{-216}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-237}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-77}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= z -3.4e+42)
     t
     (if (<= z -58000.0)
       t_1
       (if (<= z -7.1e-15)
         (+ x t)
         (if (<= z -8.5e-109)
           (* t (/ y (- a z)))
           (if (<= z -2e-216)
             t_1
             (if (<= z -3.4e-237)
               (* (- t x) (/ y a))
               (if (<= z 4e-77)
                 t_1
                 (if (<= z 5.9e+35) (* t (/ (- y z) a)) t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -3.4e+42) {
		tmp = t;
	} else if (z <= -58000.0) {
		tmp = t_1;
	} else if (z <= -7.1e-15) {
		tmp = x + t;
	} else if (z <= -8.5e-109) {
		tmp = t * (y / (a - z));
	} else if (z <= -2e-216) {
		tmp = t_1;
	} else if (z <= -3.4e-237) {
		tmp = (t - x) * (y / a);
	} else if (z <= 4e-77) {
		tmp = t_1;
	} else if (z <= 5.9e+35) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    if (z <= (-3.4d+42)) then
        tmp = t
    else if (z <= (-58000.0d0)) then
        tmp = t_1
    else if (z <= (-7.1d-15)) then
        tmp = x + t
    else if (z <= (-8.5d-109)) then
        tmp = t * (y / (a - z))
    else if (z <= (-2d-216)) then
        tmp = t_1
    else if (z <= (-3.4d-237)) then
        tmp = (t - x) * (y / a)
    else if (z <= 4d-77) then
        tmp = t_1
    else if (z <= 5.9d+35) then
        tmp = t * ((y - z) / a)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -3.4e+42) {
		tmp = t;
	} else if (z <= -58000.0) {
		tmp = t_1;
	} else if (z <= -7.1e-15) {
		tmp = x + t;
	} else if (z <= -8.5e-109) {
		tmp = t * (y / (a - z));
	} else if (z <= -2e-216) {
		tmp = t_1;
	} else if (z <= -3.4e-237) {
		tmp = (t - x) * (y / a);
	} else if (z <= 4e-77) {
		tmp = t_1;
	} else if (z <= 5.9e+35) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -3.4e+42:
		tmp = t
	elif z <= -58000.0:
		tmp = t_1
	elif z <= -7.1e-15:
		tmp = x + t
	elif z <= -8.5e-109:
		tmp = t * (y / (a - z))
	elif z <= -2e-216:
		tmp = t_1
	elif z <= -3.4e-237:
		tmp = (t - x) * (y / a)
	elif z <= 4e-77:
		tmp = t_1
	elif z <= 5.9e+35:
		tmp = t * ((y - z) / a)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -3.4e+42)
		tmp = t;
	elseif (z <= -58000.0)
		tmp = t_1;
	elseif (z <= -7.1e-15)
		tmp = Float64(x + t);
	elseif (z <= -8.5e-109)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= -2e-216)
		tmp = t_1;
	elseif (z <= -3.4e-237)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (z <= 4e-77)
		tmp = t_1;
	elseif (z <= 5.9e+35)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -3.4e+42)
		tmp = t;
	elseif (z <= -58000.0)
		tmp = t_1;
	elseif (z <= -7.1e-15)
		tmp = x + t;
	elseif (z <= -8.5e-109)
		tmp = t * (y / (a - z));
	elseif (z <= -2e-216)
		tmp = t_1;
	elseif (z <= -3.4e-237)
		tmp = (t - x) * (y / a);
	elseif (z <= 4e-77)
		tmp = t_1;
	elseif (z <= 5.9e+35)
		tmp = t * ((y - z) / a);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e+42], t, If[LessEqual[z, -58000.0], t$95$1, If[LessEqual[z, -7.1e-15], N[(x + t), $MachinePrecision], If[LessEqual[z, -8.5e-109], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2e-216], t$95$1, If[LessEqual[z, -3.4e-237], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-77], t$95$1, If[LessEqual[z, 5.9e+35], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -7.1 \cdot 10^{-15}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;z \leq -2 \cdot 10^{-216}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 4 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -3.39999999999999975e42 or 5.89999999999999985e35 < z

    1. Initial program 66.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 50.9%

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

    if -3.39999999999999975e42 < z < -58000 or -8.50000000000000005e-109 < z < -2.0000000000000001e-216 or -3.4000000000000002e-237 < z < 3.9999999999999997e-77

    1. Initial program 93.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 73.4%

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

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

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

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

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

    if -58000 < z < -7.1000000000000002e-15

    1. Initial program 99.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 100.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot t} \]
    8. Step-by-step derivation
      1. sub-neg76.1%

        \[\leadsto \color{blue}{x + \left(--1 \cdot t\right)} \]
      2. neg-mul-176.1%

        \[\leadsto x + \left(-\color{blue}{\left(-t\right)}\right) \]
      3. remove-double-neg76.1%

        \[\leadsto x + \color{blue}{t} \]
    9. Simplified76.1%

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

    if -7.1000000000000002e-15 < z < -8.50000000000000005e-109

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 54.0%

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

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

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

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

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

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

    if -2.0000000000000001e-216 < z < -3.4000000000000002e-237

    1. Initial program 99.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 99.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{y}{a} + \color{blue}{\left(-x\right) \cdot \frac{y}{a}} \]
      6. distribute-rgt-in99.7%

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

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

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

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

    if 3.9999999999999997e-77 < z < 5.89999999999999985e35

    1. Initial program 92.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 53.7%

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

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

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

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

Alternative 9: 46.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -2.1 \cdot 10^{+39}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -12200:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-17}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-108}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{-216}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-236}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-77}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= z -2.1e+39)
     t
     (if (<= z -12200.0)
       t_1
       (if (<= z -1.5e-17)
         (+ x t)
         (if (<= z -3.2e-108)
           (* t (/ y (- a z)))
           (if (<= z -4.9e-216)
             t_1
             (if (<= z -3.5e-236)
               (* y (/ (- t x) a))
               (if (<= z 4.6e-77)
                 t_1
                 (if (<= z 4.5e+35) (* t (/ (- y z) a)) t))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.1e+39) {
		tmp = t;
	} else if (z <= -12200.0) {
		tmp = t_1;
	} else if (z <= -1.5e-17) {
		tmp = x + t;
	} else if (z <= -3.2e-108) {
		tmp = t * (y / (a - z));
	} else if (z <= -4.9e-216) {
		tmp = t_1;
	} else if (z <= -3.5e-236) {
		tmp = y * ((t - x) / a);
	} else if (z <= 4.6e-77) {
		tmp = t_1;
	} else if (z <= 4.5e+35) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    if (z <= (-2.1d+39)) then
        tmp = t
    else if (z <= (-12200.0d0)) then
        tmp = t_1
    else if (z <= (-1.5d-17)) then
        tmp = x + t
    else if (z <= (-3.2d-108)) then
        tmp = t * (y / (a - z))
    else if (z <= (-4.9d-216)) then
        tmp = t_1
    else if (z <= (-3.5d-236)) then
        tmp = y * ((t - x) / a)
    else if (z <= 4.6d-77) then
        tmp = t_1
    else if (z <= 4.5d+35) then
        tmp = t * ((y - z) / a)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -2.1e+39) {
		tmp = t;
	} else if (z <= -12200.0) {
		tmp = t_1;
	} else if (z <= -1.5e-17) {
		tmp = x + t;
	} else if (z <= -3.2e-108) {
		tmp = t * (y / (a - z));
	} else if (z <= -4.9e-216) {
		tmp = t_1;
	} else if (z <= -3.5e-236) {
		tmp = y * ((t - x) / a);
	} else if (z <= 4.6e-77) {
		tmp = t_1;
	} else if (z <= 4.5e+35) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -2.1e+39:
		tmp = t
	elif z <= -12200.0:
		tmp = t_1
	elif z <= -1.5e-17:
		tmp = x + t
	elif z <= -3.2e-108:
		tmp = t * (y / (a - z))
	elif z <= -4.9e-216:
		tmp = t_1
	elif z <= -3.5e-236:
		tmp = y * ((t - x) / a)
	elif z <= 4.6e-77:
		tmp = t_1
	elif z <= 4.5e+35:
		tmp = t * ((y - z) / a)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -2.1e+39)
		tmp = t;
	elseif (z <= -12200.0)
		tmp = t_1;
	elseif (z <= -1.5e-17)
		tmp = Float64(x + t);
	elseif (z <= -3.2e-108)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= -4.9e-216)
		tmp = t_1;
	elseif (z <= -3.5e-236)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 4.6e-77)
		tmp = t_1;
	elseif (z <= 4.5e+35)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -2.1e+39)
		tmp = t;
	elseif (z <= -12200.0)
		tmp = t_1;
	elseif (z <= -1.5e-17)
		tmp = x + t;
	elseif (z <= -3.2e-108)
		tmp = t * (y / (a - z));
	elseif (z <= -4.9e-216)
		tmp = t_1;
	elseif (z <= -3.5e-236)
		tmp = y * ((t - x) / a);
	elseif (z <= 4.6e-77)
		tmp = t_1;
	elseif (z <= 4.5e+35)
		tmp = t * ((y - z) / a);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+39], t, If[LessEqual[z, -12200.0], t$95$1, If[LessEqual[z, -1.5e-17], N[(x + t), $MachinePrecision], If[LessEqual[z, -3.2e-108], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.9e-216], t$95$1, If[LessEqual[z, -3.5e-236], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e-77], t$95$1, If[LessEqual[z, 4.5e+35], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -1.5 \cdot 10^{-17}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;z \leq -4.9 \cdot 10^{-216}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 4.6 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -2.0999999999999999e39 or 4.4999999999999997e35 < z

    1. Initial program 66.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 50.9%

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

    if -2.0999999999999999e39 < z < -12200 or -3.2e-108 < z < -4.9000000000000001e-216 or -3.49999999999999994e-236 < z < 4.59999999999999997e-77

    1. Initial program 93.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 73.4%

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

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

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

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

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

    if -12200 < z < -1.50000000000000003e-17

    1. Initial program 99.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 100.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot t} \]
    8. Step-by-step derivation
      1. sub-neg76.1%

        \[\leadsto \color{blue}{x + \left(--1 \cdot t\right)} \]
      2. neg-mul-176.1%

        \[\leadsto x + \left(-\color{blue}{\left(-t\right)}\right) \]
      3. remove-double-neg76.1%

        \[\leadsto x + \color{blue}{t} \]
    9. Simplified76.1%

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

    if -1.50000000000000003e-17 < z < -3.2e-108

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 54.0%

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

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

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

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

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

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

    if -4.9000000000000001e-216 < z < -3.49999999999999994e-236

    1. Initial program 99.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 99.4%

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

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

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

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

    if 4.59999999999999997e-77 < z < 4.4999999999999997e35

    1. Initial program 92.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 53.7%

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

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

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

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

Alternative 10: 94.8% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.00000000000000005e-262 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

    1. Initial program 3.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 90.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}} \]
    4. Step-by-step derivation
      1. associate--l+90.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. distribute-lft-out--90.2%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 90.1% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.0000000000000002e-142 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 94.3%

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

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

    1. Initial program 6.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 67.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + x \cdot \frac{y}{z}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+118}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+147} \lor \neg \left(z \leq 9.5 \cdot 10^{+257}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* x (/ y z)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= z -3.6e+45)
     t_1
     (if (<= z 2.15e-13)
       (+ x (/ (- t x) (/ a y)))
       (if (<= z 2.9e+85)
         t_2
         (if (<= z 2.8e+87)
           x
           (if (<= z 4.6e+118)
             t_2
             (if (or (<= z 3.3e+147) (not (<= z 9.5e+257)))
               t_1
               (+ t (/ (* y (- x t)) z))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (x * (y / z));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -3.6e+45) {
		tmp = t_1;
	} else if (z <= 2.15e-13) {
		tmp = x + ((t - x) / (a / y));
	} else if (z <= 2.9e+85) {
		tmp = t_2;
	} else if (z <= 2.8e+87) {
		tmp = x;
	} else if (z <= 4.6e+118) {
		tmp = t_2;
	} else if ((z <= 3.3e+147) || !(z <= 9.5e+257)) {
		tmp = t_1;
	} else {
		tmp = t + ((y * (x - t)) / z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t + (x * (y / z))
    t_2 = t * ((y - z) / (a - z))
    if (z <= (-3.6d+45)) then
        tmp = t_1
    else if (z <= 2.15d-13) then
        tmp = x + ((t - x) / (a / y))
    else if (z <= 2.9d+85) then
        tmp = t_2
    else if (z <= 2.8d+87) then
        tmp = x
    else if (z <= 4.6d+118) then
        tmp = t_2
    else if ((z <= 3.3d+147) .or. (.not. (z <= 9.5d+257))) then
        tmp = t_1
    else
        tmp = t + ((y * (x - t)) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (x * (y / z));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -3.6e+45) {
		tmp = t_1;
	} else if (z <= 2.15e-13) {
		tmp = x + ((t - x) / (a / y));
	} else if (z <= 2.9e+85) {
		tmp = t_2;
	} else if (z <= 2.8e+87) {
		tmp = x;
	} else if (z <= 4.6e+118) {
		tmp = t_2;
	} else if ((z <= 3.3e+147) || !(z <= 9.5e+257)) {
		tmp = t_1;
	} else {
		tmp = t + ((y * (x - t)) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (x * (y / z))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -3.6e+45:
		tmp = t_1
	elif z <= 2.15e-13:
		tmp = x + ((t - x) / (a / y))
	elif z <= 2.9e+85:
		tmp = t_2
	elif z <= 2.8e+87:
		tmp = x
	elif z <= 4.6e+118:
		tmp = t_2
	elif (z <= 3.3e+147) or not (z <= 9.5e+257):
		tmp = t_1
	else:
		tmp = t + ((y * (x - t)) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(x * Float64(y / z)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -3.6e+45)
		tmp = t_1;
	elseif (z <= 2.15e-13)
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y)));
	elseif (z <= 2.9e+85)
		tmp = t_2;
	elseif (z <= 2.8e+87)
		tmp = x;
	elseif (z <= 4.6e+118)
		tmp = t_2;
	elseif ((z <= 3.3e+147) || !(z <= 9.5e+257))
		tmp = t_1;
	else
		tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (x * (y / z));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -3.6e+45)
		tmp = t_1;
	elseif (z <= 2.15e-13)
		tmp = x + ((t - x) / (a / y));
	elseif (z <= 2.9e+85)
		tmp = t_2;
	elseif (z <= 2.8e+87)
		tmp = x;
	elseif (z <= 4.6e+118)
		tmp = t_2;
	elseif ((z <= 3.3e+147) || ~((z <= 9.5e+257)))
		tmp = t_1;
	else
		tmp = t + ((y * (x - t)) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e+45], t$95$1, If[LessEqual[z, 2.15e-13], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+85], t$95$2, If[LessEqual[z, 2.8e+87], x, If[LessEqual[z, 4.6e+118], t$95$2, If[Or[LessEqual[z, 3.3e+147], N[Not[LessEqual[z, 9.5e+257]], $MachinePrecision]], t$95$1, N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+85}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+87}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.6 \cdot 10^{+118}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 3.3 \cdot 10^{+147} \lor \neg \left(z \leq 9.5 \cdot 10^{+257}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.6e45 or 4.60000000000000032e118 < z < 3.30000000000000025e147 or 9.50000000000000022e257 < z

    1. Initial program 63.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6e45 < z < 2.1499999999999999e-13

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

    if 2.1499999999999999e-13 < z < 2.89999999999999997e85 or 2.80000000000000015e87 < z < 4.60000000000000032e118

    1. Initial program 87.2%

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

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

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

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

    if 2.89999999999999997e85 < z < 2.80000000000000015e87

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 54.7%

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

    if 3.30000000000000025e147 < z < 9.50000000000000022e257

    1. Initial program 71.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 76.8%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+45}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+118}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+147} \lor \neg \left(z \leq 9.5 \cdot 10^{+257}\right):\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 67.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + x \cdot \frac{y}{z}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -6.6 \cdot 10^{+43}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+113} \lor \neg \left(z \leq 1.5 \cdot 10^{+149}\right) \land z \leq 4.7 \cdot 10^{+257}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* x (/ y z)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= z -6.6e+43)
     t_1
     (if (<= z 7.5e-13)
       (+ x (/ (- t x) (/ a y)))
       (if (<= z 2.9e+85)
         t_2
         (if (<= z 2.8e+87)
           x
           (if (or (<= z 5.5e+113) (and (not (<= z 1.5e+149)) (<= z 4.7e+257)))
             t_2
             t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (x * (y / z));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -6.6e+43) {
		tmp = t_1;
	} else if (z <= 7.5e-13) {
		tmp = x + ((t - x) / (a / y));
	} else if (z <= 2.9e+85) {
		tmp = t_2;
	} else if (z <= 2.8e+87) {
		tmp = x;
	} else if ((z <= 5.5e+113) || (!(z <= 1.5e+149) && (z <= 4.7e+257))) {
		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 / z))
    t_2 = t * ((y - z) / (a - z))
    if (z <= (-6.6d+43)) then
        tmp = t_1
    else if (z <= 7.5d-13) then
        tmp = x + ((t - x) / (a / y))
    else if (z <= 2.9d+85) then
        tmp = t_2
    else if (z <= 2.8d+87) then
        tmp = x
    else if ((z <= 5.5d+113) .or. (.not. (z <= 1.5d+149)) .and. (z <= 4.7d+257)) 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 / z));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -6.6e+43) {
		tmp = t_1;
	} else if (z <= 7.5e-13) {
		tmp = x + ((t - x) / (a / y));
	} else if (z <= 2.9e+85) {
		tmp = t_2;
	} else if (z <= 2.8e+87) {
		tmp = x;
	} else if ((z <= 5.5e+113) || (!(z <= 1.5e+149) && (z <= 4.7e+257))) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (x * (y / z))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -6.6e+43:
		tmp = t_1
	elif z <= 7.5e-13:
		tmp = x + ((t - x) / (a / y))
	elif z <= 2.9e+85:
		tmp = t_2
	elif z <= 2.8e+87:
		tmp = x
	elif (z <= 5.5e+113) or (not (z <= 1.5e+149) and (z <= 4.7e+257)):
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(x * Float64(y / z)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -6.6e+43)
		tmp = t_1;
	elseif (z <= 7.5e-13)
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y)));
	elseif (z <= 2.9e+85)
		tmp = t_2;
	elseif (z <= 2.8e+87)
		tmp = x;
	elseif ((z <= 5.5e+113) || (!(z <= 1.5e+149) && (z <= 4.7e+257)))
		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 / z));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -6.6e+43)
		tmp = t_1;
	elseif (z <= 7.5e-13)
		tmp = x + ((t - x) / (a / y));
	elseif (z <= 2.9e+85)
		tmp = t_2;
	elseif (z <= 2.8e+87)
		tmp = x;
	elseif ((z <= 5.5e+113) || (~((z <= 1.5e+149)) && (z <= 4.7e+257)))
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e+43], t$95$1, If[LessEqual[z, 7.5e-13], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+85], t$95$2, If[LessEqual[z, 2.8e+87], x, If[Or[LessEqual[z, 5.5e+113], And[N[Not[LessEqual[z, 1.5e+149]], $MachinePrecision], LessEqual[z, 4.7e+257]]], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+85}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+87}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+113} \lor \neg \left(z \leq 1.5 \cdot 10^{+149}\right) \land z \leq 4.7 \cdot 10^{+257}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.6000000000000003e43 or 5.5000000000000001e113 < z < 1.50000000000000002e149 or 4.7e257 < z

    1. Initial program 63.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.6000000000000003e43 < z < 7.5000000000000004e-13

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

    if 7.5000000000000004e-13 < z < 2.89999999999999997e85 or 2.80000000000000015e87 < z < 5.5000000000000001e113 or 1.50000000000000002e149 < z < 4.7e257

    1. Initial program 81.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 59.7%

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

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

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

    if 2.89999999999999997e85 < z < 2.80000000000000015e87

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 54.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+43}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+113} \lor \neg \left(z \leq 1.5 \cdot 10^{+149}\right) \land z \leq 4.7 \cdot 10^{+257}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 66.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + x \cdot \frac{y}{z}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{+46}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-19}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+114} \lor \neg \left(z \leq 6 \cdot 10^{+147}\right) \land z \leq 4.6 \cdot 10^{+256}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* x (/ y z)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= z -5.5e+46)
     t_1
     (if (<= z 2.7e-19)
       (+ x (* y (/ (- t x) a)))
       (if (<= z 2.5e+85)
         t_2
         (if (<= z 2.8e+87)
           x
           (if (or (<= z 4.2e+114) (and (not (<= z 6e+147)) (<= z 4.6e+256)))
             t_2
             t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (x * (y / z));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -5.5e+46) {
		tmp = t_1;
	} else if (z <= 2.7e-19) {
		tmp = x + (y * ((t - x) / a));
	} else if (z <= 2.5e+85) {
		tmp = t_2;
	} else if (z <= 2.8e+87) {
		tmp = x;
	} else if ((z <= 4.2e+114) || (!(z <= 6e+147) && (z <= 4.6e+256))) {
		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 / z))
    t_2 = t * ((y - z) / (a - z))
    if (z <= (-5.5d+46)) then
        tmp = t_1
    else if (z <= 2.7d-19) then
        tmp = x + (y * ((t - x) / a))
    else if (z <= 2.5d+85) then
        tmp = t_2
    else if (z <= 2.8d+87) then
        tmp = x
    else if ((z <= 4.2d+114) .or. (.not. (z <= 6d+147)) .and. (z <= 4.6d+256)) 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 / z));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -5.5e+46) {
		tmp = t_1;
	} else if (z <= 2.7e-19) {
		tmp = x + (y * ((t - x) / a));
	} else if (z <= 2.5e+85) {
		tmp = t_2;
	} else if (z <= 2.8e+87) {
		tmp = x;
	} else if ((z <= 4.2e+114) || (!(z <= 6e+147) && (z <= 4.6e+256))) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (x * (y / z))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -5.5e+46:
		tmp = t_1
	elif z <= 2.7e-19:
		tmp = x + (y * ((t - x) / a))
	elif z <= 2.5e+85:
		tmp = t_2
	elif z <= 2.8e+87:
		tmp = x
	elif (z <= 4.2e+114) or (not (z <= 6e+147) and (z <= 4.6e+256)):
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(x * Float64(y / z)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -5.5e+46)
		tmp = t_1;
	elseif (z <= 2.7e-19)
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	elseif (z <= 2.5e+85)
		tmp = t_2;
	elseif (z <= 2.8e+87)
		tmp = x;
	elseif ((z <= 4.2e+114) || (!(z <= 6e+147) && (z <= 4.6e+256)))
		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 / z));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -5.5e+46)
		tmp = t_1;
	elseif (z <= 2.7e-19)
		tmp = x + (y * ((t - x) / a));
	elseif (z <= 2.5e+85)
		tmp = t_2;
	elseif (z <= 2.8e+87)
		tmp = x;
	elseif ((z <= 4.2e+114) || (~((z <= 6e+147)) && (z <= 4.6e+256)))
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e+46], t$95$1, If[LessEqual[z, 2.7e-19], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+85], t$95$2, If[LessEqual[z, 2.8e+87], x, If[Or[LessEqual[z, 4.2e+114], And[N[Not[LessEqual[z, 6e+147]], $MachinePrecision], LessEqual[z, 4.6e+256]]], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+87}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+114} \lor \neg \left(z \leq 6 \cdot 10^{+147}\right) \land z \leq 4.6 \cdot 10^{+256}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.4999999999999998e46 or 4.2000000000000001e114 < z < 5.99999999999999987e147 or 4.5999999999999997e256 < z

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    8. Simplified83.6%

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

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

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

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    11. Simplified82.5%

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

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    13. Step-by-step derivation
      1. mul-1-neg68.3%

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

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

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

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

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

    if -5.4999999999999998e46 < z < 2.7000000000000001e-19

    1. Initial program 93.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 75.2%

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

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

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

    if 2.7000000000000001e-19 < z < 2.5e85 or 2.80000000000000015e87 < z < 4.2000000000000001e114 or 5.99999999999999987e147 < z < 4.5999999999999997e256

    1. Initial program 81.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 59.7%

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

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

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

    if 2.5e85 < z < 2.80000000000000015e87

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 54.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+46}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-19}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+114} \lor \neg \left(z \leq 6 \cdot 10^{+147}\right) \land z \leq 4.6 \cdot 10^{+256}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 53.5% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;z \leq -3.1 \cdot 10^{-221}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+36}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.6000000000000002e32 or -8600 < z < -190 or 4.79999999999999985e36 < z

    1. Initial program 67.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 34.0%

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

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

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

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

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

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

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

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

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

    if -2.6000000000000002e32 < z < -8600

    1. Initial program 83.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 83.9%

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

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

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

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

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

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

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

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

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

    if -190 < z < -3.0999999999999999e-221 or -3.1999999999999998e-243 < z < 4.79999999999999985e36

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

    if -3.0999999999999999e-221 < z < -3.1999999999999998e-243

    1. Initial program 99.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 99.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{y}{a} + \color{blue}{\left(-x\right) \cdot \frac{y}{a}} \]
      6. distribute-rgt-in99.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+32}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -8600:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -190:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-221}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-243}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+36}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 50.7% accurate, 0.4× speedup?

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

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

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

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

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

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

\mathbf{elif}\;z \leq 1.38 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.19999999999999996e36 or -8500 < z < -8e3 or 1.38e19 < z

    1. Initial program 69.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 49.3%

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

    if -1.19999999999999996e36 < z < -8500

    1. Initial program 83.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 83.9%

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

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

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

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

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

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

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

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

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

    if -8e3 < z < -4.4e-122 or -1.2e-260 < z < 1.38e19

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

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

    if -4.4e-122 < z < -1.2e-260

    1. Initial program 93.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 75.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+36}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8500:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -8000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.4 \cdot 10^{-122}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-260}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.38 \cdot 10^{+19}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 50.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y \cdot t}{a}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -1.75 \cdot 10^{+35}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -31000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1300:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-127}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-259}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.38 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* y t) a))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= z -1.75e+35)
     t
     (if (<= z -31000.0)
       t_2
       (if (<= z -1300.0)
         t
         (if (<= z -9e-127)
           t_1
           (if (<= z -1.85e-259) t_2 (if (<= z 1.38e+19) t_1 t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y * t) / a);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -1.75e+35) {
		tmp = t;
	} else if (z <= -31000.0) {
		tmp = t_2;
	} else if (z <= -1300.0) {
		tmp = t;
	} else if (z <= -9e-127) {
		tmp = t_1;
	} else if (z <= -1.85e-259) {
		tmp = t_2;
	} else if (z <= 1.38e+19) {
		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 * t) / a)
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-1.75d+35)) then
        tmp = t
    else if (z <= (-31000.0d0)) then
        tmp = t_2
    else if (z <= (-1300.0d0)) then
        tmp = t
    else if (z <= (-9d-127)) then
        tmp = t_1
    else if (z <= (-1.85d-259)) then
        tmp = t_2
    else if (z <= 1.38d+19) 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 * t) / a);
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -1.75e+35) {
		tmp = t;
	} else if (z <= -31000.0) {
		tmp = t_2;
	} else if (z <= -1300.0) {
		tmp = t;
	} else if (z <= -9e-127) {
		tmp = t_1;
	} else if (z <= -1.85e-259) {
		tmp = t_2;
	} else if (z <= 1.38e+19) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y * t) / a)
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -1.75e+35:
		tmp = t
	elif z <= -31000.0:
		tmp = t_2
	elif z <= -1300.0:
		tmp = t
	elif z <= -9e-127:
		tmp = t_1
	elif z <= -1.85e-259:
		tmp = t_2
	elif z <= 1.38e+19:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y * t) / a))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -1.75e+35)
		tmp = t;
	elseif (z <= -31000.0)
		tmp = t_2;
	elseif (z <= -1300.0)
		tmp = t;
	elseif (z <= -9e-127)
		tmp = t_1;
	elseif (z <= -1.85e-259)
		tmp = t_2;
	elseif (z <= 1.38e+19)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y * t) / a);
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -1.75e+35)
		tmp = t;
	elseif (z <= -31000.0)
		tmp = t_2;
	elseif (z <= -1300.0)
		tmp = t;
	elseif (z <= -9e-127)
		tmp = t_1;
	elseif (z <= -1.85e-259)
		tmp = t_2;
	elseif (z <= 1.38e+19)
		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 * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+35], t, If[LessEqual[z, -31000.0], t$95$2, If[LessEqual[z, -1300.0], t, If[LessEqual[z, -9e-127], t$95$1, If[LessEqual[z, -1.85e-259], t$95$2, If[LessEqual[z, 1.38e+19], t$95$1, t]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -31000:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -1300:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -9 \cdot 10^{-127}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.85 \cdot 10^{-259}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 1.38 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.75e35 or -31000 < z < -1300 or 1.38e19 < z

    1. Initial program 69.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 49.3%

      \[\leadsto \color{blue}{t} \]

    if -1.75e35 < z < -31000 or -8.9999999999999998e-127 < z < -1.84999999999999996e-259

    1. Initial program 92.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 76.9%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y - z}{a - z}\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg76.9%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y - z}{a - z}\right)}\right) \]
      2. unsub-neg76.9%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y - z}{a - z}\right)} \]
    5. Simplified76.9%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y - z}{a - z}\right)} \]
    6. Taylor expanded in z around 0 75.6%

      \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]

    if -1300 < z < -8.9999999999999998e-127 or -1.84999999999999996e-259 < z < 1.38e19

    1. Initial program 95.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative95.3%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
      2. associate-*l/91.7%

        \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
      3. associate-*r/96.9%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
      4. clear-num96.9%

        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
      5. un-div-inv97.3%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr97.3%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Taylor expanded in z around 0 79.0%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y}}} \]
    6. Taylor expanded in t around inf 61.0%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+35}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -31000:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1300:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-127}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-259}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.38 \cdot 10^{+19}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 37.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{-a}\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{-198}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-243}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -7.4 \cdot 10^{-252}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-262}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+32}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ y (- a)))))
   (if (<= z -4.5e-198)
     (+ x t)
     (if (<= z -2.2e-243)
       t_1
       (if (<= z -7.4e-252)
         x
         (if (<= z -2.6e-262)
           t_1
           (if (<= z 5e-77) x (if (<= z 4.5e+32) (/ t (/ a y)) t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / -a);
	double tmp;
	if (z <= -4.5e-198) {
		tmp = x + t;
	} else if (z <= -2.2e-243) {
		tmp = t_1;
	} else if (z <= -7.4e-252) {
		tmp = x;
	} else if (z <= -2.6e-262) {
		tmp = t_1;
	} else if (z <= 5e-77) {
		tmp = x;
	} else if (z <= 4.5e+32) {
		tmp = t / (a / y);
	} 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)
    if (z <= (-4.5d-198)) then
        tmp = x + t
    else if (z <= (-2.2d-243)) then
        tmp = t_1
    else if (z <= (-7.4d-252)) then
        tmp = x
    else if (z <= (-2.6d-262)) then
        tmp = t_1
    else if (z <= 5d-77) then
        tmp = x
    else if (z <= 4.5d+32) then
        tmp = t / (a / y)
    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);
	double tmp;
	if (z <= -4.5e-198) {
		tmp = x + t;
	} else if (z <= -2.2e-243) {
		tmp = t_1;
	} else if (z <= -7.4e-252) {
		tmp = x;
	} else if (z <= -2.6e-262) {
		tmp = t_1;
	} else if (z <= 5e-77) {
		tmp = x;
	} else if (z <= 4.5e+32) {
		tmp = t / (a / y);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (y / -a)
	tmp = 0
	if z <= -4.5e-198:
		tmp = x + t
	elif z <= -2.2e-243:
		tmp = t_1
	elif z <= -7.4e-252:
		tmp = x
	elif z <= -2.6e-262:
		tmp = t_1
	elif z <= 5e-77:
		tmp = x
	elif z <= 4.5e+32:
		tmp = t / (a / y)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(y / Float64(-a)))
	tmp = 0.0
	if (z <= -4.5e-198)
		tmp = Float64(x + t);
	elseif (z <= -2.2e-243)
		tmp = t_1;
	elseif (z <= -7.4e-252)
		tmp = x;
	elseif (z <= -2.6e-262)
		tmp = t_1;
	elseif (z <= 5e-77)
		tmp = x;
	elseif (z <= 4.5e+32)
		tmp = Float64(t / Float64(a / y));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (y / -a);
	tmp = 0.0;
	if (z <= -4.5e-198)
		tmp = x + t;
	elseif (z <= -2.2e-243)
		tmp = t_1;
	elseif (z <= -7.4e-252)
		tmp = x;
	elseif (z <= -2.6e-262)
		tmp = t_1;
	elseif (z <= 5e-77)
		tmp = x;
	elseif (z <= 4.5e+32)
		tmp = t / (a / y);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e-198], N[(x + t), $MachinePrecision], If[LessEqual[z, -2.2e-243], t$95$1, If[LessEqual[z, -7.4e-252], x, If[LessEqual[z, -2.6e-262], t$95$1, If[LessEqual[z, 5e-77], x, If[LessEqual[z, 4.5e+32], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], t]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{-a}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{-198}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;z \leq -2.2 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -7.4 \cdot 10^{-252}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-262}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 5 \cdot 10^{-77}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{+32}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -4.4999999999999998e-198

    1. Initial program 78.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 44.8%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{z \cdot \left(t - x\right)}{a - z}} \]
    4. Step-by-step derivation
      1. mul-1-neg44.8%

        \[\leadsto x + \color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a - z}\right)} \]
      2. unsub-neg44.8%

        \[\leadsto \color{blue}{x - \frac{z \cdot \left(t - x\right)}{a - z}} \]
      3. associate-/l*53.9%

        \[\leadsto x - \color{blue}{z \cdot \frac{t - x}{a - z}} \]
    5. Simplified53.9%

      \[\leadsto \color{blue}{x - z \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in t around inf 51.8%

      \[\leadsto x - z \cdot \color{blue}{\frac{t}{a - z}} \]
    7. Taylor expanded in z around inf 45.6%

      \[\leadsto \color{blue}{x - -1 \cdot t} \]
    8. Step-by-step derivation
      1. sub-neg45.6%

        \[\leadsto \color{blue}{x + \left(--1 \cdot t\right)} \]
      2. neg-mul-145.6%

        \[\leadsto x + \left(-\color{blue}{\left(-t\right)}\right) \]
      3. remove-double-neg45.6%

        \[\leadsto x + \color{blue}{t} \]
    9. Simplified45.6%

      \[\leadsto \color{blue}{x + t} \]

    if -4.4999999999999998e-198 < z < -2.1999999999999999e-243 or -7.4000000000000002e-252 < z < -2.5999999999999999e-262

    1. Initial program 99.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 85.9%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub85.9%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified85.9%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in a around inf 85.9%

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Taylor expanded in t around 0 58.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg58.5%

        \[\leadsto \color{blue}{-\frac{x \cdot y}{a}} \]
      2. associate-/l*65.2%

        \[\leadsto -\color{blue}{x \cdot \frac{y}{a}} \]
    9. Simplified65.2%

      \[\leadsto \color{blue}{-x \cdot \frac{y}{a}} \]

    if -2.1999999999999999e-243 < z < -7.4000000000000002e-252 or -2.5999999999999999e-262 < z < 4.99999999999999963e-77

    1. Initial program 95.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 47.4%

      \[\leadsto \color{blue}{x} \]

    if 4.99999999999999963e-77 < z < 4.5000000000000003e32

    1. Initial program 91.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 67.4%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub67.4%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified67.4%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in a around inf 48.1%

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Taylor expanded in t around inf 36.1%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*47.9%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified47.9%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Step-by-step derivation
      1. clear-num48.0%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. un-div-inv48.0%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Applied egg-rr48.0%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]

    if 4.5000000000000003e32 < z

    1. Initial program 71.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 47.3%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification47.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{-198}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-243}:\\ \;\;\;\;x \cdot \frac{y}{-a}\\ \mathbf{elif}\;z \leq -7.4 \cdot 10^{-252}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-262}:\\ \;\;\;\;x \cdot \frac{y}{-a}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+32}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 70.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{y - a}{\frac{z}{x}}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -2 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+83}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+88}:\\ \;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+107}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (/ (- y a) (/ z x)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= z -2e+44)
     t_1
     (if (<= z 1.15e-13)
       (+ x (/ (- t x) (/ a y)))
       (if (<= z 9.2e+83)
         t_2
         (if (<= z 4.5e+88)
           (* x (+ (/ (- y z) (- z a)) 1.0))
           (if (<= z 6.2e+107) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((y - a) / (z / x));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -2e+44) {
		tmp = t_1;
	} else if (z <= 1.15e-13) {
		tmp = x + ((t - x) / (a / y));
	} else if (z <= 9.2e+83) {
		tmp = t_2;
	} else if (z <= 4.5e+88) {
		tmp = x * (((y - z) / (z - a)) + 1.0);
	} else if (z <= 6.2e+107) {
		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 + ((y - a) / (z / x))
    t_2 = t * ((y - z) / (a - z))
    if (z <= (-2d+44)) then
        tmp = t_1
    else if (z <= 1.15d-13) then
        tmp = x + ((t - x) / (a / y))
    else if (z <= 9.2d+83) then
        tmp = t_2
    else if (z <= 4.5d+88) then
        tmp = x * (((y - z) / (z - a)) + 1.0d0)
    else if (z <= 6.2d+107) 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 + ((y - a) / (z / x));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -2e+44) {
		tmp = t_1;
	} else if (z <= 1.15e-13) {
		tmp = x + ((t - x) / (a / y));
	} else if (z <= 9.2e+83) {
		tmp = t_2;
	} else if (z <= 4.5e+88) {
		tmp = x * (((y - z) / (z - a)) + 1.0);
	} else if (z <= 6.2e+107) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + ((y - a) / (z / x))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -2e+44:
		tmp = t_1
	elif z <= 1.15e-13:
		tmp = x + ((t - x) / (a / y))
	elif z <= 9.2e+83:
		tmp = t_2
	elif z <= 4.5e+88:
		tmp = x * (((y - z) / (z - a)) + 1.0)
	elif z <= 6.2e+107:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(y - a) / Float64(z / x)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -2e+44)
		tmp = t_1;
	elseif (z <= 1.15e-13)
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y)));
	elseif (z <= 9.2e+83)
		tmp = t_2;
	elseif (z <= 4.5e+88)
		tmp = Float64(x * Float64(Float64(Float64(y - z) / Float64(z - a)) + 1.0));
	elseif (z <= 6.2e+107)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + ((y - a) / (z / x));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -2e+44)
		tmp = t_1;
	elseif (z <= 1.15e-13)
		tmp = x + ((t - x) / (a / y));
	elseif (z <= 9.2e+83)
		tmp = t_2;
	elseif (z <= 4.5e+88)
		tmp = x * (((y - z) / (z - a)) + 1.0);
	elseif (z <= 6.2e+107)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+44], t$95$1, If[LessEqual[z, 1.15e-13], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e+83], t$95$2, If[LessEqual[z, 4.5e+88], N[(x * N[(N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+107], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \frac{y - a}{\frac{z}{x}}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -2 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-13}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\

\mathbf{elif}\;z \leq 9.2 \cdot 10^{+83}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{+88}:\\
\;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+107}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.0000000000000002e44 or 6.20000000000000052e107 < z

    1. Initial program 65.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 70.6%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+70.6%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--70.6%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub70.6%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg70.6%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg70.6%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub70.6%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*77.1%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*84.1%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--85.2%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    5. Simplified85.2%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    6. Taylor expanded in t around 0 76.5%

      \[\leadsto t - \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z} + t \cdot \left(\frac{y}{z} - \frac{a}{z}\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutative76.5%

        \[\leadsto t - \color{blue}{\left(t \cdot \left(\frac{y}{z} - \frac{a}{z}\right) + -1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)} \]
      2. div-sub76.5%

        \[\leadsto t - \left(t \cdot \color{blue}{\frac{y - a}{z}} + -1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right) \]
      3. mul-1-neg76.5%

        \[\leadsto t - \left(t \cdot \frac{y - a}{z} + \color{blue}{\left(-\frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
      4. associate-/l*83.0%

        \[\leadsto t - \left(t \cdot \frac{y - a}{z} + \left(-\color{blue}{x \cdot \frac{y - a}{z}}\right)\right) \]
      5. distribute-lft-neg-in83.0%

        \[\leadsto t - \left(t \cdot \frac{y - a}{z} + \color{blue}{\left(-x\right) \cdot \frac{y - a}{z}}\right) \]
      6. distribute-rgt-in83.0%

        \[\leadsto t - \color{blue}{\frac{y - a}{z} \cdot \left(t + \left(-x\right)\right)} \]
      7. sub-neg83.0%

        \[\leadsto t - \frac{y - a}{z} \cdot \color{blue}{\left(t - x\right)} \]
      8. associate-/r/85.2%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    8. Simplified85.2%

      \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    9. Taylor expanded in t around 0 80.1%

      \[\leadsto t - \frac{y - a}{\color{blue}{-1 \cdot \frac{z}{x}}} \]
    10. Step-by-step derivation
      1. associate-*r/80.1%

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-180.1%

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    11. Simplified80.1%

      \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-z}{x}}} \]

    if -2.0000000000000002e44 < z < 1.1499999999999999e-13

    1. Initial program 93.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative93.6%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
      2. associate-*l/88.9%

        \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
      3. associate-*r/94.9%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
      4. clear-num94.9%

        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
      5. un-div-inv95.1%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr95.1%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Taylor expanded in z around 0 82.0%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y}}} \]

    if 1.1499999999999999e-13 < z < 9.1999999999999998e83 or 4.5e88 < z < 6.20000000000000052e107

    1. Initial program 88.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 67.3%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. associate-/l*71.0%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    5. Simplified71.0%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if 9.1999999999999998e83 < z < 4.5e88

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 100.0%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y - z}{a - z}\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg100.0%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y - z}{a - z}\right)}\right) \]
      2. unsub-neg100.0%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y - z}{a - z}\right)} \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y - z}{a - z}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification80.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+44}:\\ \;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-13}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+83}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+88}:\\ \;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+107}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 70.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{y - a}{\frac{z}{x}}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -1.35 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-14}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+108}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (/ (- y a) (/ z x)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= z -1.35e+45)
     t_1
     (if (<= z 8.2e-14)
       (+ x (/ (- t x) (/ a y)))
       (if (<= z 2.8e+85)
         t_2
         (if (<= z 5.5e+87) x (if (<= z 2.3e+108) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((y - a) / (z / x));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.35e+45) {
		tmp = t_1;
	} else if (z <= 8.2e-14) {
		tmp = x + ((t - x) / (a / y));
	} else if (z <= 2.8e+85) {
		tmp = t_2;
	} else if (z <= 5.5e+87) {
		tmp = x;
	} else if (z <= 2.3e+108) {
		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 + ((y - a) / (z / x))
    t_2 = t * ((y - z) / (a - z))
    if (z <= (-1.35d+45)) then
        tmp = t_1
    else if (z <= 8.2d-14) then
        tmp = x + ((t - x) / (a / y))
    else if (z <= 2.8d+85) then
        tmp = t_2
    else if (z <= 5.5d+87) then
        tmp = x
    else if (z <= 2.3d+108) 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 + ((y - a) / (z / x));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.35e+45) {
		tmp = t_1;
	} else if (z <= 8.2e-14) {
		tmp = x + ((t - x) / (a / y));
	} else if (z <= 2.8e+85) {
		tmp = t_2;
	} else if (z <= 5.5e+87) {
		tmp = x;
	} else if (z <= 2.3e+108) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + ((y - a) / (z / x))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -1.35e+45:
		tmp = t_1
	elif z <= 8.2e-14:
		tmp = x + ((t - x) / (a / y))
	elif z <= 2.8e+85:
		tmp = t_2
	elif z <= 5.5e+87:
		tmp = x
	elif z <= 2.3e+108:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(y - a) / Float64(z / x)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -1.35e+45)
		tmp = t_1;
	elseif (z <= 8.2e-14)
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y)));
	elseif (z <= 2.8e+85)
		tmp = t_2;
	elseif (z <= 5.5e+87)
		tmp = x;
	elseif (z <= 2.3e+108)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + ((y - a) / (z / x));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -1.35e+45)
		tmp = t_1;
	elseif (z <= 8.2e-14)
		tmp = x + ((t - x) / (a / y));
	elseif (z <= 2.8e+85)
		tmp = t_2;
	elseif (z <= 5.5e+87)
		tmp = x;
	elseif (z <= 2.3e+108)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e+45], t$95$1, If[LessEqual[z, 8.2e-14], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+85], t$95$2, If[LessEqual[z, 5.5e+87], x, If[LessEqual[z, 2.3e+108], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \frac{y - a}{\frac{z}{x}}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 8.2 \cdot 10^{-14}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+85}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+87}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+108}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.34999999999999992e45 or 2.2999999999999999e108 < z

    1. Initial program 65.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 70.3%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+70.3%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--70.3%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub70.3%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg70.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg70.3%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub70.3%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*76.8%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*83.9%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--85.1%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    5. Simplified85.1%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    6. Taylor expanded in t around 0 76.2%

      \[\leadsto t - \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z} + t \cdot \left(\frac{y}{z} - \frac{a}{z}\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutative76.2%

        \[\leadsto t - \color{blue}{\left(t \cdot \left(\frac{y}{z} - \frac{a}{z}\right) + -1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)} \]
      2. div-sub76.2%

        \[\leadsto t - \left(t \cdot \color{blue}{\frac{y - a}{z}} + -1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right) \]
      3. mul-1-neg76.2%

        \[\leadsto t - \left(t \cdot \frac{y - a}{z} + \color{blue}{\left(-\frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
      4. associate-/l*82.8%

        \[\leadsto t - \left(t \cdot \frac{y - a}{z} + \left(-\color{blue}{x \cdot \frac{y - a}{z}}\right)\right) \]
      5. distribute-lft-neg-in82.8%

        \[\leadsto t - \left(t \cdot \frac{y - a}{z} + \color{blue}{\left(-x\right) \cdot \frac{y - a}{z}}\right) \]
      6. distribute-rgt-in82.8%

        \[\leadsto t - \color{blue}{\frac{y - a}{z} \cdot \left(t + \left(-x\right)\right)} \]
      7. sub-neg82.8%

        \[\leadsto t - \frac{y - a}{z} \cdot \color{blue}{\left(t - x\right)} \]
      8. associate-/r/85.0%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    8. Simplified85.0%

      \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    9. Taylor expanded in t around 0 79.8%

      \[\leadsto t - \frac{y - a}{\color{blue}{-1 \cdot \frac{z}{x}}} \]
    10. Step-by-step derivation
      1. associate-*r/79.8%

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-179.8%

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    11. Simplified79.8%

      \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-z}{x}}} \]

    if -1.34999999999999992e45 < z < 8.2000000000000004e-14

    1. Initial program 93.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative93.6%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
      2. associate-*l/88.9%

        \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
      3. associate-*r/94.9%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
      4. clear-num94.9%

        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
      5. un-div-inv95.1%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr95.1%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Taylor expanded in z around 0 82.0%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y}}} \]

    if 8.2000000000000004e-14 < z < 2.7999999999999999e85 or 5.50000000000000022e87 < z < 2.2999999999999999e108

    1. Initial program 86.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 68.5%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. associate-/l*72.0%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    5. Simplified72.0%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if 2.7999999999999999e85 < z < 5.50000000000000022e87

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 54.7%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification80.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+45}:\\ \;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-14}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+87}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+108}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 70.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + x \cdot \frac{y - a}{z}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -1.1 \cdot 10^{+30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+88}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+111}:\\ \;\;\;\;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 (* t (/ (- y z) (- a z)))))
   (if (<= z -1.1e+30)
     t_1
     (if (<= z 1.2e-19)
       (+ x (/ (- t x) (/ a y)))
       (if (<= z 2.9e+85)
         t_2
         (if (<= z 1.1e+88) x (if (<= z 8e+111) 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 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.1e+30) {
		tmp = t_1;
	} else if (z <= 1.2e-19) {
		tmp = x + ((t - x) / (a / y));
	} else if (z <= 2.9e+85) {
		tmp = t_2;
	} else if (z <= 1.1e+88) {
		tmp = x;
	} else if (z <= 8e+111) {
		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 = t * ((y - z) / (a - z))
    if (z <= (-1.1d+30)) then
        tmp = t_1
    else if (z <= 1.2d-19) then
        tmp = x + ((t - x) / (a / y))
    else if (z <= 2.9d+85) then
        tmp = t_2
    else if (z <= 1.1d+88) then
        tmp = x
    else if (z <= 8d+111) 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 = t * ((y - z) / (a - z));
	double tmp;
	if (z <= -1.1e+30) {
		tmp = t_1;
	} else if (z <= 1.2e-19) {
		tmp = x + ((t - x) / (a / y));
	} else if (z <= 2.9e+85) {
		tmp = t_2;
	} else if (z <= 1.1e+88) {
		tmp = x;
	} else if (z <= 8e+111) {
		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 = t * ((y - z) / (a - z))
	tmp = 0
	if z <= -1.1e+30:
		tmp = t_1
	elif z <= 1.2e-19:
		tmp = x + ((t - x) / (a / y))
	elif z <= 2.9e+85:
		tmp = t_2
	elif z <= 1.1e+88:
		tmp = x
	elif z <= 8e+111:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(x * Float64(Float64(y - a) / z)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (z <= -1.1e+30)
		tmp = t_1;
	elseif (z <= 1.2e-19)
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y)));
	elseif (z <= 2.9e+85)
		tmp = t_2;
	elseif (z <= 1.1e+88)
		tmp = x;
	elseif (z <= 8e+111)
		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 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (z <= -1.1e+30)
		tmp = t_1;
	elseif (z <= 1.2e-19)
		tmp = x + ((t - x) / (a / y));
	elseif (z <= 2.9e+85)
		tmp = t_2;
	elseif (z <= 1.1e+88)
		tmp = x;
	elseif (z <= 8e+111)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+30], t$95$1, If[LessEqual[z, 1.2e-19], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+85], t$95$2, If[LessEqual[z, 1.1e+88], x, If[LessEqual[z, 8e+111], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + x \cdot \frac{y - a}{z}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+85}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 1.1 \cdot 10^{+88}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 8 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.1e30 or 7.99999999999999965e111 < z

    1. Initial program 64.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 70.6%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+70.6%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--70.6%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub70.6%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg70.6%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg70.6%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub70.6%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*77.1%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*84.1%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--85.2%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    5. Simplified85.2%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    6. Taylor expanded in t around 0 71.3%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. mul-1-neg71.3%

        \[\leadsto t - \color{blue}{\left(-\frac{x \cdot \left(y - a\right)}{z}\right)} \]
      2. associate-/l*77.8%

        \[\leadsto t - \left(-\color{blue}{x \cdot \frac{y - a}{z}}\right) \]
      3. distribute-rgt-neg-in77.8%

        \[\leadsto t - \color{blue}{x \cdot \left(-\frac{y - a}{z}\right)} \]
      4. distribute-neg-frac277.8%

        \[\leadsto t - x \cdot \color{blue}{\frac{y - a}{-z}} \]
    8. Simplified77.8%

      \[\leadsto t - \color{blue}{x \cdot \frac{y - a}{-z}} \]

    if -1.1e30 < z < 1.20000000000000011e-19

    1. Initial program 94.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative94.2%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
      2. associate-*l/89.5%

        \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
      3. associate-*r/95.6%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
      4. clear-num95.5%

        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
      5. un-div-inv95.8%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr95.8%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Taylor expanded in z around 0 82.5%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y}}} \]

    if 1.20000000000000011e-19 < z < 2.89999999999999997e85 or 1.10000000000000004e88 < z < 7.99999999999999965e111

    1. Initial program 86.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 68.5%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. associate-/l*72.0%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    5. Simplified72.0%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if 2.89999999999999997e85 < z < 1.10000000000000004e88

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 54.7%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+30}:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-19}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+88}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+111}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y - a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 38.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+45}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{-297}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-142}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-39}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.8e+45)
   t
   (if (<= z 5.4e-297)
     x
     (if (<= z 3.5e-142)
       (* t (/ y a))
       (if (<= z 5e-77) x (if (<= z 2.1e-39) (/ t (/ a y)) t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.8e+45) {
		tmp = t;
	} else if (z <= 5.4e-297) {
		tmp = x;
	} else if (z <= 3.5e-142) {
		tmp = t * (y / a);
	} else if (z <= 5e-77) {
		tmp = x;
	} else if (z <= 2.1e-39) {
		tmp = t / (a / y);
	} 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 <= (-6.8d+45)) then
        tmp = t
    else if (z <= 5.4d-297) then
        tmp = x
    else if (z <= 3.5d-142) then
        tmp = t * (y / a)
    else if (z <= 5d-77) then
        tmp = x
    else if (z <= 2.1d-39) then
        tmp = t / (a / y)
    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 <= -6.8e+45) {
		tmp = t;
	} else if (z <= 5.4e-297) {
		tmp = x;
	} else if (z <= 3.5e-142) {
		tmp = t * (y / a);
	} else if (z <= 5e-77) {
		tmp = x;
	} else if (z <= 2.1e-39) {
		tmp = t / (a / y);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6.8e+45:
		tmp = t
	elif z <= 5.4e-297:
		tmp = x
	elif z <= 3.5e-142:
		tmp = t * (y / a)
	elif z <= 5e-77:
		tmp = x
	elif z <= 2.1e-39:
		tmp = t / (a / y)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.8e+45)
		tmp = t;
	elseif (z <= 5.4e-297)
		tmp = x;
	elseif (z <= 3.5e-142)
		tmp = Float64(t * Float64(y / a));
	elseif (z <= 5e-77)
		tmp = x;
	elseif (z <= 2.1e-39)
		tmp = Float64(t / Float64(a / y));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6.8e+45)
		tmp = t;
	elseif (z <= 5.4e-297)
		tmp = x;
	elseif (z <= 3.5e-142)
		tmp = t * (y / a);
	elseif (z <= 5e-77)
		tmp = x;
	elseif (z <= 2.1e-39)
		tmp = t / (a / y);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e+45], t, If[LessEqual[z, 5.4e-297], x, If[LessEqual[z, 3.5e-142], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-77], x, If[LessEqual[z, 2.1e-39], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+45}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 5.4 \cdot 10^{-297}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3.5 \cdot 10^{-142}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 5 \cdot 10^{-77}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-39}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.8e45 or 2.09999999999999993e-39 < z

    1. Initial program 71.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 44.1%

      \[\leadsto \color{blue}{t} \]

    if -6.8e45 < z < 5.4000000000000002e-297 or 3.50000000000000015e-142 < z < 4.99999999999999963e-77

    1. Initial program 94.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 45.2%

      \[\leadsto \color{blue}{x} \]

    if 5.4000000000000002e-297 < z < 3.50000000000000015e-142

    1. Initial program 94.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 59.2%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub59.2%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified59.2%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in a around inf 55.2%

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Taylor expanded in t around inf 40.1%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*40.2%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified40.2%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]

    if 4.99999999999999963e-77 < z < 2.09999999999999993e-39

    1. Initial program 99.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 99.5%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub99.5%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified99.5%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in a around inf 84.8%

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Taylor expanded in t around inf 52.3%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*83.1%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified83.1%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Step-by-step derivation
      1. clear-num83.3%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. un-div-inv83.6%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Applied egg-rr83.6%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 23: 38.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+43}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-297}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-143}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-37}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.5e+43)
   t
   (if (<= z 7.5e-297)
     x
     (if (<= z 2.7e-143)
       (* t (/ y a))
       (if (<= z 4.2e-77) x (if (<= z 1.35e-37) (* y (/ t a)) t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.5e+43) {
		tmp = t;
	} else if (z <= 7.5e-297) {
		tmp = x;
	} else if (z <= 2.7e-143) {
		tmp = t * (y / a);
	} else if (z <= 4.2e-77) {
		tmp = x;
	} else if (z <= 1.35e-37) {
		tmp = y * (t / a);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-4.5d+43)) then
        tmp = t
    else if (z <= 7.5d-297) then
        tmp = x
    else if (z <= 2.7d-143) then
        tmp = t * (y / a)
    else if (z <= 4.2d-77) then
        tmp = x
    else if (z <= 1.35d-37) then
        tmp = y * (t / a)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.5e+43) {
		tmp = t;
	} else if (z <= 7.5e-297) {
		tmp = x;
	} else if (z <= 2.7e-143) {
		tmp = t * (y / a);
	} else if (z <= 4.2e-77) {
		tmp = x;
	} else if (z <= 1.35e-37) {
		tmp = y * (t / a);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.5e+43:
		tmp = t
	elif z <= 7.5e-297:
		tmp = x
	elif z <= 2.7e-143:
		tmp = t * (y / a)
	elif z <= 4.2e-77:
		tmp = x
	elif z <= 1.35e-37:
		tmp = y * (t / a)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.5e+43)
		tmp = t;
	elseif (z <= 7.5e-297)
		tmp = x;
	elseif (z <= 2.7e-143)
		tmp = Float64(t * Float64(y / a));
	elseif (z <= 4.2e-77)
		tmp = x;
	elseif (z <= 1.35e-37)
		tmp = Float64(y * Float64(t / a));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4.5e+43)
		tmp = t;
	elseif (z <= 7.5e-297)
		tmp = x;
	elseif (z <= 2.7e-143)
		tmp = t * (y / a);
	elseif (z <= 4.2e-77)
		tmp = x;
	elseif (z <= 1.35e-37)
		tmp = y * (t / a);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.5e+43], t, If[LessEqual[z, 7.5e-297], x, If[LessEqual[z, 2.7e-143], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-77], x, If[LessEqual[z, 1.35e-37], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+43}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-297}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{-143}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-77}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.35 \cdot 10^{-37}:\\
\;\;\;\;y \cdot \frac{t}{a}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.5e43 or 1.35000000000000008e-37 < z

    1. Initial program 71.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 44.1%

      \[\leadsto \color{blue}{t} \]

    if -4.5e43 < z < 7.4999999999999994e-297 or 2.70000000000000009e-143 < z < 4.20000000000000031e-77

    1. Initial program 94.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 45.2%

      \[\leadsto \color{blue}{x} \]

    if 7.4999999999999994e-297 < z < 2.70000000000000009e-143

    1. Initial program 94.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 59.2%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub59.2%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified59.2%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in a around inf 55.2%

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Taylor expanded in t around inf 40.1%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*40.2%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified40.2%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]

    if 4.20000000000000031e-77 < z < 1.35000000000000008e-37

    1. Initial program 99.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 99.5%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub99.5%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified99.5%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in a around inf 84.8%

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Taylor expanded in t around inf 83.3%

      \[\leadsto y \cdot \color{blue}{\frac{t}{a}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 24: 38.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+44}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{-297}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-143}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-38}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y a))))
   (if (<= z -3.1e+44)
     t
     (if (<= z 5.7e-297)
       x
       (if (<= z 1.25e-143)
         t_1
         (if (<= z 4.5e-77) x (if (<= z 6.8e-38) t_1 t)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -3.1e+44) {
		tmp = t;
	} else if (z <= 5.7e-297) {
		tmp = x;
	} else if (z <= 1.25e-143) {
		tmp = t_1;
	} else if (z <= 4.5e-77) {
		tmp = x;
	} else if (z <= 6.8e-38) {
		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 = t * (y / a)
    if (z <= (-3.1d+44)) then
        tmp = t
    else if (z <= 5.7d-297) then
        tmp = x
    else if (z <= 1.25d-143) then
        tmp = t_1
    else if (z <= 4.5d-77) then
        tmp = x
    else if (z <= 6.8d-38) 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 = t * (y / a);
	double tmp;
	if (z <= -3.1e+44) {
		tmp = t;
	} else if (z <= 5.7e-297) {
		tmp = x;
	} else if (z <= 1.25e-143) {
		tmp = t_1;
	} else if (z <= 4.5e-77) {
		tmp = x;
	} else if (z <= 6.8e-38) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / a)
	tmp = 0
	if z <= -3.1e+44:
		tmp = t
	elif z <= 5.7e-297:
		tmp = x
	elif z <= 1.25e-143:
		tmp = t_1
	elif z <= 4.5e-77:
		tmp = x
	elif z <= 6.8e-38:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / a))
	tmp = 0.0
	if (z <= -3.1e+44)
		tmp = t;
	elseif (z <= 5.7e-297)
		tmp = x;
	elseif (z <= 1.25e-143)
		tmp = t_1;
	elseif (z <= 4.5e-77)
		tmp = x;
	elseif (z <= 6.8e-38)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / a);
	tmp = 0.0;
	if (z <= -3.1e+44)
		tmp = t;
	elseif (z <= 5.7e-297)
		tmp = x;
	elseif (z <= 1.25e-143)
		tmp = t_1;
	elseif (z <= 4.5e-77)
		tmp = x;
	elseif (z <= 6.8e-38)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+44], t, If[LessEqual[z, 5.7e-297], x, If[LessEqual[z, 1.25e-143], t$95$1, If[LessEqual[z, 4.5e-77], x, If[LessEqual[z, 6.8e-38], t$95$1, t]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+44}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 5.7 \cdot 10^{-297}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.25 \cdot 10^{-143}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-77}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 6.8 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.09999999999999996e44 or 6.8000000000000004e-38 < z

    1. Initial program 71.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 44.1%

      \[\leadsto \color{blue}{t} \]

    if -3.09999999999999996e44 < z < 5.6999999999999997e-297 or 1.2500000000000001e-143 < z < 4.5000000000000001e-77

    1. Initial program 94.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 45.2%

      \[\leadsto \color{blue}{x} \]

    if 5.6999999999999997e-297 < z < 1.2500000000000001e-143 or 4.5000000000000001e-77 < z < 6.8000000000000004e-38

    1. Initial program 95.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 66.7%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub66.7%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified66.7%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in a around inf 60.7%

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Taylor expanded in t around inf 42.4%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*48.2%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified48.2%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 25: 75.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{if}\;z \leq -3.3 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{-9}:\\ \;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{+106}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* (/ (- t x) z) (- a y)))))
   (if (<= z -3.3e+44)
     t_1
     (if (<= z 7.8e-9)
       (- x (* (- t x) (/ (- z y) a)))
       (if (<= z 1.22e+106) (* t (/ (- y z) (- a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (((t - x) / z) * (a - y));
	double tmp;
	if (z <= -3.3e+44) {
		tmp = t_1;
	} else if (z <= 7.8e-9) {
		tmp = x - ((t - x) * ((z - y) / a));
	} else if (z <= 1.22e+106) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t + (((t - x) / z) * (a - y))
    if (z <= (-3.3d+44)) then
        tmp = t_1
    else if (z <= 7.8d-9) then
        tmp = x - ((t - x) * ((z - y) / a))
    else if (z <= 1.22d+106) then
        tmp = t * ((y - z) / (a - z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (((t - x) / z) * (a - y));
	double tmp;
	if (z <= -3.3e+44) {
		tmp = t_1;
	} else if (z <= 7.8e-9) {
		tmp = x - ((t - x) * ((z - y) / a));
	} else if (z <= 1.22e+106) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (((t - x) / z) * (a - y))
	tmp = 0
	if z <= -3.3e+44:
		tmp = t_1
	elif z <= 7.8e-9:
		tmp = x - ((t - x) * ((z - y) / a))
	elif z <= 1.22e+106:
		tmp = t * ((y - z) / (a - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y)))
	tmp = 0.0
	if (z <= -3.3e+44)
		tmp = t_1;
	elseif (z <= 7.8e-9)
		tmp = Float64(x - Float64(Float64(t - x) * Float64(Float64(z - y) / a)));
	elseif (z <= 1.22e+106)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (((t - x) / z) * (a - y));
	tmp = 0.0;
	if (z <= -3.3e+44)
		tmp = t_1;
	elseif (z <= 7.8e-9)
		tmp = x - ((t - x) * ((z - y) / a));
	elseif (z <= 1.22e+106)
		tmp = t * ((y - z) / (a - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+44], t$95$1, If[LessEqual[z, 7.8e-9], N[(x - N[(N[(t - x), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.22e+106], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7.8 \cdot 10^{-9}:\\
\;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a}\\

\mathbf{elif}\;z \leq 1.22 \cdot 10^{+106}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.30000000000000013e44 or 1.2199999999999999e106 < z

    1. Initial program 65.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 70.6%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+70.6%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--70.6%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub70.6%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg70.6%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg70.6%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub70.6%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*77.1%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*84.1%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--85.2%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    5. Simplified85.2%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]

    if -3.30000000000000013e44 < z < 7.8000000000000004e-9

    1. Initial program 93.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 78.7%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*84.6%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a}} \]
    5. Simplified84.6%

      \[\leadsto \color{blue}{x + \left(t - x\right) \cdot \frac{y - z}{a}} \]

    if 7.8000000000000004e-9 < z < 1.2199999999999999e106

    1. Initial program 88.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 66.0%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. associate-/l*69.8%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    5. Simplified69.8%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification83.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+44}:\\ \;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{-9}:\\ \;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{+106}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 72.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{y - a}{\frac{z}{x}}\\ \mathbf{if}\;z \leq -4 \cdot 10^{+35}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-9}:\\ \;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+108}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (/ (- y a) (/ z x)))))
   (if (<= z -4e+35)
     t_1
     (if (<= z 4.8e-9)
       (- x (* (- t x) (/ (- z y) a)))
       (if (<= z 2.1e+108) (* t (/ (- y z) (- a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((y - a) / (z / x));
	double tmp;
	if (z <= -4e+35) {
		tmp = t_1;
	} else if (z <= 4.8e-9) {
		tmp = x - ((t - x) * ((z - y) / a));
	} else if (z <= 2.1e+108) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t + ((y - a) / (z / x))
    if (z <= (-4d+35)) then
        tmp = t_1
    else if (z <= 4.8d-9) then
        tmp = x - ((t - x) * ((z - y) / a))
    else if (z <= 2.1d+108) then
        tmp = t * ((y - z) / (a - z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((y - a) / (z / x));
	double tmp;
	if (z <= -4e+35) {
		tmp = t_1;
	} else if (z <= 4.8e-9) {
		tmp = x - ((t - x) * ((z - y) / a));
	} else if (z <= 2.1e+108) {
		tmp = t * ((y - z) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + ((y - a) / (z / x))
	tmp = 0
	if z <= -4e+35:
		tmp = t_1
	elif z <= 4.8e-9:
		tmp = x - ((t - x) * ((z - y) / a))
	elif z <= 2.1e+108:
		tmp = t * ((y - z) / (a - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(y - a) / Float64(z / x)))
	tmp = 0.0
	if (z <= -4e+35)
		tmp = t_1;
	elseif (z <= 4.8e-9)
		tmp = Float64(x - Float64(Float64(t - x) * Float64(Float64(z - y) / a)));
	elseif (z <= 2.1e+108)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + ((y - a) / (z / x));
	tmp = 0.0;
	if (z <= -4e+35)
		tmp = t_1;
	elseif (z <= 4.8e-9)
		tmp = x - ((t - x) * ((z - y) / a));
	elseif (z <= 2.1e+108)
		tmp = t * ((y - z) / (a - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+35], t$95$1, If[LessEqual[z, 4.8e-9], N[(x - N[(N[(t - x), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+108], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{-9}:\\
\;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a}\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+108}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.9999999999999999e35 or 2.1000000000000001e108 < z

    1. Initial program 64.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 71.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}} \]
    4. Step-by-step derivation
      1. associate--l+71.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. distribute-lft-out--71.0%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub71.0%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg71.0%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg71.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub71.0%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*77.3%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*84.3%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--85.4%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    5. Simplified85.4%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    6. Taylor expanded in t around 0 76.7%

      \[\leadsto t - \color{blue}{\left(-1 \cdot \frac{x \cdot \left(y - a\right)}{z} + t \cdot \left(\frac{y}{z} - \frac{a}{z}\right)\right)} \]
    7. Step-by-step derivation
      1. +-commutative76.7%

        \[\leadsto t - \color{blue}{\left(t \cdot \left(\frac{y}{z} - \frac{a}{z}\right) + -1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right)} \]
      2. div-sub76.7%

        \[\leadsto t - \left(t \cdot \color{blue}{\frac{y - a}{z}} + -1 \cdot \frac{x \cdot \left(y - a\right)}{z}\right) \]
      3. mul-1-neg76.7%

        \[\leadsto t - \left(t \cdot \frac{y - a}{z} + \color{blue}{\left(-\frac{x \cdot \left(y - a\right)}{z}\right)}\right) \]
      4. associate-/l*83.2%

        \[\leadsto t - \left(t \cdot \frac{y - a}{z} + \left(-\color{blue}{x \cdot \frac{y - a}{z}}\right)\right) \]
      5. distribute-lft-neg-in83.2%

        \[\leadsto t - \left(t \cdot \frac{y - a}{z} + \color{blue}{\left(-x\right) \cdot \frac{y - a}{z}}\right) \]
      6. distribute-rgt-in83.2%

        \[\leadsto t - \color{blue}{\frac{y - a}{z} \cdot \left(t + \left(-x\right)\right)} \]
      7. sub-neg83.2%

        \[\leadsto t - \frac{y - a}{z} \cdot \color{blue}{\left(t - x\right)} \]
      8. associate-/r/85.4%

        \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    8. Simplified85.4%

      \[\leadsto t - \color{blue}{\frac{y - a}{\frac{z}{t - x}}} \]
    9. Taylor expanded in t around 0 80.3%

      \[\leadsto t - \frac{y - a}{\color{blue}{-1 \cdot \frac{z}{x}}} \]
    10. Step-by-step derivation
      1. associate-*r/80.3%

        \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-1 \cdot z}{x}}} \]
      2. neg-mul-180.3%

        \[\leadsto t - \frac{y - a}{\frac{\color{blue}{-z}}{x}} \]
    11. Simplified80.3%

      \[\leadsto t - \frac{y - a}{\color{blue}{\frac{-z}{x}}} \]

    if -3.9999999999999999e35 < z < 4.8e-9

    1. Initial program 94.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 79.2%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*85.2%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a}} \]
    5. Simplified85.2%

      \[\leadsto \color{blue}{x + \left(t - x\right) \cdot \frac{y - z}{a}} \]

    if 4.8e-9 < z < 2.1000000000000001e108

    1. Initial program 88.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 66.0%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. associate-/l*69.8%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    5. Simplified69.8%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification81.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+35}:\\ \;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-9}:\\ \;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+108}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 48.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.85 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-77}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.85e+37)
   t
   (if (<= z 4.8e-77)
     (* x (- 1.0 (/ y a)))
     (if (<= z 4.2e+35) (* t (/ (- y z) a)) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.85e+37) {
		tmp = t;
	} else if (z <= 4.8e-77) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 4.2e+35) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-3.85d+37)) then
        tmp = t
    else if (z <= 4.8d-77) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 4.2d+35) then
        tmp = t * ((y - z) / a)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.85e+37) {
		tmp = t;
	} else if (z <= 4.8e-77) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 4.2e+35) {
		tmp = t * ((y - z) / a);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.85e+37:
		tmp = t
	elif z <= 4.8e-77:
		tmp = x * (1.0 - (y / a))
	elif z <= 4.2e+35:
		tmp = t * ((y - z) / a)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.85e+37)
		tmp = t;
	elseif (z <= 4.8e-77)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 4.2e+35)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.85e+37)
		tmp = t;
	elseif (z <= 4.8e-77)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 4.2e+35)
		tmp = t * ((y - z) / a);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.85e+37], t, If[LessEqual[z, 4.8e-77], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+35], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.85 \cdot 10^{+37}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{-77}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+35}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.85000000000000011e37 or 4.1999999999999998e35 < z

    1. Initial program 66.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 50.9%

      \[\leadsto \color{blue}{t} \]

    if -3.85000000000000011e37 < z < 4.7999999999999998e-77

    1. Initial program 95.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 66.0%

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y - z}{a - z}\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg66.0%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(-\frac{y - z}{a - z}\right)}\right) \]
      2. unsub-neg66.0%

        \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y - z}{a - z}\right)} \]
    5. Simplified66.0%

      \[\leadsto \color{blue}{x \cdot \left(1 - \frac{y - z}{a - z}\right)} \]
    6. Taylor expanded in z around 0 62.7%

      \[\leadsto x \cdot \color{blue}{\left(1 - \frac{y}{a}\right)} \]

    if 4.7999999999999998e-77 < z < 4.1999999999999998e35

    1. Initial program 92.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 53.7%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Taylor expanded in a around inf 43.0%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a}} \]
    5. Step-by-step derivation
      1. associate-/l*53.8%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a}} \]
    6. Simplified53.8%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 28: 38.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.28 \cdot 10^{+42}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-135}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.28e+42) t (if (<= z 3.8e-135) x (+ x t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.28e+42) {
		tmp = t;
	} else if (z <= 3.8e-135) {
		tmp = x;
	} else {
		tmp = x + 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.28d+42)) then
        tmp = t
    else if (z <= 3.8d-135) then
        tmp = x
    else
        tmp = x + 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.28e+42) {
		tmp = t;
	} else if (z <= 3.8e-135) {
		tmp = x;
	} else {
		tmp = x + t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.28e+42:
		tmp = t
	elif z <= 3.8e-135:
		tmp = x
	else:
		tmp = x + t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.28e+42)
		tmp = t;
	elseif (z <= 3.8e-135)
		tmp = x;
	else
		tmp = Float64(x + t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.28e+42)
		tmp = t;
	elseif (z <= 3.8e-135)
		tmp = x;
	else
		tmp = x + t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.28e+42], t, If[LessEqual[z, 3.8e-135], x, N[(x + t), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.28 \cdot 10^{+42}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 3.8 \cdot 10^{-135}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;x + t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.28000000000000004e42

    1. Initial program 63.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 53.0%

      \[\leadsto \color{blue}{t} \]

    if -1.28000000000000004e42 < z < 3.8000000000000003e-135

    1. Initial program 95.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 41.9%

      \[\leadsto \color{blue}{x} \]

    if 3.8000000000000003e-135 < z

    1. Initial program 80.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 32.0%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{z \cdot \left(t - x\right)}{a - z}} \]
    4. Step-by-step derivation
      1. mul-1-neg32.0%

        \[\leadsto x + \color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a - z}\right)} \]
      2. unsub-neg32.0%

        \[\leadsto \color{blue}{x - \frac{z \cdot \left(t - x\right)}{a - z}} \]
      3. associate-/l*42.9%

        \[\leadsto x - \color{blue}{z \cdot \frac{t - x}{a - z}} \]
    5. Simplified42.9%

      \[\leadsto \color{blue}{x - z \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in t around inf 41.1%

      \[\leadsto x - z \cdot \color{blue}{\frac{t}{a - z}} \]
    7. Taylor expanded in z around inf 34.1%

      \[\leadsto \color{blue}{x - -1 \cdot t} \]
    8. Step-by-step derivation
      1. sub-neg34.1%

        \[\leadsto \color{blue}{x + \left(--1 \cdot t\right)} \]
      2. neg-mul-134.1%

        \[\leadsto x + \left(-\color{blue}{\left(-t\right)}\right) \]
      3. remove-double-neg34.1%

        \[\leadsto x + \color{blue}{t} \]
    9. Simplified34.1%

      \[\leadsto \color{blue}{x + t} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 29: 39.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+81}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.5e+81) t (if (<= z 4e-20) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.5e+81) {
		tmp = t;
	} else if (z <= 4e-20) {
		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 <= (-4.5d+81)) then
        tmp = t
    else if (z <= 4d-20) 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 <= -4.5e+81) {
		tmp = t;
	} else if (z <= 4e-20) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.5e+81:
		tmp = t
	elif z <= 4e-20:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.5e+81)
		tmp = t;
	elseif (z <= 4e-20)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4.5e+81)
		tmp = t;
	elseif (z <= 4e-20)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.5e+81], t, If[LessEqual[z, 4e-20], x, t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+81}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-20}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.50000000000000017e81 or 3.99999999999999978e-20 < z

    1. Initial program 71.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 45.7%

      \[\leadsto \color{blue}{t} \]

    if -4.50000000000000017e81 < z < 3.99999999999999978e-20

    1. Initial program 92.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 38.1%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 30: 26.1% 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 83.3%

    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
  2. Add Preprocessing
  3. Taylor expanded in z around inf 24.4%

    \[\leadsto \color{blue}{t} \]
  4. Add Preprocessing

Reproduce

?
herbie shell --seed 2024105 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))