Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.4% → 90.5%
Time: 27.5s
Alternatives: 24
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 24 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: 79.4% 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: 90.5% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t + \frac{x}{z} \cdot \left(y - a\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)))) < -2.00000000000000013e-301 or 5.0000000000000002e-203 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 92.7%

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

    if -2.00000000000000013e-301 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.0000000000000002e-203

    1. Initial program 6.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 83.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+83.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--83.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-sub83.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 54.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\ t_2 := \left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{if}\;y \leq -6.2 \cdot 10^{+35}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1 \cdot 10^{-16}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-286}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{-176}:\\ \;\;\;\;\frac{t}{\frac{-z}{y - z}}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-109}:\\ \;\;\;\;x + z \cdot \frac{x}{a}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-11}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- y z) (/ t (- a z)))) (t_2 (* (- t x) (/ y (- a z)))))
   (if (<= y -6.2e+35)
     t_2
     (if (<= y -1e-16)
       t_1
       (if (<= y 3.3e-286)
         (- x (/ (* x y) a))
         (if (<= y 1.02e-176)
           (/ t (/ (- z) (- y z)))
           (if (<= y 2.7e-109)
             (+ x (* z (/ x a)))
             (if (<= y 8.5e-11) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / (a - z));
	double t_2 = (t - x) * (y / (a - z));
	double tmp;
	if (y <= -6.2e+35) {
		tmp = t_2;
	} else if (y <= -1e-16) {
		tmp = t_1;
	} else if (y <= 3.3e-286) {
		tmp = x - ((x * y) / a);
	} else if (y <= 1.02e-176) {
		tmp = t / (-z / (y - z));
	} else if (y <= 2.7e-109) {
		tmp = x + (z * (x / a));
	} else if (y <= 8.5e-11) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (y - z) * (t / (a - z))
    t_2 = (t - x) * (y / (a - z))
    if (y <= (-6.2d+35)) then
        tmp = t_2
    else if (y <= (-1d-16)) then
        tmp = t_1
    else if (y <= 3.3d-286) then
        tmp = x - ((x * y) / a)
    else if (y <= 1.02d-176) then
        tmp = t / (-z / (y - z))
    else if (y <= 2.7d-109) then
        tmp = x + (z * (x / a))
    else if (y <= 8.5d-11) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / (a - z));
	double t_2 = (t - x) * (y / (a - z));
	double tmp;
	if (y <= -6.2e+35) {
		tmp = t_2;
	} else if (y <= -1e-16) {
		tmp = t_1;
	} else if (y <= 3.3e-286) {
		tmp = x - ((x * y) / a);
	} else if (y <= 1.02e-176) {
		tmp = t / (-z / (y - z));
	} else if (y <= 2.7e-109) {
		tmp = x + (z * (x / a));
	} else if (y <= 8.5e-11) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - z) * (t / (a - z))
	t_2 = (t - x) * (y / (a - z))
	tmp = 0
	if y <= -6.2e+35:
		tmp = t_2
	elif y <= -1e-16:
		tmp = t_1
	elif y <= 3.3e-286:
		tmp = x - ((x * y) / a)
	elif y <= 1.02e-176:
		tmp = t / (-z / (y - z))
	elif y <= 2.7e-109:
		tmp = x + (z * (x / a))
	elif y <= 8.5e-11:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - z) * Float64(t / Float64(a - z)))
	t_2 = Float64(Float64(t - x) * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (y <= -6.2e+35)
		tmp = t_2;
	elseif (y <= -1e-16)
		tmp = t_1;
	elseif (y <= 3.3e-286)
		tmp = Float64(x - Float64(Float64(x * y) / a));
	elseif (y <= 1.02e-176)
		tmp = Float64(t / Float64(Float64(-z) / Float64(y - z)));
	elseif (y <= 2.7e-109)
		tmp = Float64(x + Float64(z * Float64(x / a)));
	elseif (y <= 8.5e-11)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - z) * (t / (a - z));
	t_2 = (t - x) * (y / (a - z));
	tmp = 0.0;
	if (y <= -6.2e+35)
		tmp = t_2;
	elseif (y <= -1e-16)
		tmp = t_1;
	elseif (y <= 3.3e-286)
		tmp = x - ((x * y) / a);
	elseif (y <= 1.02e-176)
		tmp = t / (-z / (y - z));
	elseif (y <= 2.7e-109)
		tmp = x + (z * (x / a));
	elseif (y <= 8.5e-11)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+35], t$95$2, If[LessEqual[y, -1e-16], t$95$1, If[LessEqual[y, 3.3e-286], N[(x - N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.02e-176], N[(t / N[((-z) / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e-109], N[(x + N[(z * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e-11], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1 \cdot 10^{-16}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 3.3 \cdot 10^{-286}:\\
\;\;\;\;x - \frac{x \cdot y}{a}\\

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

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

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-11}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6.19999999999999973e35 or 8.50000000000000037e-11 < y

    1. Initial program 84.3%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-*r/57.0%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/72.3%

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

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

    if -6.19999999999999973e35 < y < -9.9999999999999998e-17 or 2.7e-109 < y < 8.50000000000000037e-11

    1. Initial program 83.8%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
      2. associate-/r/70.9%

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

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

    if -9.9999999999999998e-17 < y < 3.2999999999999999e-286

    1. Initial program 72.3%

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
      2. associate-/r/54.3%

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

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

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

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

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

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

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

    if 3.2999999999999999e-286 < y < 1.02000000000000002e-176

    1. Initial program 42.3%

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

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

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

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

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

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

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

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

    if 1.02000000000000002e-176 < y < 2.7e-109

    1. Initial program 88.6%

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
      2. associate-/r/85.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{x \cdot z}{a}} \]
    10. Step-by-step derivation
      1. sub-neg62.9%

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

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

        \[\leadsto x + \color{blue}{\frac{x \cdot z}{a}} \]
      4. *-commutative62.9%

        \[\leadsto x + \frac{\color{blue}{z \cdot x}}{a} \]
      5. associate-*r/70.6%

        \[\leadsto x + \color{blue}{z \cdot \frac{x}{a}} \]
    11. Simplified70.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+35}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -1 \cdot 10^{-16}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{-286}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{-176}:\\ \;\;\;\;\frac{t}{\frac{-z}{y - z}}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{-109}:\\ \;\;\;\;x + z \cdot \frac{x}{a}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-11}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 57.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq 2.3 \cdot 10^{-286}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 4.8 \cdot 10^{-107}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 2.45 \cdot 10^{+45}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.19999999999999996e32 or 2.4500000000000001e45 < y

    1. Initial program 84.4%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-*r/56.2%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/73.1%

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

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

    if -1.19999999999999996e32 < y < 2.3000000000000002e-286 or 4.50000000000000009e-180 < y < 4.79999999999999989e-107 or 4.80000000000000018e-25 < y < 2.4500000000000001e45

    1. Initial program 78.6%

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
      2. associate-/r/61.3%

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

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

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

    if 2.3000000000000002e-286 < y < 4.50000000000000009e-180

    1. Initial program 42.3%

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

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

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

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

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

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

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

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

    if 4.79999999999999989e-107 < y < 4.80000000000000018e-25

    1. Initial program 77.2%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
      2. associate-/r/71.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+32}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-286}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-180}:\\ \;\;\;\;\frac{t}{\frac{-z}{y - z}}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-107}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{-25}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{+45}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 36.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{a}{\frac{z}{t}}\\ \mathbf{if}\;z \leq -920000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{-270}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-187}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-185}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-34}:\\ \;\;\;\;\frac{-x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+79}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (/ a (/ z t)))))
   (if (<= z -920000000.0)
     t_1
     (if (<= z 5.9e-270)
       (* t (/ (- y z) a))
       (if (<= z 9.2e-187)
         x
         (if (<= z 1.9e-185)
           (* y (/ t a))
           (if (<= z 1.4e-34) (/ (- x) (/ a y)) (if (<= z 7e+79) x t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (a / (z / t));
	double tmp;
	if (z <= -920000000.0) {
		tmp = t_1;
	} else if (z <= 5.9e-270) {
		tmp = t * ((y - z) / a);
	} else if (z <= 9.2e-187) {
		tmp = x;
	} else if (z <= 1.9e-185) {
		tmp = y * (t / a);
	} else if (z <= 1.4e-34) {
		tmp = -x / (a / y);
	} else if (z <= 7e+79) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t + (a / (z / t))
    if (z <= (-920000000.0d0)) then
        tmp = t_1
    else if (z <= 5.9d-270) then
        tmp = t * ((y - z) / a)
    else if (z <= 9.2d-187) then
        tmp = x
    else if (z <= 1.9d-185) then
        tmp = y * (t / a)
    else if (z <= 1.4d-34) then
        tmp = -x / (a / y)
    else if (z <= 7d+79) then
        tmp = x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (a / (z / t));
	double tmp;
	if (z <= -920000000.0) {
		tmp = t_1;
	} else if (z <= 5.9e-270) {
		tmp = t * ((y - z) / a);
	} else if (z <= 9.2e-187) {
		tmp = x;
	} else if (z <= 1.9e-185) {
		tmp = y * (t / a);
	} else if (z <= 1.4e-34) {
		tmp = -x / (a / y);
	} else if (z <= 7e+79) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (a / (z / t))
	tmp = 0
	if z <= -920000000.0:
		tmp = t_1
	elif z <= 5.9e-270:
		tmp = t * ((y - z) / a)
	elif z <= 9.2e-187:
		tmp = x
	elif z <= 1.9e-185:
		tmp = y * (t / a)
	elif z <= 1.4e-34:
		tmp = -x / (a / y)
	elif z <= 7e+79:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(a / Float64(z / t)))
	tmp = 0.0
	if (z <= -920000000.0)
		tmp = t_1;
	elseif (z <= 5.9e-270)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= 9.2e-187)
		tmp = x;
	elseif (z <= 1.9e-185)
		tmp = Float64(y * Float64(t / a));
	elseif (z <= 1.4e-34)
		tmp = Float64(Float64(-x) / Float64(a / y));
	elseif (z <= 7e+79)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (a / (z / t));
	tmp = 0.0;
	if (z <= -920000000.0)
		tmp = t_1;
	elseif (z <= 5.9e-270)
		tmp = t * ((y - z) / a);
	elseif (z <= 9.2e-187)
		tmp = x;
	elseif (z <= 1.9e-185)
		tmp = y * (t / a);
	elseif (z <= 1.4e-34)
		tmp = -x / (a / y);
	elseif (z <= 7e+79)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(a / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -920000000.0], t$95$1, If[LessEqual[z, 5.9e-270], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-187], x, If[LessEqual[z, 1.9e-185], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e-34], N[((-x) / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+79], x, t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \frac{a}{\frac{z}{t}}\\
\mathbf{if}\;z \leq -920000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 9.2 \cdot 10^{-187}:\\
\;\;\;\;x\\

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

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

\mathbf{elif}\;z \leq 7 \cdot 10^{+79}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -9.2e8 or 6.99999999999999961e79 < z

    1. Initial program 63.4%

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-\frac{a - z}{z}}} \]
      2. div-sub48.3%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} - \frac{z}{z}\right)}} \]
      3. sub-neg48.3%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} + \left(-\frac{z}{z}\right)\right)}} \]
      4. *-inverses48.3%

        \[\leadsto \frac{t}{-\left(\frac{a}{z} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval48.3%

        \[\leadsto \frac{t}{-\left(\frac{a}{z} + \color{blue}{-1}\right)} \]
    8. Simplified48.3%

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

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

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

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

    if -9.2e8 < z < 5.9e-270

    1. Initial program 89.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y - z}}} \]
      2. div-inv41.2%

        \[\leadsto \color{blue}{t \cdot \frac{1}{\frac{a}{y - z}}} \]
      3. clear-num41.2%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a}} \]
    8. Applied egg-rr41.2%

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

    if 5.9e-270 < z < 9.19999999999999991e-187 or 1.39999999999999998e-34 < z < 6.99999999999999961e79

    1. Initial program 94.6%

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

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

    if 9.19999999999999991e-187 < z < 1.9e-185

    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 53.6%

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

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

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

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

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

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

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

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

    if 1.9e-185 < z < 1.39999999999999998e-34

    1. Initial program 93.8%

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
      2. associate-/r/72.7%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{a}{y}}} \]
      3. distribute-neg-frac38.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -920000000:\\ \;\;\;\;t + \frac{a}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{-270}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-187}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-185}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-34}:\\ \;\;\;\;\frac{-x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+79}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 36.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+20}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-229}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-267}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-187}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-186}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-38}:\\ \;\;\;\;\frac{-x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.2e+20)
   t
   (if (<= z -3.3e-229)
     x
     (if (<= z 9.5e-267)
       (/ t (/ a y))
       (if (<= z 8.5e-187)
         x
         (if (<= z 8.6e-186)
           (* y (/ t a))
           (if (<= z 7.5e-38) (/ (- x) (/ a y)) (if (<= z 4.2e+83) x t))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.2e+20) {
		tmp = t;
	} else if (z <= -3.3e-229) {
		tmp = x;
	} else if (z <= 9.5e-267) {
		tmp = t / (a / y);
	} else if (z <= 8.5e-187) {
		tmp = x;
	} else if (z <= 8.6e-186) {
		tmp = y * (t / a);
	} else if (z <= 7.5e-38) {
		tmp = -x / (a / y);
	} else if (z <= 4.2e+83) {
		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 <= (-6.2d+20)) then
        tmp = t
    else if (z <= (-3.3d-229)) then
        tmp = x
    else if (z <= 9.5d-267) then
        tmp = t / (a / y)
    else if (z <= 8.5d-187) then
        tmp = x
    else if (z <= 8.6d-186) then
        tmp = y * (t / a)
    else if (z <= 7.5d-38) then
        tmp = -x / (a / y)
    else if (z <= 4.2d+83) 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 <= -6.2e+20) {
		tmp = t;
	} else if (z <= -3.3e-229) {
		tmp = x;
	} else if (z <= 9.5e-267) {
		tmp = t / (a / y);
	} else if (z <= 8.5e-187) {
		tmp = x;
	} else if (z <= 8.6e-186) {
		tmp = y * (t / a);
	} else if (z <= 7.5e-38) {
		tmp = -x / (a / y);
	} else if (z <= 4.2e+83) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6.2e+20:
		tmp = t
	elif z <= -3.3e-229:
		tmp = x
	elif z <= 9.5e-267:
		tmp = t / (a / y)
	elif z <= 8.5e-187:
		tmp = x
	elif z <= 8.6e-186:
		tmp = y * (t / a)
	elif z <= 7.5e-38:
		tmp = -x / (a / y)
	elif z <= 4.2e+83:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.2e+20)
		tmp = t;
	elseif (z <= -3.3e-229)
		tmp = x;
	elseif (z <= 9.5e-267)
		tmp = Float64(t / Float64(a / y));
	elseif (z <= 8.5e-187)
		tmp = x;
	elseif (z <= 8.6e-186)
		tmp = Float64(y * Float64(t / a));
	elseif (z <= 7.5e-38)
		tmp = Float64(Float64(-x) / Float64(a / y));
	elseif (z <= 4.2e+83)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6.2e+20)
		tmp = t;
	elseif (z <= -3.3e-229)
		tmp = x;
	elseif (z <= 9.5e-267)
		tmp = t / (a / y);
	elseif (z <= 8.5e-187)
		tmp = x;
	elseif (z <= 8.6e-186)
		tmp = y * (t / a);
	elseif (z <= 7.5e-38)
		tmp = -x / (a / y);
	elseif (z <= 4.2e+83)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.2e+20], t, If[LessEqual[z, -3.3e-229], x, If[LessEqual[z, 9.5e-267], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e-187], x, If[LessEqual[z, 8.6e-186], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-38], N[((-x) / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+83], x, t]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -3.3 \cdot 10^{-229}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 8.5 \cdot 10^{-187}:\\
\;\;\;\;x\\

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

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

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+83}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -6.2e20 or 4.20000000000000005e83 < z

    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 45.9%

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

    if -6.2e20 < z < -3.30000000000000021e-229 or 9.49999999999999985e-267 < z < 8.4999999999999999e-187 or 7.5e-38 < z < 4.20000000000000005e83

    1. Initial program 90.2%

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

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

    if -3.30000000000000021e-229 < z < 9.49999999999999985e-267

    1. Initial program 95.8%

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

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

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

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

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

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

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

    if 8.4999999999999999e-187 < z < 8.5999999999999998e-186

    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 53.6%

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

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

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

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

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

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

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

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

    if 8.5999999999999998e-186 < z < 7.5e-38

    1. Initial program 93.8%

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
      2. associate-/r/72.7%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{a}{y}}} \]
      3. distribute-neg-frac38.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+20}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-229}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-267}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-187}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-186}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-38}:\\ \;\;\;\;\frac{-x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 56.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{+64} \lor \neg \left(t \leq -8.5 \cdot 10^{-19}\right) \land \left(t \leq -3.8 \cdot 10^{-117} \lor \neg \left(t \leq 4.7 \cdot 10^{-6}\right)\right):\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.40000000000000012e64 or -8.50000000000000003e-19 < t < -3.79999999999999972e-117 or 4.69999999999999989e-6 < t

    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 50.6%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
      2. associate-/r/73.3%

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

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

    if -1.40000000000000012e64 < t < -8.50000000000000003e-19 or -3.79999999999999972e-117 < t < 4.69999999999999989e-6

    1. Initial program 69.3%

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
      2. associate-/r/52.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.4 \cdot 10^{+64} \lor \neg \left(t \leq -8.5 \cdot 10^{-19}\right) \land \left(t \leq -3.8 \cdot 10^{-117} \lor \neg \left(t \leq 4.7 \cdot 10^{-6}\right)\right):\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 62.9% accurate, 0.8× speedup?

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.1999999999999998e120 or 1.4999999999999999e60 < z

    1. Initial program 61.2%

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

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

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

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

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

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

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

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

    if -5.1999999999999998e120 < z < -4.49999999999999999e62

    1. Initial program 58.3%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-*r/49.2%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/55.8%

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

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

    if -4.49999999999999999e62 < z < -6.50000000000000025e-27

    1. Initial program 83.4%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
      2. associate-/r/63.3%

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

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

    if -6.50000000000000025e-27 < z < 1.4999999999999999e60

    1. Initial program 93.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/82.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+120}:\\ \;\;\;\;\frac{t}{\frac{-z}{y - z}}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{+62}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-27}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+60}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{-z}{y - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 62.9% accurate, 0.8× speedup?

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.3e118 or 3.85000000000000026e58 < z

    1. Initial program 61.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 67.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+67.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--67.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-sub67.0%

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{t}{\frac{z}{y - a}}} \]
      2. associate-/r/57.3%

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

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

    if -3.3e118 < z < -2.65e63

    1. Initial program 58.3%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-*r/49.2%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/55.8%

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

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

    if -2.65e63 < z < -5.4999999999999996e-20

    1. Initial program 83.4%

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
      2. associate-/r/63.3%

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

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

    if -5.4999999999999996e-20 < z < 3.85000000000000026e58

    1. Initial program 93.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/82.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+118}:\\ \;\;\;\;t + \left(a - y\right) \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{+63}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-20}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 3.85 \cdot 10^{+58}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \left(a - y\right) \cdot \frac{t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 36.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -14000000000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-268}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-187}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-186}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-36}:\\ \;\;\;\;\frac{-x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -14000000000.0)
   t
   (if (<= z 1.3e-268)
     (* t (/ (- y z) a))
     (if (<= z 9e-187)
       x
       (if (<= z 6.5e-186)
         (* y (/ t a))
         (if (<= z 8e-36) (/ (- x) (/ a y)) (if (<= z 3.7e+81) x t)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -14000000000.0) {
		tmp = t;
	} else if (z <= 1.3e-268) {
		tmp = t * ((y - z) / a);
	} else if (z <= 9e-187) {
		tmp = x;
	} else if (z <= 6.5e-186) {
		tmp = y * (t / a);
	} else if (z <= 8e-36) {
		tmp = -x / (a / y);
	} else if (z <= 3.7e+81) {
		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 <= (-14000000000.0d0)) then
        tmp = t
    else if (z <= 1.3d-268) then
        tmp = t * ((y - z) / a)
    else if (z <= 9d-187) then
        tmp = x
    else if (z <= 6.5d-186) then
        tmp = y * (t / a)
    else if (z <= 8d-36) then
        tmp = -x / (a / y)
    else if (z <= 3.7d+81) 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 <= -14000000000.0) {
		tmp = t;
	} else if (z <= 1.3e-268) {
		tmp = t * ((y - z) / a);
	} else if (z <= 9e-187) {
		tmp = x;
	} else if (z <= 6.5e-186) {
		tmp = y * (t / a);
	} else if (z <= 8e-36) {
		tmp = -x / (a / y);
	} else if (z <= 3.7e+81) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -14000000000.0:
		tmp = t
	elif z <= 1.3e-268:
		tmp = t * ((y - z) / a)
	elif z <= 9e-187:
		tmp = x
	elif z <= 6.5e-186:
		tmp = y * (t / a)
	elif z <= 8e-36:
		tmp = -x / (a / y)
	elif z <= 3.7e+81:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -14000000000.0)
		tmp = t;
	elseif (z <= 1.3e-268)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= 9e-187)
		tmp = x;
	elseif (z <= 6.5e-186)
		tmp = Float64(y * Float64(t / a));
	elseif (z <= 8e-36)
		tmp = Float64(Float64(-x) / Float64(a / y));
	elseif (z <= 3.7e+81)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -14000000000.0)
		tmp = t;
	elseif (z <= 1.3e-268)
		tmp = t * ((y - z) / a);
	elseif (z <= 9e-187)
		tmp = x;
	elseif (z <= 6.5e-186)
		tmp = y * (t / a);
	elseif (z <= 8e-36)
		tmp = -x / (a / y);
	elseif (z <= 3.7e+81)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -14000000000.0], t, If[LessEqual[z, 1.3e-268], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-187], x, If[LessEqual[z, 6.5e-186], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-36], N[((-x) / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e+81], x, t]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -14000000000:\\
