Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.9% → 93.7%
Time: 32.3s
Alternatives: 29
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 29 alternatives:

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

Initial Program: 79.9% 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: 93.7% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000018e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.0000000000000002e-210

    1. Initial program 3.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 44.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{if}\;a \leq -2.55 \cdot 10^{+160}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -59:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-242}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-55}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+38}:\\ \;\;\;\;\frac{t}{\frac{z - a}{z}}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+91}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{+132}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+160}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+164}:\\ \;\;\;\;a \cdot \frac{-x}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- y z) (/ t a))))
   (if (<= a -2.55e+160)
     x
     (if (<= a -59.0)
       t_1
       (if (<= a 2.8e-242)
         (- t (/ t (/ z y)))
         (if (<= a 6.2e-55)
           (* x (/ (- y a) z))
           (if (<= a 1.5e+38)
             (/ t (/ (- z a) z))
             (if (<= a 1.8e+91)
               (/ t (/ a (- y z)))
               (if (<= a 1.45e+96)
                 t
                 (if (<= a 7.6e+132)
                   x
                   (if (<= a 6.2e+160)
                     t_1
                     (if (<= a 1.35e+164) (* a (/ (- x) z)) x))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / a);
	double tmp;
	if (a <= -2.55e+160) {
		tmp = x;
	} else if (a <= -59.0) {
		tmp = t_1;
	} else if (a <= 2.8e-242) {
		tmp = t - (t / (z / y));
	} else if (a <= 6.2e-55) {
		tmp = x * ((y - a) / z);
	} else if (a <= 1.5e+38) {
		tmp = t / ((z - a) / z);
	} else if (a <= 1.8e+91) {
		tmp = t / (a / (y - z));
	} else if (a <= 1.45e+96) {
		tmp = t;
	} else if (a <= 7.6e+132) {
		tmp = x;
	} else if (a <= 6.2e+160) {
		tmp = t_1;
	} else if (a <= 1.35e+164) {
		tmp = a * (-x / z);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - z) * (t / a)
    if (a <= (-2.55d+160)) then
        tmp = x
    else if (a <= (-59.0d0)) then
        tmp = t_1
    else if (a <= 2.8d-242) then
        tmp = t - (t / (z / y))
    else if (a <= 6.2d-55) then
        tmp = x * ((y - a) / z)
    else if (a <= 1.5d+38) then
        tmp = t / ((z - a) / z)
    else if (a <= 1.8d+91) then
        tmp = t / (a / (y - z))
    else if (a <= 1.45d+96) then
        tmp = t
    else if (a <= 7.6d+132) then
        tmp = x
    else if (a <= 6.2d+160) then
        tmp = t_1
    else if (a <= 1.35d+164) then
        tmp = a * (-x / z)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - z) * (t / a);
	double tmp;
	if (a <= -2.55e+160) {
		tmp = x;
	} else if (a <= -59.0) {
		tmp = t_1;
	} else if (a <= 2.8e-242) {
		tmp = t - (t / (z / y));
	} else if (a <= 6.2e-55) {
		tmp = x * ((y - a) / z);
	} else if (a <= 1.5e+38) {
		tmp = t / ((z - a) / z);
	} else if (a <= 1.8e+91) {
		tmp = t / (a / (y - z));
	} else if (a <= 1.45e+96) {
		tmp = t;
	} else if (a <= 7.6e+132) {
		tmp = x;
	} else if (a <= 6.2e+160) {
		tmp = t_1;
	} else if (a <= 1.35e+164) {
		tmp = a * (-x / z);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - z) * (t / a)
	tmp = 0
	if a <= -2.55e+160:
		tmp = x
	elif a <= -59.0:
		tmp = t_1
	elif a <= 2.8e-242:
		tmp = t - (t / (z / y))
	elif a <= 6.2e-55:
		tmp = x * ((y - a) / z)
	elif a <= 1.5e+38:
		tmp = t / ((z - a) / z)
	elif a <= 1.8e+91:
		tmp = t / (a / (y - z))
	elif a <= 1.45e+96:
		tmp = t
	elif a <= 7.6e+132:
		tmp = x
	elif a <= 6.2e+160:
		tmp = t_1
	elif a <= 1.35e+164:
		tmp = a * (-x / z)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - z) * Float64(t / a))
	tmp = 0.0
	if (a <= -2.55e+160)
		tmp = x;
	elseif (a <= -59.0)
		tmp = t_1;
	elseif (a <= 2.8e-242)
		tmp = Float64(t - Float64(t / Float64(z / y)));
	elseif (a <= 6.2e-55)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (a <= 1.5e+38)
		tmp = Float64(t / Float64(Float64(z - a) / z));
	elseif (a <= 1.8e+91)
		tmp = Float64(t / Float64(a / Float64(y - z)));
	elseif (a <= 1.45e+96)
		tmp = t;
	elseif (a <= 7.6e+132)
		tmp = x;
	elseif (a <= 6.2e+160)
		tmp = t_1;
	elseif (a <= 1.35e+164)
		tmp = Float64(a * Float64(Float64(-x) / z));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - z) * (t / a);
	tmp = 0.0;
	if (a <= -2.55e+160)
		tmp = x;
	elseif (a <= -59.0)
		tmp = t_1;
	elseif (a <= 2.8e-242)
		tmp = t - (t / (z / y));
	elseif (a <= 6.2e-55)
		tmp = x * ((y - a) / z);
	elseif (a <= 1.5e+38)
		tmp = t / ((z - a) / z);
	elseif (a <= 1.8e+91)
		tmp = t / (a / (y - z));
	elseif (a <= 1.45e+96)
		tmp = t;
	elseif (a <= 7.6e+132)
		tmp = x;
	elseif (a <= 6.2e+160)
		tmp = t_1;
	elseif (a <= 1.35e+164)
		tmp = a * (-x / z);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.55e+160], x, If[LessEqual[a, -59.0], t$95$1, If[LessEqual[a, 2.8e-242], N[(t - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.2e-55], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.5e+38], N[(t / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.8e+91], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.45e+96], t, If[LessEqual[a, 7.6e+132], x, If[LessEqual[a, 6.2e+160], t$95$1, If[LessEqual[a, 1.35e+164], N[(a * N[((-x) / z), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -59:\\
\;\;\;\;t\_1\\

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

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

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

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

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+96}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 7.6 \cdot 10^{+132}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if a < -2.5500000000000001e160 or 1.44999999999999989e96 < a < 7.60000000000000012e132 or 1.35000000000000003e164 < a

    1. Initial program 88.2%

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

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

    if -2.5500000000000001e160 < a < -59 or 7.60000000000000012e132 < a < 6.1999999999999996e160

    1. Initial program 87.8%

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

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

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

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

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

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

    if -59 < a < 2.79999999999999983e-242

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.79999999999999983e-242 < a < 6.19999999999999993e-55

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - a}{z}} \]
      3. /-rgt-identity51.3%

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

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

    if 6.19999999999999993e-55 < a < 1.5000000000000001e38

    1. Initial program 75.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot z\right)}{a - z}} \]
      2. mul-1-neg40.6%

        \[\leadsto \frac{\color{blue}{-t \cdot z}}{a - z} \]
      3. distribute-rgt-neg-out40.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-t \cdot \left(-z\right)}{-\left(a - z\right)}} \]
      3. add-sqr-sqrt26.6%

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

        \[\leadsto \frac{-t \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\left(a - z\right)} \]
      5. sqr-neg15.4%

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

        \[\leadsto \frac{-t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{-\left(a - z\right)} \]
      7. add-sqr-sqrt2.3%

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

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

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)}}{-\left(a - z\right)} \]
      10. sqrt-unprod8.9%

        \[\leadsto \frac{t \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\left(a - z\right)} \]
      11. sqr-neg8.9%

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

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{-\left(a - z\right)} \]
      13. add-sqr-sqrt40.6%

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

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

        \[\leadsto \frac{t \cdot z}{\color{blue}{\left(-a\right) + \left(-\left(-z\right)\right)}} \]
      16. add-sqr-sqrt26.6%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}\right)} \]
      17. sqrt-unprod15.3%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)} \]
      18. sqr-neg15.3%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\sqrt{\color{blue}{z \cdot z}}\right)} \]
      19. sqrt-unprod0.8%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)} \]
      20. add-sqr-sqrt2.3%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{z}\right)} \]
      21. add-sqr-sqrt1.5%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      22. sqrt-unprod9.5%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      23. sqr-neg9.5%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \sqrt{\color{blue}{z \cdot z}}} \]
    10. Applied egg-rr40.6%

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

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

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

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

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

    if 1.5000000000000001e38 < a < 1.8e91

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

    if 1.8e91 < a < 1.44999999999999989e96

    1. Initial program 100.0%

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

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

    if 6.1999999999999996e160 < a < 1.35000000000000003e164

    1. Initial program 2.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{a \cdot x}{z}} \]
      2. distribute-neg-frac4.7%

        \[\leadsto \color{blue}{\frac{-a \cdot x}{z}} \]
      3. distribute-lft-neg-out4.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.55 \cdot 10^{+160}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -59:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-242}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-55}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+38}:\\ \;\;\;\;\frac{t}{\frac{z - a}{z}}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+91}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{+132}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+160}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+164}:\\ \;\;\;\;a \cdot \frac{-x}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 45.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{\frac{a}{t - x}}\\ \mathbf{if}\;a \leq -4.6 \cdot 10^{+108}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -0.41:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-242}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-49}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+32}:\\ \;\;\;\;\frac{t}{\frac{z - a}{z}}\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+132}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+164}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+164}:\\ \;\;\;\;a \cdot \frac{-x}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ y (/ a (- t x)))))
   (if (<= a -4.6e+108)
     x
     (if (<= a -0.41)
       t_1
       (if (<= a 2.7e-242)
         (- t (/ t (/ z y)))
         (if (<= a 1.55e-49)
           (* x (/ (- y a) z))
           (if (<= a 1.55e+32)
             (/ t (/ (- z a) z))
             (if (<= a 3.3e+91)
               t_1
               (if (<= a 1.7e+96)
                 t
                 (if (<= a 2.8e+132)
                   x
                   (if (<= a 1.25e+164)
                     (* (- y z) (/ t a))
                     (if (<= a 1.35e+164) (* a (/ (- x) z)) x))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a / (t - x));
	double tmp;
	if (a <= -4.6e+108) {
		tmp = x;
	} else if (a <= -0.41) {
		tmp = t_1;
	} else if (a <= 2.7e-242) {
		tmp = t - (t / (z / y));
	} else if (a <= 1.55e-49) {
		tmp = x * ((y - a) / z);
	} else if (a <= 1.55e+32) {
		tmp = t / ((z - a) / z);
	} else if (a <= 3.3e+91) {
		tmp = t_1;
	} else if (a <= 1.7e+96) {
		tmp = t;
	} else if (a <= 2.8e+132) {
		tmp = x;
	} else if (a <= 1.25e+164) {
		tmp = (y - z) * (t / a);
	} else if (a <= 1.35e+164) {
		tmp = a * (-x / z);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y / (a / (t - x))
    if (a <= (-4.6d+108)) then
        tmp = x
    else if (a <= (-0.41d0)) then
        tmp = t_1
    else if (a <= 2.7d-242) then
        tmp = t - (t / (z / y))
    else if (a <= 1.55d-49) then
        tmp = x * ((y - a) / z)
    else if (a <= 1.55d+32) then
        tmp = t / ((z - a) / z)
    else if (a <= 3.3d+91) then
        tmp = t_1
    else if (a <= 1.7d+96) then
        tmp = t
    else if (a <= 2.8d+132) then
        tmp = x
    else if (a <= 1.25d+164) then
        tmp = (y - z) * (t / a)
    else if (a <= 1.35d+164) then
        tmp = a * (-x / z)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a / (t - x));
	double tmp;
	if (a <= -4.6e+108) {
		tmp = x;
	} else if (a <= -0.41) {
		tmp = t_1;
	} else if (a <= 2.7e-242) {
		tmp = t - (t / (z / y));
	} else if (a <= 1.55e-49) {
		tmp = x * ((y - a) / z);
	} else if (a <= 1.55e+32) {
		tmp = t / ((z - a) / z);
	} else if (a <= 3.3e+91) {
		tmp = t_1;
	} else if (a <= 1.7e+96) {
		tmp = t;
	} else if (a <= 2.8e+132) {
		tmp = x;
	} else if (a <= 1.25e+164) {
		tmp = (y - z) * (t / a);
	} else if (a <= 1.35e+164) {
		tmp = a * (-x / z);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y / (a / (t - x))
	tmp = 0
	if a <= -4.6e+108:
		tmp = x
	elif a <= -0.41:
		tmp = t_1
	elif a <= 2.7e-242:
		tmp = t - (t / (z / y))
	elif a <= 1.55e-49:
		tmp = x * ((y - a) / z)
	elif a <= 1.55e+32:
		tmp = t / ((z - a) / z)
	elif a <= 3.3e+91:
		tmp = t_1
	elif a <= 1.7e+96:
		tmp = t
	elif a <= 2.8e+132:
		tmp = x
	elif a <= 1.25e+164:
		tmp = (y - z) * (t / a)
	elif a <= 1.35e+164:
		tmp = a * (-x / z)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y / Float64(a / Float64(t - x)))
	tmp = 0.0
	if (a <= -4.6e+108)
		tmp = x;
	elseif (a <= -0.41)
		tmp = t_1;
	elseif (a <= 2.7e-242)
		tmp = Float64(t - Float64(t / Float64(z / y)));
	elseif (a <= 1.55e-49)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (a <= 1.55e+32)
		tmp = Float64(t / Float64(Float64(z - a) / z));
	elseif (a <= 3.3e+91)
		tmp = t_1;
	elseif (a <= 1.7e+96)
		tmp = t;
	elseif (a <= 2.8e+132)
		tmp = x;
	elseif (a <= 1.25e+164)
		tmp = Float64(Float64(y - z) * Float64(t / a));
	elseif (a <= 1.35e+164)
		tmp = Float64(a * Float64(Float64(-x) / z));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y / (a / (t - x));
	tmp = 0.0;
	if (a <= -4.6e+108)
		tmp = x;
	elseif (a <= -0.41)
		tmp = t_1;
	elseif (a <= 2.7e-242)
		tmp = t - (t / (z / y));
	elseif (a <= 1.55e-49)
		tmp = x * ((y - a) / z);
	elseif (a <= 1.55e+32)
		tmp = t / ((z - a) / z);
	elseif (a <= 3.3e+91)
		tmp = t_1;
	elseif (a <= 1.7e+96)
		tmp = t;
	elseif (a <= 2.8e+132)
		tmp = x;
	elseif (a <= 1.25e+164)
		tmp = (y - z) * (t / a);
	elseif (a <= 1.35e+164)
		tmp = a * (-x / z);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.6e+108], x, If[LessEqual[a, -0.41], t$95$1, If[LessEqual[a, 2.7e-242], N[(t - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e-49], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e+32], N[(t / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.3e+91], t$95$1, If[LessEqual[a, 1.7e+96], t, If[LessEqual[a, 2.8e+132], x, If[LessEqual[a, 1.25e+164], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e+164], N[(a * N[((-x) / z), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -0.41:\\
\;\;\;\;t\_1\\

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

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

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

\mathbf{elif}\;a \leq 3.3 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.7 \cdot 10^{+96}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 2.8 \cdot 10^{+132}:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if a < -4.5999999999999998e108 or 1.7e96 < a < 2.7999999999999999e132 or 1.35000000000000003e164 < a

    1. Initial program 86.8%

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

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

    if -4.5999999999999998e108 < a < -0.409999999999999976 or 1.54999999999999997e32 < a < 3.30000000000000017e91

    1. Initial program 87.5%

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

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

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

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

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

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

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

    if -0.409999999999999976 < a < 2.7e-242

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7e-242 < a < 1.55e-49

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - a}{z}} \]
      3. /-rgt-identity51.3%

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

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

    if 1.55e-49 < a < 1.54999999999999997e32

    1. Initial program 72.2%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t \cdot z}}{a - z} \]
      3. distribute-rgt-neg-out39.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-t \cdot \left(-z\right)}{-\left(a - z\right)}} \]
      3. add-sqr-sqrt30.1%

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

        \[\leadsto \frac{-t \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\left(a - z\right)} \]
      5. sqr-neg17.4%

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

        \[\leadsto \frac{-t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{-\left(a - z\right)} \]
      7. add-sqr-sqrt2.5%

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

        \[\leadsto \frac{\color{blue}{t \cdot \left(-z\right)}}{-\left(a - z\right)} \]
      9. add-sqr-sqrt1.6%

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)}}{-\left(a - z\right)} \]
      10. sqrt-unprod2.9%

        \[\leadsto \frac{t \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\left(a - z\right)} \]
      11. sqr-neg2.9%

        \[\leadsto \frac{t \cdot \sqrt{\color{blue}{z \cdot z}}}{-\left(a - z\right)} \]
      12. sqrt-unprod8.5%

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{-\left(a - z\right)} \]
      13. add-sqr-sqrt39.0%

        \[\leadsto \frac{t \cdot \color{blue}{z}}{-\left(a - z\right)} \]
      14. sub-neg39.0%

        \[\leadsto \frac{t \cdot z}{-\color{blue}{\left(a + \left(-z\right)\right)}} \]
      15. distribute-neg-in39.0%

        \[\leadsto \frac{t \cdot z}{\color{blue}{\left(-a\right) + \left(-\left(-z\right)\right)}} \]
      16. add-sqr-sqrt30.1%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}\right)} \]
      17. sqrt-unprod17.1%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)} \]
      18. sqr-neg17.1%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\sqrt{\color{blue}{z \cdot z}}\right)} \]
      19. sqrt-unprod0.9%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)} \]
      20. add-sqr-sqrt2.3%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{z}\right)} \]
      21. add-sqr-sqrt1.5%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      22. sqrt-unprod3.4%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      23. sqr-neg3.4%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \sqrt{\color{blue}{z \cdot z}}} \]
    10. Applied egg-rr39.0%

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

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

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

        \[\leadsto \frac{t}{\frac{\color{blue}{z - a}}{z}} \]
    12. Simplified59.1%

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

    if 3.30000000000000017e91 < a < 1.7e96

    1. Initial program 100.0%

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

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

    if 2.7999999999999999e132 < a < 1.24999999999999987e164

    1. Initial program 96.7%

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

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

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

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

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

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

    if 1.24999999999999987e164 < a < 1.35000000000000003e164

    1. Initial program 2.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{a \cdot x}{z}} \]
      2. distribute-neg-frac4.7%

        \[\leadsto \color{blue}{\frac{-a \cdot x}{z}} \]
      3. distribute-lft-neg-out4.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{+108}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -0.41:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-242}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-49}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+32}:\\ \;\;\;\;\frac{t}{\frac{z - a}{z}}\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+91}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+132}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+164}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+164}:\\ \;\;\;\;a \cdot \frac{-x}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 45.6% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{\frac{a}{t - x}}\\ \mathbf{if}\;a \leq -9.5 \cdot 10^{+109}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -0.72:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-242}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-54}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+29}:\\ \;\;\;\;\frac{t}{\frac{z - a}{z}}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+132}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{+163}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+164}:\\ \;\;\;\;a \cdot \frac{-x}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ y (/ a (- t x)))))
   (if (<= a -9.5e+109)
     x
     (if (<= a -0.72)
       t_1
       (if (<= a 2.7e-242)
         (- t (/ t (/ z y)))
         (if (<= a 1.2e-54)
           (/ (* x (- y a)) z)
           (if (<= a 1.8e+29)
             (/ t (/ (- z a) z))
             (if (<= a 3.2e+91)
               t_1
               (if (<= a 1.7e+96)
                 t
                 (if (<= a 6.2e+132)
                   x
                   (if (<= a 7.2e+163)
                     (* (- y z) (/ t a))
                     (if (<= a 1.35e+164) (* a (/ (- x) z)) x))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a / (t - x));
	double tmp;
	if (a <= -9.5e+109) {
		tmp = x;
	} else if (a <= -0.72) {
		tmp = t_1;
	} else if (a <= 2.7e-242) {
		tmp = t - (t / (z / y));
	} else if (a <= 1.2e-54) {
		tmp = (x * (y - a)) / z;
	} else if (a <= 1.8e+29) {
		tmp = t / ((z - a) / z);
	} else if (a <= 3.2e+91) {
		tmp = t_1;
	} else if (a <= 1.7e+96) {
		tmp = t;
	} else if (a <= 6.2e+132) {
		tmp = x;
	} else if (a <= 7.2e+163) {
		tmp = (y - z) * (t / a);
	} else if (a <= 1.35e+164) {
		tmp = a * (-x / z);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y / (a / (t - x))
    if (a <= (-9.5d+109)) then
        tmp = x
    else if (a <= (-0.72d0)) then
        tmp = t_1
    else if (a <= 2.7d-242) then
        tmp = t - (t / (z / y))
    else if (a <= 1.2d-54) then
        tmp = (x * (y - a)) / z
    else if (a <= 1.8d+29) then
        tmp = t / ((z - a) / z)
    else if (a <= 3.2d+91) then
        tmp = t_1
    else if (a <= 1.7d+96) then
        tmp = t
    else if (a <= 6.2d+132) then
        tmp = x
    else if (a <= 7.2d+163) then
        tmp = (y - z) * (t / a)
    else if (a <= 1.35d+164) then
        tmp = a * (-x / z)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a / (t - x));
	double tmp;
	if (a <= -9.5e+109) {
		tmp = x;
	} else if (a <= -0.72) {
		tmp = t_1;
	} else if (a <= 2.7e-242) {
		tmp = t - (t / (z / y));
	} else if (a <= 1.2e-54) {
		tmp = (x * (y - a)) / z;
	} else if (a <= 1.8e+29) {
		tmp = t / ((z - a) / z);
	} else if (a <= 3.2e+91) {
		tmp = t_1;
	} else if (a <= 1.7e+96) {
		tmp = t;
	} else if (a <= 6.2e+132) {
		tmp = x;
	} else if (a <= 7.2e+163) {
		tmp = (y - z) * (t / a);
	} else if (a <= 1.35e+164) {
		tmp = a * (-x / z);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y / (a / (t - x))
	tmp = 0
	if a <= -9.5e+109:
		tmp = x
	elif a <= -0.72:
		tmp = t_1
	elif a <= 2.7e-242:
		tmp = t - (t / (z / y))
	elif a <= 1.2e-54:
		tmp = (x * (y - a)) / z
	elif a <= 1.8e+29:
		tmp = t / ((z - a) / z)
	elif a <= 3.2e+91:
		tmp = t_1
	elif a <= 1.7e+96:
		tmp = t
	elif a <= 6.2e+132:
		tmp = x
	elif a <= 7.2e+163:
		tmp = (y - z) * (t / a)
	elif a <= 1.35e+164:
		tmp = a * (-x / z)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y / Float64(a / Float64(t - x)))
	tmp = 0.0
	if (a <= -9.5e+109)
		tmp = x;
	elseif (a <= -0.72)
		tmp = t_1;
	elseif (a <= 2.7e-242)
		tmp = Float64(t - Float64(t / Float64(z / y)));
	elseif (a <= 1.2e-54)
		tmp = Float64(Float64(x * Float64(y - a)) / z);
	elseif (a <= 1.8e+29)
		tmp = Float64(t / Float64(Float64(z - a) / z));
	elseif (a <= 3.2e+91)
		tmp = t_1;
	elseif (a <= 1.7e+96)
		tmp = t;
	elseif (a <= 6.2e+132)
		tmp = x;
	elseif (a <= 7.2e+163)
		tmp = Float64(Float64(y - z) * Float64(t / a));
	elseif (a <= 1.35e+164)
		tmp = Float64(a * Float64(Float64(-x) / z));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y / (a / (t - x));
	tmp = 0.0;
	if (a <= -9.5e+109)
		tmp = x;
	elseif (a <= -0.72)
		tmp = t_1;
	elseif (a <= 2.7e-242)
		tmp = t - (t / (z / y));
	elseif (a <= 1.2e-54)
		tmp = (x * (y - a)) / z;
	elseif (a <= 1.8e+29)
		tmp = t / ((z - a) / z);
	elseif (a <= 3.2e+91)
		tmp = t_1;
	elseif (a <= 1.7e+96)
		tmp = t;
	elseif (a <= 6.2e+132)
		tmp = x;
	elseif (a <= 7.2e+163)
		tmp = (y - z) * (t / a);
	elseif (a <= 1.35e+164)
		tmp = a * (-x / z);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.5e+109], x, If[LessEqual[a, -0.72], t$95$1, If[LessEqual[a, 2.7e-242], N[(t - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e-54], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.8e+29], N[(t / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e+91], t$95$1, If[LessEqual[a, 1.7e+96], t, If[LessEqual[a, 6.2e+132], x, If[LessEqual[a, 7.2e+163], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e+164], N[(a * N[((-x) / z), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -0.72:\\
\;\;\;\;t\_1\\

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

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

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

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

\mathbf{elif}\;a \leq 1.7 \cdot 10^{+96}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+132}:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if a < -9.49999999999999972e109 or 1.7e96 < a < 6.1999999999999995e132 or 1.35000000000000003e164 < a

    1. Initial program 86.8%

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

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

    if -9.49999999999999972e109 < a < -0.71999999999999997 or 1.79999999999999988e29 < a < 3.19999999999999989e91

    1. Initial program 87.5%

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

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

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

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

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

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

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

    if -0.71999999999999997 < a < 2.7e-242

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7e-242 < a < 1.20000000000000007e-54

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

    if 1.20000000000000007e-54 < a < 1.79999999999999988e29

    1. Initial program 72.2%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t \cdot z}}{a - z} \]
      3. distribute-rgt-neg-out39.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-t \cdot \left(-z\right)}{-\left(a - z\right)}} \]
      3. add-sqr-sqrt30.1%

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

        \[\leadsto \frac{-t \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\left(a - z\right)} \]
      5. sqr-neg17.4%

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

        \[\leadsto \frac{-t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{-\left(a - z\right)} \]
      7. add-sqr-sqrt2.5%

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

        \[\leadsto \frac{\color{blue}{t \cdot \left(-z\right)}}{-\left(a - z\right)} \]
      9. add-sqr-sqrt1.6%

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)}}{-\left(a - z\right)} \]
      10. sqrt-unprod2.9%

        \[\leadsto \frac{t \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\left(a - z\right)} \]
      11. sqr-neg2.9%

        \[\leadsto \frac{t \cdot \sqrt{\color{blue}{z \cdot z}}}{-\left(a - z\right)} \]
      12. sqrt-unprod8.5%

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{-\left(a - z\right)} \]
      13. add-sqr-sqrt39.0%

        \[\leadsto \frac{t \cdot \color{blue}{z}}{-\left(a - z\right)} \]
      14. sub-neg39.0%

        \[\leadsto \frac{t \cdot z}{-\color{blue}{\left(a + \left(-z\right)\right)}} \]
      15. distribute-neg-in39.0%

        \[\leadsto \frac{t \cdot z}{\color{blue}{\left(-a\right) + \left(-\left(-z\right)\right)}} \]
      16. add-sqr-sqrt30.1%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}\right)} \]
      17. sqrt-unprod17.1%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)} \]
      18. sqr-neg17.1%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\sqrt{\color{blue}{z \cdot z}}\right)} \]
      19. sqrt-unprod0.9%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)} \]
      20. add-sqr-sqrt2.3%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{z}\right)} \]
      21. add-sqr-sqrt1.5%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      22. sqrt-unprod3.4%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      23. sqr-neg3.4%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \sqrt{\color{blue}{z \cdot z}}} \]
    10. Applied egg-rr39.0%

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

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

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

        \[\leadsto \frac{t}{\frac{\color{blue}{z - a}}{z}} \]
    12. Simplified59.1%

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

    if 3.19999999999999989e91 < a < 1.7e96

    1. Initial program 100.0%

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

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

    if 6.1999999999999995e132 < a < 7.19999999999999955e163

    1. Initial program 96.7%

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

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

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

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

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

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

    if 7.19999999999999955e163 < a < 1.35000000000000003e164

    1. Initial program 2.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{a \cdot x}{z}} \]
      2. distribute-neg-frac4.7%

        \[\leadsto \color{blue}{\frac{-a \cdot x}{z}} \]
      3. distribute-lft-neg-out4.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{+109}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -0.72:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-242}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-54}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+29}:\\ \;\;\;\;\frac{t}{\frac{z - a}{z}}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+91}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+132}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.2 \cdot 10^{+163}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+164}:\\ \;\;\;\;a \cdot \frac{-x}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 45.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{\frac{a}{t - x}}\\ \mathbf{if}\;a \leq -1.05 \cdot 10^{+106}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.65:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-242}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-48}:\\ \;\;\;\;\frac{-x}{\frac{z}{a - y}}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+29}:\\ \;\;\;\;\frac{t}{\frac{z - a}{z}}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+131}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+164}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+164}:\\ \;\;\;\;a \cdot \frac{-x}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ y (/ a (- t x)))))
   (if (<= a -1.05e+106)
     x
     (if (<= a -1.65)
       t_1
       (if (<= a 1.2e-242)
         (- t (/ t (/ z y)))
         (if (<= a 3.8e-48)
           (/ (- x) (/ z (- a y)))
           (if (<= a 1.2e+29)
             (/ t (/ (- z a) z))
             (if (<= a 1.4e+91)
               t_1
               (if (<= a 1.12e+96)
                 t
                 (if (<= a 4e+131)
                   x
                   (if (<= a 1.3e+164)
                     (* (- y z) (/ t a))
                     (if (<= a 1.35e+164) (* a (/ (- x) z)) x))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a / (t - x));
	double tmp;
	if (a <= -1.05e+106) {
		tmp = x;
	} else if (a <= -1.65) {
		tmp = t_1;
	} else if (a <= 1.2e-242) {
		tmp = t - (t / (z / y));
	} else if (a <= 3.8e-48) {
		tmp = -x / (z / (a - y));
	} else if (a <= 1.2e+29) {
		tmp = t / ((z - a) / z);
	} else if (a <= 1.4e+91) {
		tmp = t_1;
	} else if (a <= 1.12e+96) {
		tmp = t;
	} else if (a <= 4e+131) {
		tmp = x;
	} else if (a <= 1.3e+164) {
		tmp = (y - z) * (t / a);
	} else if (a <= 1.35e+164) {
		tmp = a * (-x / z);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y / (a / (t - x))
    if (a <= (-1.05d+106)) then
        tmp = x
    else if (a <= (-1.65d0)) then
        tmp = t_1
    else if (a <= 1.2d-242) then
        tmp = t - (t / (z / y))
    else if (a <= 3.8d-48) then
        tmp = -x / (z / (a - y))
    else if (a <= 1.2d+29) then
        tmp = t / ((z - a) / z)
    else if (a <= 1.4d+91) then
        tmp = t_1
    else if (a <= 1.12d+96) then
        tmp = t
    else if (a <= 4d+131) then
        tmp = x
    else if (a <= 1.3d+164) then
        tmp = (y - z) * (t / a)
    else if (a <= 1.35d+164) then
        tmp = a * (-x / z)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (a / (t - x));
	double tmp;
	if (a <= -1.05e+106) {
		tmp = x;
	} else if (a <= -1.65) {
		tmp = t_1;
	} else if (a <= 1.2e-242) {
		tmp = t - (t / (z / y));
	} else if (a <= 3.8e-48) {
		tmp = -x / (z / (a - y));
	} else if (a <= 1.2e+29) {
		tmp = t / ((z - a) / z);
	} else if (a <= 1.4e+91) {
		tmp = t_1;
	} else if (a <= 1.12e+96) {
		tmp = t;
	} else if (a <= 4e+131) {
		tmp = x;
	} else if (a <= 1.3e+164) {
		tmp = (y - z) * (t / a);
	} else if (a <= 1.35e+164) {
		tmp = a * (-x / z);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y / (a / (t - x))
	tmp = 0
	if a <= -1.05e+106:
		tmp = x
	elif a <= -1.65:
		tmp = t_1
	elif a <= 1.2e-242:
		tmp = t - (t / (z / y))
	elif a <= 3.8e-48:
		tmp = -x / (z / (a - y))
	elif a <= 1.2e+29:
		tmp = t / ((z - a) / z)
	elif a <= 1.4e+91:
		tmp = t_1
	elif a <= 1.12e+96:
		tmp = t
	elif a <= 4e+131:
		tmp = x
	elif a <= 1.3e+164:
		tmp = (y - z) * (t / a)
	elif a <= 1.35e+164:
		tmp = a * (-x / z)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y / Float64(a / Float64(t - x)))
	tmp = 0.0
	if (a <= -1.05e+106)
		tmp = x;
	elseif (a <= -1.65)
		tmp = t_1;
	elseif (a <= 1.2e-242)
		tmp = Float64(t - Float64(t / Float64(z / y)));
	elseif (a <= 3.8e-48)
		tmp = Float64(Float64(-x) / Float64(z / Float64(a - y)));
	elseif (a <= 1.2e+29)
		tmp = Float64(t / Float64(Float64(z - a) / z));
	elseif (a <= 1.4e+91)
		tmp = t_1;
	elseif (a <= 1.12e+96)
		tmp = t;
	elseif (a <= 4e+131)
		tmp = x;
	elseif (a <= 1.3e+164)
		tmp = Float64(Float64(y - z) * Float64(t / a));
	elseif (a <= 1.35e+164)
		tmp = Float64(a * Float64(Float64(-x) / z));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y / (a / (t - x));
	tmp = 0.0;
	if (a <= -1.05e+106)
		tmp = x;
	elseif (a <= -1.65)
		tmp = t_1;
	elseif (a <= 1.2e-242)
		tmp = t - (t / (z / y));
	elseif (a <= 3.8e-48)
		tmp = -x / (z / (a - y));
	elseif (a <= 1.2e+29)
		tmp = t / ((z - a) / z);
	elseif (a <= 1.4e+91)
		tmp = t_1;
	elseif (a <= 1.12e+96)
		tmp = t;
	elseif (a <= 4e+131)
		tmp = x;
	elseif (a <= 1.3e+164)
		tmp = (y - z) * (t / a);
	elseif (a <= 1.35e+164)
		tmp = a * (-x / z);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.05e+106], x, If[LessEqual[a, -1.65], t$95$1, If[LessEqual[a, 1.2e-242], N[(t - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.8e-48], N[((-x) / N[(z / N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e+29], N[(t / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.4e+91], t$95$1, If[LessEqual[a, 1.12e+96], t, If[LessEqual[a, 4e+131], x, If[LessEqual[a, 1.3e+164], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e+164], N[(a * N[((-x) / z), $MachinePrecision]), $MachinePrecision], x]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.65:\\
\;\;\;\;t\_1\\

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

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

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

\mathbf{elif}\;a \leq 1.4 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 4 \cdot 10^{+131}:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 8 regimes
  2. if a < -1.05000000000000002e106 or 1.1199999999999999e96 < a < 3.9999999999999996e131 or 1.35000000000000003e164 < a

    1. Initial program 86.8%

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

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

    if -1.05000000000000002e106 < a < -1.6499999999999999 or 1.2e29 < a < 1.3999999999999999e91

    1. Initial program 87.5%

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

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

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

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

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

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

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

    if -1.6499999999999999 < a < 1.2e-242

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2e-242 < a < 3.80000000000000002e-48

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.80000000000000002e-48 < a < 1.2e29

    1. Initial program 72.2%

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t \cdot z}}{a - z} \]
      3. distribute-rgt-neg-out39.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{-t \cdot \left(-z\right)}{-\left(a - z\right)}} \]
      3. add-sqr-sqrt30.1%

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

        \[\leadsto \frac{-t \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\left(a - z\right)} \]
      5. sqr-neg17.4%

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

        \[\leadsto \frac{-t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{-\left(a - z\right)} \]
      7. add-sqr-sqrt2.5%

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

        \[\leadsto \frac{\color{blue}{t \cdot \left(-z\right)}}{-\left(a - z\right)} \]
      9. add-sqr-sqrt1.6%

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)}}{-\left(a - z\right)} \]
      10. sqrt-unprod2.9%

        \[\leadsto \frac{t \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\left(a - z\right)} \]
      11. sqr-neg2.9%

        \[\leadsto \frac{t \cdot \sqrt{\color{blue}{z \cdot z}}}{-\left(a - z\right)} \]
      12. sqrt-unprod8.5%

        \[\leadsto \frac{t \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}}{-\left(a - z\right)} \]
      13. add-sqr-sqrt39.0%

        \[\leadsto \frac{t \cdot \color{blue}{z}}{-\left(a - z\right)} \]
      14. sub-neg39.0%

        \[\leadsto \frac{t \cdot z}{-\color{blue}{\left(a + \left(-z\right)\right)}} \]
      15. distribute-neg-in39.0%

        \[\leadsto \frac{t \cdot z}{\color{blue}{\left(-a\right) + \left(-\left(-z\right)\right)}} \]
      16. add-sqr-sqrt30.1%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}\right)} \]
      17. sqrt-unprod17.1%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right)} \]
      18. sqr-neg17.1%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\sqrt{\color{blue}{z \cdot z}}\right)} \]
      19. sqrt-unprod0.9%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{\sqrt{z} \cdot \sqrt{z}}\right)} \]
      20. add-sqr-sqrt2.3%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \left(-\color{blue}{z}\right)} \]
      21. add-sqr-sqrt1.5%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      22. sqrt-unprod3.4%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      23. sqr-neg3.4%

        \[\leadsto \frac{t \cdot z}{\left(-a\right) + \sqrt{\color{blue}{z \cdot z}}} \]
    10. Applied egg-rr39.0%

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

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

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

        \[\leadsto \frac{t}{\frac{\color{blue}{z - a}}{z}} \]
    12. Simplified59.1%

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

    if 1.3999999999999999e91 < a < 1.1199999999999999e96

    1. Initial program 100.0%

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

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

    if 3.9999999999999996e131 < a < 1.3e164

    1. Initial program 96.7%

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

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

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

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

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

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

    if 1.3e164 < a < 1.35000000000000003e164

    1. Initial program 2.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\frac{a \cdot x}{z}} \]
      2. distribute-neg-frac4.7%

        \[\leadsto \color{blue}{\frac{-a \cdot x}{z}} \]
      3. distribute-lft-neg-out4.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.05 \cdot 10^{+106}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.65:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-242}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-48}:\\ \;\;\;\;\frac{-x}{\frac{z}{a - y}}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+29}:\\ \;\;\;\;\frac{t}{\frac{z - a}{z}}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+91}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+131}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+164}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+164}:\\ \;\;\;\;a \cdot \frac{-x}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 90.7% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 90.8%

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

    if -9.9999999999999996e-236 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.0000000000000002e-210

    1. Initial program 6.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 57.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;x \leq -16000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -2.4 \cdot 10^{-36}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{-133}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 6 \cdot 10^{-23}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 1.06 \cdot 10^{+114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 3.15 \cdot 10^{+156}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{a - y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- t x) (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= x -16000000000.0)
     t_1
     (if (<= x -2.4e-36)
       (+ t (/ (* x y) z))
       (if (<= x -2.9e-133)
         t_1
         (if (<= x 6e-23)
           t_2
           (if (<= x 1.06e+114)
             t_1
             (if (<= x 3.15e+156) t_2 (* (- t x) (/ (- a y) z))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t - x) * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -16000000000.0) {
		tmp = t_1;
	} else if (x <= -2.4e-36) {
		tmp = t + ((x * y) / z);
	} else if (x <= -2.9e-133) {
		tmp = t_1;
	} else if (x <= 6e-23) {
		tmp = t_2;
	} else if (x <= 1.06e+114) {
		tmp = t_1;
	} else if (x <= 3.15e+156) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x + ((t - x) * (y / a))
    t_2 = t * ((y - z) / (a - z))
    if (x <= (-16000000000.0d0)) then
        tmp = t_1
    else if (x <= (-2.4d-36)) then
        tmp = t + ((x * y) / z)
    else if (x <= (-2.9d-133)) then
        tmp = t_1
    else if (x <= 6d-23) then
        tmp = t_2
    else if (x <= 1.06d+114) then
        tmp = t_1
    else if (x <= 3.15d+156) then
        tmp = t_2
    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 + ((t - x) * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -16000000000.0) {
		tmp = t_1;
	} else if (x <= -2.4e-36) {
		tmp = t + ((x * y) / z);
	} else if (x <= -2.9e-133) {
		tmp = t_1;
	} else if (x <= 6e-23) {
		tmp = t_2;
	} else if (x <= 1.06e+114) {
		tmp = t_1;
	} else if (x <= 3.15e+156) {
		tmp = t_2;
	} else {
		tmp = (t - x) * ((a - y) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((t - x) * (y / a))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if x <= -16000000000.0:
		tmp = t_1
	elif x <= -2.4e-36:
		tmp = t + ((x * y) / z)
	elif x <= -2.9e-133:
		tmp = t_1
	elif x <= 6e-23:
		tmp = t_2
	elif x <= 1.06e+114:
		tmp = t_1
	elif x <= 3.15e+156:
		tmp = t_2
	else:
		tmp = (t - x) * ((a - y) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (x <= -16000000000.0)
		tmp = t_1;
	elseif (x <= -2.4e-36)
		tmp = Float64(t + Float64(Float64(x * y) / z));
	elseif (x <= -2.9e-133)
		tmp = t_1;
	elseif (x <= 6e-23)
		tmp = t_2;
	elseif (x <= 1.06e+114)
		tmp = t_1;
	elseif (x <= 3.15e+156)
		tmp = t_2;
	else
		tmp = Float64(Float64(t - x) * Float64(Float64(a - y) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((t - x) * (y / a));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (x <= -16000000000.0)
		tmp = t_1;
	elseif (x <= -2.4e-36)
		tmp = t + ((x * y) / z);
	elseif (x <= -2.9e-133)
		tmp = t_1;
	elseif (x <= 6e-23)
		tmp = t_2;
	elseif (x <= 1.06e+114)
		tmp = t_1;
	elseif (x <= 3.15e+156)
		tmp = t_2;
	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[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -16000000000.0], t$95$1, If[LessEqual[x, -2.4e-36], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.9e-133], t$95$1, If[LessEqual[x, 6e-23], t$95$2, If[LessEqual[x, 1.06e+114], t$95$1, If[LessEqual[x, 3.15e+156], t$95$2, N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -2.4 \cdot 10^{-36}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\

\mathbf{elif}\;x \leq -2.9 \cdot 10^{-133}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 6 \cdot 10^{-23}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 1.06 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 3.15 \cdot 10^{+156}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.6e10 or -2.4e-36 < x < -2.8999999999999998e-133 or 6.00000000000000006e-23 < x < 1.05999999999999993e114

    1. Initial program 79.7%

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

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

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

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

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

    if -1.6e10 < x < -2.4e-36

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{\color{blue}{-x \cdot y}}{z} \]
      2. distribute-lft-neg-out81.4%

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

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

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

    if -2.8999999999999998e-133 < x < 6.00000000000000006e-23 or 1.05999999999999993e114 < x < 3.14999999999999991e156

    1. Initial program 83.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*r/75.2%

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

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

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

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

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

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

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

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

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

    if 3.14999999999999991e156 < x

    1. Initial program 63.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -16000000000:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -2.4 \cdot 10^{-36}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{elif}\;x \leq -2.9 \cdot 10^{-133}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq 6 \cdot 10^{-23}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.06 \cdot 10^{+114}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq 3.15 \cdot 10^{+156}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{a - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 57.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{if}\;x \leq -19000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-34}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{elif}\;x \leq -9.2 \cdot 10^{-143}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+114}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 3.15 \cdot 10^{+156}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{a - y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* (- t x) (/ y a)))))
   (if (<= x -19000000.0)
     t_2
     (if (<= x -1.6e-34)
       (+ t (/ (* x y) z))
       (if (<= x -9.2e-143)
         (+ x (/ y (/ a (- t x))))
         (if (<= x 1.7e-12)
           t_1
           (if (<= x 1.3e+114)
             t_2
             (if (<= x 3.15e+156) t_1 (* (- t x) (/ (- a y) z))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + ((t - x) * (y / a));
	double tmp;
	if (x <= -19000000.0) {
		tmp = t_2;
	} else if (x <= -1.6e-34) {
		tmp = t + ((x * y) / z);
	} else if (x <= -9.2e-143) {
		tmp = x + (y / (a / (t - x)));
	} else if (x <= 1.7e-12) {
		tmp = t_1;
	} else if (x <= 1.3e+114) {
		tmp = t_2;
	} else if (x <= 3.15e+156) {
		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) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = x + ((t - x) * (y / a))
    if (x <= (-19000000.0d0)) then
        tmp = t_2
    else if (x <= (-1.6d-34)) then
        tmp = t + ((x * y) / z)
    else if (x <= (-9.2d-143)) then
        tmp = x + (y / (a / (t - x)))
    else if (x <= 1.7d-12) then
        tmp = t_1
    else if (x <= 1.3d+114) then
        tmp = t_2
    else if (x <= 3.15d+156) 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 = t * ((y - z) / (a - z));
	double t_2 = x + ((t - x) * (y / a));
	double tmp;
	if (x <= -19000000.0) {
		tmp = t_2;
	} else if (x <= -1.6e-34) {
		tmp = t + ((x * y) / z);
	} else if (x <= -9.2e-143) {
		tmp = x + (y / (a / (t - x)));
	} else if (x <= 1.7e-12) {
		tmp = t_1;
	} else if (x <= 1.3e+114) {
		tmp = t_2;
	} else if (x <= 3.15e+156) {
		tmp = t_1;
	} else {
		tmp = (t - x) * ((a - y) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + ((t - x) * (y / a))
	tmp = 0
	if x <= -19000000.0:
		tmp = t_2
	elif x <= -1.6e-34:
		tmp = t + ((x * y) / z)
	elif x <= -9.2e-143:
		tmp = x + (y / (a / (t - x)))
	elif x <= 1.7e-12:
		tmp = t_1
	elif x <= 1.3e+114:
		tmp = t_2
	elif x <= 3.15e+156:
		tmp = t_1
	else:
		tmp = (t - x) * ((a - y) / z)
	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(Float64(t - x) * Float64(y / a)))
	tmp = 0.0
	if (x <= -19000000.0)
		tmp = t_2;
	elseif (x <= -1.6e-34)
		tmp = Float64(t + Float64(Float64(x * y) / z));
	elseif (x <= -9.2e-143)
		tmp = Float64(x + Float64(y / Float64(a / Float64(t - x))));
	elseif (x <= 1.7e-12)
		tmp = t_1;
	elseif (x <= 1.3e+114)
		tmp = t_2;
	elseif (x <= 3.15e+156)
		tmp = t_1;
	else
		tmp = Float64(Float64(t - x) * Float64(Float64(a - y) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x + ((t - x) * (y / a));
	tmp = 0.0;
	if (x <= -19000000.0)
		tmp = t_2;
	elseif (x <= -1.6e-34)
		tmp = t + ((x * y) / z);
	elseif (x <= -9.2e-143)
		tmp = x + (y / (a / (t - x)));
	elseif (x <= 1.7e-12)
		tmp = t_1;
	elseif (x <= 1.3e+114)
		tmp = t_2;
	elseif (x <= 3.15e+156)
		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[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -19000000.0], t$95$2, If[LessEqual[x, -1.6e-34], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -9.2e-143], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e-12], t$95$1, If[LessEqual[x, 1.3e+114], t$95$2, If[LessEqual[x, 3.15e+156], t$95$1, N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;x \leq 1.7 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.3 \cdot 10^{+114}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 3.15 \cdot 10^{+156}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.9e7 or 1.7e-12 < x < 1.3e114

    1. Initial program 77.0%

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

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

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

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

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

    if -1.9e7 < x < -1.60000000000000001e-34

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{\color{blue}{-x \cdot y}}{z} \]
      2. distribute-lft-neg-out81.4%

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

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

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

    if -1.60000000000000001e-34 < x < -9.20000000000000045e-143

    1. Initial program 94.3%

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

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

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

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

    if -9.20000000000000045e-143 < x < 1.7e-12 or 1.3e114 < x < 3.14999999999999991e156

    1. Initial program 83.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*r/75.9%

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

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

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

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

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

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

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

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

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

    if 3.14999999999999991e156 < x

    1. Initial program 63.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -19000000:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -1.6 \cdot 10^{-34}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{elif}\;x \leq -9.2 \cdot 10^{-143}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{-12}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+114}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq 3.15 \cdot 10^{+156}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{a - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 44.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -40:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;a \leq 1.2 \cdot 10^{+38}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 6 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{+96}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.80000000000000016e155 or 1.2500000000000001e96 < a

    1. Initial program 87.7%

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

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

    if -2.80000000000000016e155 < a < -40 or 1.20000000000000009e38 < a < 5.99999999999999957e90

    1. Initial program 85.1%

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

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

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

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

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

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

    if -40 < a < 2.79999999999999983e-242

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.79999999999999983e-242 < a < 6.0000000000000004e-53

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - a}{z}} \]
      3. /-rgt-identity51.3%

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

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

    if 6.0000000000000004e-53 < a < 1.20000000000000009e38 or 5.99999999999999957e90 < a < 1.2500000000000001e96

    1. Initial program 79.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{+155}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -40:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-242}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-53}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+90}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 44.8% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -88:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;a \leq 1.2 \cdot 10^{+38}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 6 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.2 \cdot 10^{+96}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.36e157 or 1.19999999999999996e96 < a

    1. Initial program 87.7%

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

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

    if -1.36e157 < a < -88 or 1.20000000000000009e38 < a < 5.99999999999999957e90

    1. Initial program 85.1%

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

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

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

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

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

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

    if -88 < a < 2.7e-242

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7e-242 < a < 5.3999999999999999e-49

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - a}{z}} \]
      3. /-rgt-identity51.3%

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

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

    if 5.3999999999999999e-49 < a < 1.20000000000000009e38 or 5.99999999999999957e90 < a < 1.19999999999999996e96

    1. Initial program 79.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.36 \cdot 10^{+157}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -88:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-242}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-49}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+90}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 44.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+155}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -43:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-242}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-49}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+91}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.5e+155)
   x
   (if (<= a -43.0)
     (* (- y z) (/ t a))
     (if (<= a 1.65e-242)
       (- t (/ t (/ z y)))
       (if (<= a 5.8e-49)
         (* x (/ (- y a) z))
         (if (<= a 1.25e+38)
           t
           (if (<= a 2.9e+91)
             (/ t (/ a (- y z)))
             (if (<= a 1.12e+96) t x))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.5e+155) {
		tmp = x;
	} else if (a <= -43.0) {
		tmp = (y - z) * (t / a);
	} else if (a <= 1.65e-242) {
		tmp = t - (t / (z / y));
	} else if (a <= 5.8e-49) {
		tmp = x * ((y - a) / z);
	} else if (a <= 1.25e+38) {
		tmp = t;
	} else if (a <= 2.9e+91) {
		tmp = t / (a / (y - z));
	} else if (a <= 1.12e+96) {
		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 <= (-2.5d+155)) then
        tmp = x
    else if (a <= (-43.0d0)) then
        tmp = (y - z) * (t / a)
    else if (a <= 1.65d-242) then
        tmp = t - (t / (z / y))
    else if (a <= 5.8d-49) then
        tmp = x * ((y - a) / z)
    else if (a <= 1.25d+38) then
        tmp = t
    else if (a <= 2.9d+91) then
        tmp = t / (a / (y - z))
    else if (a <= 1.12d+96) 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 <= -2.5e+155) {
		tmp = x;
	} else if (a <= -43.0) {
		tmp = (y - z) * (t / a);
	} else if (a <= 1.65e-242) {
		tmp = t - (t / (z / y));
	} else if (a <= 5.8e-49) {
		tmp = x * ((y - a) / z);
	} else if (a <= 1.25e+38) {
		tmp = t;
	} else if (a <= 2.9e+91) {
		tmp = t / (a / (y - z));
	} else if (a <= 1.12e+96) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.5e+155:
		tmp = x
	elif a <= -43.0:
		tmp = (y - z) * (t / a)
	elif a <= 1.65e-242:
		tmp = t - (t / (z / y))
	elif a <= 5.8e-49:
		tmp = x * ((y - a) / z)
	elif a <= 1.25e+38:
		tmp = t
	elif a <= 2.9e+91:
		tmp = t / (a / (y - z))
	elif a <= 1.12e+96:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.5e+155)
		tmp = x;
	elseif (a <= -43.0)
		tmp = Float64(Float64(y - z) * Float64(t / a));
	elseif (a <= 1.65e-242)
		tmp = Float64(t - Float64(t / Float64(z / y)));
	elseif (a <= 5.8e-49)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (a <= 1.25e+38)
		tmp = t;
	elseif (a <= 2.9e+91)
		tmp = Float64(t / Float64(a / Float64(y - z)));
	elseif (a <= 1.12e+96)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.5e+155)
		tmp = x;
	elseif (a <= -43.0)
		tmp = (y - z) * (t / a);
	elseif (a <= 1.65e-242)
		tmp = t - (t / (z / y));
	elseif (a <= 5.8e-49)
		tmp = x * ((y - a) / z);
	elseif (a <= 1.25e+38)
		tmp = t;
	elseif (a <= 2.9e+91)
		tmp = t / (a / (y - z));
	elseif (a <= 1.12e+96)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e+155], x, If[LessEqual[a, -43.0], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.65e-242], N[(t - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.8e-49], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e+38], t, If[LessEqual[a, 2.9e+91], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.12e+96], t, x]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;a \leq 1.25 \cdot 10^{+38}:\\
