Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.3% → 95.5%
Time: 19.6s
Alternatives: 21
Speedup: 0.8×

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 21 alternatives:

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

Initial Program: 80.3% 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: 95.5% accurate, 0.2× speedup?

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

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

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

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

\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)))) < -4e-263 or 5.00000000000000024e56 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

    1. Initial program 4.0%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative79.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} \]
      2. associate--l+79.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)} \]
      3. associate-*r/79.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity80.0%

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

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

      \[\leadsto t - \color{blue}{1 \cdot \frac{t - x}{\frac{z}{y - a}}} \]
    7. Step-by-step derivation
      1. *-lft-identity99.4%

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

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

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

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

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

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

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

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

    1. Initial program 74.3%

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

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

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

Alternative 2: 70.4% accurate, 0.7× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 6.4 \cdot 10^{+174}:\\
\;\;\;\;x + \frac{x - t}{-1 + \frac{a}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.60000000000000023e75 or 6.4000000000000001e174 < a

    1. Initial program 88.6%

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

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

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

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

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

    if -5.60000000000000023e75 < a < 5.5e9

    1. Initial program 66.1%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative72.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} \]
      2. 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)} \]
      3. associate-*r/72.2%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \color{blue}{1 \cdot \frac{t - x}{\frac{z}{y - a}}} \]
    7. Step-by-step derivation
      1. *-lft-identity82.6%

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

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

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

    if 5.5e9 < a < 1.0399999999999999e83

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

    if 1.0399999999999999e83 < a < 6.4000000000000001e174

    1. Initial program 82.8%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t - x}{\frac{a - z}{z}}} \]
      5. div-sub82.7%

        \[\leadsto x - \frac{t - x}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      6. *-inverses82.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+75}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 5500000000:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.04 \cdot 10^{+83}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+174}:\\ \;\;\;\;x + \frac{x - t}{-1 + \frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 3: 71.3% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.7999999999999997e75 or 3.19999999999999985e172 < a

    1. Initial program 88.6%

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

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

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

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

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

    if -5.7999999999999997e75 < a < 1.45e9

    1. Initial program 66.1%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative72.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} \]
      2. 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)} \]
      3. associate-*r/72.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \left(-\color{blue}{\frac{t - x}{\frac{z}{y - a}}}\right) \]
    6. Applied egg-rr82.6%

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

    if 1.45e9 < a < 7.00000000000000001e91

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

    if 7.00000000000000001e91 < a < 3.19999999999999985e172

    1. Initial program 82.8%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t - x}{\frac{a - z}{z}}} \]
      5. div-sub82.7%

        \[\leadsto x - \frac{t - x}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      6. *-inverses82.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+75}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 1450000000:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+91}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+172}:\\ \;\;\;\;x + \frac{x - t}{-1 + \frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 4: 48.0% accurate, 0.7× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -5.7999999999999997e75 or 8.6000000000000005e155 < a

    1. Initial program 88.0%

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

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

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

    if -5.7999999999999997e75 < a < 4.4000000000000002e-116

    1. Initial program 64.8%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative75.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} \]
      2. associate--l+75.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)} \]
      3. associate-*r/75.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity77.8%

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

        \[\leadsto t - 1 \cdot \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Applied egg-rr84.1%

      \[\leadsto t - \color{blue}{1 \cdot \frac{t - x}{\frac{z}{y - a}}} \]
    7. Step-by-step derivation
      1. *-lft-identity84.1%

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

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

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

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

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

    if 4.4000000000000002e-116 < a < 3.1e8

    1. Initial program 72.1%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative57.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} \]
      2. associate--l+57.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)} \]
      3. associate-*r/57.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) \]
      4. associate-*r/57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.1e8 < a < 2.7000000000000001e129

    1. Initial program 91.2%

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

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

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

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

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

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

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

    if 2.7000000000000001e129 < a < 8.6000000000000005e155

    1. Initial program 67.7%

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(-\frac{z}{a - z}\right)} \]
      2. distribute-neg-frac83.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+75}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-116}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq 310000000:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+129}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{+155}:\\ \;\;\;\;t \cdot \frac{-z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]

Alternative 5: 50.0% accurate, 0.7× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -5.7999999999999997e75 or 2.2999999999999999e156 < a

    1. Initial program 88.0%

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

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

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

    if -5.7999999999999997e75 < a < 3.30000000000000001e-116

    1. Initial program 64.8%

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

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

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

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

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

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

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

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

    if 3.30000000000000001e-116 < a < 2.4e5

    1. Initial program 72.1%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative57.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} \]
      2. associate--l+57.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)} \]
      3. associate-*r/57.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) \]
      4. associate-*r/57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4e5 < a < 2.7000000000000001e129

    1. Initial program 91.2%

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

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

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

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

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

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

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

    if 2.7000000000000001e129 < a < 2.2999999999999999e156

    1. Initial program 67.7%

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(-\frac{z}{a - z}\right)} \]
      2. distribute-neg-frac83.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+75}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-116}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 240000:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+129}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+156}:\\ \;\;\;\;t \cdot \frac{-z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]