\;\;\;\;t\\

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

\mathbf{elif}\;z \leq 9 \cdot 10^{-187}:\\
\;\;\;\;x\\

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

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

\mathbf{elif}\;z \leq 3.7 \cdot 10^{+81}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.4e10 or 3.7000000000000001e81 < z

    1. Initial program 63.4%

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

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

    if -1.4e10 < z < 1.30000000000000001e-268

    1. Initial program 89.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y - z}}} \]
      2. div-inv41.2%

        \[\leadsto \color{blue}{t \cdot \frac{1}{\frac{a}{y - z}}} \]
      3. clear-num41.2%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a}} \]
    8. Applied egg-rr41.2%

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

    if 1.30000000000000001e-268 < z < 8.9999999999999996e-187 or 7.9999999999999995e-36 < z < 3.7000000000000001e81

    1. Initial program 94.6%

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

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

    if 8.9999999999999996e-187 < z < 6.49999999999999962e-186

    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 53.6%

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

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

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

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

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

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

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

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

    if 6.49999999999999962e-186 < z < 7.9999999999999995e-36

    1. Initial program 93.8%

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
      2. associate-/r/72.7%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{\frac{a}{y}}} \]
      3. distribute-neg-frac38.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -14000000000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-268}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-187}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-186}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-36}:\\ \;\;\;\;\frac{-x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 70.2% accurate, 0.9× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.0000000000000005e87 or 7.39999999999999994e56 < z

    1. Initial program 59.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.0000000000000005e87 < z < -1.09999999999999998e-28

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

    if -1.09999999999999998e-28 < z < 7.39999999999999994e56

    1. Initial program 93.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/82.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+87}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{-28}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{+56}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 73.6% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.5e-31 or 3.84999999999999984e55 < z

    1. Initial program 65.2%

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

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

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

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

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

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

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

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

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

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

    if -2.5e-31 < z < 3.84999999999999984e55

    1. Initial program 93.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/82.4%

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

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

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