\;\;\;\;t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -2.5e155 or 1.1199999999999999e96 < a

    1. Initial program 87.7%

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

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

    if -2.5e155 < a < -43

    1. Initial program 86.6%

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

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

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

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

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

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

    if -43 < a < 1.64999999999999991e-242

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.64999999999999991e-242 < a < 5.8e-49

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - a}{z}} \]
      3. /-rgt-identity51.3%

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

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

    if 5.8e-49 < a < 1.24999999999999992e38 or 2.90000000000000014e91 < a < 1.1199999999999999e96

    1. Initial program 78.4%

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

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

    if 1.24999999999999992e38 < a < 2.90000000000000014e91

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+155}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -43:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-242}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-49}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+91}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 45.5% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 1.9 \cdot 10^{+38}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.55 \cdot 10^{+96}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.9999999999999999e99 or 1.5499999999999999e96 < a

    1. Initial program 87.1%

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

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

    if -3.9999999999999999e99 < a < 2.7499999999999999e-242

    1. Initial program 75.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7499999999999999e-242 < a < 4.6000000000000001e-48

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{1} \cdot \frac{y - a}{z}} \]
      3. /-rgt-identity51.3%

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

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

    if 4.6000000000000001e-48 < a < 1.8999999999999999e38 or 1.14999999999999996e91 < a < 1.5499999999999999e96

    1. Initial program 78.4%

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

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

    if 1.8999999999999999e38 < a < 1.14999999999999996e91

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{+99}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.75 \cdot 10^{-242}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-48}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+91}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 50.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -1.85:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;a \leq 2.95 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -2.19999999999999992e106 or 1.1199999999999999e96 < a

    1. Initial program 86.5%

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

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

    if -2.19999999999999992e106 < a < -1.8500000000000001 or 1.65e38 < a < 2.9500000000000001e91

    1. Initial program 86.9%

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

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

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

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

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

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

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

    if -1.8500000000000001 < a < 2.4999999999999998e-245

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4999999999999998e-245 < a < 1.65e38

    1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{\color{blue}{-x \cdot y}}{z} \]
      2. distribute-lft-neg-out63.1%

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

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

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

    if 2.9500000000000001e91 < a < 1.1199999999999999e96

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{+106}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.85:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-245}:\\ \;\;\;\;t - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+38}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 2.95 \cdot 10^{+91}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 50.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -42:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2.5 \cdot 10^{-245}:\\
\;\;\;\;t \cdot \left(\frac{a - y}{z} + 1\right)\\

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

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

