Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 81.1% → 91.6%
Time: 20.0s
Alternatives: 23
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 23 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: 81.1% 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: 91.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\

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


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

    1. Initial program 91.0%

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

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

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

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

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

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 92.6%

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

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

Alternative 2: 91.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \left(y - z\right) \cdot \frac{x - t}{a - z}\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{-282} \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) (/ (- x t) (- a z))))))
   (if (or (<= t_1 -5e-282) (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) * ((x - t) / (a - z)));
	double tmp;
	if ((t_1 <= -5e-282) || !(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) * ((x - t) / (a - z)))
    if ((t_1 <= (-5d-282)) .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) * ((x - t) / (a - z)));
	double tmp;
	if ((t_1 <= -5e-282) || !(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) * ((x - t) / (a - z)))
	tmp = 0
	if (t_1 <= -5e-282) 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(x - t) / Float64(a - z))))
	tmp = 0.0
	if ((t_1 <= -5e-282) || !(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) * ((x - t) / (a - z)));
	tmp = 0.0;
	if ((t_1 <= -5e-282) || ~((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[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-282], 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{x - t}{a - z}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-282} \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)))) < -5.0000000000000001e-282 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 91.8%

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

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

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 71.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ t_2 := x + \frac{y - z}{\frac{a}{t - x}}\\ \mathbf{if}\;a \leq -3.4 \cdot 10^{+125}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-46}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-83}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-134}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{-26}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (/ (* (- t x) (- a y)) z)))
        (t_2 (+ x (/ (- y z) (/ a (- t x))))))
   (if (<= a -3.4e+125)
     t_2
     (if (<= a -3.6e-46)
       (/ t (/ (- a z) (- y z)))
       (if (<= a -4.7e-83)
         (* y (/ (- t x) (- a z)))
         (if (<= a 2e-134)
           t_1
           (if (<= a 1.06e-26)
             (* t (/ (- y z) (- a z)))
             (if (<= a 2.9e+57) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (((t - x) * (a - y)) / z);
	double t_2 = x + ((y - z) / (a / (t - x)));
	double tmp;
	if (a <= -3.4e+125) {
		tmp = t_2;
	} else if (a <= -3.6e-46) {
		tmp = t / ((a - z) / (y - z));
	} else if (a <= -4.7e-83) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 2e-134) {
		tmp = t_1;
	} else if (a <= 1.06e-26) {
		tmp = t * ((y - z) / (a - z));
	} else if (a <= 2.9e+57) {
		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 + (((t - x) * (a - y)) / z)
    t_2 = x + ((y - z) / (a / (t - x)))
    if (a <= (-3.4d+125)) then
        tmp = t_2
    else if (a <= (-3.6d-46)) then
        tmp = t / ((a - z) / (y - z))
    else if (a <= (-4.7d-83)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 2d-134) then
        tmp = t_1
    else if (a <= 1.06d-26) then
        tmp = t * ((y - z) / (a - z))
    else if (a <= 2.9d+57) 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 + (((t - x) * (a - y)) / z);
	double t_2 = x + ((y - z) / (a / (t - x)));
	double tmp;
	if (a <= -3.4e+125) {
		tmp = t_2;
	} else if (a <= -3.6e-46) {
		tmp = t / ((a - z) / (y - z));
	} else if (a <= -4.7e-83) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 2e-134) {
		tmp = t_1;
	} else if (a <= 1.06e-26) {
		tmp = t * ((y - z) / (a - z));
	} else if (a <= 2.9e+57) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (((t - x) * (a - y)) / z)
	t_2 = x + ((y - z) / (a / (t - x)))
	tmp = 0
	if a <= -3.4e+125:
		tmp = t_2
	elif a <= -3.6e-46:
		tmp = t / ((a - z) / (y - z))
	elif a <= -4.7e-83:
		tmp = y * ((t - x) / (a - z))
	elif a <= 2e-134:
		tmp = t_1
	elif a <= 1.06e-26:
		tmp = t * ((y - z) / (a - z))
	elif a <= 2.9e+57:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z))
	t_2 = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x))))
	tmp = 0.0
	if (a <= -3.4e+125)
		tmp = t_2;
	elseif (a <= -3.6e-46)
		tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z)));
	elseif (a <= -4.7e-83)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 2e-134)
		tmp = t_1;
	elseif (a <= 1.06e-26)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif (a <= 2.9e+57)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (((t - x) * (a - y)) / z);
	t_2 = x + ((y - z) / (a / (t - x)));
	tmp = 0.0;
	if (a <= -3.4e+125)
		tmp = t_2;
	elseif (a <= -3.6e-46)
		tmp = t / ((a - z) / (y - z));
	elseif (a <= -4.7e-83)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 2e-134)
		tmp = t_1;
	elseif (a <= 1.06e-26)
		tmp = t * ((y - z) / (a - z));
	elseif (a <= 2.9e+57)
		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[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.4e+125], t$95$2, If[LessEqual[a, -3.6e-46], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.7e-83], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e-134], t$95$1, If[LessEqual[a, 1.06e-26], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.9e+57], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;a \leq 2 \cdot 10^{-134}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.9 \cdot 10^{+57}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.3999999999999999e125 or 2.9000000000000002e57 < a

    1. Initial program 96.5%

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

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

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

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

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

    if -3.3999999999999999e125 < a < -3.6e-46

    1. Initial program 75.6%

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

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

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

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

    if -3.6e-46 < a < -4.7000000000000003e-83

    1. Initial program 64.8%

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      4. sub-div82.9%

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

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

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

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

    if -4.7000000000000003e-83 < a < 2.00000000000000008e-134 or 1.06000000000000001e-26 < a < 2.9000000000000002e57

    1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000008e-134 < a < 1.06000000000000001e-26

    1. Initial program 79.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{+125}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-46}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-83}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-134}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{-26}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+57}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 4: 43.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -4.2 \cdot 10^{+119}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-21}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-278}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-275}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-201}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.76 \cdot 10^{+58}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+117}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z))) (t_2 (* t (- 1.0 (/ y z)))))
   (if (<= a -4.2e+119)
     x
     (if (<= a -4.5e-21)
       t_2
       (if (<= a -4.7e-278)
         t_1
         (if (<= a 1.45e-275)
           t_2
           (if (<= a 1.15e-201)
             t_1
             (if (<= a 1.76e+58)
               t_2
               (if (<= a 1.15e+117) (* y (/ (- t x) a)) x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -4.2e+119) {
		tmp = x;
	} else if (a <= -4.5e-21) {
		tmp = t_2;
	} else if (a <= -4.7e-278) {
		tmp = t_1;
	} else if (a <= 1.45e-275) {
		tmp = t_2;
	} else if (a <= 1.15e-201) {
		tmp = t_1;
	} else if (a <= 1.76e+58) {
		tmp = t_2;
	} else if (a <= 1.15e+117) {
		tmp = y * ((t - x) / a);
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    t_2 = t * (1.0d0 - (y / z))
    if (a <= (-4.2d+119)) then
        tmp = x
    else if (a <= (-4.5d-21)) then
        tmp = t_2
    else if (a <= (-4.7d-278)) then
        tmp = t_1
    else if (a <= 1.45d-275) then
        tmp = t_2
    else if (a <= 1.15d-201) then
        tmp = t_1
    else if (a <= 1.76d+58) then
        tmp = t_2
    else if (a <= 1.15d+117) then
        tmp = y * ((t - x) / a)
    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 - a) / z);
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -4.2e+119) {
		tmp = x;
	} else if (a <= -4.5e-21) {
		tmp = t_2;
	} else if (a <= -4.7e-278) {
		tmp = t_1;
	} else if (a <= 1.45e-275) {
		tmp = t_2;
	} else if (a <= 1.15e-201) {
		tmp = t_1;
	} else if (a <= 1.76e+58) {
		tmp = t_2;
	} else if (a <= 1.15e+117) {
		tmp = y * ((t - x) / a);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = t * (1.0 - (y / z))
	tmp = 0
	if a <= -4.2e+119:
		tmp = x
	elif a <= -4.5e-21:
		tmp = t_2
	elif a <= -4.7e-278:
		tmp = t_1
	elif a <= 1.45e-275:
		tmp = t_2
	elif a <= 1.15e-201:
		tmp = t_1
	elif a <= 1.76e+58:
		tmp = t_2
	elif a <= 1.15e+117:
		tmp = y * ((t - x) / a)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (a <= -4.2e+119)
		tmp = x;
	elseif (a <= -4.5e-21)
		tmp = t_2;
	elseif (a <= -4.7e-278)
		tmp = t_1;
	elseif (a <= 1.45e-275)
		tmp = t_2;
	elseif (a <= 1.15e-201)
		tmp = t_1;
	elseif (a <= 1.76e+58)
		tmp = t_2;
	elseif (a <= 1.15e+117)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (a <= -4.2e+119)
		tmp = x;
	elseif (a <= -4.5e-21)
		tmp = t_2;
	elseif (a <= -4.7e-278)
		tmp = t_1;
	elseif (a <= 1.45e-275)
		tmp = t_2;
	elseif (a <= 1.15e-201)
		tmp = t_1;
	elseif (a <= 1.76e+58)
		tmp = t_2;
	elseif (a <= 1.15e+117)
		tmp = y * ((t - x) / a);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.2e+119], x, If[LessEqual[a, -4.5e-21], t$95$2, If[LessEqual[a, -4.7e-278], t$95$1, If[LessEqual[a, 1.45e-275], t$95$2, If[LessEqual[a, 1.15e-201], t$95$1, If[LessEqual[a, 1.76e+58], t$95$2, If[LessEqual[a, 1.15e+117], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4.5 \cdot 10^{-21}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -4.7 \cdot 10^{-278}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.45 \cdot 10^{-275}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.15 \cdot 10^{-201}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.76 \cdot 10^{+58}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.19999999999999966e119 or 1.14999999999999994e117 < a

    1. Initial program 96.3%

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

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

    if -4.19999999999999966e119 < a < -4.49999999999999968e-21 or -4.6999999999999997e-278 < a < 1.45e-275 or 1.14999999999999993e-201 < a < 1.7600000000000001e58

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.49999999999999968e-21 < a < -4.6999999999999997e-278 or 1.45e-275 < a < 1.14999999999999993e-201

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7600000000000001e58 < a < 1.14999999999999994e117

    1. Initial program 97.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{+119}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-21}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-278}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-275}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-201}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.76 \cdot 10^{+58}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+117}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 5: 43.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -7.7 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-278}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-275}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.36 \cdot 10^{-199}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 7.1 \cdot 10^{+58}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+116}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z))) (t_2 (* t (- 1.0 (/ y z)))))
   (if (<= a -7.7e+118)
     x
     (if (<= a -4.2e-19)
       t_2
       (if (<= a -4.2e-278)
         t_1
         (if (<= a 2.3e-275)
           t_2
           (if (<= a 1.36e-199)
             t_1
             (if (<= a 7.1e+58)
               t_2
               (if (<= a 2.6e+116) (* (- t x) (/ y a)) x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -7.7e+118) {
		tmp = x;
	} else if (a <= -4.2e-19) {
		tmp = t_2;
	} else if (a <= -4.2e-278) {
		tmp = t_1;
	} else if (a <= 2.3e-275) {
		tmp = t_2;
	} else if (a <= 1.36e-199) {
		tmp = t_1;
	} else if (a <= 7.1e+58) {
		tmp = t_2;
	} else if (a <= 2.6e+116) {
		tmp = (t - x) * (y / a);
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    t_2 = t * (1.0d0 - (y / z))
    if (a <= (-7.7d+118)) then
        tmp = x
    else if (a <= (-4.2d-19)) then
        tmp = t_2
    else if (a <= (-4.2d-278)) then
        tmp = t_1
    else if (a <= 2.3d-275) then
        tmp = t_2
    else if (a <= 1.36d-199) then
        tmp = t_1
    else if (a <= 7.1d+58) then
        tmp = t_2
    else if (a <= 2.6d+116) then
        tmp = (t - x) * (y / a)
    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 - a) / z);
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -7.7e+118) {
		tmp = x;
	} else if (a <= -4.2e-19) {
		tmp = t_2;
	} else if (a <= -4.2e-278) {
		tmp = t_1;
	} else if (a <= 2.3e-275) {
		tmp = t_2;
	} else if (a <= 1.36e-199) {
		tmp = t_1;
	} else if (a <= 7.1e+58) {
		tmp = t_2;
	} else if (a <= 2.6e+116) {
		tmp = (t - x) * (y / a);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = t * (1.0 - (y / z))
	tmp = 0
	if a <= -7.7e+118:
		tmp = x
	elif a <= -4.2e-19:
		tmp = t_2
	elif a <= -4.2e-278:
		tmp = t_1
	elif a <= 2.3e-275:
		tmp = t_2
	elif a <= 1.36e-199:
		tmp = t_1
	elif a <= 7.1e+58:
		tmp = t_2
	elif a <= 2.6e+116:
		tmp = (t - x) * (y / a)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (a <= -7.7e+118)
		tmp = x;
	elseif (a <= -4.2e-19)
		tmp = t_2;
	elseif (a <= -4.2e-278)
		tmp = t_1;
	elseif (a <= 2.3e-275)
		tmp = t_2;
	elseif (a <= 1.36e-199)
		tmp = t_1;
	elseif (a <= 7.1e+58)
		tmp = t_2;
	elseif (a <= 2.6e+116)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (a <= -7.7e+118)
		tmp = x;
	elseif (a <= -4.2e-19)
		tmp = t_2;
	elseif (a <= -4.2e-278)
		tmp = t_1;
	elseif (a <= 2.3e-275)
		tmp = t_2;
	elseif (a <= 1.36e-199)
		tmp = t_1;
	elseif (a <= 7.1e+58)
		tmp = t_2;
	elseif (a <= 2.6e+116)
		tmp = (t - x) * (y / a);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.7e+118], x, If[LessEqual[a, -4.2e-19], t$95$2, If[LessEqual[a, -4.2e-278], t$95$1, If[LessEqual[a, 2.3e-275], t$95$2, If[LessEqual[a, 1.36e-199], t$95$1, If[LessEqual[a, 7.1e+58], t$95$2, If[LessEqual[a, 2.6e+116], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4.2 \cdot 10^{-19}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -4.2 \cdot 10^{-278}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.3 \cdot 10^{-275}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.36 \cdot 10^{-199}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 7.1 \cdot 10^{+58}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.6999999999999997e118 or 2.59999999999999987e116 < a

    1. Initial program 96.3%

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

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

    if -7.6999999999999997e118 < a < -4.1999999999999998e-19 or -4.20000000000000027e-278 < a < 2.2999999999999999e-275 or 1.3600000000000001e-199 < a < 7.10000000000000026e58

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1999999999999998e-19 < a < -4.20000000000000027e-278 or 2.2999999999999999e-275 < a < 1.3600000000000001e-199

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.10000000000000026e58 < a < 2.59999999999999987e116

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.7 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-19}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-278}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-275}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.36 \cdot 10^{-199}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 7.1 \cdot 10^{+58}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+116}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 6: 43.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -5.6 \cdot 10^{-47}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 8 \cdot 10^{-277}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.8 \cdot 10^{+74}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -6.30000000000000002e118 or 1.79999999999999994e74 < a

    1. Initial program 96.4%

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

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

    if -6.30000000000000002e118 < a < -5.59999999999999986e-47 or -4.4000000000000002e-278 < a < 7.99999999999999975e-277 or 4.40000000000000027e-200 < a < 1.79999999999999994e74

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

    if -5.59999999999999986e-47 < a < -4.4000000000000002e-278

    1. Initial program 71.4%

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

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \frac{t}{z} - -1 \cdot \frac{x}{z}\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-out--53.6%

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

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

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

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

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

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

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

    if 7.99999999999999975e-277 < a < 4.40000000000000027e-200

    1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.3 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.6 \cdot 10^{-47}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-278}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-277}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-200}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+74}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 7: 43.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -9.5 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-21}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-278}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-276}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-199}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+67}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z))) (t_2 (* t (- 1.0 (/ y z)))))
   (if (<= a -9.5e+118)
     x
     (if (<= a -4.8e-21)
       t_2
       (if (<= a -4.5e-278)
         t_1
         (if (<= a 9e-276)
           t_2
           (if (<= a 1.05e-199) t_1 (if (<= a 9.5e+67) t_2 x))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -9.5e+118) {
		tmp = x;
	} else if (a <= -4.8e-21) {
		tmp = t_2;
	} else if (a <= -4.5e-278) {
		tmp = t_1;
	} else if (a <= 9e-276) {
		tmp = t_2;
	} else if (a <= 1.05e-199) {
		tmp = t_1;
	} else if (a <= 9.5e+67) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x * ((y - a) / z)
    t_2 = t * (1.0d0 - (y / z))
    if (a <= (-9.5d+118)) then
        tmp = x
    else if (a <= (-4.8d-21)) then
        tmp = t_2
    else if (a <= (-4.5d-278)) then
        tmp = t_1
    else if (a <= 9d-276) then
        tmp = t_2
    else if (a <= 1.05d-199) then
        tmp = t_1
    else if (a <= 9.5d+67) then
        tmp = t_2
    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 - a) / z);
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -9.5e+118) {
		tmp = x;
	} else if (a <= -4.8e-21) {
		tmp = t_2;
	} else if (a <= -4.5e-278) {
		tmp = t_1;
	} else if (a <= 9e-276) {
		tmp = t_2;
	} else if (a <= 1.05e-199) {
		tmp = t_1;
	} else if (a <= 9.5e+67) {
		tmp = t_2;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = t * (1.0 - (y / z))
	tmp = 0
	if a <= -9.5e+118:
		tmp = x
	elif a <= -4.8e-21:
		tmp = t_2
	elif a <= -4.5e-278:
		tmp = t_1
	elif a <= 9e-276:
		tmp = t_2
	elif a <= 1.05e-199:
		tmp = t_1
	elif a <= 9.5e+67:
		tmp = t_2
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (a <= -9.5e+118)
		tmp = x;
	elseif (a <= -4.8e-21)
		tmp = t_2;
	elseif (a <= -4.5e-278)
		tmp = t_1;
	elseif (a <= 9e-276)
		tmp = t_2;
	elseif (a <= 1.05e-199)
		tmp = t_1;
	elseif (a <= 9.5e+67)
		tmp = t_2;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (a <= -9.5e+118)
		tmp = x;
	elseif (a <= -4.8e-21)
		tmp = t_2;
	elseif (a <= -4.5e-278)
		tmp = t_1;
	elseif (a <= 9e-276)
		tmp = t_2;
	elseif (a <= 1.05e-199)
		tmp = t_1;
	elseif (a <= 9.5e+67)
		tmp = t_2;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.5e+118], x, If[LessEqual[a, -4.8e-21], t$95$2, If[LessEqual[a, -4.5e-278], t$95$1, If[LessEqual[a, 9e-276], t$95$2, If[LessEqual[a, 1.05e-199], t$95$1, If[LessEqual[a, 9.5e+67], t$95$2, x]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -4.8 \cdot 10^{-21}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -4.5 \cdot 10^{-278}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 9 \cdot 10^{-276}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-199}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 9.5 \cdot 10^{+67}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.49999999999999974e118 or 9.5000000000000002e67 < a

    1. Initial program 96.4%

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

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

    if -9.49999999999999974e118 < a < -4.7999999999999999e-21 or -4.4999999999999998e-278 < a < 8.99999999999999925e-276 or 1.05000000000000001e-199 < a < 9.5000000000000002e67

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.7999999999999999e-21 < a < -4.4999999999999998e-278 or 8.99999999999999925e-276 < a < 1.05000000000000001e-199

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-21}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -4.5 \cdot 10^{-278}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-276}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-199}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+67}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 49.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ t_2 := x + \frac{t}{\frac{a}{y}}\\ t_3 := x \cdot \frac{y - a}{z}\\ \mathbf{if}\;a \leq -6.2 \cdot 10^{+118}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-13}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-278}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-278}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-201}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ y z))))
        (t_2 (+ x (/ t (/ a y))))
        (t_3 (* x (/ (- y a) z))))
   (if (<= a -6.2e+118)
     t_2
     (if (<= a -2e-13)
       t_1
       (if (<= a -4.7e-278)
         t_3
         (if (<= a 2.5e-278)
           t_1
           (if (<= a 5e-201) t_3 (if (<= a 2.9e+57) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double t_2 = x + (t / (a / y));
	double t_3 = x * ((y - a) / z);
	double tmp;
	if (a <= -6.2e+118) {
		tmp = t_2;
	} else if (a <= -2e-13) {
		tmp = t_1;
	} else if (a <= -4.7e-278) {
		tmp = t_3;
	} else if (a <= 2.5e-278) {
		tmp = t_1;
	} else if (a <= 5e-201) {
		tmp = t_3;
	} else if (a <= 2.9e+57) {
		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) :: t_3
    real(8) :: tmp
    t_1 = t * (1.0d0 - (y / z))
    t_2 = x + (t / (a / y))
    t_3 = x * ((y - a) / z)
    if (a <= (-6.2d+118)) then
        tmp = t_2
    else if (a <= (-2d-13)) then
        tmp = t_1
    else if (a <= (-4.7d-278)) then
        tmp = t_3
    else if (a <= 2.5d-278) then
        tmp = t_1
    else if (a <= 5d-201) then
        tmp = t_3
    else if (a <= 2.9d+57) 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 * (1.0 - (y / z));
	double t_2 = x + (t / (a / y));
	double t_3 = x * ((y - a) / z);
	double tmp;
	if (a <= -6.2e+118) {
		tmp = t_2;
	} else if (a <= -2e-13) {
		tmp = t_1;
	} else if (a <= -4.7e-278) {
		tmp = t_3;
	} else if (a <= 2.5e-278) {
		tmp = t_1;
	} else if (a <= 5e-201) {
		tmp = t_3;
	} else if (a <= 2.9e+57) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	t_2 = x + (t / (a / y))
	t_3 = x * ((y - a) / z)
	tmp = 0
	if a <= -6.2e+118:
		tmp = t_2
	elif a <= -2e-13:
		tmp = t_1
	elif a <= -4.7e-278:
		tmp = t_3
	elif a <= 2.5e-278:
		tmp = t_1
	elif a <= 5e-201:
		tmp = t_3
	elif a <= 2.9e+57:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 - Float64(y / z)))
	t_2 = Float64(x + Float64(t / Float64(a / y)))
	t_3 = Float64(x * Float64(Float64(y - a) / z))
	tmp = 0.0
	if (a <= -6.2e+118)
		tmp = t_2;
	elseif (a <= -2e-13)
		tmp = t_1;
	elseif (a <= -4.7e-278)
		tmp = t_3;
	elseif (a <= 2.5e-278)
		tmp = t_1;
	elseif (a <= 5e-201)
		tmp = t_3;
	elseif (a <= 2.9e+57)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 - (y / z));
	t_2 = x + (t / (a / y));
	t_3 = x * ((y - a) / z);
	tmp = 0.0;
	if (a <= -6.2e+118)
		tmp = t_2;
	elseif (a <= -2e-13)
		tmp = t_1;
	elseif (a <= -4.7e-278)
		tmp = t_3;
	elseif (a <= 2.5e-278)
		tmp = t_1;
	elseif (a <= 5e-201)
		tmp = t_3;
	elseif (a <= 2.9e+57)
		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[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.2e+118], t$95$2, If[LessEqual[a, -2e-13], t$95$1, If[LessEqual[a, -4.7e-278], t$95$3, If[LessEqual[a, 2.5e-278], t$95$1, If[LessEqual[a, 5e-201], t$95$3, If[LessEqual[a, 2.9e+57], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -4.7 \cdot 10^{-278}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 2.5 \cdot 10^{-278}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 5 \cdot 10^{-201}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 2.9 \cdot 10^{+57}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.19999999999999973e118 or 2.9000000000000002e57 < a

    1. Initial program 96.5%

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    5. Simplified69.4%

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

    if -6.19999999999999973e118 < a < -2.0000000000000001e-13 or -4.6999999999999997e-278 < a < 2.49999999999999992e-278 or 4.9999999999999999e-201 < a < 2.9000000000000002e57

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e-13 < a < -4.6999999999999997e-278 or 2.49999999999999992e-278 < a < 4.9999999999999999e-201

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+118}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-13}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -4.7 \cdot 10^{-278}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-278}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-201}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+57}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]

Alternative 9: 49.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ t_2 := x + \frac{t}{\frac{a}{y}}\\ \mathbf{if}\;a \leq -6 \cdot 10^{+118}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-278}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-275}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-201}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+57}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ y z)))) (t_2 (+ x (/ t (/ a y)))))
   (if (<= a -6e+118)
     t_2
     (if (<= a -3.2e-20)
       t_1
       (if (<= a -3.8e-278)
         (/ x (/ z (- y a)))
         (if (<= a 2.3e-275)
           t_1
           (if (<= a 6.8e-201)
             (* x (/ (- y a) z))
             (if (<= a 2.8e+57) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double t_2 = x + (t / (a / y));
	double tmp;
	if (a <= -6e+118) {
		tmp = t_2;
	} else if (a <= -3.2e-20) {
		tmp = t_1;
	} else if (a <= -3.8e-278) {
		tmp = x / (z / (y - a));
	} else if (a <= 2.3e-275) {
		tmp = t_1;
	} else if (a <= 6.8e-201) {
		tmp = x * ((y - a) / z);
	} else if (a <= 2.8e+57) {
		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 * (1.0d0 - (y / z))
    t_2 = x + (t / (a / y))
    if (a <= (-6d+118)) then
        tmp = t_2
    else if (a <= (-3.2d-20)) then
        tmp = t_1
    else if (a <= (-3.8d-278)) then
        tmp = x / (z / (y - a))
    else if (a <= 2.3d-275) then
        tmp = t_1
    else if (a <= 6.8d-201) then
        tmp = x * ((y - a) / z)
    else if (a <= 2.8d+57) 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 * (1.0 - (y / z));
	double t_2 = x + (t / (a / y));
	double tmp;
	if (a <= -6e+118) {
		tmp = t_2;
	} else if (a <= -3.2e-20) {
		tmp = t_1;
	} else if (a <= -3.8e-278) {
		tmp = x / (z / (y - a));
	} else if (a <= 2.3e-275) {
		tmp = t_1;
	} else if (a <= 6.8e-201) {
		tmp = x * ((y - a) / z);
	} else if (a <= 2.8e+57) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	t_2 = x + (t / (a / y))
	tmp = 0
	if a <= -6e+118:
		tmp = t_2
	elif a <= -3.2e-20:
		tmp = t_1
	elif a <= -3.8e-278:
		tmp = x / (z / (y - a))
	elif a <= 2.3e-275:
		tmp = t_1
	elif a <= 6.8e-201:
		tmp = x * ((y - a) / z)
	elif a <= 2.8e+57:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 - Float64(y / z)))
	t_2 = Float64(x + Float64(t / Float64(a / y)))
	tmp = 0.0
	if (a <= -6e+118)
		tmp = t_2;
	elseif (a <= -3.2e-20)
		tmp = t_1;
	elseif (a <= -3.8e-278)
		tmp = Float64(x / Float64(z / Float64(y - a)));
	elseif (a <= 2.3e-275)
		tmp = t_1;
	elseif (a <= 6.8e-201)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (a <= 2.8e+57)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 - (y / z));
	t_2 = x + (t / (a / y));
	tmp = 0.0;
	if (a <= -6e+118)
		tmp = t_2;
	elseif (a <= -3.2e-20)
		tmp = t_1;
	elseif (a <= -3.8e-278)
		tmp = x / (z / (y - a));
	elseif (a <= 2.3e-275)
		tmp = t_1;
	elseif (a <= 6.8e-201)
		tmp = x * ((y - a) / z);
	elseif (a <= 2.8e+57)
		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[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6e+118], t$95$2, If[LessEqual[a, -3.2e-20], t$95$1, If[LessEqual[a, -3.8e-278], N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.3e-275], t$95$1, If[LessEqual[a, 6.8e-201], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e+57], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-20}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.3 \cdot 10^{-275}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.8 \cdot 10^{+57}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -6e118 or 2.8e57 < a

    1. Initial program 96.5%

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    5. Simplified69.4%

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

    if -6e118 < a < -3.1999999999999997e-20 or -3.7999999999999999e-278 < a < 2.2999999999999999e-275 or 6.7999999999999997e-201 < a < 2.8e57

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1999999999999997e-20 < a < -3.7999999999999999e-278

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.2999999999999999e-275 < a < 6.7999999999999997e-201

    1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{+118}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-20}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-278}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-275}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{-201}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+57}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]