Alternative 6: 58.9% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 1.55:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.29999999999999995e83 or 2.4000000000000002e50 < z

    1. Initial program 54.2%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative62.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} \]
      2. associate--l+62.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)} \]
      3. associate-*r/62.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) \]
      4. associate-*r/62.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto t - 1 \cdot \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Applied egg-rr85.7%

      \[\leadsto t - \color{blue}{1 \cdot \frac{t - x}{\frac{z}{y - a}}} \]
    7. Step-by-step derivation
      1. *-lft-identity85.7%

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999995e83 < z < -2.3e-144

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

    if -2.3e-144 < z < 3.8000000000000002e-56

    1. Initial program 93.7%

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

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

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

    if 3.8000000000000002e-56 < z < 1.55000000000000004

    1. Initial program 83.7%

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

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

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

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

    if 1.55000000000000004 < z < 2.4000000000000002e50

    1. Initial program 93.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+83}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-144}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-56}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.55:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+50}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 7: 66.0% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 1.25:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.7999999999999999e83 or 2.7999999999999998e50 < z

    1. Initial program 54.2%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative62.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} \]
      2. associate--l+62.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)} \]
      3. associate-*r/62.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) \]
      4. associate-*r/62.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto t - 1 \cdot \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Applied egg-rr85.7%

      \[\leadsto t - \color{blue}{1 \cdot \frac{t - x}{\frac{z}{y - a}}} \]
    7. Step-by-step derivation
      1. *-lft-identity85.7%

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

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

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

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

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

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

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

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

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

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

    if -1.7999999999999999e83 < z < -9.50000000000000025e-102

    1. Initial program 88.3%

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

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

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

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

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

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

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

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

    if -9.50000000000000025e-102 < z < 3.09999999999999997e-55

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

    if 3.09999999999999997e-55 < z < 1.25

    1. Initial program 83.7%

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

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

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

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

    if 1.25 < z < 2.7999999999999998e50

    1. Initial program 93.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+83}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-102}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-55}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.25:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+50}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 8: 56.1% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -6.4999999999999998e75 or 8.99999999999999947e155 < a

    1. Initial program 88.0%

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

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

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

    if -6.4999999999999998e75 < a < 1.26e29

    1. Initial program 66.3%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative70.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} \]
      2. associate--l+70.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)} \]
      3. associate-*r/70.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - 1 \cdot \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Applied egg-rr81.1%

      \[\leadsto t - \color{blue}{1 \cdot \frac{t - x}{\frac{z}{y - a}}} \]
    7. Step-by-step derivation
      1. *-lft-identity81.1%

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

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

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

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

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

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

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

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

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

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

    if 1.26e29 < a < 1.90000000000000003e129

    1. Initial program 94.5%

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

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

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

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

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

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

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

    if 1.90000000000000003e129 < a < 8.99999999999999947e155

    1. Initial program 67.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.5 \cdot 10^{+75}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq 1.26 \cdot 10^{+29}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+129}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+155}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]

Alternative 9: 68.5% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -6e75 or 2.2999999999999999e156 < a

    1. Initial program 88.0%

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

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

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

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

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

    if -6e75 < a < 7.1e12

    1. Initial program 66.1%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative72.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} \]
      2. 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)} \]
      3. associate-*r/72.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.1e12 < a < 2.7000000000000001e129

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

    if 2.7000000000000001e129 < a < 2.2999999999999999e156

    1. Initial program 67.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{+75}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 7100000000000:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+129}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+156}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 10: 70.7% accurate, 0.8× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.60000000000000023e75 or 9.9999999999999998e155 < a

    1. Initial program 88.0%

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

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

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

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

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

    if -5.60000000000000023e75 < a < 5.8e13

    1. Initial program 66.1%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative72.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} \]
      2. 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)} \]
      3. associate-*r/72.2%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \color{blue}{1 \cdot \frac{t - x}{\frac{z}{y - a}}} \]
    7. Step-by-step derivation
      1. *-lft-identity82.6%

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

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

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

    if 5.8e13 < a < 2.7000000000000001e129

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

    if 2.7000000000000001e129 < a < 9.9999999999999998e155

    1. Initial program 67.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+75}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 58000000000000:\\ \;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+129}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 10^{+156}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 11: 86.4% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.6000000000000002e167 or 3.5e51 < z

    1. Initial program 49.8%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative62.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} \]
      2. associate--l+62.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)} \]
      3. associate-*r/62.7%

        \[\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) \]
      4. associate-*r/62.7%

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000002e167 < z < 3.5e51

    1. Initial program 89.7%

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

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

Alternative 12: 88.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+168} \lor \neg \left(z \leq 3.5 \cdot 10^{+51}\right):\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.15e168 or 3.5e51 < z

    1. Initial program 49.8%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative62.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} \]
      2. associate--l+62.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)} \]
      3. associate-*r/62.7%

        \[\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) \]
      4. associate-*r/62.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e168 < z < 3.5e51

    1. Initial program 89.7%

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

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

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

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

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

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

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

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

