Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.6% → 90.9%
Time: 27.5s
Alternatives: 20
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 20 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 80.6% 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.9% accurate, 0.3× speedup?

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

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

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


\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)))) < -1e-236 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 90.4%

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

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

    1. Initial program 6.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 45.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{\frac{z}{x - t}}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -5 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.25 \cdot 10^{-88}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+67}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+99}:\\ \;\;\;\;\frac{z \cdot \left(-t\right)}{a - z}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+111}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+233}:\\ \;\;\;\;\left(y - a\right) \cdot \left(x \cdot \frac{1}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ y (/ z (- x t)))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= z -5e+104)
     t
     (if (<= z -2.25e-88)
       t_2
       (if (<= z -1.12e-148)
         t_1
         (if (<= z 6.5e+67)
           t_2
           (if (<= z 1.4e+99)
             (/ (* z (- t)) (- a z))
             (if (<= z 3.5e+111)
               t_1
               (if (<= z 6.5e+233) (* (- y a) (* x (/ 1.0 z))) t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (z / (x - t));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -5e+104) {
		tmp = t;
	} else if (z <= -2.25e-88) {
		tmp = t_2;
	} else if (z <= -1.12e-148) {
		tmp = t_1;
	} else if (z <= 6.5e+67) {
		tmp = t_2;
	} else if (z <= 1.4e+99) {
		tmp = (z * -t) / (a - z);
	} else if (z <= 3.5e+111) {
		tmp = t_1;
	} else if (z <= 6.5e+233) {
		tmp = (y - a) * (x * (1.0 / z));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y / (z / (x - t))
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-5d+104)) then
        tmp = t
    else if (z <= (-2.25d-88)) then
        tmp = t_2
    else if (z <= (-1.12d-148)) then
        tmp = t_1
    else if (z <= 6.5d+67) then
        tmp = t_2
    else if (z <= 1.4d+99) then
        tmp = (z * -t) / (a - z)
    else if (z <= 3.5d+111) then
        tmp = t_1
    else if (z <= 6.5d+233) then
        tmp = (y - a) * (x * (1.0d0 / z))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (z / (x - t));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -5e+104) {
		tmp = t;
	} else if (z <= -2.25e-88) {
		tmp = t_2;
	} else if (z <= -1.12e-148) {
		tmp = t_1;
	} else if (z <= 6.5e+67) {
		tmp = t_2;
	} else if (z <= 1.4e+99) {
		tmp = (z * -t) / (a - z);
	} else if (z <= 3.5e+111) {
		tmp = t_1;
	} else if (z <= 6.5e+233) {
		tmp = (y - a) * (x * (1.0 / z));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y / (z / (x - t))
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -5e+104:
		tmp = t
	elif z <= -2.25e-88:
		tmp = t_2
	elif z <= -1.12e-148:
		tmp = t_1
	elif z <= 6.5e+67:
		tmp = t_2
	elif z <= 1.4e+99:
		tmp = (z * -t) / (a - z)
	elif z <= 3.5e+111:
		tmp = t_1
	elif z <= 6.5e+233:
		tmp = (y - a) * (x * (1.0 / z))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y / Float64(z / Float64(x - t)))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -5e+104)
		tmp = t;
	elseif (z <= -2.25e-88)
		tmp = t_2;
	elseif (z <= -1.12e-148)
		tmp = t_1;
	elseif (z <= 6.5e+67)
		tmp = t_2;
	elseif (z <= 1.4e+99)
		tmp = Float64(Float64(z * Float64(-t)) / Float64(a - z));
	elseif (z <= 3.5e+111)
		tmp = t_1;
	elseif (z <= 6.5e+233)
		tmp = Float64(Float64(y - a) * Float64(x * Float64(1.0 / z)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y / (z / (x - t));
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -5e+104)
		tmp = t;
	elseif (z <= -2.25e-88)
		tmp = t_2;
	elseif (z <= -1.12e-148)
		tmp = t_1;
	elseif (z <= 6.5e+67)
		tmp = t_2;
	elseif (z <= 1.4e+99)
		tmp = (z * -t) / (a - z);
	elseif (z <= 3.5e+111)
		tmp = t_1;
	elseif (z <= 6.5e+233)
		tmp = (y - a) * (x * (1.0 / z));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(z / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+104], t, If[LessEqual[z, -2.25e-88], t$95$2, If[LessEqual[z, -1.12e-148], t$95$1, If[LessEqual[z, 6.5e+67], t$95$2, If[LessEqual[z, 1.4e+99], N[(N[(z * (-t)), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+111], t$95$1, If[LessEqual[z, 6.5e+233], N[(N[(y - a), $MachinePrecision] * N[(x * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.25 \cdot 10^{-88}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -1.12 \cdot 10^{-148}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+67}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+99}:\\
\;\;\;\;\frac{z \cdot \left(-t\right)}{a - z}\\

\mathbf{elif}\;z \leq 3.5 \cdot 10^{+111}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -4.9999999999999997e104 or 6.50000000000000038e233 < z

    1. Initial program 59.5%

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

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

    if -4.9999999999999997e104 < z < -2.24999999999999996e-88 or -1.1199999999999999e-148 < z < 6.4999999999999995e67

    1. Initial program 89.1%

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

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

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

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

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

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

    if -2.24999999999999996e-88 < z < -1.1199999999999999e-148 or 1.4e99 < z < 3.5000000000000002e111

    1. Initial program 83.9%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-1 \cdot t - -1 \cdot x}}} \]
      2. sub-neg62.2%

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

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

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

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

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

    if 6.4999999999999995e67 < z < 1.4e99

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if 3.5000000000000002e111 < z < 6.50000000000000038e233

    1. Initial program 63.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.25 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-148}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+67}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+99}:\\ \;\;\;\;\frac{z \cdot \left(-t\right)}{a - z}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+111}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+233}:\\ \;\;\;\;\left(y - a\right) \cdot \left(x \cdot \frac{1}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 3: 54.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := \left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{if}\;y \leq -6.5 \cdot 10^{-85}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-136}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-143}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-259}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-274}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.45 \cdot 10^{-69}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 290000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* (- t x) (/ y (- a z)))))
   (if (<= y -6.5e-85)
     t_2
     (if (<= y -5.2e-136)
       t_1
       (if (<= y -4.5e-143)
         (/ t (/ a (- y z)))
         (if (<= y -4.5e-259)
           t
           (if (<= y -9.5e-274)
             x
             (if (<= y 3.45e-69) t (if (<= y 290000000.0) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = (t - x) * (y / (a - z));
	double tmp;
	if (y <= -6.5e-85) {
		tmp = t_2;
	} else if (y <= -5.2e-136) {
		tmp = t_1;
	} else if (y <= -4.5e-143) {
		tmp = t / (a / (y - z));
	} else if (y <= -4.5e-259) {
		tmp = t;
	} else if (y <= -9.5e-274) {
		tmp = x;
	} else if (y <= 3.45e-69) {
		tmp = t;
	} else if (y <= 290000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    t_2 = (t - x) * (y / (a - z))
    if (y <= (-6.5d-85)) then
        tmp = t_2
    else if (y <= (-5.2d-136)) then
        tmp = t_1
    else if (y <= (-4.5d-143)) then
        tmp = t / (a / (y - z))
    else if (y <= (-4.5d-259)) then
        tmp = t
    else if (y <= (-9.5d-274)) then
        tmp = x
    else if (y <= 3.45d-69) then
        tmp = t
    else if (y <= 290000000.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = (t - x) * (y / (a - z));
	double tmp;
	if (y <= -6.5e-85) {
		tmp = t_2;
	} else if (y <= -5.2e-136) {
		tmp = t_1;
	} else if (y <= -4.5e-143) {
		tmp = t / (a / (y - z));
	} else if (y <= -4.5e-259) {
		tmp = t;
	} else if (y <= -9.5e-274) {
		tmp = x;
	} else if (y <= 3.45e-69) {
		tmp = t;
	} else if (y <= 290000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = (t - x) * (y / (a - z))
	tmp = 0
	if y <= -6.5e-85:
		tmp = t_2
	elif y <= -5.2e-136:
		tmp = t_1
	elif y <= -4.5e-143:
		tmp = t / (a / (y - z))
	elif y <= -4.5e-259:
		tmp = t
	elif y <= -9.5e-274:
		tmp = x
	elif y <= 3.45e-69:
		tmp = t
	elif y <= 290000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(Float64(t - x) * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (y <= -6.5e-85)
		tmp = t_2;
	elseif (y <= -5.2e-136)
		tmp = t_1;
	elseif (y <= -4.5e-143)
		tmp = Float64(t / Float64(a / Float64(y - z)));
	elseif (y <= -4.5e-259)
		tmp = t;
	elseif (y <= -9.5e-274)
		tmp = x;
	elseif (y <= 3.45e-69)
		tmp = t;
	elseif (y <= 290000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = (t - x) * (y / (a - z));
	tmp = 0.0;
	if (y <= -6.5e-85)
		tmp = t_2;
	elseif (y <= -5.2e-136)
		tmp = t_1;
	elseif (y <= -4.5e-143)
		tmp = t / (a / (y - z));
	elseif (y <= -4.5e-259)
		tmp = t;
	elseif (y <= -9.5e-274)
		tmp = x;
	elseif (y <= 3.45e-69)
		tmp = t;
	elseif (y <= 290000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e-85], t$95$2, If[LessEqual[y, -5.2e-136], t$95$1, If[LessEqual[y, -4.5e-143], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.5e-259], t, If[LessEqual[y, -9.5e-274], x, If[LessEqual[y, 3.45e-69], t, If[LessEqual[y, 290000000.0], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-136}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq -4.5 \cdot 10^{-259}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -9.5 \cdot 10^{-274}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 3.45 \cdot 10^{-69}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 290000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6.5e-85 or 2.9e8 < y

    1. Initial program 81.3%

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

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

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

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

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

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

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

    if -6.5e-85 < y < -5.19999999999999993e-136 or 3.44999999999999985e-69 < y < 2.9e8

    1. Initial program 83.8%

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

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

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

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

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

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

    if -5.19999999999999993e-136 < y < -4.5e-143

    1. Initial program 99.7%

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

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

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

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

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

    if -4.5e-143 < y < -4.49999999999999974e-259 or -9.5000000000000009e-274 < y < 3.44999999999999985e-69

    1. Initial program 75.6%

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

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

    if -4.49999999999999974e-259 < y < -9.5000000000000009e-274

    1. Initial program 69.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{-85}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-136}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-143}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;y \leq -4.5 \cdot 10^{-259}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -9.5 \cdot 10^{-274}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.45 \cdot 10^{-69}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 290000000:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \end{array} \]

Alternative 4: 58.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\ t_2 := x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-88}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+81}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{+123}:\\ \;\;\;\;\frac{z \cdot \left(-t\right)}{a - z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+149}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+233}:\\ \;\;\;\;\left(y - a\right) \cdot \left(x \cdot \frac{1}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- t x) (/ y (- a z)))) (t_2 (+ x (* (- t x) (/ y a)))))
   (if (<= z -5.2e+104)
     t
     (if (<= z -1.25e-88)
       t_2
       (if (<= z -1.12e-148)
         t_1
         (if (<= z 2.8e+81)
           t_2
           (if (<= z 6.6e+123)
             (/ (* z (- t)) (- a z))
             (if (<= z 5.2e+149)
               t_1
               (if (<= z 6.5e+233) (* (- y a) (* x (/ 1.0 z))) t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - x) * (y / (a - z));
	double t_2 = x + ((t - x) * (y / a));
	double tmp;
	if (z <= -5.2e+104) {
		tmp = t;
	} else if (z <= -1.25e-88) {
		tmp = t_2;
	} else if (z <= -1.12e-148) {
		tmp = t_1;
	} else if (z <= 2.8e+81) {
		tmp = t_2;
	} else if (z <= 6.6e+123) {
		tmp = (z * -t) / (a - z);
	} else if (z <= 5.2e+149) {
		tmp = t_1;
	} else if (z <= 6.5e+233) {
		tmp = (y - a) * (x * (1.0 / z));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (t - x) * (y / (a - z))
    t_2 = x + ((t - x) * (y / a))
    if (z <= (-5.2d+104)) then
        tmp = t
    else if (z <= (-1.25d-88)) then
        tmp = t_2
    else if (z <= (-1.12d-148)) then
        tmp = t_1
    else if (z <= 2.8d+81) then
        tmp = t_2
    else if (z <= 6.6d+123) then
        tmp = (z * -t) / (a - z)
    else if (z <= 5.2d+149) then
        tmp = t_1
    else if (z <= 6.5d+233) then
        tmp = (y - a) * (x * (1.0d0 / z))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - x) * (y / (a - z));
	double t_2 = x + ((t - x) * (y / a));
	double tmp;
	if (z <= -5.2e+104) {
		tmp = t;
	} else if (z <= -1.25e-88) {
		tmp = t_2;
	} else if (z <= -1.12e-148) {
		tmp = t_1;
	} else if (z <= 2.8e+81) {
		tmp = t_2;
	} else if (z <= 6.6e+123) {
		tmp = (z * -t) / (a - z);
	} else if (z <= 5.2e+149) {
		tmp = t_1;
	} else if (z <= 6.5e+233) {
		tmp = (y - a) * (x * (1.0 / z));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (t - x) * (y / (a - z))
	t_2 = x + ((t - x) * (y / a))
	tmp = 0
	if z <= -5.2e+104:
		tmp = t
	elif z <= -1.25e-88:
		tmp = t_2
	elif z <= -1.12e-148:
		tmp = t_1
	elif z <= 2.8e+81:
		tmp = t_2
	elif z <= 6.6e+123:
		tmp = (z * -t) / (a - z)
	elif z <= 5.2e+149:
		tmp = t_1
	elif z <= 6.5e+233:
		tmp = (y - a) * (x * (1.0 / z))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(t - x) * Float64(y / Float64(a - z)))
	t_2 = Float64(x + Float64(Float64(t - x) * Float64(y / a)))
	tmp = 0.0
	if (z <= -5.2e+104)
		tmp = t;
	elseif (z <= -1.25e-88)
		tmp = t_2;
	elseif (z <= -1.12e-148)
		tmp = t_1;
	elseif (z <= 2.8e+81)
		tmp = t_2;
	elseif (z <= 6.6e+123)
		tmp = Float64(Float64(z * Float64(-t)) / Float64(a - z));
	elseif (z <= 5.2e+149)
		tmp = t_1;
	elseif (z <= 6.5e+233)
		tmp = Float64(Float64(y - a) * Float64(x * Float64(1.0 / z)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (t - x) * (y / (a - z));
	t_2 = x + ((t - x) * (y / a));
	tmp = 0.0;
	if (z <= -5.2e+104)
		tmp = t;
	elseif (z <= -1.25e-88)
		tmp = t_2;
	elseif (z <= -1.12e-148)
		tmp = t_1;
	elseif (z <= 2.8e+81)
		tmp = t_2;
	elseif (z <= 6.6e+123)
		tmp = (z * -t) / (a - z);
	elseif (z <= 5.2e+149)
		tmp = t_1;
	elseif (z <= 6.5e+233)
		tmp = (y - a) * (x * (1.0 / z));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+104], t, If[LessEqual[z, -1.25e-88], t$95$2, If[LessEqual[z, -1.12e-148], t$95$1, If[LessEqual[z, 2.8e+81], t$95$2, If[LessEqual[z, 6.6e+123], N[(N[(z * (-t)), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+149], t$95$1, If[LessEqual[z, 6.5e+233], N[(N[(y - a), $MachinePrecision] * N[(x * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-88}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -1.12 \cdot 10^{-148}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.8 \cdot 10^{+81}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 6.6 \cdot 10^{+123}:\\
\;\;\;\;\frac{z \cdot \left(-t\right)}{a - z}\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{+149}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -5.20000000000000001e104 or 6.50000000000000038e233 < z

    1. Initial program 59.5%

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

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

    if -5.20000000000000001e104 < z < -1.25000000000000002e-88 or -1.1199999999999999e-148 < z < 2.79999999999999995e81

    1. Initial program 89.2%

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

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

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

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

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

    if -1.25000000000000002e-88 < z < -1.1199999999999999e-148 or 6.60000000000000006e123 < z < 5.19999999999999957e149

    1. Initial program 90.7%

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

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

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

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

        \[\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)} \]
    4. Simplified72.3%

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

    if 2.79999999999999995e81 < z < 6.60000000000000006e123

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

    if 5.19999999999999957e149 < z < 6.50000000000000038e233

    1. Initial program 52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(y - a\right) \cdot \left(x \cdot \frac{1}{z}\right)} \]
    10. Applied egg-rr61.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-88}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-148}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+81}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{+123}:\\ \;\;\;\;\frac{z \cdot \left(-t\right)}{a - z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+149}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+233}:\\ \;\;\;\;\left(y - a\right) \cdot \left(x \cdot \frac{1}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 5: 36.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;y \leq -2.9 \cdot 10^{-69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-136}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-143}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-259}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{-275}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-14}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2700000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y (- a z)))))
   (if (<= y -2.9e-69)
     t_1
     (if (<= y -4.8e-136)
       x
       (if (<= y -4.2e-143)
         (/ (* y t) a)
         (if (<= y -4.1e-259)
           t
           (if (<= y -5.4e-275)
             x
             (if (<= y 1.05e-14) t (if (<= y 2700000.0) x t_1)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (y <= -2.9e-69) {
		tmp = t_1;
	} else if (y <= -4.8e-136) {
		tmp = x;
	} else if (y <= -4.2e-143) {
		tmp = (y * t) / a;
	} else if (y <= -4.1e-259) {
		tmp = t;
	} else if (y <= -5.4e-275) {
		tmp = x;
	} else if (y <= 1.05e-14) {
		tmp = t;
	} else if (y <= 2700000.0) {
		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 * (y / (a - z))
    if (y <= (-2.9d-69)) then
        tmp = t_1
    else if (y <= (-4.8d-136)) then
        tmp = x
    else if (y <= (-4.2d-143)) then
        tmp = (y * t) / a
    else if (y <= (-4.1d-259)) then
        tmp = t
    else if (y <= (-5.4d-275)) then
        tmp = x
    else if (y <= 1.05d-14) then
        tmp = t
    else if (y <= 2700000.0d0) 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 * (y / (a - z));
	double tmp;
	if (y <= -2.9e-69) {
		tmp = t_1;
	} else if (y <= -4.8e-136) {
		tmp = x;
	} else if (y <= -4.2e-143) {
		tmp = (y * t) / a;
	} else if (y <= -4.1e-259) {
		tmp = t;
	} else if (y <= -5.4e-275) {
		tmp = x;
	} else if (y <= 1.05e-14) {
		tmp = t;
	} else if (y <= 2700000.0) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / (a - z))
	tmp = 0
	if y <= -2.9e-69:
		tmp = t_1
	elif y <= -4.8e-136:
		tmp = x
	elif y <= -4.2e-143:
		tmp = (y * t) / a
	elif y <= -4.1e-259:
		tmp = t
	elif y <= -5.4e-275:
		tmp = x
	elif y <= 1.05e-14:
		tmp = t
	elif y <= 2700000.0:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (y <= -2.9e-69)
		tmp = t_1;
	elseif (y <= -4.8e-136)
		tmp = x;
	elseif (y <= -4.2e-143)
		tmp = Float64(Float64(y * t) / a);
	elseif (y <= -4.1e-259)
		tmp = t;
	elseif (y <= -5.4e-275)
		tmp = x;
	elseif (y <= 1.05e-14)
		tmp = t;
	elseif (y <= 2700000.0)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / (a - z));
	tmp = 0.0;
	if (y <= -2.9e-69)
		tmp = t_1;
	elseif (y <= -4.8e-136)
		tmp = x;
	elseif (y <= -4.2e-143)
		tmp = (y * t) / a;
	elseif (y <= -4.1e-259)
		tmp = t;
	elseif (y <= -5.4e-275)
		tmp = x;
	elseif (y <= 1.05e-14)
		tmp = t;
	elseif (y <= 2700000.0)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.9e-69], t$95$1, If[LessEqual[y, -4.8e-136], x, If[LessEqual[y, -4.2e-143], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -4.1e-259], t, If[LessEqual[y, -5.4e-275], x, If[LessEqual[y, 1.05e-14], t, If[LessEqual[y, 2700000.0], x, t$95$1]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -4.8 \cdot 10^{-136}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq -4.1 \cdot 10^{-259}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -5.4 \cdot 10^{-275}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-14}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 2700000:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.8999999999999998e-69 or 2.7e6 < y

    1. Initial program 81.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    8. Step-by-step derivation
      1. div-inv37.3%

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

        \[\leadsto t \cdot \color{blue}{\frac{y}{a - z}} \]
    9. Applied egg-rr37.3%

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

    if -2.8999999999999998e-69 < y < -4.7999999999999997e-136 or -4.0999999999999998e-259 < y < -5.39999999999999987e-275 or 1.0499999999999999e-14 < y < 2.7e6

    1. Initial program 84.0%

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

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

    if -4.7999999999999997e-136 < y < -4.2000000000000002e-143

    1. Initial program 99.7%

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

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

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

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

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

    if -4.2000000000000002e-143 < y < -4.0999999999999998e-259 or -5.39999999999999987e-275 < y < 1.0499999999999999e-14

    1. Initial program 74.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{-69}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-136}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-143}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{-259}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{-275}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-14}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2700000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \end{array} \]

Alternative 6: 45.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -5.4 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-88}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-148}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+71}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+124}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+150}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+233}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= z -5.4e+104)
     t
     (if (<= z -1.45e-88)
       t_1
       (if (<= z -1.12e-148)
         (/ y (/ z (- x t)))
         (if (<= z 6.5e+71)
           t_1
           (if (<= z 1.6e+124)
             t
             (if (<= z 1.6e+150)
               (* t (/ y (- a z)))
               (if (<= z 6.5e+233) (* x (/ (- y a) z)) t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -5.4e+104) {
		tmp = t;
	} else if (z <= -1.45e-88) {
		tmp = t_1;
	} else if (z <= -1.12e-148) {
		tmp = y / (z / (x - t));
	} else if (z <= 6.5e+71) {
		tmp = t_1;
	} else if (z <= 1.6e+124) {
		tmp = t;
	} else if (z <= 1.6e+150) {
		tmp = t * (y / (a - z));
	} else if (z <= 6.5e+233) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    if (z <= (-5.4d+104)) then
        tmp = t
    else if (z <= (-1.45d-88)) then
        tmp = t_1
    else if (z <= (-1.12d-148)) then
        tmp = y / (z / (x - t))
    else if (z <= 6.5d+71) then
        tmp = t_1
    else if (z <= 1.6d+124) then
        tmp = t
    else if (z <= 1.6d+150) then
        tmp = t * (y / (a - z))
    else if (z <= 6.5d+233) then
        tmp = x * ((y - a) / z)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -5.4e+104) {
		tmp = t;
	} else if (z <= -1.45e-88) {
		tmp = t_1;
	} else if (z <= -1.12e-148) {
		tmp = y / (z / (x - t));
	} else if (z <= 6.5e+71) {
		tmp = t_1;
	} else if (z <= 1.6e+124) {
		tmp = t;
	} else if (z <= 1.6e+150) {
		tmp = t * (y / (a - z));
	} else if (z <= 6.5e+233) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -5.4e+104:
		tmp = t
	elif z <= -1.45e-88:
		tmp = t_1
	elif z <= -1.12e-148:
		tmp = y / (z / (x - t))
	elif z <= 6.5e+71:
		tmp = t_1
	elif z <= 1.6e+124:
		tmp = t
	elif z <= 1.6e+150:
		tmp = t * (y / (a - z))
	elif z <= 6.5e+233:
		tmp = x * ((y - a) / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -5.4e+104)
		tmp = t;
	elseif (z <= -1.45e-88)
		tmp = t_1;
	elseif (z <= -1.12e-148)
		tmp = Float64(y / Float64(z / Float64(x - t)));
	elseif (z <= 6.5e+71)
		tmp = t_1;
	elseif (z <= 1.6e+124)
		tmp = t;
	elseif (z <= 1.6e+150)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= 6.5e+233)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -5.4e+104)
		tmp = t;
	elseif (z <= -1.45e-88)
		tmp = t_1;
	elseif (z <= -1.12e-148)
		tmp = y / (z / (x - t));
	elseif (z <= 6.5e+71)
		tmp = t_1;
	elseif (z <= 1.6e+124)
		tmp = t;
	elseif (z <= 1.6e+150)
		tmp = t * (y / (a - z));
	elseif (z <= 6.5e+233)
		tmp = x * ((y - a) / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e+104], t, If[LessEqual[z, -1.45e-88], t$95$1, If[LessEqual[z, -1.12e-148], N[(y / N[(z / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+71], t$95$1, If[LessEqual[z, 1.6e+124], t, If[LessEqual[z, 1.6e+150], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+233], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.45 \cdot 10^{-88}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+71}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+124}:\\
\;\;\;\;t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -5.39999999999999969e104 or 6.49999999999999954e71 < z < 1.59999999999999996e124 or 6.50000000000000038e233 < z

    1. Initial program 63.4%

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

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

    if -5.39999999999999969e104 < z < -1.4500000000000001e-88 or -1.1199999999999999e-148 < z < 6.49999999999999954e71

    1. Initial program 89.1%

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

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

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

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

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

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

    if -1.4500000000000001e-88 < z < -1.1199999999999999e-148

    1. Initial program 87.2%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-1 \cdot t - -1 \cdot x}}} \]
      2. sub-neg61.2%

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

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

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

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

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

    if 1.59999999999999996e124 < z < 1.60000000000000008e150

    1. Initial program 99.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    8. Step-by-step derivation
      1. div-inv52.8%

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

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

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

    if 1.60000000000000008e150 < z < 6.50000000000000038e233

    1. Initial program 52.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-148}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+71}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+124}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+150}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+233}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 7: 45.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{\frac{z}{x - t}}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -7 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-88}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+71}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+98}:\\ \;\;\;\;\frac{z \cdot \left(-t\right)}{a - z}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+110}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+233}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ y (/ z (- x t)))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= z -7e+104)
     t
     (if (<= z -1.25e-88)
       t_2
       (if (<= z -1.12e-148)
         t_1
         (if (<= z 5.2e+71)
           t_2
           (if (<= z 7e+98)
             (/ (* z (- t)) (- a z))
             (if (<= z 6.8e+110)
               t_1
               (if (<= z 6.5e+233) (* x (/ (- y a) z)) t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (z / (x - t));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -7e+104) {
		tmp = t;
	} else if (z <= -1.25e-88) {
		tmp = t_2;
	} else if (z <= -1.12e-148) {
		tmp = t_1;
	} else if (z <= 5.2e+71) {
		tmp = t_2;
	} else if (z <= 7e+98) {
		tmp = (z * -t) / (a - z);
	} else if (z <= 6.8e+110) {
		tmp = t_1;
	} else if (z <= 6.5e+233) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y / (z / (x - t))
    t_2 = x * (1.0d0 - (y / a))
    if (z <= (-7d+104)) then
        tmp = t
    else if (z <= (-1.25d-88)) then
        tmp = t_2
    else if (z <= (-1.12d-148)) then
        tmp = t_1
    else if (z <= 5.2d+71) then
        tmp = t_2
    else if (z <= 7d+98) then
        tmp = (z * -t) / (a - z)
    else if (z <= 6.8d+110) then
        tmp = t_1
    else if (z <= 6.5d+233) then
        tmp = x * ((y - a) / z)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (z / (x - t));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -7e+104) {
		tmp = t;
	} else if (z <= -1.25e-88) {
		tmp = t_2;
	} else if (z <= -1.12e-148) {
		tmp = t_1;
	} else if (z <= 5.2e+71) {
		tmp = t_2;
	} else if (z <= 7e+98) {
		tmp = (z * -t) / (a - z);
	} else if (z <= 6.8e+110) {
		tmp = t_1;
	} else if (z <= 6.5e+233) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y / (z / (x - t))
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -7e+104:
		tmp = t
	elif z <= -1.25e-88:
		tmp = t_2
	elif z <= -1.12e-148:
		tmp = t_1
	elif z <= 5.2e+71:
		tmp = t_2
	elif z <= 7e+98:
		tmp = (z * -t) / (a - z)
	elif z <= 6.8e+110:
		tmp = t_1
	elif z <= 6.5e+233:
		tmp = x * ((y - a) / z)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y / Float64(z / Float64(x - t)))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -7e+104)
		tmp = t;
	elseif (z <= -1.25e-88)
		tmp = t_2;
	elseif (z <= -1.12e-148)
		tmp = t_1;
	elseif (z <= 5.2e+71)
		tmp = t_2;
	elseif (z <= 7e+98)
		tmp = Float64(Float64(z * Float64(-t)) / Float64(a - z));
	elseif (z <= 6.8e+110)
		tmp = t_1;
	elseif (z <= 6.5e+233)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y / (z / (x - t));
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (z <= -7e+104)
		tmp = t;
	elseif (z <= -1.25e-88)
		tmp = t_2;
	elseif (z <= -1.12e-148)
		tmp = t_1;
	elseif (z <= 5.2e+71)
		tmp = t_2;
	elseif (z <= 7e+98)
		tmp = (z * -t) / (a - z);
	elseif (z <= 6.8e+110)
		tmp = t_1;
	elseif (z <= 6.5e+233)
		tmp = x * ((y - a) / z);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(z / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7e+104], t, If[LessEqual[z, -1.25e-88], t$95$2, If[LessEqual[z, -1.12e-148], t$95$1, If[LessEqual[z, 5.2e+71], t$95$2, If[LessEqual[z, 7e+98], N[(N[(z * (-t)), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+110], t$95$1, If[LessEqual[z, 6.5e+233], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-88}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -1.12 \cdot 10^{-148}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 5.2 \cdot 10^{+71}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 6.8 \cdot 10^{+110}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -7.0000000000000003e104 or 6.50000000000000038e233 < z

    1. Initial program 59.5%

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

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

    if -7.0000000000000003e104 < z < -1.25000000000000002e-88 or -1.1199999999999999e-148 < z < 5.19999999999999983e71

    1. Initial program 89.1%

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

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

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

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

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

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

    if -1.25000000000000002e-88 < z < -1.1199999999999999e-148 or 7e98 < z < 6.8000000000000003e110

    1. Initial program 83.9%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{-1 \cdot t - -1 \cdot x}}} \]
      2. sub-neg62.2%

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

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

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

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

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

    if 5.19999999999999983e71 < z < 7e98

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    if 6.8000000000000003e110 < z < 6.50000000000000038e233

    1. Initial program 63.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-88}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-148}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+71}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+98}:\\ \;\;\;\;\frac{z \cdot \left(-t\right)}{a - z}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+110}:\\ \;\;\;\;\frac{y}{\frac{z}{x - t}}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+233}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 8: 36.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+149}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-142}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-206}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-216}:\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-253}:\\ \;\;\;\;\frac{-t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-278}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.62 \cdot 10^{-285}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.85 \cdot 10^{+82}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -6.2e+149)
   x
   (if (<= a -9.5e-142)
     t
     (if (<= a -2.8e-206)
       (/ x (/ z y))
       (if (<= a -1.6e-216)
         (+ x (- t x))
         (if (<= a -5.5e-253)
           (/ (- t) (/ z y))
           (if (<= a -2.1e-278)
             t
             (if (<= a 2.62e-285)
               (* x (/ y z))
               (if (<= a 2.85e+82) t x)))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -6.2e+149) {
		tmp = x;
	} else if (a <= -9.5e-142) {
		tmp = t;
	} else if (a <= -2.8e-206) {
		tmp = x / (z / y);
	} else if (a <= -1.6e-216) {
		tmp = x + (t - x);
	} else if (a <= -5.5e-253) {
		tmp = -t / (z / y);
	} else if (a <= -2.1e-278) {
		tmp = t;
	} else if (a <= 2.62e-285) {
		tmp = x * (y / z);
	} else if (a <= 2.85e+82) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-6.2d+149)) then
        tmp = x
    else if (a <= (-9.5d-142)) then
        tmp = t
    else if (a <= (-2.8d-206)) then
        tmp = x / (z / y)
    else if (a <= (-1.6d-216)) then
        tmp = x + (t - x)
    else if (a <= (-5.5d-253)) then
        tmp = -t / (z / y)
    else if (a <= (-2.1d-278)) then
        tmp = t
    else if (a <= 2.62d-285) then
        tmp = x * (y / z)
    else if (a <= 2.85d+82) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -6.2e+149) {
		tmp = x;
	} else if (a <= -9.5e-142) {
		tmp = t;
	} else if (a <= -2.8e-206) {
		tmp = x / (z / y);
	} else if (a <= -1.6e-216) {
		tmp = x + (t - x);
	} else if (a <= -5.5e-253) {
		tmp = -t / (z / y);
	} else if (a <= -2.1e-278) {
		tmp = t;
	} else if (a <= 2.62e-285) {
		tmp = x * (y / z);
	} else if (a <= 2.85e+82) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -6.2e+149:
		tmp = x
	elif a <= -9.5e-142:
		tmp = t
	elif a <= -2.8e-206:
		tmp = x / (z / y)
	elif a <= -1.6e-216:
		tmp = x + (t - x)
	elif a <= -5.5e-253:
		tmp = -t / (z / y)
	elif a <= -2.1e-278:
		tmp = t
	elif a <= 2.62e-285:
		tmp = x * (y / z)
	elif a <= 2.85e+82:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -6.2e+149)
		tmp = x;
	elseif (a <= -9.5e-142)
		tmp = t;
	elseif (a <= -2.8e-206)
		tmp = Float64(x / Float64(z / y));
	elseif (a <= -1.6e-216)
		tmp = Float64(x + Float64(t - x));
	elseif (a <= -5.5e-253)
		tmp = Float64(Float64(-t) / Float64(z / y));
	elseif (a <= -2.1e-278)
		tmp = t;
	elseif (a <= 2.62e-285)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 2.85e+82)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -6.2e+149)
		tmp = x;
	elseif (a <= -9.5e-142)
		tmp = t;
	elseif (a <= -2.8e-206)
		tmp = x / (z / y);
	elseif (a <= -1.6e-216)
		tmp = x + (t - x);
	elseif (a <= -5.5e-253)
		tmp = -t / (z / y);
	elseif (a <= -2.1e-278)
		tmp = t;
	elseif (a <= 2.62e-285)
		tmp = x * (y / z);
	elseif (a <= 2.85e+82)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.2e+149], x, If[LessEqual[a, -9.5e-142], t, If[LessEqual[a, -2.8e-206], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.6e-216], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.5e-253], N[((-t) / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.1e-278], t, If[LessEqual[a, 2.62e-285], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.85e+82], t, x]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -9.5 \cdot 10^{-142}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq -1.6 \cdot 10^{-216}:\\