Alternative 12: 73.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{-20}:\\
\;\;\;\;t - \left(y - a\right) \cdot \frac{t - x}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.5999999999999998e-20

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5999999999999998e-20 < z < 5.39999999999999954e55

    1. Initial program 93.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/82.4%

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

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

    if 5.39999999999999954e55 < z

    1. Initial program 71.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 66.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+66.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--66.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-sub66.5%

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

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

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

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

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

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

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

Alternative 13: 39.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := t + \frac{a}{\frac{z}{t}}\\
\mathbf{if}\;z \leq -2600000000000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+65}:\\
\;\;\;\;x + z \cdot \frac{x}{a}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.6e12 or 5.4999999999999996e65 < z

    1. Initial program 64.0%

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-\frac{a - z}{z}}} \]
      2. div-sub47.6%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} - \frac{z}{z}\right)}} \]
      3. sub-neg47.6%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} + \left(-\frac{z}{z}\right)\right)}} \]
      4. *-inverses47.6%

        \[\leadsto \frac{t}{-\left(\frac{a}{z} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval47.6%

        \[\leadsto \frac{t}{-\left(\frac{a}{z} + \color{blue}{-1}\right)} \]
    8. Simplified47.6%

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

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

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

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

    if -2.6e12 < z < 8.1999999999999994e-263

    1. Initial program 89.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y - z}}} \]
      2. div-inv41.2%

        \[\leadsto \color{blue}{t \cdot \frac{1}{\frac{a}{y - z}}} \]
      3. clear-num41.2%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a}} \]
    8. Applied egg-rr41.2%

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

    if 8.1999999999999994e-263 < z < 5.4999999999999996e65

    1. Initial program 94.3%

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
      2. associate-/r/77.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{x \cdot z}{a}} \]
      4. *-commutative45.1%

        \[\leadsto x + \frac{\color{blue}{z \cdot x}}{a} \]
      5. associate-*r/48.2%

        \[\leadsto x + \color{blue}{z \cdot \frac{x}{a}} \]
    11. Simplified48.2%

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

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

