Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.2% → 95.0%
Time: 16.2s
Alternatives: 20
Speedup: 0.3×

Specification

?
\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a):
	return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y - z) * ((t - x) / (a - z)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 80.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a):
	return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y - z) * ((t - x) / (a - z)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 95.0% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

    1. Initial program 3.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.2% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 92.5%

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

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

    1. Initial program 3.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 50.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+163}:\\
\;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if z < -2.30000000000000002e163

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \frac{t}{\color{blue}{\frac{a}{z} + \left(-1\right)}} \]
      2. metadata-eval84.2%

        \[\leadsto -1 \cdot \frac{t}{\frac{a}{z} + \color{blue}{-1}} \]
      3. associate-*r/84.2%

        \[\leadsto \color{blue}{\frac{-1 \cdot t}{\frac{a}{z} + -1}} \]
      4. mul-1-neg84.2%

        \[\leadsto \frac{\color{blue}{-t}}{\frac{a}{z} + -1} \]
      5. +-commutative84.2%

        \[\leadsto \frac{-t}{\color{blue}{-1 + \frac{a}{z}}} \]
    7. Simplified84.2%

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

    if -2.30000000000000002e163 < z < -2.00000000000000011e32

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000011e32 < z < -1.5499999999999999e-19

    1. Initial program 85.1%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative70.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5499999999999999e-19 < z < -1.6e-196

    1. Initial program 91.8%

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

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

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

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

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

      \[\leadsto x + \frac{y}{\color{blue}{-1 \cdot \frac{a}{x}}} \]
    6. Step-by-step derivation
      1. associate-*r/66.1%

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

        \[\leadsto x + \frac{y}{\frac{\color{blue}{-a}}{x}} \]
    7. Simplified66.1%

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

    if -1.6e-196 < z < 8.1999999999999995e136

    1. Initial program 90.9%

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

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

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

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

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

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

    if 8.1999999999999995e136 < z < 3.4999999999999999e190

    1. Initial program 33.6%

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

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

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

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

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

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

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

    if 3.4999999999999999e190 < z

    1. Initial program 59.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+163}:\\ \;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{+32}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{-19}:\\ \;\;\;\;y \cdot \frac{t - x}{-z}\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-196}:\\ \;\;\;\;x + \frac{y}{\frac{-a}{x}}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+136}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{+190}:\\ \;\;\;\;\frac{y - a}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 4: 50.3% accurate, 0.8× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.45000000000000003e165 or 7.19999999999999958e156 < z

    1. Initial program 58.7%

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

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

    if -3.45000000000000003e165 < z < -1.54999999999999997e32

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.54999999999999997e32 < z < -9.1999999999999997e-20

    1. Initial program 85.1%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative70.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.1999999999999997e-20 < z < -7.00000000000000016e-201

    1. Initial program 91.8%

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

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

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

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

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

      \[\leadsto x + \frac{y}{\color{blue}{-1 \cdot \frac{a}{x}}} \]
    6. Step-by-step derivation
      1. associate-*r/66.1%

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

        \[\leadsto x + \frac{y}{\frac{\color{blue}{-a}}{x}} \]
    7. Simplified66.1%

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

    if -7.00000000000000016e-201 < z < 7.19999999999999958e156

    1. Initial program 89.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.45 \cdot 10^{+165}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{+32}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-20}:\\ \;\;\;\;y \cdot \frac{t - x}{-z}\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-201}:\\ \;\;\;\;x + \frac{y}{\frac{-a}{x}}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+156}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 5: 50.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+162}:\\