\;\;\;\;x + \left(t - x\right)\\

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

\mathbf{elif}\;a \leq -2.1 \cdot 10^{-278}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 2.85 \cdot 10^{+82}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -6.19999999999999974e149 or 2.85000000000000008e82 < a

    1. Initial program 88.0%

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

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

    if -6.19999999999999974e149 < a < -9.49999999999999967e-142 or -5.49999999999999974e-253 < a < -2.10000000000000014e-278 or 2.62000000000000002e-285 < a < 2.85000000000000008e82

    1. Initial program 74.3%

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

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

    if -9.49999999999999967e-142 < a < -2.8000000000000001e-206

    1. Initial program 64.7%

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

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

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

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

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

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

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

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

    if -2.8000000000000001e-206 < a < -1.60000000000000013e-216

    1. Initial program 100.0%

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

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

    if -1.60000000000000013e-216 < a < -5.49999999999999974e-253

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

    if -2.10000000000000014e-278 < a < 2.62000000000000002e-285

    1. Initial program 92.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+149}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-142}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-206}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq -1.6 \cdot 10^{-216}:\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-253}:\\ \;\;\;\;\frac{-t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-278}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.62 \cdot 10^{-285}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.85 \cdot 10^{+82}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 59.3% accurate, 0.7× speedup?

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

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

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

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

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