Alternative 10: 62.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + \frac{t}{\frac{a}{y}}\\ \mathbf{if}\;a \leq -6.2 \cdot 10^{+118}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-83}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-127}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (/ t (/ a y)))))
   (if (<= a -6.2e+118)
     t_2
     (if (<= a -8.6e-46)
       t_1
       (if (<= a -1.65e-83)
         (* (- t x) (/ y (- a z)))
         (if (<= a 1.35e-127)
           (+ t (* x (/ y z)))
           (if (<= a 1.5e+76) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + (t / (a / y));
	double tmp;
	if (a <= -6.2e+118) {
		tmp = t_2;
	} else if (a <= -8.6e-46) {
		tmp = t_1;
	} else if (a <= -1.65e-83) {
		tmp = (t - x) * (y / (a - z));
	} else if (a <= 1.35e-127) {
		tmp = t + (x * (y / z));
	} else if (a <= 1.5e+76) {
		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 * ((y - z) / (a - z))
    t_2 = x + (t / (a / y))
    if (a <= (-6.2d+118)) then
        tmp = t_2
    else if (a <= (-8.6d-46)) then
        tmp = t_1
    else if (a <= (-1.65d-83)) then
        tmp = (t - x) * (y / (a - z))
    else if (a <= 1.35d-127) then
        tmp = t + (x * (y / z))
    else if (a <= 1.5d+76) 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 * ((y - z) / (a - z));
	double t_2 = x + (t / (a / y));
	double tmp;
	if (a <= -6.2e+118) {
		tmp = t_2;
	} else if (a <= -8.6e-46) {
		tmp = t_1;
	} else if (a <= -1.65e-83) {
		tmp = (t - x) * (y / (a - z));
	} else if (a <= 1.35e-127) {
		tmp = t + (x * (y / z));
	} else if (a <= 1.5e+76) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + (t / (a / y))
	tmp = 0
	if a <= -6.2e+118:
		tmp = t_2
	elif a <= -8.6e-46:
		tmp = t_1
	elif a <= -1.65e-83:
		tmp = (t - x) * (y / (a - z))
	elif a <= 1.35e-127:
		tmp = t + (x * (y / z))
	elif a <= 1.5e+76:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x + Float64(t / Float64(a / y)))
	tmp = 0.0
	if (a <= -6.2e+118)
		tmp = t_2;
	elseif (a <= -8.6e-46)
		tmp = t_1;
	elseif (a <= -1.65e-83)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	elseif (a <= 1.35e-127)
		tmp = Float64(t + Float64(x * Float64(y / z)));
	elseif (a <= 1.5e+76)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x + (t / (a / y));
	tmp = 0.0;
	if (a <= -6.2e+118)
		tmp = t_2;
	elseif (a <= -8.6e-46)
		tmp = t_1;
	elseif (a <= -1.65e-83)
		tmp = (t - x) * (y / (a - z));
	elseif (a <= 1.35e-127)
		tmp = t + (x * (y / z));
	elseif (a <= 1.5e+76)
		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[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.2e+118], t$95$2, If[LessEqual[a, -8.6e-46], t$95$1, If[LessEqual[a, -1.65e-83], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e-127], N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.5e+76], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -8.6 \cdot 10^{-46}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;a \leq 1.5 \cdot 10^{+76}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -6.19999999999999973e118 or 1.4999999999999999e76 < a

    1. Initial program 96.4%

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    5. Simplified69.2%

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

    if -6.19999999999999973e118 < a < -8.6000000000000007e-46 or 1.35e-127 < a < 1.4999999999999999e76

    1. Initial program 75.3%

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

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

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

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

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

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

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

    if -8.6000000000000007e-46 < a < -1.65e-83

    1. Initial program 64.8%

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

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

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

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

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

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

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

    if -1.65e-83 < a < 1.35e-127

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+118}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-46}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-83}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-127}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+76}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]