\mathbf{elif}\;a \leq 1.46 \cdot 10^{+96}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.39999999999999993e110 or 1.4600000000000001e96 < a

    1. Initial program 86.5%

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

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

    if -1.39999999999999993e110 < a < -42 or 2.3000000000000001e38 < a < 3.50000000000000001e91

    1. Initial program 86.9%

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

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

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

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

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

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

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

    if -42 < a < 2.4999999999999998e-245

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified80.4%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around -inf 64.8%

      \[\leadsto \color{blue}{t \cdot \left(1 + -1 \cdot \frac{y - a}{z}\right)} \]
    7. Step-by-step derivation
      1. neg-mul-164.8%

        \[\leadsto t \cdot \left(1 + \color{blue}{\left(-\frac{y - a}{z}\right)}\right) \]
      2. unsub-neg64.8%

        \[\leadsto t \cdot \color{blue}{\left(1 - \frac{y - a}{z}\right)} \]
    8. Simplified64.8%

      \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y - a}{z}\right)} \]

    if 2.4999999999999998e-245 < a < 2.3000000000000001e38

    1. Initial program 69.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 68.3%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+68.3%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--68.3%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub68.3%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg68.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg68.3%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--68.3%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*76.1%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified76.1%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 63.0%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Taylor expanded in t around 0 63.1%

      \[\leadsto t - \frac{\color{blue}{-1 \cdot \left(x \cdot y\right)}}{z} \]
    8. Step-by-step derivation
      1. mul-1-neg63.1%

        \[\leadsto t - \frac{\color{blue}{-x \cdot y}}{z} \]
      2. distribute-lft-neg-out63.1%

        \[\leadsto t - \frac{\color{blue}{\left(-x\right) \cdot y}}{z} \]
      3. *-commutative63.1%

        \[\leadsto t - \frac{\color{blue}{y \cdot \left(-x\right)}}{z} \]
    9. Simplified63.1%

      \[\leadsto t - \frac{\color{blue}{y \cdot \left(-x\right)}}{z} \]

    if 3.50000000000000001e91 < a < 1.4600000000000001e96

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 100.0%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification58.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.4 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -42:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-245}:\\ \;\;\;\;t \cdot \left(\frac{a - y}{z} + 1\right)\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+38}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+91}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 1.46 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 38.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{+106}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{+58}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -1100000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-222}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-42}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.15e+106)
   x
   (if (<= a -2.6e+58)
     (/ t (/ a y))
     (if (<= a -1100000000.0)
       x
       (if (<= a 3.6e-222)
         t
         (if (<= a 2.5e-42) (* y (/ x z)) (if (<= a 1.35e+38) t x)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.15e+106) {
		tmp = x;
	} else if (a <= -2.6e+58) {
		tmp = t / (a / y);
	} else if (a <= -1100000000.0) {
		tmp = x;
	} else if (a <= 3.6e-222) {
		tmp = t;
	} else if (a <= 2.5e-42) {
		tmp = y * (x / z);
	} else if (a <= 1.35e+38) {
		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 <= (-1.15d+106)) then
        tmp = x
    else if (a <= (-2.6d+58)) then
        tmp = t / (a / y)
    else if (a <= (-1100000000.0d0)) then
        tmp = x
    else if (a <= 3.6d-222) then
        tmp = t
    else if (a <= 2.5d-42) then
        tmp = y * (x / z)
    else if (a <= 1.35d+38) 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 <= -1.15e+106) {
		tmp = x;
	} else if (a <= -2.6e+58) {
		tmp = t / (a / y);
	} else if (a <= -1100000000.0) {
		tmp = x;
	} else if (a <= 3.6e-222) {
		tmp = t;
	} else if (a <= 2.5e-42) {
		tmp = y * (x / z);
	} else if (a <= 1.35e+38) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.15e+106:
		tmp = x
	elif a <= -2.6e+58:
		tmp = t / (a / y)
	elif a <= -1100000000.0:
		tmp = x
	elif a <= 3.6e-222:
		tmp = t
	elif a <= 2.5e-42:
		tmp = y * (x / z)
	elif a <= 1.35e+38:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.15e+106)
		tmp = x;
	elseif (a <= -2.6e+58)
		tmp = Float64(t / Float64(a / y));
	elseif (a <= -1100000000.0)
		tmp = x;
	elseif (a <= 3.6e-222)
		tmp = t;
	elseif (a <= 2.5e-42)
		tmp = Float64(y * Float64(x / z));
	elseif (a <= 1.35e+38)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.15e+106)
		tmp = x;
	elseif (a <= -2.6e+58)
		tmp = t / (a / y);
	elseif (a <= -1100000000.0)
		tmp = x;
	elseif (a <= 3.6e-222)
		tmp = t;
	elseif (a <= 2.5e-42)
		tmp = y * (x / z);
	elseif (a <= 1.35e+38)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.15e+106], x, If[LessEqual[a, -2.6e+58], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1100000000.0], x, If[LessEqual[a, 3.6e-222], t, If[LessEqual[a, 2.5e-42], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e+38], t, x]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{+106}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -2.6 \cdot 10^{+58}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