\mathbf{elif}\;x \leq 7.5 \cdot 10^{+260}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -2.30000000000000004e80 or 1.8500000000000001e189 < x < 7.49999999999999947e260

    1. Initial program 77.5%

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

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

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

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

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

    if -2.30000000000000004e80 < x < -9.5e11

    1. Initial program 78.5%

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

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

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

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

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

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

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

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

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

    if -9.5e11 < x < 3.9999999999999999e82

    1. Initial program 86.7%

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

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

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

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

    if 3.9999999999999999e82 < x < 1.8500000000000001e189

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.49999999999999947e260 < x

    1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+80}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -950000000000:\\ \;\;\;\;x \cdot \frac{-y}{a - z}\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+82}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;x \leq 1.85 \cdot 10^{+189}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{+260}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]

Alternative 10: 59.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;x \leq -350000000000:\\
\;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\

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

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

\mathbf{elif}\;x \leq 4.7 \cdot 10^{+260}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -4.09999999999999998e96 or 6.4000000000000001e190 < x < 4.70000000000000021e260

    1. Initial program 77.5%

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

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

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

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

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

    if -4.09999999999999998e96 < x < -3.5e11

    1. Initial program 78.5%

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

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

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

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

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

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

    if -3.5e11 < x < 1.4599999999999999e82

    1. Initial program 86.7%

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

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

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

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

    if 1.4599999999999999e82 < x < 6.4000000000000001e190

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.70000000000000021e260 < x

    1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.1 \cdot 10^{+96}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -350000000000:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;x \leq 1.46 \cdot 10^{+82}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;x \leq 6.4 \cdot 10^{+190}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;x \leq 4.7 \cdot 10^{+260}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]