Alternative 14: 69.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-24} \lor \neg \left(z \leq 7.8 \cdot 10^{+55}\right):\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.40000000000000003e-24 or 7.80000000000000054e55 < z

    1. Initial program 65.2%

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

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

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

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

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

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

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

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

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

    if -4.40000000000000003e-24 < z < 7.80000000000000054e55

    1. Initial program 93.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/82.4%

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

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

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

Alternative 15: 69.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{-27}:\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.39999999999999982e-27

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

    if -6.39999999999999982e-27 < z < 3.75e56

    1. Initial program 93.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/82.4%

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

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

    if 3.75e56 < z

    1. Initial program 71.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 66.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+66.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--66.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-sub66.5%

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

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

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

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

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

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

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

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

Alternative 16: 51.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-20} \lor \neg \left(z \leq 9.5 \cdot 10^{+59}\right):\\
\;\;\;\;\frac{t}{\frac{-z}{y - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.59999999999999985e-20 or 9.50000000000000023e59 < z

    1. Initial program 65.2%

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

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

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

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

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

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

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

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

    if -1.59999999999999985e-20 < z < 9.50000000000000023e59

    1. Initial program 93.1%

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
      2. associate-/r/81.8%

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

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

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

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

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

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

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

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

Alternative 17: 38.1% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+21}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-231}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-273}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.25e+21)
   t
   (if (<= z -8.5e-231)
     x
     (if (<= z 2.3e-273) (* y (/ t a)) (if (<= z 6.5e+81) x t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.25e+21) {
		tmp = t;
	} else if (z <= -8.5e-231) {
		tmp = x;
	} else if (z <= 2.3e-273) {
		tmp = y * (t / a);
	} else if (z <= 6.5e+81) {
		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 <= (-1.25d+21)) then
        tmp = t
    else if (z <= (-8.5d-231)) then
        tmp = x
    else if (z <= 2.3d-273) then
        tmp = y * (t / a)
    else if (z <= 6.5d+81) 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 <= -1.25e+21) {
		tmp = t;
	} else if (z <= -8.5e-231) {
		tmp = x;
	} else if (z <= 2.3e-273) {
		tmp = y * (t / a);
	} else if (z <= 6.5e+81) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.25e+21:
		tmp = t
	elif z <= -8.5e-231:
		tmp = x
	elif z <= 2.3e-273:
		tmp = y * (t / a)
	elif z <= 6.5e+81:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.25e+21)
		tmp = t;
	elseif (z <= -8.5e-231)
		tmp = x;
	elseif (z <= 2.3e-273)
		tmp = Float64(y * Float64(t / a));
	elseif (z <= 6.5e+81)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.25e+21)
		tmp = t;
	elseif (z <= -8.5e-231)
		tmp = x;
	elseif (z <= 2.3e-273)
		tmp = y * (t / a);
	elseif (z <= 6.5e+81)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.25e+21], t, If[LessEqual[z, -8.5e-231], x, If[LessEqual[z, 2.3e-273], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+81], x, t]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -8.5 \cdot 10^{-231}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+81}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.25e21 or 6.4999999999999996e81 < z

    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 45.9%

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

    if -1.25e21 < z < -8.5e-231 or 2.29999999999999981e-273 < z < 6.4999999999999996e81

    1. Initial program 91.3%

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

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

    if -8.5e-231 < z < 2.29999999999999981e-273

    1. Initial program 95.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    9. Step-by-step derivation
      1. associate-/r/54.1%

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} \]
    10. Applied egg-rr54.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+21}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-231}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-273}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 38.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+21}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-225}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-267}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.05e+21)
   t
   (if (<= z -8.2e-225)
     x
     (if (<= z 3.9e-267) (* t (/ y a)) (if (<= z 6e+83) x t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.05e+21) {
		tmp = t;
	} else if (z <= -8.2e-225) {
		tmp = x;
	} else if (z <= 3.9e-267) {
		tmp = t * (y / a);
	} else if (z <= 6e+83) {
		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 <= (-1.05d+21)) then
        tmp = t
    else if (z <= (-8.2d-225)) then
        tmp = x
    else if (z <= 3.9d-267) then
        tmp = t * (y / a)
    else if (z <= 6d+83) 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 <= -1.05e+21) {
		tmp = t;
	} else if (z <= -8.2e-225) {
		tmp = x;
	} else if (z <= 3.9e-267) {
		tmp = t * (y / a);
	} else if (z <= 6e+83) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.05e+21:
		tmp = t
	elif z <= -8.2e-225:
		tmp = x
	elif z <= 3.9e-267:
		tmp = t * (y / a)
	elif z <= 6e+83:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.05e+21)
		tmp = t;
	elseif (z <= -8.2e-225)
		tmp = x;
	elseif (z <= 3.9e-267)
		tmp = Float64(t * Float64(y / a));
	elseif (z <= 6e+83)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.05e+21)
		tmp = t;
	elseif (z <= -8.2e-225)
		tmp = x;
	elseif (z <= 3.9e-267)
		tmp = t * (y / a);
	elseif (z <= 6e+83)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.05e+21], t, If[LessEqual[z, -8.2e-225], x, If[LessEqual[z, 3.9e-267], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+83], x, t]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -8.2 \cdot 10^{-225}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 6 \cdot 10^{+83}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.05e21 or 5.9999999999999999e83 < z

    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 45.9%

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

    if -1.05e21 < z < -8.20000000000000044e-225 or 3.89999999999999977e-267 < z < 5.9999999999999999e83

    1. Initial program 91.3%

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

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

    if -8.20000000000000044e-225 < z < 3.89999999999999977e-267

    1. Initial program 95.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{\frac{a}{y}}{t}}} \]
      2. associate-/r/62.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{y}} \cdot t} \]
      3. clear-num62.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+21}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-225}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-267}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 38.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+21}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-227}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-263}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+79}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.25e+21)
   t
   (if (<= z -1.95e-227)
     x
     (if (<= z 1.5e-263) (/ t (/ a y)) (if (<= z 2.6e+79) x t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.25e+21) {
		tmp = t;
	} else if (z <= -1.95e-227) {
		tmp = x;
	} else if (z <= 1.5e-263) {
		tmp = t / (a / y);
	} else if (z <= 2.6e+79) {
		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 <= (-1.25d+21)) then
        tmp = t
    else if (z <= (-1.95d-227)) then
        tmp = x
    else if (z <= 1.5d-263) then
        tmp = t / (a / y)
    else if (z <= 2.6d+79) 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 <= -1.25e+21) {
		tmp = t;
	} else if (z <= -1.95e-227) {
		tmp = x;
	} else if (z <= 1.5e-263) {
		tmp = t / (a / y);
	} else if (z <= 2.6e+79) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.25e+21:
		tmp = t
	elif z <= -1.95e-227:
		tmp = x
	elif z <= 1.5e-263:
		tmp = t / (a / y)
	elif z <= 2.6e+79:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.25e+21)
		tmp = t;
	elseif (z <= -1.95e-227)
		tmp = x;
	elseif (z <= 1.5e-263)
		tmp = Float64(t / Float64(a / y));
	elseif (z <= 2.6e+79)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.25e+21)
		tmp = t;
	elseif (z <= -1.95e-227)
		tmp = x;
	elseif (z <= 1.5e-263)
		tmp = t / (a / y);
	elseif (z <= 2.6e+79)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.25e+21], t, If[LessEqual[z, -1.95e-227], x, If[LessEqual[z, 1.5e-263], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+79], x, t]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.95 \cdot 10^{-227}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+79}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.25e21 or 2.60000000000000015e79 < z

    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 45.9%

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

    if -1.25e21 < z < -1.95e-227 or 1.5e-263 < z < 2.60000000000000015e79

    1. Initial program 91.3%

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

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

    if -1.95e-227 < z < 1.5e-263

    1. Initial program 95.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+21}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-227}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-263}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+79}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 47.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+21} \lor \neg \left(z \leq 3.5 \cdot 10^{+80}\right):\\