\mathbf{elif}\;a \leq -1100000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.6 \cdot 10^{-222}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 2.5 \cdot 10^{-42}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{elif}\;a \leq 1.35 \cdot 10^{+38}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.1500000000000001e106 or -2.59999999999999988e58 < a < -1.1e9 or 1.34999999999999998e38 < a

    1. Initial program 85.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 47.6%

      \[\leadsto \color{blue}{x} \]

    if -1.1500000000000001e106 < a < -2.59999999999999988e58

    1. Initial program 93.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 53.6%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. associate-/l*64.9%

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
      2. associate-/r/64.8%

        \[\leadsto \color{blue}{\frac{t}{a - z} \cdot \left(y - z\right)} \]
    5. Simplified64.8%

      \[\leadsto \color{blue}{\frac{t}{a - z} \cdot \left(y - z\right)} \]
    6. Taylor expanded in z around 0 37.7%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*38.1%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    8. Simplified38.1%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]

    if -1.1e9 < a < 3.59999999999999974e-222 or 2.50000000000000001e-42 < a < 1.34999999999999998e38

    1. Initial program 70.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 43.6%

      \[\leadsto \color{blue}{t} \]

    if 3.59999999999999974e-222 < a < 2.50000000000000001e-42

    1. Initial program 71.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 65.3%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+65.3%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--65.3%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub65.3%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg65.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg65.3%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--65.3%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*72.3%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified72.3%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 47.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-/l*48.0%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
      2. associate-/r/47.8%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - a\right)} \]
    8. Simplified47.8%

      \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - a\right)} \]
    9. Taylor expanded in y around inf 41.5%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. associate-*l/41.6%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
      2. *-commutative41.6%

        \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
    11. Simplified41.6%

      \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification44.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{+106}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.6 \cdot 10^{+58}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -1100000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-222}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-42}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 37.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{+56}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -13000000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-244}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-46}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.8e+110)
   x
   (if (<= a -7.2e+56)
     (/ t (/ a y))
     (if (<= a -13000000000000.0)
       x
       (if (<= a 2.4e-244)
         t
         (if (<= a 1.65e-46) (/ (* x y) z) (if (<= a 2.4e+38) t x)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.8e+110) {
		tmp = x;
	} else if (a <= -7.2e+56) {
		tmp = t / (a / y);
	} else if (a <= -13000000000000.0) {
		tmp = x;
	} else if (a <= 2.4e-244) {
		tmp = t;
	} else if (a <= 1.65e-46) {
		tmp = (x * y) / z;
	} else if (a <= 2.4e+38) {
		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 <= (-1.8d+110)) then
        tmp = x
    else if (a <= (-7.2d+56)) then
        tmp = t / (a / y)
    else if (a <= (-13000000000000.0d0)) then
        tmp = x
    else if (a <= 2.4d-244) then
        tmp = t
    else if (a <= 1.65d-46) then
        tmp = (x * y) / z
    else if (a <= 2.4d+38) 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 <= -1.8e+110) {
		tmp = x;
	} else if (a <= -7.2e+56) {
		tmp = t / (a / y);
	} else if (a <= -13000000000000.0) {
		tmp = x;
	} else if (a <= 2.4e-244) {
		tmp = t;
	} else if (a <= 1.65e-46) {
		tmp = (x * y) / z;
	} else if (a <= 2.4e+38) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.8e+110:
		tmp = x
	elif a <= -7.2e+56:
		tmp = t / (a / y)
	elif a <= -13000000000000.0:
		tmp = x
	elif a <= 2.4e-244:
		tmp = t
	elif a <= 1.65e-46:
		tmp = (x * y) / z
	elif a <= 2.4e+38:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.8e+110)
		tmp = x;
	elseif (a <= -7.2e+56)
		tmp = Float64(t / Float64(a / y));
	elseif (a <= -13000000000000.0)
		tmp = x;
	elseif (a <= 2.4e-244)
		tmp = t;
	elseif (a <= 1.65e-46)
		tmp = Float64(Float64(x * y) / z);
	elseif (a <= 2.4e+38)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.8e+110)
		tmp = x;
	elseif (a <= -7.2e+56)
		tmp = t / (a / y);
	elseif (a <= -13000000000000.0)
		tmp = x;
	elseif (a <= 2.4e-244)
		tmp = t;
	elseif (a <= 1.65e-46)
		tmp = (x * y) / z;
	elseif (a <= 2.4e+38)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.8e+110], x, If[LessEqual[a, -7.2e+56], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -13000000000000.0], x, If[LessEqual[a, 2.4e-244], t, If[LessEqual[a, 1.65e-46], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 2.4e+38], t, x]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+110}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -7.2 \cdot 10^{+56}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