Alternative 11: 64.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;x \leq 1.4 \cdot 10^{-185}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 4.5 \cdot 10^{+51}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4 or 4.5e51 < x

    1. Initial program 70.8%

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

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

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

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

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

    if -4 < x < 1.39999999999999996e-185 or 7.2000000000000003e-130 < x < 4.5e51

    1. Initial program 86.3%

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

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

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

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

    if 1.39999999999999996e-185 < x < 7.2000000000000003e-130

    1. Initial program 89.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-185}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-130}:\\ \;\;\;\;x + \left(z - y\right) \cdot \frac{x - t}{a}\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+51}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \end{array} \]

Alternative 12: 74.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{if}\;z \leq -8300000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-88}:\\ \;\;\;\;x + \left(z - y\right) \cdot \frac{x - t}{a}\\ \mathbf{elif}\;z \leq -3.35 \cdot 10^{-149}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 225000:\\ \;\;\;\;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 t) (/ z (- y a))))))
   (if (<= z -8300000000.0)
     t_1
     (if (<= z -1.7e-88)
       (+ x (* (- z y) (/ (- x t) a)))
       (if (<= z -3.35e-149)
         (/ (* y (- t x)) (- a z))
         (if (<= z 225000.0) (+ x (* (- t x) (/ y a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((x - t) / (z / (y - a)));
	double tmp;
	if (z <= -8300000000.0) {
		tmp = t_1;
	} else if (z <= -1.7e-88) {
		tmp = x + ((z - y) * ((x - t) / a));
	} else if (z <= -3.35e-149) {
		tmp = (y * (t - x)) / (a - z);
	} else if (z <= 225000.0) {
		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 - t) / (z / (y - a)))
    if (z <= (-8300000000.0d0)) then
        tmp = t_1
    else if (z <= (-1.7d-88)) then
        tmp = x + ((z - y) * ((x - t) / a))
    else if (z <= (-3.35d-149)) then
        tmp = (y * (t - x)) / (a - z)
    else if (z <= 225000.0d0) 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 - t) / (z / (y - a)));
	double tmp;
	if (z <= -8300000000.0) {
		tmp = t_1;
	} else if (z <= -1.7e-88) {
		tmp = x + ((z - y) * ((x - t) / a));
	} else if (z <= -3.35e-149) {
		tmp = (y * (t - x)) / (a - z);
	} else if (z <= 225000.0) {
		tmp = x + ((t - x) * (y / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + ((x - t) / (z / (y - a)))
	tmp = 0
	if z <= -8300000000.0:
		tmp = t_1
	elif z <= -1.7e-88:
		tmp = x + ((z - y) * ((x - t) / a))
	elif z <= -3.35e-149:
		tmp = (y * (t - x)) / (a - z)
	elif z <= 225000.0:
		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 - t) / Float64(z / Float64(y - a))))
	tmp = 0.0
	if (z <= -8300000000.0)
		tmp = t_1;
	elseif (z <= -1.7e-88)
		tmp = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / a)));
	elseif (z <= -3.35e-149)
		tmp = Float64(Float64(y * Float64(t - x)) / Float64(a - z));
	elseif (z <= 225000.0)
		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 - t) / (z / (y - a)));
	tmp = 0.0;
	if (z <= -8300000000.0)
		tmp = t_1;
	elseif (z <= -1.7e-88)
		tmp = x + ((z - y) * ((x - t) / a));
	elseif (z <= -3.35e-149)
		tmp = (y * (t - x)) / (a - z);
	elseif (z <= 225000.0)
		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 - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8300000000.0], t$95$1, If[LessEqual[z, -1.7e-88], N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.35e-149], N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 225000.0], 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 - t}{\frac{z}{y - a}}\\