Alternative 11: 62.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + \frac{t}{\frac{a}{y}}\\ \mathbf{if}\;a \leq -7.4 \cdot 10^{+118}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-84}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-127}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{+72}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (/ t (/ a y)))))
   (if (<= a -7.4e+118)
     t_2
     (if (<= a -9.6e-46)
       t_1
       (if (<= a -9.6e-84)
         (* y (/ (- t x) (- a z)))
         (if (<= a 1.35e-127)
           (+ t (* x (/ y z)))
           (if (<= a 4.4e+72) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + (t / (a / y));
	double tmp;
	if (a <= -7.4e+118) {
		tmp = t_2;
	} else if (a <= -9.6e-46) {
		tmp = t_1;
	} else if (a <= -9.6e-84) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 1.35e-127) {
		tmp = t + (x * (y / z));
	} else if (a <= 4.4e+72) {
		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 * ((y - z) / (a - z))
    t_2 = x + (t / (a / y))
    if (a <= (-7.4d+118)) then
        tmp = t_2
    else if (a <= (-9.6d-46)) then
        tmp = t_1
    else if (a <= (-9.6d-84)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 1.35d-127) then
        tmp = t + (x * (y / z))
    else if (a <= 4.4d+72) 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 * ((y - z) / (a - z));
	double t_2 = x + (t / (a / y));
	double tmp;
	if (a <= -7.4e+118) {
		tmp = t_2;
	} else if (a <= -9.6e-46) {
		tmp = t_1;
	} else if (a <= -9.6e-84) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 1.35e-127) {
		tmp = t + (x * (y / z));
	} else if (a <= 4.4e+72) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + (t / (a / y))
	tmp = 0
	if a <= -7.4e+118:
		tmp = t_2
	elif a <= -9.6e-46:
		tmp = t_1
	elif a <= -9.6e-84:
		tmp = y * ((t - x) / (a - z))
	elif a <= 1.35e-127:
		tmp = t + (x * (y / z))
	elif a <= 4.4e+72:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x + Float64(t / Float64(a / y)))
	tmp = 0.0
	if (a <= -7.4e+118)
		tmp = t_2;
	elseif (a <= -9.6e-46)
		tmp = t_1;
	elseif (a <= -9.6e-84)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 1.35e-127)
		tmp = Float64(t + Float64(x * Float64(y / z)));
	elseif (a <= 4.4e+72)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x + (t / (a / y));
	tmp = 0.0;
	if (a <= -7.4e+118)
		tmp = t_2;
	elseif (a <= -9.6e-46)
		tmp = t_1;
	elseif (a <= -9.6e-84)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 1.35e-127)
		tmp = t + (x * (y / z));
	elseif (a <= 4.4e+72)
		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[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.4e+118], t$95$2, If[LessEqual[a, -9.6e-46], t$95$1, If[LessEqual[a, -9.6e-84], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e-127], N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.4e+72], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -9.6 \cdot 10^{-46}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;a \leq 4.4 \cdot 10^{+72}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.39999999999999973e118 or 4.4e72 < a

    1. Initial program 96.4%

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    5. Simplified69.2%

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

    if -7.39999999999999973e118 < a < -9.60000000000000053e-46 or 1.35e-127 < a < 4.4e72

    1. Initial program 75.3%

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

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

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

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

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

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

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

    if -9.60000000000000053e-46 < a < -9.6000000000000007e-84

    1. Initial program 64.8%

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      4. sub-div82.9%

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

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

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

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

    if -9.6000000000000007e-84 < a < 1.35e-127

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.4 \cdot 10^{+118}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-46}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -9.6 \cdot 10^{-84}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-127}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{+72}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]