\;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -4.70000000000000003e162

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \frac{t}{\color{blue}{\frac{a}{z} + \left(-1\right)}} \]
      2. metadata-eval84.2%

        \[\leadsto -1 \cdot \frac{t}{\frac{a}{z} + \color{blue}{-1}} \]
      3. associate-*r/84.2%

        \[\leadsto \color{blue}{\frac{-1 \cdot t}{\frac{a}{z} + -1}} \]
      4. mul-1-neg84.2%

        \[\leadsto \frac{\color{blue}{-t}}{\frac{a}{z} + -1} \]
      5. +-commutative84.2%

        \[\leadsto \frac{-t}{\color{blue}{-1 + \frac{a}{z}}} \]
    7. Simplified84.2%

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

    if -4.70000000000000003e162 < z < -1.00000000000000005e32

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000005e32 < z < -1.59999999999999991e-19

    1. Initial program 85.1%

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative70.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.59999999999999991e-19 < z < -1.59999999999999997e-198

    1. Initial program 91.8%

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

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

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

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

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

      \[\leadsto x + \frac{y}{\color{blue}{-1 \cdot \frac{a}{x}}} \]
    6. Step-by-step derivation
      1. associate-*r/66.1%

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

        \[\leadsto x + \frac{y}{\frac{\color{blue}{-a}}{x}} \]
    7. Simplified66.1%

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

    if -1.59999999999999997e-198 < z < 1.7500000000000001e158

    1. Initial program 89.7%

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

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

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

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

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

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

    if 1.7500000000000001e158 < z

    1. Initial program 48.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.7 \cdot 10^{+162}:\\ \;\;\;\;\frac{-t}{-1 + \frac{a}{z}}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{+32}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-19}:\\ \;\;\;\;y \cdot \frac{t - x}{-z}\\ \mathbf{elif}\;z \leq -1.6 \cdot 10^{-198}:\\ \;\;\;\;x + \frac{y}{\frac{-a}{x}}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+158}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 6: 63.4% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+98} \lor \neg \left(z \leq 3.5 \cdot 10^{+190}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.50000000000000001e111 or 5.80000000000000029e-54 < z < 2.6e98 or 3.4999999999999999e190 < z

    1. Initial program 70.1%

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

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

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

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

    if -4.50000000000000001e111 < z < 5.80000000000000029e-54

    1. Initial program 93.9%

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

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

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

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

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

    if 2.6e98 < z < 3.4999999999999999e190

    1. Initial program 49.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+111}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-54}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+98} \lor \neg \left(z \leq 3.5 \cdot 10^{+190}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y - a}{\frac{z}{x}}\\ \end{array} \]

Alternative 7: 58.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -1.25 \cdot 10^{-219}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 9 \cdot 10^{+69}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.5999999999999998e82 or 8.9999999999999999e69 < a

    1. Initial program 97.6%

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

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

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

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

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

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

    if -2.5999999999999998e82 < a < -1.25e-219 or 6.0000000000000005e-166 < a < 8.9999999999999999e69

    1. Initial program 70.4%

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

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

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

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

    if -1.25e-219 < a < 6.0000000000000005e-166

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(y \cdot \left(t - x\right)\right)} \cdot \frac{1}{-z} \]
    9. Applied egg-rr65.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.6 \cdot 10^{+82}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{-219}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-166}:\\ \;\;\;\;y \cdot \frac{t - x}{-z}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+69}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \end{array} \]

Alternative 8: 59.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -6.2 \cdot 10^{-193}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 5.2 \cdot 10^{+69}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.20000000000000011e81 or 5.2000000000000004e69 < a

    1. Initial program 97.6%

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

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

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

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

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

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

    if -7.20000000000000011e81 < a < -6.2000000000000004e-193 or 8.2000000000000002e-151 < a < 5.2000000000000004e69

    1. Initial program 69.4%

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

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

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

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

    if -6.2000000000000004e-193 < a < 8.2000000000000002e-151

    1. Initial program 77.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot y \]
      2. *-commutative72.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.2 \cdot 10^{+81}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-193}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-151}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+69}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \end{array} \]

Alternative 9: 71.1% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.2999999999999999e112 or 4.2e8 < z

    1. Initial program 64.3%

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

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

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

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

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

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

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

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

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

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

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

    if -3.2999999999999999e112 < z < -2.5999999999999998e-139

    1. Initial program 89.3%

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

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

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

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

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

    if -2.5999999999999998e-139 < z < 4.2e8

    1. Initial program 95.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+112}:\\ \;\;\;\;t - \left(t - x\right) \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-139}:\\ \;\;\;\;x \cdot \left(1 - \frac{y - z}{a - z}\right)\\ \mathbf{elif}\;z \leq 420000000:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t - \left(t - x\right) \cdot \frac{y - a}{z}\\ \end{array} \]