\mathbf{if}\;z \leq -8300000000:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;z \leq 225000:\\
\;\;\;\;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 < -8.3e9 or 225000 < z

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

    if -8.3e9 < z < -1.69999999999999987e-88

    1. Initial program 95.2%

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

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

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

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

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

    if -1.69999999999999987e-88 < z < -3.3499999999999998e-149

    1. Initial program 87.2%

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

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

    if -3.3499999999999998e-149 < z < 225000

    1. Initial program 91.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8300000000:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-88}:\\ \;\;\;\;x + \left(z - y\right) \cdot \frac{x - t}{a}\\ \mathbf{elif}\;z \leq -3.35 \cdot 10^{-149}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 225000:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \end{array} \]

Alternative 13: 47.1% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+124}:\\
\;\;\;\;t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.59999999999999969e104 or 1.60000000000000012e71 < z < 1.59999999999999996e124 or 6.50000000000000038e233 < z

    1. Initial program 63.4%

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

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

    if -4.59999999999999969e104 < z < 1.60000000000000012e71

    1. Initial program 88.9%

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

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

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

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

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

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

    if 1.59999999999999996e124 < z < 1.6000000000000001e149

    1. Initial program 99.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    8. Step-by-step derivation
      1. div-inv52.8%

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

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

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

    if 1.6000000000000001e149 < z < 6.50000000000000038e233

    1. Initial program 52.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    10. Simplified55.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+71}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+124}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+149}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+233}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 14: 47.1% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+124}:\\