\mathbf{elif}\;a \leq -13000000000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.4 \cdot 10^{-244}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1.65 \cdot 10^{-46}:\\
\;\;\;\;\frac{x \cdot y}{z}\\

\mathbf{elif}\;a \leq 2.4 \cdot 10^{+38}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.7999999999999998e110 or -7.19999999999999996e56 < a < -1.3e13 or 2.40000000000000017e38 < a

    1. Initial program 85.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 47.6%

      \[\leadsto \color{blue}{x} \]

    if -1.7999999999999998e110 < a < -7.19999999999999996e56

    1. Initial program 93.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 53.6%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. associate-/l*64.9%

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
      2. associate-/r/64.8%

        \[\leadsto \color{blue}{\frac{t}{a - z} \cdot \left(y - z\right)} \]
    5. Simplified64.8%

      \[\leadsto \color{blue}{\frac{t}{a - z} \cdot \left(y - z\right)} \]
    6. Taylor expanded in z around 0 37.7%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*38.1%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    8. Simplified38.1%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]

    if -1.3e13 < a < 2.40000000000000016e-244 or 1.65000000000000007e-46 < a < 2.40000000000000017e38

    1. Initial program 72.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 43.7%

      \[\leadsto \color{blue}{t} \]

    if 2.40000000000000016e-244 < a < 1.65000000000000007e-46

    1. Initial program 66.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 70.6%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+70.6%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--70.6%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub70.6%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg70.6%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg70.6%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--70.6%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*76.5%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified76.5%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 50.0%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-/l*50.0%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
      2. associate-/r/44.2%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - a\right)} \]
    8. Simplified44.2%

      \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - a\right)} \]
    9. Taylor expanded in y around inf 41.7%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification44.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+110}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{+56}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -13000000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-244}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-46}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 69.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \mathbf{if}\;a \leq -0.97:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-124}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-80}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.18 \cdot 10^{+38}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) a)))))
   (if (<= a -0.97)
     t_1
     (if (<= a 5.6e-124)
       (+ t (/ (* y (- x t)) z))
       (if (<= a 1.9e-80)
         (+ x (* (- t x) (/ y a)))
         (if (<= a 1.18e+38) (+ t (/ (* x y) z)) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / a));
	double tmp;
	if (a <= -0.97) {
		tmp = t_1;
	} else if (a <= 5.6e-124) {
		tmp = t + ((y * (x - t)) / z);
	} else if (a <= 1.9e-80) {
		tmp = x + ((t - x) * (y / a));
	} else if (a <= 1.18e+38) {
		tmp = t + ((x * y) / 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 - z) * ((t - x) / a))
    if (a <= (-0.97d0)) then
        tmp = t_1
    else if (a <= 5.6d-124) then
        tmp = t + ((y * (x - t)) / z)
    else if (a <= 1.9d-80) then
        tmp = x + ((t - x) * (y / a))
    else if (a <= 1.18d+38) then
        tmp = t + ((x * y) / 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 - z) * ((t - x) / a));
	double tmp;
	if (a <= -0.97) {
		tmp = t_1;
	} else if (a <= 5.6e-124) {
		tmp = t + ((y * (x - t)) / z);
	} else if (a <= 1.9e-80) {
		tmp = x + ((t - x) * (y / a));
	} else if (a <= 1.18e+38) {
		tmp = t + ((x * y) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((t - x) / a))
	tmp = 0
	if a <= -0.97:
		tmp = t_1
	elif a <= 5.6e-124:
		tmp = t + ((y * (x - t)) / z)
	elif a <= 1.9e-80:
		tmp = x + ((t - x) * (y / a))
	elif a <= 1.18e+38:
		tmp = t + ((x * y) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a)))
	tmp = 0.0
	if (a <= -0.97)
		tmp = t_1;
	elseif (a <= 5.6e-124)
		tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z));
	elseif (a <= 1.9e-80)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	elseif (a <= 1.18e+38)
		tmp = Float64(t + Float64(Float64(x * y) / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) * ((t - x) / a));
	tmp = 0.0;
	if (a <= -0.97)
		tmp = t_1;
	elseif (a <= 5.6e-124)
		tmp = t + ((y * (x - t)) / z);
	elseif (a <= 1.9e-80)
		tmp = x + ((t - x) * (y / a));
	elseif (a <= 1.18e+38)
		tmp = t + ((x * y) / z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.97], t$95$1, If[LessEqual[a, 5.6e-124], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.9e-80], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.18e+38], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -0.97:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.6 \cdot 10^{-124}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\