Alternative 10: 49.4% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.19999999999999987e162 or 2.2000000000000001e157 < z

    1. Initial program 58.7%

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

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

    if -7.19999999999999987e162 < z < -4.19999999999999981e-151

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.19999999999999981e-151 < z < -2.5000000000000001e-181

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

    if -2.5000000000000001e-181 < z < 2.2000000000000001e157

    1. Initial program 89.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+162}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-151}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-181}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+157}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 11: 49.3% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.2000000000000001e162 or 7.40000000000000021e158 < z

    1. Initial program 58.7%

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

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

    if -4.2000000000000001e162 < z < -1.7000000000000001e-151

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7000000000000001e-151 < z < -3.50000000000000024e-179

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

    if -3.50000000000000024e-179 < z < 7.40000000000000021e158

    1. Initial program 89.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+162}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-151}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-179}:\\ \;\;\;\;\frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{+158}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 12: 48.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{\frac{a}{t}}\\ \mathbf{if}\;a \leq -1.75 \cdot 10^{+15}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-186}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-143}:\\ \;\;\;\;y \cdot \frac{t - x}{-z}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+68}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ y (/ a t)))))
   (if (<= a -1.75e+15)
     t_1
     (if (<= a -3.8e-186)
       t
       (if (<= a 1.2e-143)
         (* y (/ (- t x) (- z)))
         (if (<= a 3.2e+68) t t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (a / t));
	double tmp;
	if (a <= -1.75e+15) {
		tmp = t_1;
	} else if (a <= -3.8e-186) {
		tmp = t;
	} else if (a <= 1.2e-143) {
		tmp = y * ((t - x) / -z);
	} else if (a <= 3.2e+68) {
		tmp = t;
	} 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))
    if (a <= (-1.75d+15)) then
        tmp = t_1
    else if (a <= (-3.8d-186)) then
        tmp = t
    else if (a <= 1.2d-143) then
        tmp = y * ((t - x) / -z)
    else if (a <= 3.2d+68) then
        tmp = t
    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));
	double tmp;
	if (a <= -1.75e+15) {
		tmp = t_1;
	} else if (a <= -3.8e-186) {
		tmp = t;
	} else if (a <= 1.2e-143) {
		tmp = y * ((t - x) / -z);
	} else if (a <= 3.2e+68) {
		tmp = t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y / (a / t))
	tmp = 0
	if a <= -1.75e+15:
		tmp = t_1
	elif a <= -3.8e-186:
		tmp = t
	elif a <= 1.2e-143:
		tmp = y * ((t - x) / -z)
	elif a <= 3.2e+68:
		tmp = t
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y / Float64(a / t)))
	tmp = 0.0
	if (a <= -1.75e+15)
		tmp = t_1;
	elseif (a <= -3.8e-186)
		tmp = t;
	elseif (a <= 1.2e-143)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(-z)));
	elseif (a <= 3.2e+68)
		tmp = t;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y / (a / t));
	tmp = 0.0;
	if (a <= -1.75e+15)
		tmp = t_1;
	elseif (a <= -3.8e-186)
		tmp = t;
	elseif (a <= 1.2e-143)
		tmp = y * ((t - x) / -z);
	elseif (a <= 3.2e+68)
		tmp = t;
	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 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.75e+15], t$95$1, If[LessEqual[a, -3.8e-186], t, If[LessEqual[a, 1.2e-143], N[(y * N[(N[(t - x), $MachinePrecision] / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e+68], t, t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -3.8 \cdot 10^{-186}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 3.2 \cdot 10^{+68}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.75e15 or 3.19999999999999994e68 < a

    1. Initial program 97.1%

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

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

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

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

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

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

    if -1.75e15 < a < -3.79999999999999974e-186 or 1.1999999999999999e-143 < a < 3.19999999999999994e68

    1. Initial program 66.9%

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

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

    if -3.79999999999999974e-186 < a < 1.1999999999999999e-143

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\color{blue}{\left(-y \cdot \left(t - x\right)\right)}\right) \cdot \frac{1}{-z} \]
      4. remove-double-neg61.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.75 \cdot 10^{+15}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;a \leq -3.8 \cdot 10^{-186}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-143}:\\ \;\;\;\;y \cdot \frac{t - x}{-z}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+68}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \end{array} \]