\;\;\;\;t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.89999999999999985e104 or 9.0000000000000007e68 < z < 1.59999999999999996e124 or 6.50000000000000038e233 < z

    1. Initial program 63.4%

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

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

    if -4.89999999999999985e104 < z < 9.0000000000000007e68

    1. Initial program 88.9%

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

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

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

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

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

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

    if 1.59999999999999996e124 < z < 3.99999999999999992e150

    1. Initial program 99.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    8. Step-by-step derivation
      1. div-inv52.8%

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

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

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

    if 3.99999999999999992e150 < z < 6.50000000000000038e233

    1. Initial program 52.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.9 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+68}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+124}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+150}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+233}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 15: 37.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -4.9 \cdot 10^{-146}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq -5.5 \cdot 10^{-203}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.62 \cdot 10^{-285}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.35 \cdot 10^{+82}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.19999999999999974e149 or 2.35e82 < a

    1. Initial program 88.0%

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

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

    if -6.19999999999999974e149 < a < -4.9000000000000004e-146 or -5.5000000000000002e-203 < a < -4.79999999999999981e-275 or 2.62000000000000002e-285 < a < 2.35e82

    1. Initial program 75.9%

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

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

    if -4.9000000000000004e-146 < a < -5.5000000000000002e-203 or -4.79999999999999981e-275 < a < 2.62000000000000002e-285

    1. Initial program 79.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+149}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.9 \cdot 10^{-146}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-203}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-275}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.62 \cdot 10^{-285}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.35 \cdot 10^{+82}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 37.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+149}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-145}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-204}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-276}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.62 \cdot 10^{-285}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+81}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -6.2e+149)
   x
   (if (<= a -1.45e-145)
     t
     (if (<= a -1.15e-204)
       (/ x (/ z y))
       (if (<= a -3.6e-276)
         t
         (if (<= a 2.62e-285) (* x (/ y z)) (if (<= a 8.5e+81) t x)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -6.2e+149) {
		tmp = x;
	} else if (a <= -1.45e-145) {
		tmp = t;
	} else if (a <= -1.15e-204) {
		tmp = x / (z / y);
	} else if (a <= -3.6e-276) {
		tmp = t;
	} else if (a <= 2.62e-285) {
		tmp = x * (y / z);
	} else if (a <= 8.5e+81) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-6.2d+149)) then
        tmp = x
    else if (a <= (-1.45d-145)) then
        tmp = t
    else if (a <= (-1.15d-204)) then
        tmp = x / (z / y)
    else if (a <= (-3.6d-276)) then
        tmp = t
    else if (a <= 2.62d-285) then
        tmp = x * (y / z)
    else if (a <= 8.5d+81) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -6.2e+149) {
		tmp = x;
	} else if (a <= -1.45e-145) {
		tmp = t;
	} else if (a <= -1.15e-204) {
		tmp = x / (z / y);
	} else if (a <= -3.6e-276) {
		tmp = t;
	} else if (a <= 2.62e-285) {
		tmp = x * (y / z);
	} else if (a <= 8.5e+81) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -6.2e+149:
		tmp = x
	elif a <= -1.45e-145:
		tmp = t
	elif a <= -1.15e-204:
		tmp = x / (z / y)
	elif a <= -3.6e-276:
		tmp = t
	elif a <= 2.62e-285:
		tmp = x * (y / z)
	elif a <= 8.5e+81:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -6.2e+149)
		tmp = x;
	elseif (a <= -1.45e-145)
		tmp = t;
	elseif (a <= -1.15e-204)
		tmp = Float64(x / Float64(z / y));
	elseif (a <= -3.6e-276)
		tmp = t;
	elseif (a <= 2.62e-285)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 8.5e+81)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -6.2e+149)
		tmp = x;
	elseif (a <= -1.45e-145)
		tmp = t;
	elseif (a <= -1.15e-204)
		tmp = x / (z / y);
	elseif (a <= -3.6e-276)
		tmp = t;
	elseif (a <= 2.62e-285)
		tmp = x * (y / z);
	elseif (a <= 8.5e+81)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.2e+149], x, If[LessEqual[a, -1.45e-145], t, If[LessEqual[a, -1.15e-204], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.6e-276], t, If[LessEqual[a, 2.62e-285], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e+81], t, x]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.45 \cdot 10^{-145}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq -3.6 \cdot 10^{-276}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 8.5 \cdot 10^{+81}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -6.19999999999999974e149 or 8.49999999999999986e81 < a

    1. Initial program 88.0%

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

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

    if -6.19999999999999974e149 < a < -1.44999999999999992e-145 or -1.15e-204 < a < -3.59999999999999994e-276 or 2.62000000000000002e-285 < a < 8.49999999999999986e81

    1. Initial program 75.9%

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

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

    if -1.44999999999999992e-145 < a < -1.15e-204

    1. Initial program 64.7%

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

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

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

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

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

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

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

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

    if -3.59999999999999994e-276 < a < 2.62000000000000002e-285

    1. Initial program 92.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+149}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-145}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-204}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-276}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.62 \cdot 10^{-285}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+81}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 17: 46.6% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+124}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+233}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.59999999999999969e104 or 6.5999999999999997e69 < z < 1.59999999999999996e124 or 6.50000000000000038e233 < z

    1. Initial program 63.4%

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

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

    if -4.59999999999999969e104 < z < 6.5999999999999997e69

    1. Initial program 88.9%

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

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

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

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

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

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

    if 1.59999999999999996e124 < z < 1.99999999999999996e150

    1. Initial program 99.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    8. Step-by-step derivation
      1. div-inv52.8%

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

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

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

    if 1.99999999999999996e150 < z < 6.50000000000000038e233

    1. Initial program 52.8%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    7. Simplified33.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+104}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{+69}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+124}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+150}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+233}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 18: 64.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8500000000 \lor \neg \left(x \leq 1.6 \cdot 10^{+49}\right):\\
\;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.5e9 or 1.60000000000000007e49 < x

    1. Initial program 70.8%

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

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

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

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

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

    if -8.5e9 < x < 1.60000000000000007e49

    1. Initial program 86.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8500000000 \lor \neg \left(x \leq 1.6 \cdot 10^{+49}\right):\\ \;\;\;\;x \cdot \left(\frac{z - y}{a - z} + 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \end{array} \]

Alternative 19: 37.4% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 2.7 \cdot 10^{+83}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.19999999999999974e149 or 2.70000000000000007e83 < a

    1. Initial program 88.0%

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

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

    if -6.19999999999999974e149 < a < 2.70000000000000007e83

    1. Initial program 76.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+149}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+83}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 20: 24.7% 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 80.0%

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

    \[\leadsto \color{blue}{t} \]
  3. Final simplification26.7%

    \[\leadsto t \]

Reproduce

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