Alternative 13: 65.5% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.5e18 or 4.59999999999999994e50 < z

    1. Initial program 57.9%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative61.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} \]
      2. associate--l+61.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)} \]
      3. associate-*r/61.3%

        \[\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) \]
      4. associate-*r/61.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \color{blue}{1 \cdot \frac{t - x}{\frac{z}{y - a}}} \]
    7. Step-by-step derivation
      1. *-lft-identity82.1%

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

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

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

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

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

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

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

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

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

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

    if -6.5e18 < z < 4.80000000000000001e-56

    1. Initial program 92.8%

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

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

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

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

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

    if 4.80000000000000001e-56 < z < 3.60000000000000009

    1. Initial program 83.7%

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

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

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

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

    if 3.60000000000000009 < z < 4.59999999999999994e50

    1. Initial program 93.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+18}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-56}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 3.6:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+50}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 14: 50.4% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.7999999999999997e75 or 31500 < a

    1. Initial program 87.5%

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

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

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

    if -5.7999999999999997e75 < a < 1.89999999999999986e-117

    1. Initial program 64.8%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative75.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} \]
      2. associate--l+75.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)} \]
      3. associate-*r/75.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity77.8%

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

        \[\leadsto t - 1 \cdot \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Applied egg-rr84.1%

      \[\leadsto t - \color{blue}{1 \cdot \frac{t - x}{\frac{z}{y - a}}} \]
    7. Step-by-step derivation
      1. *-lft-identity84.1%

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{t}}} \]
    12. Simplified58.9%

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

    if 1.89999999999999986e-117 < a < 31500

    1. Initial program 72.1%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative57.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} \]
      2. associate--l+57.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)} \]
      3. associate-*r/57.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) \]
      4. associate-*r/57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+75}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-117}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;a \leq 31500:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]

Alternative 15: 49.3% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.60000000000000023e75 or 31000 < a

    1. Initial program 87.5%

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

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

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

    if -5.60000000000000023e75 < a < 1.02e-116

    1. Initial program 64.8%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative75.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} \]
      2. associate--l+75.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)} \]
      3. associate-*r/75.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity77.8%

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

        \[\leadsto t - 1 \cdot \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Applied egg-rr84.1%

      \[\leadsto t - \color{blue}{1 \cdot \frac{t - x}{\frac{z}{y - a}}} \]
    7. Step-by-step derivation
      1. *-lft-identity84.1%

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

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

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

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

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

    if 1.02e-116 < a < 31000

    1. Initial program 72.1%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative57.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} \]
      2. associate--l+57.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)} \]
      3. associate-*r/57.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) \]
      4. associate-*r/57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+75}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-116}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq 31000:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]

Alternative 16: 37.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 1.95 \cdot 10^{-116}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.2000000000000002e75 or 1.08e12 < a

    1. Initial program 87.5%

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

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

    if -6.2000000000000002e75 < a < 1.95e-116

    1. Initial program 64.8%

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

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

    if 1.95e-116 < a < 1.08e12

    1. Initial program 72.1%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative57.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} \]
      2. associate--l+57.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)} \]
      3. associate-*r/57.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) \]
      4. associate-*r/57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{+75}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.95 \cdot 10^{-116}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1080000000000:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 17: 58.0% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.5e-20 or 2.4000000000000002e50 < z

    1. Initial program 59.8%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative60.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} \]
      2. associate--l+60.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)} \]
      3. associate-*r/60.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
    5. Step-by-step derivation
      1. *-un-lft-identity61.0%

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

        \[\leadsto t - 1 \cdot \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    6. Applied egg-rr80.7%

      \[\leadsto t - \color{blue}{1 \cdot \frac{t - x}{\frac{z}{y - a}}} \]
    7. Step-by-step derivation
      1. *-lft-identity80.7%

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

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

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

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

      \[\leadsto t - \color{blue}{-1 \cdot \frac{y \cdot x}{z}} \]
    11. Step-by-step derivation
      1. mul-1-neg54.3%

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

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

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

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

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

    if -9.5e-20 < z < 2.4000000000000002e50

    1. Initial program 91.3%

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

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

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

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

Alternative 18: 46.9% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5000000000000003e202 or 3.14999999999999993e50 < z

    1. Initial program 49.8%

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

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

    if -8.5000000000000003e202 < z < 3.14999999999999993e50

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

Alternative 19: 50.9% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.5e18 or 3.5e51 < z

    1. Initial program 57.9%

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

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

    if -6.5e18 < z < 3.5e51

    1. Initial program 91.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+18}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+51}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 20: 38.6% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 1.12 \cdot 10^{+29}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.4999999999999998e75 or 1.1200000000000001e29 < a

    1. Initial program 88.0%

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

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

    if -6.4999999999999998e75 < a < 1.1200000000000001e29

    1. Initial program 66.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.5 \cdot 10^{+75}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+29}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 21: 25.4% 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 75.5%

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

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

    \[\leadsto t \]

Reproduce

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