Alternative 13: 70.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{if}\;a \leq -2.7 \cdot 10^{+25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-136}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+45}:\\ \;\;\;\;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 -2.7e+25)
     t_1
     (if (<= a 9e-136)
       (+ t (* (/ y z) (- x t)))
       (if (<= a 1.15e+45) (* 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 <= -2.7e+25) {
		tmp = t_1;
	} else if (a <= 9e-136) {
		tmp = t + ((y / z) * (x - t));
	} else if (a <= 1.15e+45) {
		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 <= (-2.7d+25)) then
        tmp = t_1
    else if (a <= 9d-136) then
        tmp = t + ((y / z) * (x - t))
    else if (a <= 1.15d+45) 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 <= -2.7e+25) {
		tmp = t_1;
	} else if (a <= 9e-136) {
		tmp = t + ((y / z) * (x - t));
	} else if (a <= 1.15e+45) {
		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 <= -2.7e+25:
		tmp = t_1
	elif a <= 9e-136:
		tmp = t + ((y / z) * (x - t))
	elif a <= 1.15e+45:
		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 <= -2.7e+25)
		tmp = t_1;
	elseif (a <= 9e-136)
		tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t)));
	elseif (a <= 1.15e+45)
		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 <= -2.7e+25)
		tmp = t_1;
	elseif (a <= 9e-136)
		tmp = t + ((y / z) * (x - t));
	elseif (a <= 1.15e+45)
		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, -2.7e+25], t$95$1, If[LessEqual[a, 9e-136], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.15e+45], 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 -2.7 \cdot 10^{+25}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.7e25 or 1.15000000000000006e45 < a

    1. Initial program 96.3%

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

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

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

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

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

    if -2.7e25 < a < 8.99999999999999944e-136

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.99999999999999944e-136 < a < 1.15000000000000006e45

    1. Initial program 61.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.7 \cdot 10^{+25}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-136}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+45}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 14: 67.6% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.29999999999999993e111

    1. Initial program 68.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.29999999999999993e111 < z < -9.80000000000000063e-139

    1. Initial program 89.3%

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

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

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

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

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

    if -9.80000000000000063e-139 < z < 8.5e10

    1. Initial program 95.4%

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

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

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

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

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

    if 8.5e10 < z

    1. Initial program 60.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+111}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -9.8 \cdot 10^{-139}:\\ \;\;\;\;x \cdot \left(1 - \frac{y - z}{a - z}\right)\\ \mathbf{elif}\;z \leq 85000000000:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{a - y}{z}\\ \end{array} \]

Alternative 15: 68.3% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.5999999999999999e113

    1. Initial program 68.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5999999999999999e113 < z < 8.3e9

    1. Initial program 93.6%

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

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

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

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

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

    if 8.3e9 < z

    1. Initial program 60.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 37.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -9 \cdot 10^{-198}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 2.8 \cdot 10^{+70}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.4e15 or 2.7999999999999999e70 < a

    1. Initial program 97.1%

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

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

    if -3.4e15 < a < -8.9999999999999996e-198 or 9.19999999999999984e-151 < a < 2.7999999999999999e70

    1. Initial program 65.9%

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

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

    if -8.9999999999999996e-198 < a < 9.19999999999999984e-151

    1. Initial program 77.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot x}{a - z}} \]
    6. Step-by-step derivation
      1. mul-1-neg56.8%

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{a - z}{x}}} \]
      3. distribute-neg-frac56.6%

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

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

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}} \]
    9. Step-by-step derivation
      1. *-commutative54.4%

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
      3. associate-/r/54.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{+15}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-198}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-151}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+70}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 17: 37.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -9.8 \cdot 10^{-198}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 9.5 \cdot 10^{+68}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.8e14 or 9.50000000000000069e68 < a

    1. Initial program 97.1%

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

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

    if -5.8e14 < a < -9.8000000000000004e-198 or 6.99999999999999991e-151 < a < 9.50000000000000069e68

    1. Initial program 65.9%

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

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

    if -9.8000000000000004e-198 < a < 6.99999999999999991e-151

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.8 \cdot 10^{-198}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-151}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+68}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 18: 51.6% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.00000000000000014e174 or 2.05000000000000008e157 < z

    1. Initial program 57.9%

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

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

    if -2.00000000000000014e174 < z < 2.05000000000000008e157

    1. Initial program 89.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+174}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+157}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 19: 38.5% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 1.15 \cdot 10^{+69}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.2e15 or 1.15000000000000008e69 < a

    1. Initial program 97.1%

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

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

    if -3.2e15 < a < 1.15000000000000008e69

    1. Initial program 70.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.2 \cdot 10^{+15}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+69}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 20: 25.2% 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 82.8%

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

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

    \[\leadsto t \]

Reproduce

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