\mathbf{elif}\;a \leq 1.9 \cdot 10^{-80}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{elif}\;a \leq 1.18 \cdot 10^{+38}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -0.96999999999999997 or 1.18e38 < a

    1. Initial program 86.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 76.1%

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{t - x}{a}} \]

    if -0.96999999999999997 < a < 5.59999999999999996e-124

    1. Initial program 68.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 79.4%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+79.4%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--79.4%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub80.6%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg80.6%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg80.6%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--80.6%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*84.0%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified84.0%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 75.5%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]

    if 5.59999999999999996e-124 < a < 1.89999999999999983e-80

    1. Initial program 87.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 97.8%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*85.7%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/98.2%

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]
    5. Simplified98.2%

      \[\leadsto \color{blue}{x + \frac{y}{a} \cdot \left(t - x\right)} \]

    if 1.89999999999999983e-80 < a < 1.18e38

    1. Initial program 70.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 66.1%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+66.1%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--66.1%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub66.1%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg66.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg66.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--66.1%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*75.5%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified75.5%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 61.7%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Taylor expanded in t around 0 66.6%

      \[\leadsto t - \frac{\color{blue}{-1 \cdot \left(x \cdot y\right)}}{z} \]
    8. Step-by-step derivation
      1. mul-1-neg66.6%

        \[\leadsto t - \frac{\color{blue}{-x \cdot y}}{z} \]
      2. distribute-lft-neg-out66.6%

        \[\leadsto t - \frac{\color{blue}{\left(-x\right) \cdot y}}{z} \]
      3. *-commutative66.6%

        \[\leadsto t - \frac{\color{blue}{y \cdot \left(-x\right)}}{z} \]
    9. Simplified66.6%

      \[\leadsto t - \frac{\color{blue}{y \cdot \left(-x\right)}}{z} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification75.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.97:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-124}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-80}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.18 \cdot 10^{+38}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 69.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{if}\;a \leq -5.3:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-124}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{-82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.18 \cdot 10^{+38}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- x t) (/ (- z y) a)))))
   (if (<= a -5.3)
     t_1
     (if (<= a 5.6e-124)
       (+ t (/ (* y (- x t)) z))
       (if (<= a 7.4e-82)
         t_1
         (if (<= a 1.18e+38)
           (+ t (/ (* x y) z))
           (+ x (* (- y z) (/ (- t x) a)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((x - t) * ((z - y) / a));
	double tmp;
	if (a <= -5.3) {
		tmp = t_1;
	} else if (a <= 5.6e-124) {
		tmp = t + ((y * (x - t)) / z);
	} else if (a <= 7.4e-82) {
		tmp = t_1;
	} else if (a <= 1.18e+38) {
		tmp = t + ((x * y) / z);
	} else {
		tmp = x + ((y - z) * ((t - x) / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + ((x - t) * ((z - y) / a))
    if (a <= (-5.3d0)) then
        tmp = t_1
    else if (a <= 5.6d-124) then
        tmp = t + ((y * (x - t)) / z)
    else if (a <= 7.4d-82) then
        tmp = t_1
    else if (a <= 1.18d+38) then
        tmp = t + ((x * y) / z)
    else
        tmp = x + ((y - z) * ((t - x) / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((x - t) * ((z - y) / a));
	double tmp;
	if (a <= -5.3) {
		tmp = t_1;
	} else if (a <= 5.6e-124) {
		tmp = t + ((y * (x - t)) / z);
	} else if (a <= 7.4e-82) {
		tmp = t_1;
	} else if (a <= 1.18e+38) {
		tmp = t + ((x * y) / z);
	} else {
		tmp = x + ((y - z) * ((t - x) / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((x - t) * ((z - y) / a))
	tmp = 0
	if a <= -5.3:
		tmp = t_1
	elif a <= 5.6e-124:
		tmp = t + ((y * (x - t)) / z)
	elif a <= 7.4e-82:
		tmp = t_1
	elif a <= 1.18e+38:
		tmp = t + ((x * y) / z)
	else:
		tmp = x + ((y - z) * ((t - x) / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(x - t) * Float64(Float64(z - y) / a)))
	tmp = 0.0
	if (a <= -5.3)
		tmp = t_1;
	elseif (a <= 5.6e-124)
		tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z));
	elseif (a <= 7.4e-82)
		tmp = t_1;
	elseif (a <= 1.18e+38)
		tmp = Float64(t + Float64(Float64(x * y) / z));
	else
		tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((x - t) * ((z - y) / a));
	tmp = 0.0;
	if (a <= -5.3)
		tmp = t_1;
	elseif (a <= 5.6e-124)
		tmp = t + ((y * (x - t)) / z);
	elseif (a <= 7.4e-82)
		tmp = t_1;
	elseif (a <= 1.18e+38)
		tmp = t + ((x * y) / z);
	else
		tmp = x + ((y - z) * ((t - x) / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.3], t$95$1, If[LessEqual[a, 5.6e-124], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.4e-82], t$95$1, If[LessEqual[a, 1.18e+38], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(x - t\right) \cdot \frac{z - y}{a}\\
\mathbf{if}\;a \leq -5.3:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.6 \cdot 10^{-124}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\

\mathbf{elif}\;a \leq 7.4 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.18 \cdot 10^{+38}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\

\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.29999999999999982 or 5.59999999999999996e-124 < a < 7.4000000000000002e-82

    1. Initial program 88.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 75.5%

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{z \cdot \left(t - x\right)}{a - z} + y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative75.5%

        \[\leadsto x + \color{blue}{\left(y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) + -1 \cdot \frac{z \cdot \left(t - x\right)}{a - z}\right)} \]
      2. div-sub75.5%

        \[\leadsto x + \left(y \cdot \color{blue}{\frac{t - x}{a - z}} + -1 \cdot \frac{z \cdot \left(t - x\right)}{a - z}\right) \]
      3. associate-*r/67.8%

        \[\leadsto x + \left(\color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} + -1 \cdot \frac{z \cdot \left(t - x\right)}{a - z}\right) \]
      4. mul-1-neg67.8%

        \[\leadsto x + \left(\frac{y \cdot \left(t - x\right)}{a - z} + \color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a - z}\right)}\right) \]
      5. sub-neg67.8%

        \[\leadsto x + \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{a - z} - \frac{z \cdot \left(t - x\right)}{a - z}\right)} \]
      6. associate-/l*75.5%

        \[\leadsto x + \left(\color{blue}{\frac{y}{\frac{a - z}{t - x}}} - \frac{z \cdot \left(t - x\right)}{a - z}\right) \]
      7. associate-/l*88.1%

        \[\leadsto x + \left(\frac{y}{\frac{a - z}{t - x}} - \color{blue}{\frac{z}{\frac{a - z}{t - x}}}\right) \]
      8. div-sub88.3%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
      9. associate-/r/91.8%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    5. Simplified91.8%

      \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    6. Taylor expanded in a around inf 80.0%

      \[\leadsto x + \color{blue}{\frac{y - z}{a}} \cdot \left(t - x\right) \]

    if -5.29999999999999982 < a < 5.59999999999999996e-124

    1. Initial program 68.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 79.4%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+79.4%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--79.4%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub80.6%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg80.6%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg80.6%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--80.6%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*84.0%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified84.0%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 75.5%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]

    if 7.4000000000000002e-82 < a < 1.18e38

    1. Initial program 70.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 66.1%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+66.1%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--66.1%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub66.1%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg66.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg66.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--66.1%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*75.5%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified75.5%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 61.7%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Taylor expanded in t around 0 66.6%

      \[\leadsto t - \frac{\color{blue}{-1 \cdot \left(x \cdot y\right)}}{z} \]
    8. Step-by-step derivation
      1. mul-1-neg66.6%

        \[\leadsto t - \frac{\color{blue}{-x \cdot y}}{z} \]
      2. distribute-lft-neg-out66.6%

        \[\leadsto t - \frac{\color{blue}{\left(-x\right) \cdot y}}{z} \]
      3. *-commutative66.6%

        \[\leadsto t - \frac{\color{blue}{y \cdot \left(-x\right)}}{z} \]
    9. Simplified66.6%

      \[\leadsto t - \frac{\color{blue}{y \cdot \left(-x\right)}}{z} \]

    if 1.18e38 < a

    1. Initial program 84.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 75.0%

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{t - x}{a}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification76.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.3:\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-124}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{-82}:\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;a \leq 1.18 \cdot 10^{+38}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 70.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{if}\;a \leq -70:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{-124}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+38}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- x t) (/ (- z y) a)))))
   (if (<= a -70.0)
     t_1
     (if (<= a 5.3e-124)
       (+ t (/ (* (- t x) (- a y)) z))
       (if (<= a 2.1e-82)
         t_1
         (if (<= a 1.55e+38)
           (+ t (/ (* x y) z))
           (+ x (* (- y z) (/ (- t x) a)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((x - t) * ((z - y) / a));
	double tmp;
	if (a <= -70.0) {
		tmp = t_1;
	} else if (a <= 5.3e-124) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else if (a <= 2.1e-82) {
		tmp = t_1;
	} else if (a <= 1.55e+38) {
		tmp = t + ((x * y) / z);
	} else {
		tmp = x + ((y - z) * ((t - x) / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + ((x - t) * ((z - y) / a))
    if (a <= (-70.0d0)) then
        tmp = t_1
    else if (a <= 5.3d-124) then
        tmp = t + (((t - x) * (a - y)) / z)
    else if (a <= 2.1d-82) then
        tmp = t_1
    else if (a <= 1.55d+38) then
        tmp = t + ((x * y) / z)
    else
        tmp = x + ((y - z) * ((t - x) / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((x - t) * ((z - y) / a));
	double tmp;
	if (a <= -70.0) {
		tmp = t_1;
	} else if (a <= 5.3e-124) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else if (a <= 2.1e-82) {
		tmp = t_1;
	} else if (a <= 1.55e+38) {
		tmp = t + ((x * y) / z);
	} else {
		tmp = x + ((y - z) * ((t - x) / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((x - t) * ((z - y) / a))
	tmp = 0
	if a <= -70.0:
		tmp = t_1
	elif a <= 5.3e-124:
		tmp = t + (((t - x) * (a - y)) / z)
	elif a <= 2.1e-82:
		tmp = t_1
	elif a <= 1.55e+38:
		tmp = t + ((x * y) / z)
	else:
		tmp = x + ((y - z) * ((t - x) / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(x - t) * Float64(Float64(z - y) / a)))
	tmp = 0.0
	if (a <= -70.0)
		tmp = t_1;
	elseif (a <= 5.3e-124)
		tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z));
	elseif (a <= 2.1e-82)
		tmp = t_1;
	elseif (a <= 1.55e+38)
		tmp = Float64(t + Float64(Float64(x * y) / z));
	else
		tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((x - t) * ((z - y) / a));
	tmp = 0.0;
	if (a <= -70.0)
		tmp = t_1;
	elseif (a <= 5.3e-124)
		tmp = t + (((t - x) * (a - y)) / z);
	elseif (a <= 2.1e-82)
		tmp = t_1;
	elseif (a <= 1.55e+38)
		tmp = t + ((x * y) / z);
	else
		tmp = x + ((y - z) * ((t - x) / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -70.0], t$95$1, If[LessEqual[a, 5.3e-124], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.1e-82], t$95$1, If[LessEqual[a, 1.55e+38], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(x - t\right) \cdot \frac{z - y}{a}\\
\mathbf{if}\;a \leq -70:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.3 \cdot 10^{-124}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\

\mathbf{elif}\;a \leq 2.1 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{+38}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\

\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -70 or 5.2999999999999997e-124 < a < 2.1e-82

    1. Initial program 88.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 75.5%

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{z \cdot \left(t - x\right)}{a - z} + y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative75.5%

        \[\leadsto x + \color{blue}{\left(y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) + -1 \cdot \frac{z \cdot \left(t - x\right)}{a - z}\right)} \]
      2. div-sub75.5%

        \[\leadsto x + \left(y \cdot \color{blue}{\frac{t - x}{a - z}} + -1 \cdot \frac{z \cdot \left(t - x\right)}{a - z}\right) \]
      3. associate-*r/67.8%

        \[\leadsto x + \left(\color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} + -1 \cdot \frac{z \cdot \left(t - x\right)}{a - z}\right) \]
      4. mul-1-neg67.8%

        \[\leadsto x + \left(\frac{y \cdot \left(t - x\right)}{a - z} + \color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a - z}\right)}\right) \]
      5. sub-neg67.8%

        \[\leadsto x + \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{a - z} - \frac{z \cdot \left(t - x\right)}{a - z}\right)} \]
      6. associate-/l*75.5%

        \[\leadsto x + \left(\color{blue}{\frac{y}{\frac{a - z}{t - x}}} - \frac{z \cdot \left(t - x\right)}{a - z}\right) \]
      7. associate-/l*88.1%

        \[\leadsto x + \left(\frac{y}{\frac{a - z}{t - x}} - \color{blue}{\frac{z}{\frac{a - z}{t - x}}}\right) \]
      8. div-sub88.3%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
      9. associate-/r/91.8%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    5. Simplified91.8%

      \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    6. Taylor expanded in a around inf 80.0%

      \[\leadsto x + \color{blue}{\frac{y - z}{a}} \cdot \left(t - x\right) \]

    if -70 < a < 5.2999999999999997e-124

    1. Initial program 68.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 79.4%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+79.4%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--79.4%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub80.6%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg80.6%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg80.6%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--80.6%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*84.0%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified84.0%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in z around 0 80.6%

      \[\leadsto t - \color{blue}{\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]

    if 2.1e-82 < a < 1.55000000000000009e38

    1. Initial program 70.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 66.1%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+66.1%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--66.1%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub66.1%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg66.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg66.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--66.1%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*75.5%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified75.5%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 61.7%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Taylor expanded in t around 0 66.6%

      \[\leadsto t - \frac{\color{blue}{-1 \cdot \left(x \cdot y\right)}}{z} \]
    8. Step-by-step derivation
      1. mul-1-neg66.6%

        \[\leadsto t - \frac{\color{blue}{-x \cdot y}}{z} \]
      2. distribute-lft-neg-out66.6%

        \[\leadsto t - \frac{\color{blue}{\left(-x\right) \cdot y}}{z} \]
      3. *-commutative66.6%

        \[\leadsto t - \frac{\color{blue}{y \cdot \left(-x\right)}}{z} \]
    9. Simplified66.6%

      \[\leadsto t - \frac{\color{blue}{y \cdot \left(-x\right)}}{z} \]

    if 1.55000000000000009e38 < a

    1. Initial program 84.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 75.0%

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{t - x}{a}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification78.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -70:\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{-124}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-82}:\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+38}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 75.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{x - t}{\frac{z}{y - a}}\\ t_2 := x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{if}\;a \leq -30.5:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-124}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+28}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (/ (- x t) (/ z (- y a)))))
        (t_2 (+ x (* (- x t) (/ (- z y) a)))))
   (if (<= a -30.5)
     t_2
     (if (<= a 1.1e-124)
       t_1
       (if (<= a 1.65e-85)
         t_2
         (if (<= a 6.2e+28) t_1 (+ x (* (- y z) (/ (- t x) a)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((x - t) / (z / (y - a)));
	double t_2 = x + ((x - t) * ((z - y) / a));
	double tmp;
	if (a <= -30.5) {
		tmp = t_2;
	} else if (a <= 1.1e-124) {
		tmp = t_1;
	} else if (a <= 1.65e-85) {
		tmp = t_2;
	} else if (a <= 6.2e+28) {
		tmp = t_1;
	} else {
		tmp = x + ((y - z) * ((t - x) / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t + ((x - t) / (z / (y - a)))
    t_2 = x + ((x - t) * ((z - y) / a))
    if (a <= (-30.5d0)) then
        tmp = t_2
    else if (a <= 1.1d-124) then
        tmp = t_1
    else if (a <= 1.65d-85) then
        tmp = t_2
    else if (a <= 6.2d+28) then
        tmp = t_1
    else
        tmp = x + ((y - z) * ((t - x) / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t + ((x - t) / (z / (y - a)));
	double t_2 = x + ((x - t) * ((z - y) / a));
	double tmp;
	if (a <= -30.5) {
		tmp = t_2;
	} else if (a <= 1.1e-124) {
		tmp = t_1;
	} else if (a <= 1.65e-85) {
		tmp = t_2;
	} else if (a <= 6.2e+28) {
		tmp = t_1;
	} else {
		tmp = x + ((y - z) * ((t - x) / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + ((x - t) / (z / (y - a)))
	t_2 = x + ((x - t) * ((z - y) / a))
	tmp = 0
	if a <= -30.5:
		tmp = t_2
	elif a <= 1.1e-124:
		tmp = t_1
	elif a <= 1.65e-85:
		tmp = t_2
	elif a <= 6.2e+28:
		tmp = t_1
	else:
		tmp = x + ((y - z) * ((t - x) / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a))))
	t_2 = Float64(x + Float64(Float64(x - t) * Float64(Float64(z - y) / a)))
	tmp = 0.0
	if (a <= -30.5)
		tmp = t_2;
	elseif (a <= 1.1e-124)
		tmp = t_1;
	elseif (a <= 1.65e-85)
		tmp = t_2;
	elseif (a <= 6.2e+28)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + ((x - t) / (z / (y - a)));
	t_2 = x + ((x - t) * ((z - y) / a));
	tmp = 0.0;
	if (a <= -30.5)
		tmp = t_2;
	elseif (a <= 1.1e-124)
		tmp = t_1;
	elseif (a <= 1.65e-85)
		tmp = t_2;
	elseif (a <= 6.2e+28)
		tmp = t_1;
	else
		tmp = x + ((y - z) * ((t - x) / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -30.5], t$95$2, If[LessEqual[a, 1.1e-124], t$95$1, If[LessEqual[a, 1.65e-85], t$95$2, If[LessEqual[a, 6.2e+28], t$95$1, N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \frac{x - t}{\frac{z}{y - a}}\\
t_2 := x + \left(x - t\right) \cdot \frac{z - y}{a}\\
\mathbf{if}\;a \leq -30.5:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{-124}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.65 \cdot 10^{-85}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -30.5 or 1.0999999999999999e-124 < a < 1.64999999999999986e-85

    1. Initial program 88.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 75.5%

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{z \cdot \left(t - x\right)}{a - z} + y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)\right)} \]
    4. Step-by-step derivation
      1. +-commutative75.5%

        \[\leadsto x + \color{blue}{\left(y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) + -1 \cdot \frac{z \cdot \left(t - x\right)}{a - z}\right)} \]
      2. div-sub75.5%

        \[\leadsto x + \left(y \cdot \color{blue}{\frac{t - x}{a - z}} + -1 \cdot \frac{z \cdot \left(t - x\right)}{a - z}\right) \]
      3. associate-*r/67.8%

        \[\leadsto x + \left(\color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} + -1 \cdot \frac{z \cdot \left(t - x\right)}{a - z}\right) \]
      4. mul-1-neg67.8%

        \[\leadsto x + \left(\frac{y \cdot \left(t - x\right)}{a - z} + \color{blue}{\left(-\frac{z \cdot \left(t - x\right)}{a - z}\right)}\right) \]
      5. sub-neg67.8%

        \[\leadsto x + \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{a - z} - \frac{z \cdot \left(t - x\right)}{a - z}\right)} \]
      6. associate-/l*75.5%

        \[\leadsto x + \left(\color{blue}{\frac{y}{\frac{a - z}{t - x}}} - \frac{z \cdot \left(t - x\right)}{a - z}\right) \]
      7. associate-/l*88.1%

        \[\leadsto x + \left(\frac{y}{\frac{a - z}{t - x}} - \color{blue}{\frac{z}{\frac{a - z}{t - x}}}\right) \]
      8. div-sub88.3%

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
      9. associate-/r/91.8%

        \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    5. Simplified91.8%

      \[\leadsto x + \color{blue}{\frac{y - z}{a - z} \cdot \left(t - x\right)} \]
    6. Taylor expanded in a around inf 80.0%

      \[\leadsto x + \color{blue}{\frac{y - z}{a}} \cdot \left(t - x\right) \]

    if -30.5 < a < 1.0999999999999999e-124 or 1.64999999999999986e-85 < a < 6.2000000000000001e28

    1. Initial program 68.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 77.5%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+77.5%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--77.5%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub78.5%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg78.5%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg78.5%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--78.5%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*83.1%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified83.1%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]

    if 6.2000000000000001e28 < a

    1. Initial program 85.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 74.1%

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{t - x}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification80.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -30.5:\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-124}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-85}:\\ \;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+28}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 57.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -8.4 \cdot 10^{-97}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{-237}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-100}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-28}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- t x) (/ y (- a z)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= t -8.4e-97)
     t_2
     (if (<= t 4.9e-237)
       t_1
       (if (<= t 3.8e-100) x (if (<= t 6.5e-28) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - x) * (y / (a - z));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -8.4e-97) {
		tmp = t_2;
	} else if (t <= 4.9e-237) {
		tmp = t_1;
	} else if (t <= 3.8e-100) {
		tmp = x;
	} else if (t <= 6.5e-28) {
		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 - x) * (y / (a - z))
    t_2 = t * ((y - z) / (a - z))
    if (t <= (-8.4d-97)) then
        tmp = t_2
    else if (t <= 4.9d-237) then
        tmp = t_1
    else if (t <= 3.8d-100) then
        tmp = x
    else if (t <= 6.5d-28) 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 - x) * (y / (a - z));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -8.4e-97) {
		tmp = t_2;
	} else if (t <= 4.9e-237) {
		tmp = t_1;
	} else if (t <= 3.8e-100) {
		tmp = x;
	} else if (t <= 6.5e-28) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (t - x) * (y / (a - z))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if t <= -8.4e-97:
		tmp = t_2
	elif t <= 4.9e-237:
		tmp = t_1
	elif t <= 3.8e-100:
		tmp = x
	elif t <= 6.5e-28:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(t - x) * Float64(y / Float64(a - z)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (t <= -8.4e-97)
		tmp = t_2;
	elseif (t <= 4.9e-237)
		tmp = t_1;
	elseif (t <= 3.8e-100)
		tmp = x;
	elseif (t <= 6.5e-28)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (t - x) * (y / (a - z));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (t <= -8.4e-97)
		tmp = t_2;
	elseif (t <= 4.9e-237)
		tmp = t_1;
	elseif (t <= 3.8e-100)
		tmp = x;
	elseif (t <= 6.5e-28)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.4e-97], t$95$2, If[LessEqual[t, 4.9e-237], t$95$1, If[LessEqual[t, 3.8e-100], x, If[LessEqual[t, 6.5e-28], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;t \leq -8.4 \cdot 10^{-97}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 4.9 \cdot 10^{-237}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 3.8 \cdot 10^{-100}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 6.5 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.4000000000000005e-97 or 6.50000000000000043e-28 < t

    1. Initial program 84.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*r/63.1%

        \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
      2. clear-num63.1%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    4. Applied egg-rr63.1%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    5. Taylor expanded in x around 0 50.4%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. *-commutative50.4%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
      2. associate-/l*63.4%

        \[\leadsto \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
      3. associate-/r/67.6%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot t} \]
      4. *-commutative67.6%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified67.6%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if -8.4000000000000005e-97 < t < 4.9000000000000001e-237 or 3.79999999999999997e-100 < t < 6.50000000000000043e-28

    1. Initial program 72.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 49.8%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub49.8%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-*r/51.1%

        \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
      3. associate-/l*49.9%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/53.4%

        \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    5. Simplified53.4%

      \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]

    if 4.9000000000000001e-237 < t < 3.79999999999999997e-100

    1. Initial program 64.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 44.8%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.4 \cdot 10^{-97}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{-237}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-100}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-28}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 56.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -1 \cdot 10^{-95}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-240}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-99}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-20}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{a - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= t -1e-95)
     t_1
     (if (<= t 5.2e-240)
       (* (- t x) (/ y (- a z)))
       (if (<= t 1.5e-99)
         x
         (if (<= t 2e-20) (* (- t x) (/ (- a y) z)) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -1e-95) {
		tmp = t_1;
	} else if (t <= 5.2e-240) {
		tmp = (t - x) * (y / (a - z));
	} else if (t <= 1.5e-99) {
		tmp = x;
	} else if (t <= 2e-20) {
		tmp = (t - x) * ((a - y) / 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 = t * ((y - z) / (a - z))
    if (t <= (-1d-95)) then
        tmp = t_1
    else if (t <= 5.2d-240) then
        tmp = (t - x) * (y / (a - z))
    else if (t <= 1.5d-99) then
        tmp = x
    else if (t <= 2d-20) then
        tmp = (t - x) * ((a - y) / 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 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -1e-95) {
		tmp = t_1;
	} else if (t <= 5.2e-240) {
		tmp = (t - x) * (y / (a - z));
	} else if (t <= 1.5e-99) {
		tmp = x;
	} else if (t <= 2e-20) {
		tmp = (t - x) * ((a - y) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if t <= -1e-95:
		tmp = t_1
	elif t <= 5.2e-240:
		tmp = (t - x) * (y / (a - z))
	elif t <= 1.5e-99:
		tmp = x
	elif t <= 2e-20:
		tmp = (t - x) * ((a - y) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (t <= -1e-95)
		tmp = t_1;
	elseif (t <= 5.2e-240)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	elseif (t <= 1.5e-99)
		tmp = x;
	elseif (t <= 2e-20)
		tmp = Float64(Float64(t - x) * Float64(Float64(a - y) / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (t <= -1e-95)
		tmp = t_1;
	elseif (t <= 5.2e-240)
		tmp = (t - x) * (y / (a - z));
	elseif (t <= 1.5e-99)
		tmp = x;
	elseif (t <= 2e-20)
		tmp = (t - x) * ((a - y) / z);
	else
		tmp = t_1;
	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[t, -1e-95], t$95$1, If[LessEqual[t, 5.2e-240], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e-99], x, If[LessEqual[t, 2e-20], N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;t \leq -1 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 5.2 \cdot 10^{-240}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\

\mathbf{elif}\;t \leq 1.5 \cdot 10^{-99}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2 \cdot 10^{-20}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{a - y}{z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -9.99999999999999989e-96 or 1.99999999999999989e-20 < t

    1. Initial program 84.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*r/62.8%

        \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
      2. clear-num62.8%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    4. Applied egg-rr62.8%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    5. Taylor expanded in x around 0 50.1%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. *-commutative50.1%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
      2. associate-/l*63.1%

        \[\leadsto \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
      3. associate-/r/67.4%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot t} \]
      4. *-commutative67.4%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified67.4%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if -9.99999999999999989e-96 < t < 5.19999999999999984e-240

    1. Initial program 74.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 48.7%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub48.7%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-*r/50.3%

        \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
      3. associate-/l*48.8%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/53.0%

        \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    5. Simplified53.0%

      \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]

    if 5.19999999999999984e-240 < t < 1.50000000000000003e-99

    1. Initial program 64.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 44.8%

      \[\leadsto \color{blue}{x} \]

    if 1.50000000000000003e-99 < t < 1.99999999999999989e-20

    1. Initial program 68.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 59.2%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+59.2%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--59.2%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub59.2%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg59.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg59.2%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--59.2%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*67.1%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified67.1%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in z around 0 51.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. mul-1-neg51.1%

        \[\leadsto \color{blue}{-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
      2. *-commutative51.1%

        \[\leadsto -\frac{\color{blue}{\left(y - a\right) \cdot \left(t - x\right)}}{z} \]
      3. associate-*l/58.8%

        \[\leadsto -\color{blue}{\frac{y - a}{z} \cdot \left(t - x\right)} \]
      4. distribute-lft-neg-in58.8%

        \[\leadsto \color{blue}{\left(-\frac{y - a}{z}\right) \cdot \left(t - x\right)} \]
      5. distribute-neg-frac58.8%

        \[\leadsto \color{blue}{\frac{-\left(y - a\right)}{z}} \cdot \left(t - x\right) \]
    8. Simplified58.8%

      \[\leadsto \color{blue}{\frac{-\left(y - a\right)}{z} \cdot \left(t - x\right)} \]
    9. Taylor expanded in y around 0 58.8%

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y}{z} + \frac{a}{z}\right)} \cdot \left(t - x\right) \]
    10. Step-by-step derivation
      1. +-commutative58.8%

        \[\leadsto \color{blue}{\left(\frac{a}{z} + -1 \cdot \frac{y}{z}\right)} \cdot \left(t - x\right) \]
      2. mul-1-neg58.8%

        \[\leadsto \left(\frac{a}{z} + \color{blue}{\left(-\frac{y}{z}\right)}\right) \cdot \left(t - x\right) \]
      3. sub-neg58.8%

        \[\leadsto \color{blue}{\left(\frac{a}{z} - \frac{y}{z}\right)} \cdot \left(t - x\right) \]
      4. div-sub58.8%

        \[\leadsto \color{blue}{\frac{a - y}{z}} \cdot \left(t - x\right) \]
    11. Simplified58.8%

      \[\leadsto \color{blue}{\frac{a - y}{z}} \cdot \left(t - x\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification61.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-95}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-240}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-99}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-20}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{a - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 65.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -7.9:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-124}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.04 \cdot 10^{-85}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+38}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- t x) (/ y a)))))
   (if (<= a -7.9)
     t_1
     (if (<= a 5.6e-124)
       (+ t (/ (* y (- x t)) z))
       (if (<= a 1.04e-85)
         t_1
         (if (<= a 1.25e+38)
           (+ t (/ (* x y) z))
           (+ x (/ y (/ a (- t x))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t - x) * (y / a));
	double tmp;
	if (a <= -7.9) {
		tmp = t_1;
	} else if (a <= 5.6e-124) {
		tmp = t + ((y * (x - t)) / z);
	} else if (a <= 1.04e-85) {
		tmp = t_1;
	} else if (a <= 1.25e+38) {
		tmp = t + ((x * y) / z);
	} else {
		tmp = x + (y / (a / (t - x)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + ((t - x) * (y / a))
    if (a <= (-7.9d0)) then
        tmp = t_1
    else if (a <= 5.6d-124) then
        tmp = t + ((y * (x - t)) / z)
    else if (a <= 1.04d-85) then
        tmp = t_1
    else if (a <= 1.25d+38) then
        tmp = t + ((x * y) / z)
    else
        tmp = x + (y / (a / (t - x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t - x) * (y / a));
	double tmp;
	if (a <= -7.9) {
		tmp = t_1;
	} else if (a <= 5.6e-124) {
		tmp = t + ((y * (x - t)) / z);
	} else if (a <= 1.04e-85) {
		tmp = t_1;
	} else if (a <= 1.25e+38) {
		tmp = t + ((x * y) / z);
	} else {
		tmp = x + (y / (a / (t - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((t - x) * (y / a))
	tmp = 0
	if a <= -7.9:
		tmp = t_1
	elif a <= 5.6e-124:
		tmp = t + ((y * (x - t)) / z)
	elif a <= 1.04e-85:
		tmp = t_1
	elif a <= 1.25e+38:
		tmp = t + ((x * y) / z)
	else:
		tmp = x + (y / (a / (t - x)))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a)))
	tmp = 0.0
	if (a <= -7.9)
		tmp = t_1;
	elseif (a <= 5.6e-124)
		tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z));
	elseif (a <= 1.04e-85)
		tmp = t_1;
	elseif (a <= 1.25e+38)
		tmp = Float64(t + Float64(Float64(x * y) / z));
	else
		tmp = Float64(x + Float64(y / Float64(a / Float64(t - x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((t - x) * (y / a));
	tmp = 0.0;
	if (a <= -7.9)
		tmp = t_1;
	elseif (a <= 5.6e-124)
		tmp = t + ((y * (x - t)) / z);
	elseif (a <= 1.04e-85)
		tmp = t_1;
	elseif (a <= 1.25e+38)
		tmp = t + ((x * y) / z);
	else
		tmp = x + (y / (a / (t - x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.9], t$95$1, If[LessEqual[a, 5.6e-124], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.04e-85], t$95$1, If[LessEqual[a, 1.25e+38], N[(t + N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -7.9:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.6 \cdot 10^{-124}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\

\mathbf{elif}\;a \leq 1.04 \cdot 10^{-85}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{+38}:\\
\;\;\;\;t + \frac{x \cdot y}{z}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.9000000000000004 or 5.59999999999999996e-124 < a < 1.04e-85

    1. Initial program 88.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 59.4%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*67.7%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/69.9%

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]
    5. Simplified69.9%

      \[\leadsto \color{blue}{x + \frac{y}{a} \cdot \left(t - x\right)} \]

    if -7.9000000000000004 < a < 5.59999999999999996e-124

    1. Initial program 68.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 79.4%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+79.4%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--79.4%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub80.6%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg80.6%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg80.6%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--80.6%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*84.0%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified84.0%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 75.5%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]

    if 1.04e-85 < a < 1.24999999999999992e38

    1. Initial program 70.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 66.1%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+66.1%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--66.1%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub66.1%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg66.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg66.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--66.1%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*75.5%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified75.5%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 61.7%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Taylor expanded in t around 0 66.6%

      \[\leadsto t - \frac{\color{blue}{-1 \cdot \left(x \cdot y\right)}}{z} \]
    8. Step-by-step derivation
      1. mul-1-neg66.6%

        \[\leadsto t - \frac{\color{blue}{-x \cdot y}}{z} \]
      2. distribute-lft-neg-out66.6%

        \[\leadsto t - \frac{\color{blue}{\left(-x\right) \cdot y}}{z} \]
      3. *-commutative66.6%

        \[\leadsto t - \frac{\color{blue}{y \cdot \left(-x\right)}}{z} \]
    9. Simplified66.6%

      \[\leadsto t - \frac{\color{blue}{y \cdot \left(-x\right)}}{z} \]

    if 1.24999999999999992e38 < a

    1. Initial program 84.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 59.5%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*67.7%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    5. Simplified67.7%

      \[\leadsto \color{blue}{x + \frac{y}{\frac{a}{t - x}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification71.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.9:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-124}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.04 \cdot 10^{-85}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+38}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 56.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -2.25 \cdot 10^{-123}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-240}:\\ \;\;\;\;\left(-x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-169}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= t -2.25e-123)
     t_1
     (if (<= t 2.5e-240) (* (- x) (/ y (- a z))) (if (<= t 4.5e-169) x t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -2.25e-123) {
		tmp = t_1;
	} else if (t <= 2.5e-240) {
		tmp = -x * (y / (a - z));
	} else if (t <= 4.5e-169) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (t <= (-2.25d-123)) then
        tmp = t_1
    else if (t <= 2.5d-240) then
        tmp = -x * (y / (a - z))
    else if (t <= 4.5d-169) then
        tmp = x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (t <= -2.25e-123) {
		tmp = t_1;
	} else if (t <= 2.5e-240) {
		tmp = -x * (y / (a - z));
	} else if (t <= 4.5e-169) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if t <= -2.25e-123:
		tmp = t_1
	elif t <= 2.5e-240:
		tmp = -x * (y / (a - z))
	elif t <= 4.5e-169:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (t <= -2.25e-123)
		tmp = t_1;
	elseif (t <= 2.5e-240)
		tmp = Float64(Float64(-x) * Float64(y / Float64(a - z)));
	elseif (t <= 4.5e-169)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (t <= -2.25e-123)
		tmp = t_1;
	elseif (t <= 2.5e-240)
		tmp = -x * (y / (a - z));
	elseif (t <= 4.5e-169)
		tmp = x;
	else
		tmp = t_1;
	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[t, -2.25e-123], t$95$1, If[LessEqual[t, 2.5e-240], N[((-x) * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-169], x, t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;t \leq -2.25 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.5 \cdot 10^{-240}:\\
\;\;\;\;\left(-x\right) \cdot \frac{y}{a - z}\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-169}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.24999999999999997e-123 or 4.4999999999999999e-169 < t

    1. Initial program 80.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*r/63.3%

        \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
      2. clear-num63.3%

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    4. Applied egg-rr63.3%

      \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{\left(y - z\right) \cdot \left(t - x\right)}}} \]
    5. Taylor expanded in x around 0 48.1%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. *-commutative48.1%

        \[\leadsto \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
      2. associate-/l*57.8%

        \[\leadsto \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
      3. associate-/r/63.0%

        \[\leadsto \color{blue}{\frac{y - z}{a - z} \cdot t} \]
      4. *-commutative63.0%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified63.0%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if -2.24999999999999997e-123 < t < 2.5000000000000002e-240

    1. Initial program 76.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 50.1%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub50.1%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-*r/51.8%

        \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
      3. associate-/l*50.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/53.2%

        \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    5. Simplified53.2%

      \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    6. Taylor expanded in t around 0 47.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. associate-*r/47.1%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot y\right)}{a - z}} \]
      2. mul-1-neg47.1%

        \[\leadsto \frac{\color{blue}{-x \cdot y}}{a - z} \]
      3. distribute-lft-neg-out47.1%

        \[\leadsto \frac{\color{blue}{\left(-x\right) \cdot y}}{a - z} \]
      4. associate-*r/48.5%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{y}{a - z}} \]
      5. distribute-lft-neg-out48.5%

        \[\leadsto \color{blue}{-x \cdot \frac{y}{a - z}} \]
      6. distribute-rgt-neg-in48.5%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{a - z}\right)} \]
    8. Simplified48.5%

      \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{a - z}\right)} \]

    if 2.5000000000000002e-240 < t < 4.4999999999999999e-169

    1. Initial program 69.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 47.6%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.25 \cdot 10^{-123}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{-240}:\\ \;\;\;\;\left(-x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-169}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 49.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+99}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+91}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -4.8e+99)
   x
   (if (<= a 2.55e+38)
     (* t (- 1.0 (/ y z)))
     (if (<= a 2.8e+91) (* t (/ y (- a z))) (if (<= a 1.12e+96) t x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -4.8e+99) {
		tmp = x;
	} else if (a <= 2.55e+38) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 2.8e+91) {
		tmp = t * (y / (a - z));
	} else if (a <= 1.12e+96) {
		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 <= (-4.8d+99)) then
        tmp = x
    else if (a <= 2.55d+38) then
        tmp = t * (1.0d0 - (y / z))
    else if (a <= 2.8d+91) then
        tmp = t * (y / (a - z))
    else if (a <= 1.12d+96) 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 <= -4.8e+99) {
		tmp = x;
	} else if (a <= 2.55e+38) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 2.8e+91) {
		tmp = t * (y / (a - z));
	} else if (a <= 1.12e+96) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -4.8e+99:
		tmp = x
	elif a <= 2.55e+38:
		tmp = t * (1.0 - (y / z))
	elif a <= 2.8e+91:
		tmp = t * (y / (a - z))
	elif a <= 1.12e+96:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -4.8e+99)
		tmp = x;
	elseif (a <= 2.55e+38)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif (a <= 2.8e+91)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (a <= 1.12e+96)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -4.8e+99)
		tmp = x;
	elseif (a <= 2.55e+38)
		tmp = t * (1.0 - (y / z));
	elseif (a <= 2.8e+91)
		tmp = t * (y / (a - z));
	elseif (a <= 1.12e+96)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.8e+99], x, If[LessEqual[a, 2.55e+38], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e+91], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.12e+96], t, x]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{+99}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.55 \cdot 10^{+38}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