Alternative 12: 64.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{if}\;a \leq -1.6 \cdot 10^{+119}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-83}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-127}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{+64}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (/ y (/ a (- t x))))))
   (if (<= a -1.6e+119)
     t_2
     (if (<= a -3.5e-46)
       t_1
       (if (<= a -1.05e-83)
         (* y (/ (- t x) (- a z)))
         (if (<= a 1.3e-127)
           (+ t (* x (/ y z)))
           (if (<= a 4.9e+64) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + (y / (a / (t - x)));
	double tmp;
	if (a <= -1.6e+119) {
		tmp = t_2;
	} else if (a <= -3.5e-46) {
		tmp = t_1;
	} else if (a <= -1.05e-83) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 1.3e-127) {
		tmp = t + (x * (y / z));
	} else if (a <= 4.9e+64) {
		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 * ((y - z) / (a - z))
    t_2 = x + (y / (a / (t - x)))
    if (a <= (-1.6d+119)) then
        tmp = t_2
    else if (a <= (-3.5d-46)) then
        tmp = t_1
    else if (a <= (-1.05d-83)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 1.3d-127) then
        tmp = t + (x * (y / z))
    else if (a <= 4.9d+64) 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 * ((y - z) / (a - z));
	double t_2 = x + (y / (a / (t - x)));
	double tmp;
	if (a <= -1.6e+119) {
		tmp = t_2;
	} else if (a <= -3.5e-46) {
		tmp = t_1;
	} else if (a <= -1.05e-83) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 1.3e-127) {
		tmp = t + (x * (y / z));
	} else if (a <= 4.9e+64) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + (y / (a / (t - x)))
	tmp = 0
	if a <= -1.6e+119:
		tmp = t_2
	elif a <= -3.5e-46:
		tmp = t_1
	elif a <= -1.05e-83:
		tmp = y * ((t - x) / (a - z))
	elif a <= 1.3e-127:
		tmp = t + (x * (y / z))
	elif a <= 4.9e+64:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x + Float64(y / Float64(a / Float64(t - x))))
	tmp = 0.0
	if (a <= -1.6e+119)
		tmp = t_2;
	elseif (a <= -3.5e-46)
		tmp = t_1;
	elseif (a <= -1.05e-83)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 1.3e-127)
		tmp = Float64(t + Float64(x * Float64(y / z)));
	elseif (a <= 4.9e+64)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x + (y / (a / (t - x)));
	tmp = 0.0;
	if (a <= -1.6e+119)
		tmp = t_2;
	elseif (a <= -3.5e-46)
		tmp = t_1;
	elseif (a <= -1.05e-83)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 1.3e-127)
		tmp = t + (x * (y / z));
	elseif (a <= 4.9e+64)
		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[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.6e+119], t$95$2, If[LessEqual[a, -3.5e-46], t$95$1, If[LessEqual[a, -1.05e-83], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e-127], N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.9e+64], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -3.5 \cdot 10^{-46}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;a \leq 4.9 \cdot 10^{+64}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.59999999999999995e119 or 4.9000000000000003e64 < a

    1. Initial program 96.4%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    4. Simplified76.2%

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

    if -1.59999999999999995e119 < a < -3.5000000000000002e-46 or 1.29999999999999995e-127 < a < 4.9000000000000003e64

    1. Initial program 75.3%

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

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

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

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

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

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

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

    if -3.5000000000000002e-46 < a < -1.0499999999999999e-83

    1. Initial program 64.8%

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      4. sub-div82.9%

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

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

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

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

    if -1.0499999999999999e-83 < a < 1.29999999999999995e-127

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+119}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-46}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-83}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-127}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{+64}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 13: 65.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -6.5 \cdot 10^{-46}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;a \leq 1.06 \cdot 10^{+68}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -6e118

    1. Initial program 97.3%

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

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

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

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

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

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

    if -6e118 < a < -6.49999999999999966e-46 or 1.2799999999999999e-127 < a < 1.06e68

    1. Initial program 75.3%

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

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

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

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

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

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

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

    if -6.49999999999999966e-46 < a < -3.85e-84

    1. Initial program 64.8%

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      4. sub-div82.9%

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

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

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

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

    if -3.85e-84 < a < 1.2799999999999999e-127

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.06e68 < a

    1. Initial program 95.8%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    4. Simplified75.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{+118}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-46}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -3.85 \cdot 10^{-84}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.28 \cdot 10^{-127}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.06 \cdot 10^{+68}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 14: 72.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - z}{\frac{a}{t - x}}\\ \mathbf{if}\;a \leq -3.4 \cdot 10^{+125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-46}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-83}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+57}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (- y z) (/ a (- t x))))))
   (if (<= a -3.4e+125)
     t_1
     (if (<= a -1.3e-46)
       (/ t (/ (- a z) (- y z)))
       (if (<= a -4.8e-83)
         (* y (/ (- t x) (- a z)))
         (if (<= a 2.8e+57) (+ t (/ (- x t) (/ z y))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) / (a / (t - x)));
	double tmp;
	if (a <= -3.4e+125) {
		tmp = t_1;
	} else if (a <= -1.3e-46) {
		tmp = t / ((a - z) / (y - z));
	} else if (a <= -4.8e-83) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 2.8e+57) {
		tmp = t + ((x - t) / (z / y));
	} 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 = x + ((y - z) / (a / (t - x)))
    if (a <= (-3.4d+125)) then
        tmp = t_1
    else if (a <= (-1.3d-46)) then
        tmp = t / ((a - z) / (y - z))
    else if (a <= (-4.8d-83)) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 2.8d+57) then
        tmp = t + ((x - t) / (z / y))
    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 = x + ((y - z) / (a / (t - x)));
	double tmp;
	if (a <= -3.4e+125) {
		tmp = t_1;
	} else if (a <= -1.3e-46) {
		tmp = t / ((a - z) / (y - z));
	} else if (a <= -4.8e-83) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 2.8e+57) {
		tmp = t + ((x - t) / (z / y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) / (a / (t - x)))
	tmp = 0
	if a <= -3.4e+125:
		tmp = t_1
	elif a <= -1.3e-46:
		tmp = t / ((a - z) / (y - z))
	elif a <= -4.8e-83:
		tmp = y * ((t - x) / (a - z))
	elif a <= 2.8e+57:
		tmp = t + ((x - t) / (z / y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x))))
	tmp = 0.0
	if (a <= -3.4e+125)
		tmp = t_1;
	elseif (a <= -1.3e-46)
		tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z)));
	elseif (a <= -4.8e-83)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 2.8e+57)
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / y)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) / (a / (t - x)));
	tmp = 0.0;
	if (a <= -3.4e+125)
		tmp = t_1;
	elseif (a <= -1.3e-46)
		tmp = t / ((a - z) / (y - z));
	elseif (a <= -4.8e-83)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 2.8e+57)
		tmp = t + ((x - t) / (z / y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.4e+125], t$95$1, If[LessEqual[a, -1.3e-46], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.8e-83], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e+57], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.3999999999999999e125 or 2.8e57 < a

    1. Initial program 96.5%

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

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

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

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

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

    if -3.3999999999999999e125 < a < -1.3000000000000001e-46

    1. Initial program 75.6%

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

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

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

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

    if -1.3000000000000001e-46 < a < -4.8000000000000002e-83

    1. Initial program 64.8%

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      4. sub-div82.9%

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

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

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

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

    if -4.8000000000000002e-83 < a < 2.8e57

    1. Initial program 70.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{+125}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-46}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-83}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+57}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 15: 62.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + \frac{t}{\frac{a}{y}}\\ \mathbf{if}\;a \leq -8.6 \cdot 10^{+120}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.02 \cdot 10^{-44}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-127}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{+73}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (/ t (/ a y)))))
   (if (<= a -8.6e+120)
     t_2
     (if (<= a -1.02e-44)
       t_1
       (if (<= a 1.25e-127)
         (+ t (* x (/ y z)))
         (if (<= a 2.55e+73) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + (t / (a / y));
	double tmp;
	if (a <= -8.6e+120) {
		tmp = t_2;
	} else if (a <= -1.02e-44) {
		tmp = t_1;
	} else if (a <= 1.25e-127) {
		tmp = t + (x * (y / z));
	} else if (a <= 2.55e+73) {
		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 * ((y - z) / (a - z))
    t_2 = x + (t / (a / y))
    if (a <= (-8.6d+120)) then
        tmp = t_2
    else if (a <= (-1.02d-44)) then
        tmp = t_1
    else if (a <= 1.25d-127) then
        tmp = t + (x * (y / z))
    else if (a <= 2.55d+73) 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 * ((y - z) / (a - z));
	double t_2 = x + (t / (a / y));
	double tmp;
	if (a <= -8.6e+120) {
		tmp = t_2;
	} else if (a <= -1.02e-44) {
		tmp = t_1;
	} else if (a <= 1.25e-127) {
		tmp = t + (x * (y / z));
	} else if (a <= 2.55e+73) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + (t / (a / y))
	tmp = 0
	if a <= -8.6e+120:
		tmp = t_2
	elif a <= -1.02e-44:
		tmp = t_1
	elif a <= 1.25e-127:
		tmp = t + (x * (y / z))
	elif a <= 2.55e+73:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x + Float64(t / Float64(a / y)))
	tmp = 0.0
	if (a <= -8.6e+120)
		tmp = t_2;
	elseif (a <= -1.02e-44)
		tmp = t_1;
	elseif (a <= 1.25e-127)
		tmp = Float64(t + Float64(x * Float64(y / z)));
	elseif (a <= 2.55e+73)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x + (t / (a / y));
	tmp = 0.0;
	if (a <= -8.6e+120)
		tmp = t_2;
	elseif (a <= -1.02e-44)
		tmp = t_1;
	elseif (a <= 1.25e-127)
		tmp = t + (x * (y / z));
	elseif (a <= 2.55e+73)
		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[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.6e+120], t$95$2, If[LessEqual[a, -1.02e-44], t$95$1, If[LessEqual[a, 1.25e-127], N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.55e+73], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.02 \cdot 10^{-44}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.55 \cdot 10^{+73}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.6000000000000003e120 or 2.55000000000000012e73 < a

    1. Initial program 96.4%

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    5. Simplified69.2%

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

    if -8.6000000000000003e120 < a < -1.0199999999999999e-44 or 1.2499999999999999e-127 < a < 2.55000000000000012e73

    1. Initial program 74.9%

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

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

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

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

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

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

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

    if -1.0199999999999999e-44 < a < 1.2499999999999999e-127

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.6 \cdot 10^{+120}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -1.02 \cdot 10^{-44}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-127}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{+73}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]

Alternative 16: 69.6% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -4.19999999999999966e119

    1. Initial program 97.3%

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

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

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

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

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

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

    if -4.19999999999999966e119 < a < -7.9999999999999998e-47

    1. Initial program 74.8%

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

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

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

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

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

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

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

    if -7.9999999999999998e-47 < a < -3.3999999999999998e-83

    1. Initial program 64.8%

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      4. sub-div82.9%

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

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

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

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

    if -3.3999999999999998e-83 < a < 5.59999999999999999e57

    1. Initial program 70.2%

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

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

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

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

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

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

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

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

    if 5.59999999999999999e57 < a

    1. Initial program 96.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    4. Simplified75.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{+119}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-47}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -3.4 \cdot 10^{-83}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+57}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 17: 69.6% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.3999999999999999e125

    1. Initial program 97.2%

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

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

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

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

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

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

    if -3.3999999999999999e125 < a < -6.00000000000000033e-47

    1. Initial program 75.6%

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

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

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

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

    if -6.00000000000000033e-47 < a < -4.8000000000000002e-83

    1. Initial program 64.8%

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      4. sub-div82.9%

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

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

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

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

    if -4.8000000000000002e-83 < a < 1.14e58

    1. Initial program 70.2%

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

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

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

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

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

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

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

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

    if 1.14e58 < a

    1. Initial program 96.1%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    4. Simplified75.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{+125}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -6 \cdot 10^{-47}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-83}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.14 \cdot 10^{+58}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 18: 73.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{+118} \lor \neg \left(a \leq 1.24 \cdot 10^{+58}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6e118 or 1.24000000000000005e58 < a

    1. Initial program 96.5%

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

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

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

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

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

    if -6e118 < a < 1.24000000000000005e58

    1. Initial program 70.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 72.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+72.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--72.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-sub74.1%

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

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

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

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

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

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

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

Alternative 19: 37.4% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -5.3 \cdot 10^{-46}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.36 \cdot 10^{+58}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.3999999999999999e125 or 1.35999999999999997e58 < a

    1. Initial program 96.5%

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

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

    if -3.3999999999999999e125 < a < -5.30000000000000018e-46 or 2.29999999999999986e-201 < a < 1.35999999999999997e58

    1. Initial program 73.7%

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

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

    if -5.30000000000000018e-46 < a < 2.29999999999999986e-201

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    8. Simplified50.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{+125}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.3 \cdot 10^{-46}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-201}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.36 \cdot 10^{+58}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 20: 37.4% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -2.3 \cdot 10^{-46}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 3.5 \cdot 10^{+57}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.3999999999999999e125 or 3.4999999999999997e57 < a

    1. Initial program 96.5%

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

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

    if -3.3999999999999999e125 < a < -2.2999999999999999e-46 or 1.22000000000000009e-201 < a < 3.4999999999999997e57

    1. Initial program 73.7%

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

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

    if -2.2999999999999999e-46 < a < 1.22000000000000009e-201

    1. Initial program 67.4%

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

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \frac{t}{z} - -1 \cdot \frac{x}{z}\right)} \]
    4. Step-by-step derivation
      1. distribute-lft-out--55.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    8. Simplified51.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{+125}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-46}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{-201}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+57}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 21: 58.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{+118} \lor \neg \left(a \leq 4.5 \cdot 10^{+57}\right):\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6e118 or 4.49999999999999996e57 < a

    1. Initial program 96.5%

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    5. Simplified69.4%

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

    if -6e118 < a < 4.49999999999999996e57

    1. Initial program 70.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 72.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+72.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--72.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-sub74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 22: 38.2% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 1.2 \cdot 10^{+58}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.3999999999999999e125 or 1.2e58 < a

    1. Initial program 96.5%

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

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

    if -3.3999999999999999e125 < a < 1.2e58

    1. Initial program 70.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{+125}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+58}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 23: 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.4%

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

    \[\leadsto \color{blue}{t} \]
  3. Final simplification27.0%

    \[\leadsto t \]

Reproduce

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