\;\;\;\;t + \frac{a}{\frac{z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.25e21 or 3.49999999999999994e80 < z

    1. Initial program 63.1%

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-\frac{a - z}{z}}} \]
      2. div-sub48.7%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} - \frac{z}{z}\right)}} \]
      3. sub-neg48.7%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} + \left(-\frac{z}{z}\right)\right)}} \]
      4. *-inverses48.7%

        \[\leadsto \frac{t}{-\left(\frac{a}{z} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval48.7%

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

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

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

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

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

    if -1.25e21 < z < 3.49999999999999994e80

    1. Initial program 92.1%

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
      2. associate-/r/77.9%

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{a} \cdot y} \]
      2. *-commutative57.0%

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

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

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

Alternative 21: 49.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+21} \lor \neg \left(z \leq 3.3 \cdot 10^{+80}\right):\\
\;\;\;\;\frac{t}{1 - \frac{a}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3e21 or 3.29999999999999991e80 < z

    1. Initial program 63.1%

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-\frac{a - z}{z}}} \]
      2. div-sub48.7%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} - \frac{z}{z}\right)}} \]
      3. sub-neg48.7%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} + \left(-\frac{z}{z}\right)\right)}} \]
      4. *-inverses48.7%

        \[\leadsto \frac{t}{-\left(\frac{a}{z} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval48.7%

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

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

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

    if -1.3e21 < z < 3.29999999999999991e80

    1. Initial program 92.1%

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
      2. associate-/r/77.9%

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{x}{a} \cdot y} \]
      2. *-commutative57.0%

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

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

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

Alternative 22: 50.4% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+20} \lor \neg \left(z \leq 9.5 \cdot 10^{+82}\right):\\
\;\;\;\;\frac{t}{1 - \frac{a}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.85e20 or 9.50000000000000049e82 < z

    1. Initial program 63.1%

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-\frac{a - z}{z}}} \]
      2. div-sub48.7%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} - \frac{z}{z}\right)}} \]
      3. sub-neg48.7%

        \[\leadsto \frac{t}{-\color{blue}{\left(\frac{a}{z} + \left(-\frac{z}{z}\right)\right)}} \]
      4. *-inverses48.7%

        \[\leadsto \frac{t}{-\left(\frac{a}{z} + \left(-\color{blue}{1}\right)\right)} \]
      5. metadata-eval48.7%

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

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

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

    if -1.85e20 < z < 9.50000000000000049e82

    1. Initial program 92.1%

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

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

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a}{y - z}}} \]
      2. associate-/r/77.9%

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

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

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

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

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

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

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

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

Alternative 23: 38.4% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;z \leq 4.7 \cdot 10^{+79}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.15e21 or 4.70000000000000023e79 < z

    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 45.9%

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

    if -1.15e21 < z < 4.70000000000000023e79

    1. Initial program 92.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+21}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{+79}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 25.6% 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 78.5%

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

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

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

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