\mathbf{elif}\;a \leq 2.8 \cdot 10^{+91}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\

\mathbf{elif}\;a \leq 1.12 \cdot 10^{+96}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.8000000000000002e99 or 1.1199999999999999e96 < a

    1. Initial program 87.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 53.7%

      \[\leadsto \color{blue}{x} \]

    if -4.8000000000000002e99 < a < 2.5500000000000001e38

    1. Initial program 73.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 65.7%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+65.7%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--65.7%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub66.4%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg66.4%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg66.4%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--66.4%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*71.2%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified71.2%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 62.6%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Taylor expanded in t around inf 49.8%

      \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y}{z}\right)} \]

    if 2.5500000000000001e38 < a < 2.7999999999999999e91

    1. Initial program 82.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 51.9%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub51.9%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-*r/51.8%

        \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
      3. associate-/l*51.7%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/51.7%

        \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    5. Simplified51.7%

      \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    6. Taylor expanded in t around inf 39.3%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. associate-*r/39.2%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
    8. Simplified39.2%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]

    if 2.7999999999999999e91 < a < 1.1199999999999999e96

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 100.0%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification50.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+99}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.55 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+91}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 38.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3250000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-225}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-47}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -3250000.0)
   x
   (if (<= a 3.3e-225)
     t
     (if (<= a 4.5e-47) (* y (/ x z)) (if (<= a 2.4e+38) t x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3250000.0) {
		tmp = x;
	} else if (a <= 3.3e-225) {
		tmp = t;
	} else if (a <= 4.5e-47) {
		tmp = y * (x / z);
	} else if (a <= 2.4e+38) {
		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 <= (-3250000.0d0)) then
        tmp = x
    else if (a <= 3.3d-225) then
        tmp = t
    else if (a <= 4.5d-47) then
        tmp = y * (x / z)
    else if (a <= 2.4d+38) 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 <= -3250000.0) {
		tmp = x;
	} else if (a <= 3.3e-225) {
		tmp = t;
	} else if (a <= 4.5e-47) {
		tmp = y * (x / z);
	} else if (a <= 2.4e+38) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -3250000.0:
		tmp = x
	elif a <= 3.3e-225:
		tmp = t
	elif a <= 4.5e-47:
		tmp = y * (x / z)
	elif a <= 2.4e+38:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -3250000.0)
		tmp = x;
	elseif (a <= 3.3e-225)
		tmp = t;
	elseif (a <= 4.5e-47)
		tmp = Float64(y * Float64(x / z));
	elseif (a <= 2.4e+38)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -3250000.0)
		tmp = x;
	elseif (a <= 3.3e-225)
		tmp = t;
	elseif (a <= 4.5e-47)
		tmp = y * (x / z);
	elseif (a <= 2.4e+38)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3250000.0], x, If[LessEqual[a, 3.3e-225], t, If[LessEqual[a, 4.5e-47], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.4e+38], t, x]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3250000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 3.3 \cdot 10^{-225}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-47}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{elif}\;a \leq 2.4 \cdot 10^{+38}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.25e6 or 2.40000000000000017e38 < a

    1. Initial program 86.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 42.7%

      \[\leadsto \color{blue}{x} \]

    if -3.25e6 < a < 3.3000000000000001e-225 or 4.5e-47 < a < 2.40000000000000017e38

    1. Initial program 70.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 43.6%

      \[\leadsto \color{blue}{t} \]

    if 3.3000000000000001e-225 < a < 4.5e-47

    1. Initial program 71.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 65.3%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+65.3%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--65.3%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub65.3%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg65.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg65.3%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--65.3%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*72.3%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified72.3%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 47.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-/l*48.0%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
      2. associate-/r/47.8%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - a\right)} \]
    8. Simplified47.8%

      \[\leadsto \color{blue}{\frac{x}{z} \cdot \left(y - a\right)} \]
    9. Taylor expanded in y around inf 41.5%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. associate-*l/41.6%

        \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
      2. *-commutative41.6%

        \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
    11. Simplified41.6%

      \[\leadsto \color{blue}{y \cdot \frac{x}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification42.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3250000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-225}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-47}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 49.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8.8 \cdot 10^{+98}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -8.8e+98) x (if (<= a 1.65e+38) (* t (- 1.0 (/ y z))) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -8.8e+98) {
		tmp = x;
	} else if (a <= 1.65e+38) {
		tmp = t * (1.0 - (y / z));
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-8.8d+98)) then
        tmp = x
    else if (a <= 1.65d+38) then
        tmp = t * (1.0d0 - (y / z))
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -8.8e+98) {
		tmp = x;
	} else if (a <= 1.65e+38) {
		tmp = t * (1.0 - (y / z));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -8.8e+98:
		tmp = x
	elif a <= 1.65e+38:
		tmp = t * (1.0 - (y / z))
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -8.8e+98)
		tmp = x;
	elseif (a <= 1.65e+38)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -8.8e+98)
		tmp = x;
	elseif (a <= 1.65e+38)
		tmp = t * (1.0 - (y / z));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.8e+98], x, If[LessEqual[a, 1.65e+38], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.8 \cdot 10^{+98}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.65 \cdot 10^{+38}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.80000000000000034e98 or 1.65e38 < a

    1. Initial program 86.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 48.6%

      \[\leadsto \color{blue}{x} \]

    if -8.80000000000000034e98 < a < 1.65e38

    1. Initial program 73.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 65.7%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+65.7%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--65.7%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub66.4%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg66.4%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg66.4%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--66.4%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*71.2%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified71.2%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 62.6%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Taylor expanded in t around inf 49.8%

      \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y}{z}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification49.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.8 \cdot 10^{+98}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+38}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 28: 39.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -275000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -275000.0) x (if (<= a 2.05e+38) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -275000.0) {
		tmp = x;
	} else if (a <= 2.05e+38) {
		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 <= (-275000.0d0)) then
        tmp = x
    else if (a <= 2.05d+38) 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 <= -275000.0) {
		tmp = x;
	} else if (a <= 2.05e+38) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -275000.0:
		tmp = x
	elif a <= 2.05e+38:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -275000.0)
		tmp = x;
	elseif (a <= 2.05e+38)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -275000.0)
		tmp = x;
	elseif (a <= 2.05e+38)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -275000.0], x, If[LessEqual[a, 2.05e+38], t, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -275000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.05 \cdot 10^{+38}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -275000 or 2.0500000000000002e38 < a

    1. Initial program 86.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 42.7%

      \[\leadsto \color{blue}{x} \]

    if -275000 < a < 2.0500000000000002e38

    1. Initial program 70.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 38.4%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -275000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 29: 26.1% 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 79.0%

    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
  2. Add Preprocessing
  3. Taylor expanded in z around inf 24.6%

    \[\leadsto \color{blue}{t} \]
  4. Final simplification24.6%

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024027 
(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)))))