Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.1% → 91.6%
Time: 21.8s
Alternatives: 26
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 26 alternatives:

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

Initial Program: 80.1% accurate, 1.0× speedup?

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

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

Alternative 1: 91.6% accurate, 0.1× speedup?

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

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

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

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


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

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

    1. Initial program 15.8%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 90.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, -\left(-x\right)\right)} \]
      8. remove-double-neg93.4%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
  3. Recombined 3 regimes into one program.
  4. Final simplification93.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x - \frac{t - x}{a - z} \cdot \left(z - y\right) \leq -2 \cdot 10^{-82}:\\ \;\;\;\;x + \frac{x - t}{\frac{a - z}{z - y}}\\ \mathbf{elif}\;x - \frac{t - x}{a - z} \cdot \left(z - y\right) \leq 0:\\ \;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 53.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + y \cdot \frac{x}{z}\\ t_2 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;a \leq -1.75 \cdot 10^{-85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-132}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-138}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-233}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-290}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+56}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+75}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+76}:\\ \;\;\;\;y \cdot \frac{x}{z - a}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+106}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+119}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+155} \lor \neg \left(a \leq 9 \cdot 10^{+172}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* y (/ x z)))) (t_2 (+ x (/ (* y t) a))))
   (if (<= a -1.75e-85)
     t_2
     (if (<= a -1.4e-132)
       t_1
       (if (<= a -2.5e-138)
         (* y (/ (- t x) a))
         (if (<= a -3.6e-233)
           (- t (/ (* y t) z))
           (if (<= a 3.4e-290)
             (* y (/ (- x t) z))
             (if (<= a 9.5e+56)
               t_1
               (if (<= a 1.9e+75)
                 t_2
                 (if (<= a 5.5e+76)
                   (* y (/ x (- z a)))
                   (if (<= a 2.8e+106)
                     t_2
                     (if (<= a 3.5e+119)
                       t_1
                       (if (or (<= a 1.6e+155) (not (<= a 9e+172)))
                         t_2
                         (/ t (/ a (- y z))))))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (y * (x / z));
	double t_2 = x + ((y * t) / a);
	double tmp;
	if (a <= -1.75e-85) {
		tmp = t_2;
	} else if (a <= -1.4e-132) {
		tmp = t_1;
	} else if (a <= -2.5e-138) {
		tmp = y * ((t - x) / a);
	} else if (a <= -3.6e-233) {
		tmp = t - ((y * t) / z);
	} else if (a <= 3.4e-290) {
		tmp = y * ((x - t) / z);
	} else if (a <= 9.5e+56) {
		tmp = t_1;
	} else if (a <= 1.9e+75) {
		tmp = t_2;
	} else if (a <= 5.5e+76) {
		tmp = y * (x / (z - a));
	} else if (a <= 2.8e+106) {
		tmp = t_2;
	} else if (a <= 3.5e+119) {
		tmp = t_1;
	} else if ((a <= 1.6e+155) || !(a <= 9e+172)) {
		tmp = t_2;
	} else {
		tmp = t / (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 * (x / z))
    t_2 = x + ((y * t) / a)
    if (a <= (-1.75d-85)) then
        tmp = t_2
    else if (a <= (-1.4d-132)) then
        tmp = t_1
    else if (a <= (-2.5d-138)) then
        tmp = y * ((t - x) / a)
    else if (a <= (-3.6d-233)) then
        tmp = t - ((y * t) / z)
    else if (a <= 3.4d-290) then
        tmp = y * ((x - t) / z)
    else if (a <= 9.5d+56) then
        tmp = t_1
    else if (a <= 1.9d+75) then
        tmp = t_2
    else if (a <= 5.5d+76) then
        tmp = y * (x / (z - a))
    else if (a <= 2.8d+106) then
        tmp = t_2
    else if (a <= 3.5d+119) then
        tmp = t_1
    else if ((a <= 1.6d+155) .or. (.not. (a <= 9d+172))) then
        tmp = t_2
    else
        tmp = t / (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 * (x / z));
	double t_2 = x + ((y * t) / a);
	double tmp;
	if (a <= -1.75e-85) {
		tmp = t_2;
	} else if (a <= -1.4e-132) {
		tmp = t_1;
	} else if (a <= -2.5e-138) {
		tmp = y * ((t - x) / a);
	} else if (a <= -3.6e-233) {
		tmp = t - ((y * t) / z);
	} else if (a <= 3.4e-290) {
		tmp = y * ((x - t) / z);
	} else if (a <= 9.5e+56) {
		tmp = t_1;
	} else if (a <= 1.9e+75) {
		tmp = t_2;
	} else if (a <= 5.5e+76) {
		tmp = y * (x / (z - a));
	} else if (a <= 2.8e+106) {
		tmp = t_2;
	} else if (a <= 3.5e+119) {
		tmp = t_1;
	} else if ((a <= 1.6e+155) || !(a <= 9e+172)) {
		tmp = t_2;
	} else {
		tmp = t / (a / (y - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (y * (x / z))
	t_2 = x + ((y * t) / a)
	tmp = 0
	if a <= -1.75e-85:
		tmp = t_2
	elif a <= -1.4e-132:
		tmp = t_1
	elif a <= -2.5e-138:
		tmp = y * ((t - x) / a)
	elif a <= -3.6e-233:
		tmp = t - ((y * t) / z)
	elif a <= 3.4e-290:
		tmp = y * ((x - t) / z)
	elif a <= 9.5e+56:
		tmp = t_1
	elif a <= 1.9e+75:
		tmp = t_2
	elif a <= 5.5e+76:
		tmp = y * (x / (z - a))
	elif a <= 2.8e+106:
		tmp = t_2
	elif a <= 3.5e+119:
		tmp = t_1
	elif (a <= 1.6e+155) or not (a <= 9e+172):
		tmp = t_2
	else:
		tmp = t / (a / (y - z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(y * Float64(x / z)))
	t_2 = Float64(x + Float64(Float64(y * t) / a))
	tmp = 0.0
	if (a <= -1.75e-85)
		tmp = t_2;
	elseif (a <= -1.4e-132)
		tmp = t_1;
	elseif (a <= -2.5e-138)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (a <= -3.6e-233)
		tmp = Float64(t - Float64(Float64(y * t) / z));
	elseif (a <= 3.4e-290)
		tmp = Float64(y * Float64(Float64(x - t) / z));
	elseif (a <= 9.5e+56)
		tmp = t_1;
	elseif (a <= 1.9e+75)
		tmp = t_2;
	elseif (a <= 5.5e+76)
		tmp = Float64(y * Float64(x / Float64(z - a)));
	elseif (a <= 2.8e+106)
		tmp = t_2;
	elseif (a <= 3.5e+119)
		tmp = t_1;
	elseif ((a <= 1.6e+155) || !(a <= 9e+172))
		tmp = t_2;
	else
		tmp = Float64(t / Float64(a / Float64(y - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (y * (x / z));
	t_2 = x + ((y * t) / a);
	tmp = 0.0;
	if (a <= -1.75e-85)
		tmp = t_2;
	elseif (a <= -1.4e-132)
		tmp = t_1;
	elseif (a <= -2.5e-138)
		tmp = y * ((t - x) / a);
	elseif (a <= -3.6e-233)
		tmp = t - ((y * t) / z);
	elseif (a <= 3.4e-290)
		tmp = y * ((x - t) / z);
	elseif (a <= 9.5e+56)
		tmp = t_1;
	elseif (a <= 1.9e+75)
		tmp = t_2;
	elseif (a <= 5.5e+76)
		tmp = y * (x / (z - a));
	elseif (a <= 2.8e+106)
		tmp = t_2;
	elseif (a <= 3.5e+119)
		tmp = t_1;
	elseif ((a <= 1.6e+155) || ~((a <= 9e+172)))
		tmp = t_2;
	else
		tmp = t / (a / (y - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.75e-85], t$95$2, If[LessEqual[a, -1.4e-132], t$95$1, If[LessEqual[a, -2.5e-138], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.6e-233], N[(t - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e-290], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e+56], t$95$1, If[LessEqual[a, 1.9e+75], t$95$2, If[LessEqual[a, 5.5e+76], N[(y * N[(x / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e+106], t$95$2, If[LessEqual[a, 3.5e+119], t$95$1, If[Or[LessEqual[a, 1.6e+155], N[Not[LessEqual[a, 9e+172]], $MachinePrecision]], t$95$2, N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.4 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\

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

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

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

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

\mathbf{elif}\;a \leq 1.9 \cdot 10^{+75}:\\
\;\;\;\;t\_2\\

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

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

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

\mathbf{elif}\;a \leq 1.6 \cdot 10^{+155} \lor \neg \left(a \leq 9 \cdot 10^{+172}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if a < -1.74999999999999989e-85 or 9.4999999999999997e56 < a < 1.9000000000000001e75 or 5.5000000000000001e76 < a < 2.79999999999999993e106 or 3.5000000000000001e119 < a < 1.60000000000000006e155 or 9.0000000000000004e172 < a

    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. *-commutative84.2%

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

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

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

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

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

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

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

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

    if -1.74999999999999989e-85 < a < -1.40000000000000001e-132 or 3.39999999999999984e-290 < a < 9.4999999999999997e56 or 2.79999999999999993e106 < a < 3.5000000000000001e119

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.40000000000000001e-132 < a < -2.49999999999999994e-138

    1. Initial program 99.2%

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

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

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

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

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

    if -2.49999999999999994e-138 < a < -3.60000000000000007e-233

    1. Initial program 79.4%

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

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

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

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

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

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

        \[\leadsto x - \left(t - x\right) \cdot \color{blue}{\left(\frac{y}{z} + \left(-\frac{z}{z}\right)\right)} \]
      6. *-inverses75.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(\left(--1\right) + \left(-\frac{y}{z}\right)\right)} \]
      7. metadata-eval72.7%

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-neg72.8%

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y \cdot t}{z}} \]
    11. Simplified72.8%

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

    if -3.60000000000000007e-233 < a < 3.39999999999999984e-290

    1. Initial program 81.7%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. distribute-rgt-neg-in73.3%

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

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

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

    if 1.9000000000000001e75 < a < 5.5000000000000001e76

    1. Initial program 51.4%

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

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

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

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

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

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

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

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

    if 1.60000000000000006e155 < a < 9.0000000000000004e172

    1. Initial program 99.6%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Step-by-step derivation
      1. div-sub99.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.75 \cdot 10^{-85}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-132}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-138}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-233}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-290}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+56}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+75}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+76}:\\ \;\;\;\;y \cdot \frac{x}{z - a}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+106}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+119}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+155} \lor \neg \left(a \leq 9 \cdot 10^{+172}\right):\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 58.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;x \leq -1 \cdot 10^{+117}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -4.2 \cdot 10^{+73}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;x \leq -1.22 \cdot 10^{+24}:\\ \;\;\;\;\frac{x \cdot y}{z - a}\\ \mathbf{elif}\;x \leq -7 \cdot 10^{-28}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -1.32 \cdot 10^{-39}:\\ \;\;\;\;x + x \cdot \frac{z}{a}\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{+57}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+176} \lor \neg \left(x \leq 9.5 \cdot 10^{+181}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t - x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* x (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= x -1e+117)
     t_1
     (if (<= x -4.2e+73)
       (+ t (* y (/ x z)))
       (if (<= x -1.22e+24)
         (/ (* x y) (- z a))
         (if (<= x -7e-28)
           t_2
           (if (<= x -1.32e-39)
             (+ x (* x (/ z a)))
             (if (<= x 1.15e+57)
               t_2
               (if (or (<= x 1.3e+176) (not (<= x 9.5e+181)))
                 t_1
                 (* a (/ (- t x) z)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -1e+117) {
		tmp = t_1;
	} else if (x <= -4.2e+73) {
		tmp = t + (y * (x / z));
	} else if (x <= -1.22e+24) {
		tmp = (x * y) / (z - a);
	} else if (x <= -7e-28) {
		tmp = t_2;
	} else if (x <= -1.32e-39) {
		tmp = x + (x * (z / a));
	} else if (x <= 1.15e+57) {
		tmp = t_2;
	} else if ((x <= 1.3e+176) || !(x <= 9.5e+181)) {
		tmp = t_1;
	} else {
		tmp = a * ((t - x) / 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 - (x * (y / a))
    t_2 = t * ((y - z) / (a - z))
    if (x <= (-1d+117)) then
        tmp = t_1
    else if (x <= (-4.2d+73)) then
        tmp = t + (y * (x / z))
    else if (x <= (-1.22d+24)) then
        tmp = (x * y) / (z - a)
    else if (x <= (-7d-28)) then
        tmp = t_2
    else if (x <= (-1.32d-39)) then
        tmp = x + (x * (z / a))
    else if (x <= 1.15d+57) then
        tmp = t_2
    else if ((x <= 1.3d+176) .or. (.not. (x <= 9.5d+181))) then
        tmp = t_1
    else
        tmp = a * ((t - x) / 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 - (x * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -1e+117) {
		tmp = t_1;
	} else if (x <= -4.2e+73) {
		tmp = t + (y * (x / z));
	} else if (x <= -1.22e+24) {
		tmp = (x * y) / (z - a);
	} else if (x <= -7e-28) {
		tmp = t_2;
	} else if (x <= -1.32e-39) {
		tmp = x + (x * (z / a));
	} else if (x <= 1.15e+57) {
		tmp = t_2;
	} else if ((x <= 1.3e+176) || !(x <= 9.5e+181)) {
		tmp = t_1;
	} else {
		tmp = a * ((t - x) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (x * (y / a))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if x <= -1e+117:
		tmp = t_1
	elif x <= -4.2e+73:
		tmp = t + (y * (x / z))
	elif x <= -1.22e+24:
		tmp = (x * y) / (z - a)
	elif x <= -7e-28:
		tmp = t_2
	elif x <= -1.32e-39:
		tmp = x + (x * (z / a))
	elif x <= 1.15e+57:
		tmp = t_2
	elif (x <= 1.3e+176) or not (x <= 9.5e+181):
		tmp = t_1
	else:
		tmp = a * ((t - x) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(x * Float64(y / a)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (x <= -1e+117)
		tmp = t_1;
	elseif (x <= -4.2e+73)
		tmp = Float64(t + Float64(y * Float64(x / z)));
	elseif (x <= -1.22e+24)
		tmp = Float64(Float64(x * y) / Float64(z - a));
	elseif (x <= -7e-28)
		tmp = t_2;
	elseif (x <= -1.32e-39)
		tmp = Float64(x + Float64(x * Float64(z / a)));
	elseif (x <= 1.15e+57)
		tmp = t_2;
	elseif ((x <= 1.3e+176) || !(x <= 9.5e+181))
		tmp = t_1;
	else
		tmp = Float64(a * Float64(Float64(t - x) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (x * (y / a));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (x <= -1e+117)
		tmp = t_1;
	elseif (x <= -4.2e+73)
		tmp = t + (y * (x / z));
	elseif (x <= -1.22e+24)
		tmp = (x * y) / (z - a);
	elseif (x <= -7e-28)
		tmp = t_2;
	elseif (x <= -1.32e-39)
		tmp = x + (x * (z / a));
	elseif (x <= 1.15e+57)
		tmp = t_2;
	elseif ((x <= 1.3e+176) || ~((x <= 9.5e+181)))
		tmp = t_1;
	else
		tmp = a * ((t - x) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(x * 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, -1e+117], t$95$1, If[LessEqual[x, -4.2e+73], N[(t + N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.22e+24], N[(N[(x * y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7e-28], t$95$2, If[LessEqual[x, -1.32e-39], N[(x + N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e+57], t$95$2, If[Or[LessEqual[x, 1.3e+176], N[Not[LessEqual[x, 9.5e+181]], $MachinePrecision]], t$95$1, N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;x \leq -7 \cdot 10^{-28}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;x \leq 1.15 \cdot 10^{+57}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 1.3 \cdot 10^{+176} \lor \neg \left(x \leq 9.5 \cdot 10^{+181}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -1.00000000000000005e117 or 1.1499999999999999e57 < x < 1.29999999999999995e176 or 9.50000000000000032e181 < x

    1. Initial program 73.9%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Step-by-step derivation
      1. div-sub76.2%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-x}{\frac{a - z}{y - z}}} \]
    9. Simplified65.1%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    11. Step-by-step derivation
      1. mul-1-neg43.7%

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

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

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{a}} \]
    12. Simplified56.0%

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

    if -1.00000000000000005e117 < x < -4.2000000000000003e73

    1. Initial program 36.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2000000000000003e73 < x < -1.21999999999999996e24

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

    if -1.21999999999999996e24 < x < -6.9999999999999999e-28 or -1.31999999999999997e-39 < x < 1.1499999999999999e57

    1. Initial program 83.3%

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

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

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

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

    if -6.9999999999999999e-28 < x < -1.31999999999999997e-39

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{x \cdot \frac{z}{a}} \]
    11. Simplified53.7%

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

    if 1.29999999999999995e176 < x < 9.50000000000000032e181

    1. Initial program 29.1%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1 \cdot 10^{+117}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -4.2 \cdot 10^{+73}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;x \leq -1.22 \cdot 10^{+24}:\\ \;\;\;\;\frac{x \cdot y}{z - a}\\ \mathbf{elif}\;x \leq -7 \cdot 10^{-28}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq -1.32 \cdot 10^{-39}:\\ \;\;\;\;x + x \cdot \frac{z}{a}\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{+57}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{+176} \lor \neg \left(x \leq 9.5 \cdot 10^{+181}\right):\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;a \cdot \frac{t - x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 50.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} \cdot \left(x - t\right)\\ t_2 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;a \leq -1.15 \cdot 10^{-85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-226}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-290}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-291}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-56}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1200:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+151} \lor \neg \left(a \leq 9.5 \cdot 10^{+185}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (/ y z) (- x t))) (t_2 (+ x (/ (* y t) a))))
   (if (<= a -1.15e-85)
     t_2
     (if (<= a -1.75e-226)
       (- t (/ (* y t) z))
       (if (<= a -1.45e-290)
         t_1
         (if (<= a 7.5e-291)
           (* y (/ (- x t) z))
           (if (<= a 5.4e-56)
             t_1
             (if (<= a 1200.0)
               (* t (- 1.0 (/ y z)))
               (if (or (<= a 1.12e+151) (not (<= a 9.5e+185)))
                 t_2
                 (/ t (/ a (- y z))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y / z) * (x - t);
	double t_2 = x + ((y * t) / a);
	double tmp;
	if (a <= -1.15e-85) {
		tmp = t_2;
	} else if (a <= -1.75e-226) {
		tmp = t - ((y * t) / z);
	} else if (a <= -1.45e-290) {
		tmp = t_1;
	} else if (a <= 7.5e-291) {
		tmp = y * ((x - t) / z);
	} else if (a <= 5.4e-56) {
		tmp = t_1;
	} else if (a <= 1200.0) {
		tmp = t * (1.0 - (y / z));
	} else if ((a <= 1.12e+151) || !(a <= 9.5e+185)) {
		tmp = t_2;
	} else {
		tmp = t / (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 = (y / z) * (x - t)
    t_2 = x + ((y * t) / a)
    if (a <= (-1.15d-85)) then
        tmp = t_2
    else if (a <= (-1.75d-226)) then
        tmp = t - ((y * t) / z)
    else if (a <= (-1.45d-290)) then
        tmp = t_1
    else if (a <= 7.5d-291) then
        tmp = y * ((x - t) / z)
    else if (a <= 5.4d-56) then
        tmp = t_1
    else if (a <= 1200.0d0) then
        tmp = t * (1.0d0 - (y / z))
    else if ((a <= 1.12d+151) .or. (.not. (a <= 9.5d+185))) then
        tmp = t_2
    else
        tmp = t / (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 = (y / z) * (x - t);
	double t_2 = x + ((y * t) / a);
	double tmp;
	if (a <= -1.15e-85) {
		tmp = t_2;
	} else if (a <= -1.75e-226) {
		tmp = t - ((y * t) / z);
	} else if (a <= -1.45e-290) {
		tmp = t_1;
	} else if (a <= 7.5e-291) {
		tmp = y * ((x - t) / z);
	} else if (a <= 5.4e-56) {
		tmp = t_1;
	} else if (a <= 1200.0) {
		tmp = t * (1.0 - (y / z));
	} else if ((a <= 1.12e+151) || !(a <= 9.5e+185)) {
		tmp = t_2;
	} else {
		tmp = t / (a / (y - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y / z) * (x - t)
	t_2 = x + ((y * t) / a)
	tmp = 0
	if a <= -1.15e-85:
		tmp = t_2
	elif a <= -1.75e-226:
		tmp = t - ((y * t) / z)
	elif a <= -1.45e-290:
		tmp = t_1
	elif a <= 7.5e-291:
		tmp = y * ((x - t) / z)
	elif a <= 5.4e-56:
		tmp = t_1
	elif a <= 1200.0:
		tmp = t * (1.0 - (y / z))
	elif (a <= 1.12e+151) or not (a <= 9.5e+185):
		tmp = t_2
	else:
		tmp = t / (a / (y - z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y / z) * Float64(x - t))
	t_2 = Float64(x + Float64(Float64(y * t) / a))
	tmp = 0.0
	if (a <= -1.15e-85)
		tmp = t_2;
	elseif (a <= -1.75e-226)
		tmp = Float64(t - Float64(Float64(y * t) / z));
	elseif (a <= -1.45e-290)
		tmp = t_1;
	elseif (a <= 7.5e-291)
		tmp = Float64(y * Float64(Float64(x - t) / z));
	elseif (a <= 5.4e-56)
		tmp = t_1;
	elseif (a <= 1200.0)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif ((a <= 1.12e+151) || !(a <= 9.5e+185))
		tmp = t_2;
	else
		tmp = Float64(t / Float64(a / Float64(y - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y / z) * (x - t);
	t_2 = x + ((y * t) / a);
	tmp = 0.0;
	if (a <= -1.15e-85)
		tmp = t_2;
	elseif (a <= -1.75e-226)
		tmp = t - ((y * t) / z);
	elseif (a <= -1.45e-290)
		tmp = t_1;
	elseif (a <= 7.5e-291)
		tmp = y * ((x - t) / z);
	elseif (a <= 5.4e-56)
		tmp = t_1;
	elseif (a <= 1200.0)
		tmp = t * (1.0 - (y / z));
	elseif ((a <= 1.12e+151) || ~((a <= 9.5e+185)))
		tmp = t_2;
	else
		tmp = t / (a / (y - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.15e-85], t$95$2, If[LessEqual[a, -1.75e-226], N[(t - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.45e-290], t$95$1, If[LessEqual[a, 7.5e-291], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.4e-56], t$95$1, If[LessEqual[a, 1200.0], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 1.12e+151], N[Not[LessEqual[a, 9.5e+185]], $MachinePrecision]], t$95$2, N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;a \leq 5.4 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.12 \cdot 10^{+151} \lor \neg \left(a \leq 9.5 \cdot 10^{+185}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -1.15e-85 or 1200 < a < 1.12000000000000004e151 or 9.4999999999999995e185 < a

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

    if -1.15e-85 < a < -1.75e-226

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \left(\frac{y}{z} - 1\right)} \]
      2. sub-neg59.0%

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

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

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(-1 + \frac{y}{z}\right)}\right) \]
      6. distribute-neg-in59.0%

        \[\leadsto t \cdot \color{blue}{\left(\left(--1\right) + \left(-\frac{y}{z}\right)\right)} \]
      7. metadata-eval59.0%

        \[\leadsto t \cdot \left(\color{blue}{1} + \left(-\frac{y}{z}\right)\right) \]
      8. sub-neg59.0%

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y \cdot t}{z}} \]
    11. Simplified59.0%

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

    if -1.75e-226 < a < -1.44999999999999997e-290 or 7.49999999999999981e-291 < a < 5.3999999999999999e-56

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \frac{y}{z} - \color{blue}{\frac{y \cdot t}{z}} \]
      6. *-commutative55.0%

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

        \[\leadsto x \cdot \frac{y}{z} - \color{blue}{t \cdot \frac{y}{z}} \]
      8. distribute-rgt-out--61.0%

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

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

    if -1.44999999999999997e-290 < a < 7.49999999999999981e-291

    1. Initial program 100.0%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. distribute-rgt-neg-in84.3%

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

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

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

    if 5.3999999999999999e-56 < a < 1200

    1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(\left(--1\right) + \left(-\frac{y}{z}\right)\right)} \]
      7. metadata-eval48.7%

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

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

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

    if 1.12000000000000004e151 < a < 9.4999999999999995e185

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.15 \cdot 10^{-85}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-226}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-290}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-291}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-56}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 1200:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.12 \cdot 10^{+151} \lor \neg \left(a \leq 9.5 \cdot 10^{+185}\right):\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 50.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} \cdot \left(x - t\right)\\ t_2 := x + \frac{y \cdot t}{a}\\ t_3 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -3.7 \cdot 10^{-85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-226}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-291}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-286}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5500:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+153} \lor \neg \left(a \leq 6.2 \cdot 10^{+196}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (/ y z) (- x t)))
        (t_2 (+ x (/ (* y t) a)))
        (t_3 (* t (- 1.0 (/ y z)))))
   (if (<= a -3.7e-85)
     t_2
     (if (<= a -4.2e-226)
       (- t (/ (* y t) z))
       (if (<= a -5.5e-291)
         t_1
         (if (<= a 2.5e-286)
           t_3
           (if (<= a 6.5e-18)
             t_1
             (if (<= a 5500.0)
               t_3
               (if (or (<= a 1.55e+153) (not (<= a 6.2e+196)))
                 t_2
                 (/ t (/ a (- y z))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y / z) * (x - t);
	double t_2 = x + ((y * t) / a);
	double t_3 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -3.7e-85) {
		tmp = t_2;
	} else if (a <= -4.2e-226) {
		tmp = t - ((y * t) / z);
	} else if (a <= -5.5e-291) {
		tmp = t_1;
	} else if (a <= 2.5e-286) {
		tmp = t_3;
	} else if (a <= 6.5e-18) {
		tmp = t_1;
	} else if (a <= 5500.0) {
		tmp = t_3;
	} else if ((a <= 1.55e+153) || !(a <= 6.2e+196)) {
		tmp = t_2;
	} else {
		tmp = t / (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) :: t_3
    real(8) :: tmp
    t_1 = (y / z) * (x - t)
    t_2 = x + ((y * t) / a)
    t_3 = t * (1.0d0 - (y / z))
    if (a <= (-3.7d-85)) then
        tmp = t_2
    else if (a <= (-4.2d-226)) then
        tmp = t - ((y * t) / z)
    else if (a <= (-5.5d-291)) then
        tmp = t_1
    else if (a <= 2.5d-286) then
        tmp = t_3
    else if (a <= 6.5d-18) then
        tmp = t_1
    else if (a <= 5500.0d0) then
        tmp = t_3
    else if ((a <= 1.55d+153) .or. (.not. (a <= 6.2d+196))) then
        tmp = t_2
    else
        tmp = t / (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 = (y / z) * (x - t);
	double t_2 = x + ((y * t) / a);
	double t_3 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -3.7e-85) {
		tmp = t_2;
	} else if (a <= -4.2e-226) {
		tmp = t - ((y * t) / z);
	} else if (a <= -5.5e-291) {
		tmp = t_1;
	} else if (a <= 2.5e-286) {
		tmp = t_3;
	} else if (a <= 6.5e-18) {
		tmp = t_1;
	} else if (a <= 5500.0) {
		tmp = t_3;
	} else if ((a <= 1.55e+153) || !(a <= 6.2e+196)) {
		tmp = t_2;
	} else {
		tmp = t / (a / (y - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y / z) * (x - t)
	t_2 = x + ((y * t) / a)
	t_3 = t * (1.0 - (y / z))
	tmp = 0
	if a <= -3.7e-85:
		tmp = t_2
	elif a <= -4.2e-226:
		tmp = t - ((y * t) / z)
	elif a <= -5.5e-291:
		tmp = t_1
	elif a <= 2.5e-286:
		tmp = t_3
	elif a <= 6.5e-18:
		tmp = t_1
	elif a <= 5500.0:
		tmp = t_3
	elif (a <= 1.55e+153) or not (a <= 6.2e+196):
		tmp = t_2
	else:
		tmp = t / (a / (y - z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y / z) * Float64(x - t))
	t_2 = Float64(x + Float64(Float64(y * t) / a))
	t_3 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (a <= -3.7e-85)
		tmp = t_2;
	elseif (a <= -4.2e-226)
		tmp = Float64(t - Float64(Float64(y * t) / z));
	elseif (a <= -5.5e-291)
		tmp = t_1;
	elseif (a <= 2.5e-286)
		tmp = t_3;
	elseif (a <= 6.5e-18)
		tmp = t_1;
	elseif (a <= 5500.0)
		tmp = t_3;
	elseif ((a <= 1.55e+153) || !(a <= 6.2e+196))
		tmp = t_2;
	else
		tmp = Float64(t / Float64(a / Float64(y - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y / z) * (x - t);
	t_2 = x + ((y * t) / a);
	t_3 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (a <= -3.7e-85)
		tmp = t_2;
	elseif (a <= -4.2e-226)
		tmp = t - ((y * t) / z);
	elseif (a <= -5.5e-291)
		tmp = t_1;
	elseif (a <= 2.5e-286)
		tmp = t_3;
	elseif (a <= 6.5e-18)
		tmp = t_1;
	elseif (a <= 5500.0)
		tmp = t_3;
	elseif ((a <= 1.55e+153) || ~((a <= 6.2e+196)))
		tmp = t_2;
	else
		tmp = t / (a / (y - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.7e-85], t$95$2, If[LessEqual[a, -4.2e-226], N[(t - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.5e-291], t$95$1, If[LessEqual[a, 2.5e-286], t$95$3, If[LessEqual[a, 6.5e-18], t$95$1, If[LessEqual[a, 5500.0], t$95$3, If[Or[LessEqual[a, 1.55e+153], N[Not[LessEqual[a, 6.2e+196]], $MachinePrecision]], t$95$2, N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -5.5 \cdot 10^{-291}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2.5 \cdot 10^{-286}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 6.5 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5500:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{+153} \lor \neg \left(a \leq 6.2 \cdot 10^{+196}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.69999999999999983e-85 or 5500 < a < 1.55e153 or 6.2000000000000002e196 < a

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

    if -3.69999999999999983e-85 < a < -4.2000000000000003e-226

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \left(\frac{y}{z} - 1\right)} \]
      2. sub-neg59.0%

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

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

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(-1 + \frac{y}{z}\right)}\right) \]
      6. distribute-neg-in59.0%

        \[\leadsto t \cdot \color{blue}{\left(\left(--1\right) + \left(-\frac{y}{z}\right)\right)} \]
      7. metadata-eval59.0%

        \[\leadsto t \cdot \left(\color{blue}{1} + \left(-\frac{y}{z}\right)\right) \]
      8. sub-neg59.0%

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y \cdot t}{z}} \]
    11. Simplified59.0%

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

    if -4.2000000000000003e-226 < a < -5.5000000000000002e-291 or 2.50000000000000018e-286 < a < 6.50000000000000008e-18

    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 74.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+74.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--74.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-sub74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{z}} - y \cdot \frac{t}{z} \]
      3. *-commutative48.7%

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

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

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

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

        \[\leadsto x \cdot \frac{y}{z} - \color{blue}{t \cdot \frac{y}{z}} \]
      8. distribute-rgt-out--62.0%

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

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

    if -5.5000000000000002e-291 < a < 2.50000000000000018e-286 or 6.50000000000000008e-18 < a < 5500

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -t \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)} \]
      3. metadata-eval60.3%

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

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

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

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

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

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

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

    if 1.55e153 < a < 6.2000000000000002e196

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.7 \cdot 10^{-85}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-226}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-291}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-286}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-18}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 5500:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+153} \lor \neg \left(a \leq 6.2 \cdot 10^{+196}\right):\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 40.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ t_2 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;z \leq -1.7 \cdot 10^{+136}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{+67}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -1.82 \cdot 10^{-68}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-245}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-59}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+71}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.56 \cdot 10^{+156} \lor \neg \left(z \leq 1.6 \cdot 10^{+156}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ y z)))) (t_2 (* t (/ y (- a z)))))
   (if (<= z -1.7e+136)
     t_1
     (if (<= z -2.15e+67)
       (* x (/ (- y a) z))
       (if (<= z -1.82e-68)
         t_2
         (if (<= z -9.2e-245)
           x
           (if (<= z 6.2e-59)
             t_2
             (if (<= z 2.05e+71)
               x
               (if (or (<= z 1.56e+156) (not (<= z 1.6e+156)))
                 t_1
                 (* t (/ y a)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double t_2 = t * (y / (a - z));
	double tmp;
	if (z <= -1.7e+136) {
		tmp = t_1;
	} else if (z <= -2.15e+67) {
		tmp = x * ((y - a) / z);
	} else if (z <= -1.82e-68) {
		tmp = t_2;
	} else if (z <= -9.2e-245) {
		tmp = x;
	} else if (z <= 6.2e-59) {
		tmp = t_2;
	} else if (z <= 2.05e+71) {
		tmp = x;
	} else if ((z <= 1.56e+156) || !(z <= 1.6e+156)) {
		tmp = t_1;
	} else {
		tmp = t * (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) :: t_2
    real(8) :: tmp
    t_1 = t * (1.0d0 - (y / z))
    t_2 = t * (y / (a - z))
    if (z <= (-1.7d+136)) then
        tmp = t_1
    else if (z <= (-2.15d+67)) then
        tmp = x * ((y - a) / z)
    else if (z <= (-1.82d-68)) then
        tmp = t_2
    else if (z <= (-9.2d-245)) then
        tmp = x
    else if (z <= 6.2d-59) then
        tmp = t_2
    else if (z <= 2.05d+71) then
        tmp = x
    else if ((z <= 1.56d+156) .or. (.not. (z <= 1.6d+156))) then
        tmp = t_1
    else
        tmp = t * (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 = t * (1.0 - (y / z));
	double t_2 = t * (y / (a - z));
	double tmp;
	if (z <= -1.7e+136) {
		tmp = t_1;
	} else if (z <= -2.15e+67) {
		tmp = x * ((y - a) / z);
	} else if (z <= -1.82e-68) {
		tmp = t_2;
	} else if (z <= -9.2e-245) {
		tmp = x;
	} else if (z <= 6.2e-59) {
		tmp = t_2;
	} else if (z <= 2.05e+71) {
		tmp = x;
	} else if ((z <= 1.56e+156) || !(z <= 1.6e+156)) {
		tmp = t_1;
	} else {
		tmp = t * (y / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	t_2 = t * (y / (a - z))
	tmp = 0
	if z <= -1.7e+136:
		tmp = t_1
	elif z <= -2.15e+67:
		tmp = x * ((y - a) / z)
	elif z <= -1.82e-68:
		tmp = t_2
	elif z <= -9.2e-245:
		tmp = x
	elif z <= 6.2e-59:
		tmp = t_2
	elif z <= 2.05e+71:
		tmp = x
	elif (z <= 1.56e+156) or not (z <= 1.6e+156):
		tmp = t_1
	else:
		tmp = t * (y / a)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 - Float64(y / z)))
	t_2 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (z <= -1.7e+136)
		tmp = t_1;
	elseif (z <= -2.15e+67)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= -1.82e-68)
		tmp = t_2;
	elseif (z <= -9.2e-245)
		tmp = x;
	elseif (z <= 6.2e-59)
		tmp = t_2;
	elseif (z <= 2.05e+71)
		tmp = x;
	elseif ((z <= 1.56e+156) || !(z <= 1.6e+156))
		tmp = t_1;
	else
		tmp = Float64(t * Float64(y / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 - (y / z));
	t_2 = t * (y / (a - z));
	tmp = 0.0;
	if (z <= -1.7e+136)
		tmp = t_1;
	elseif (z <= -2.15e+67)
		tmp = x * ((y - a) / z);
	elseif (z <= -1.82e-68)
		tmp = t_2;
	elseif (z <= -9.2e-245)
		tmp = x;
	elseif (z <= 6.2e-59)
		tmp = t_2;
	elseif (z <= 2.05e+71)
		tmp = x;
	elseif ((z <= 1.56e+156) || ~((z <= 1.6e+156)))
		tmp = t_1;
	else
		tmp = t * (y / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e+136], t$95$1, If[LessEqual[z, -2.15e+67], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.82e-68], t$95$2, If[LessEqual[z, -9.2e-245], x, If[LessEqual[z, 6.2e-59], t$95$2, If[LessEqual[z, 2.05e+71], x, If[Or[LessEqual[z, 1.56e+156], N[Not[LessEqual[z, 1.6e+156]], $MachinePrecision]], t$95$1, N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -1.82 \cdot 10^{-68}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -9.2 \cdot 10^{-245}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{-59}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 2.05 \cdot 10^{+71}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.56 \cdot 10^{+156} \lor \neg \left(z \leq 1.6 \cdot 10^{+156}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.69999999999999998e136 or 2.0500000000000001e71 < z < 1.55999999999999992e156 or 1.60000000000000001e156 < z

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \left(\frac{y}{z} - 1\right)} \]
      2. sub-neg59.4%

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

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

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

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

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

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

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

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

    if -1.69999999999999998e136 < z < -2.1500000000000001e67

    1. Initial program 63.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1500000000000001e67 < z < -1.81999999999999994e-68 or -9.2000000000000007e-245 < z < 6.19999999999999998e-59

    1. Initial program 88.7%

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

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

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

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

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

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

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

    if -1.81999999999999994e-68 < z < -9.2000000000000007e-245 or 6.19999999999999998e-59 < z < 2.0500000000000001e71

    1. Initial program 90.4%

      \[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 1.55999999999999992e156 < z < 1.60000000000000001e156

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+136}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{+67}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -1.82 \cdot 10^{-68}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-245}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-59}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+71}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.56 \cdot 10^{+156} \lor \neg \left(z \leq 1.6 \cdot 10^{+156}\right):\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 40.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ t_2 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;z \leq -1.75 \cdot 10^{+39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-49}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-50}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-296}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-217}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-217}:\\ \;\;\;\;x \cdot \frac{y}{-a}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-56}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+63}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ y z)))) (t_2 (* t (/ y (- a z)))))
   (if (<= z -1.75e+39)
     t_1
     (if (<= z -3.5e-49)
       (/ t (/ a y))
       (if (<= z -2.05e-50)
         t
         (if (<= z 4.2e-296)
           x
           (if (<= z 1.6e-217)
             t_2
             (if (<= z 9.2e-217)
               (* x (/ y (- a)))
               (if (<= z 1.3e-56) t_2 (if (<= z 9.5e+63) x t_1))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double t_2 = t * (y / (a - z));
	double tmp;
	if (z <= -1.75e+39) {
		tmp = t_1;
	} else if (z <= -3.5e-49) {
		tmp = t / (a / y);
	} else if (z <= -2.05e-50) {
		tmp = t;
	} else if (z <= 4.2e-296) {
		tmp = x;
	} else if (z <= 1.6e-217) {
		tmp = t_2;
	} else if (z <= 9.2e-217) {
		tmp = x * (y / -a);
	} else if (z <= 1.3e-56) {
		tmp = t_2;
	} else if (z <= 9.5e+63) {
		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) :: t_2
    real(8) :: tmp
    t_1 = t * (1.0d0 - (y / z))
    t_2 = t * (y / (a - z))
    if (z <= (-1.75d+39)) then
        tmp = t_1
    else if (z <= (-3.5d-49)) then
        tmp = t / (a / y)
    else if (z <= (-2.05d-50)) then
        tmp = t
    else if (z <= 4.2d-296) then
        tmp = x
    else if (z <= 1.6d-217) then
        tmp = t_2
    else if (z <= 9.2d-217) then
        tmp = x * (y / -a)
    else if (z <= 1.3d-56) then
        tmp = t_2
    else if (z <= 9.5d+63) 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 * (1.0 - (y / z));
	double t_2 = t * (y / (a - z));
	double tmp;
	if (z <= -1.75e+39) {
		tmp = t_1;
	} else if (z <= -3.5e-49) {
		tmp = t / (a / y);
	} else if (z <= -2.05e-50) {
		tmp = t;
	} else if (z <= 4.2e-296) {
		tmp = x;
	} else if (z <= 1.6e-217) {
		tmp = t_2;
	} else if (z <= 9.2e-217) {
		tmp = x * (y / -a);
	} else if (z <= 1.3e-56) {
		tmp = t_2;
	} else if (z <= 9.5e+63) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	t_2 = t * (y / (a - z))
	tmp = 0
	if z <= -1.75e+39:
		tmp = t_1
	elif z <= -3.5e-49:
		tmp = t / (a / y)
	elif z <= -2.05e-50:
		tmp = t
	elif z <= 4.2e-296:
		tmp = x
	elif z <= 1.6e-217:
		tmp = t_2
	elif z <= 9.2e-217:
		tmp = x * (y / -a)
	elif z <= 1.3e-56:
		tmp = t_2
	elif z <= 9.5e+63:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 - Float64(y / z)))
	t_2 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (z <= -1.75e+39)
		tmp = t_1;
	elseif (z <= -3.5e-49)
		tmp = Float64(t / Float64(a / y));
	elseif (z <= -2.05e-50)
		tmp = t;
	elseif (z <= 4.2e-296)
		tmp = x;
	elseif (z <= 1.6e-217)
		tmp = t_2;
	elseif (z <= 9.2e-217)
		tmp = Float64(x * Float64(y / Float64(-a)));
	elseif (z <= 1.3e-56)
		tmp = t_2;
	elseif (z <= 9.5e+63)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 - (y / z));
	t_2 = t * (y / (a - z));
	tmp = 0.0;
	if (z <= -1.75e+39)
		tmp = t_1;
	elseif (z <= -3.5e-49)
		tmp = t / (a / y);
	elseif (z <= -2.05e-50)
		tmp = t;
	elseif (z <= 4.2e-296)
		tmp = x;
	elseif (z <= 1.6e-217)
		tmp = t_2;
	elseif (z <= 9.2e-217)
		tmp = x * (y / -a);
	elseif (z <= 1.3e-56)
		tmp = t_2;
	elseif (z <= 9.5e+63)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.75e+39], t$95$1, If[LessEqual[z, -3.5e-49], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.05e-50], t, If[LessEqual[z, 4.2e-296], x, If[LessEqual[z, 1.6e-217], t$95$2, If[LessEqual[z, 9.2e-217], N[(x * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e-56], t$95$2, If[LessEqual[z, 9.5e+63], x, t$95$1]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -2.05 \cdot 10^{-50}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-296}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-217}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 1.3 \cdot 10^{-56}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{+63}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -1.7500000000000001e39 or 9.5000000000000003e63 < z

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -t \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)} \]
      3. metadata-eval53.3%

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

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

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

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

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

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

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

    if -1.7500000000000001e39 < z < -3.50000000000000006e-49

    1. Initial program 85.2%

      \[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}} \]
    5. Simplified48.7%

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

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Taylor expanded in t around inf 26.0%

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified40.1%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Step-by-step derivation
      1. clear-num40.1%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. un-div-inv40.3%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Applied egg-rr40.3%

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

    if -3.50000000000000006e-49 < z < -2.04999999999999993e-50

    1. Initial program 7.6%

      \[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.04999999999999993e-50 < z < 4.1999999999999999e-296 or 1.29999999999999998e-56 < z < 9.5000000000000003e63

    1. Initial program 89.5%

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

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

    if 4.1999999999999999e-296 < z < 1.6000000000000001e-217 or 9.20000000000000019e-217 < z < 1.29999999999999998e-56

    1. Initial program 91.9%

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

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

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

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

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

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

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

    if 1.6000000000000001e-217 < z < 9.20000000000000019e-217

    1. Initial program 98.4%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{x \cdot \frac{y}{a}} \]
    9. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+39}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-49}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-50}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-296}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-217}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-217}:\\ \;\;\;\;x \cdot \frac{y}{-a}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-56}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+63}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 91.6% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

    1. Initial program 15.8%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 88.6% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 90.3%

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

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

    1. Initial program 15.8%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 42.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -80:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-269}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -3.65 \cdot 10^{-292}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-118}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{-56}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+57}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{+154}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{+158}:\\ \;\;\;\;z \cdot \frac{t}{-a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ y z)))))
   (if (<= a -80.0)
     x
     (if (<= a -2.7e-269)
       t_1
       (if (<= a -3.65e-292)
         (/ (* x y) z)
         (if (<= a 1.05e-118)
           t_1
           (if (<= a 3.4e-56)
             (/ x (/ z y))
             (if (<= a 2.1e+57)
               t_1
               (if (<= a 7.6e+154)
                 x
                 (if (<= a 6.6e+158) (* z (/ t (- a))) (/ t (/ a y))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -80.0) {
		tmp = x;
	} else if (a <= -2.7e-269) {
		tmp = t_1;
	} else if (a <= -3.65e-292) {
		tmp = (x * y) / z;
	} else if (a <= 1.05e-118) {
		tmp = t_1;
	} else if (a <= 3.4e-56) {
		tmp = x / (z / y);
	} else if (a <= 2.1e+57) {
		tmp = t_1;
	} else if (a <= 7.6e+154) {
		tmp = x;
	} else if (a <= 6.6e+158) {
		tmp = z * (t / -a);
	} else {
		tmp = t / (a / y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (1.0d0 - (y / z))
    if (a <= (-80.0d0)) then
        tmp = x
    else if (a <= (-2.7d-269)) then
        tmp = t_1
    else if (a <= (-3.65d-292)) then
        tmp = (x * y) / z
    else if (a <= 1.05d-118) then
        tmp = t_1
    else if (a <= 3.4d-56) then
        tmp = x / (z / y)
    else if (a <= 2.1d+57) then
        tmp = t_1
    else if (a <= 7.6d+154) then
        tmp = x
    else if (a <= 6.6d+158) then
        tmp = z * (t / -a)
    else
        tmp = t / (a / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -80.0) {
		tmp = x;
	} else if (a <= -2.7e-269) {
		tmp = t_1;
	} else if (a <= -3.65e-292) {
		tmp = (x * y) / z;
	} else if (a <= 1.05e-118) {
		tmp = t_1;
	} else if (a <= 3.4e-56) {
		tmp = x / (z / y);
	} else if (a <= 2.1e+57) {
		tmp = t_1;
	} else if (a <= 7.6e+154) {
		tmp = x;
	} else if (a <= 6.6e+158) {
		tmp = z * (t / -a);
	} else {
		tmp = t / (a / y);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	tmp = 0
	if a <= -80.0:
		tmp = x
	elif a <= -2.7e-269:
		tmp = t_1
	elif a <= -3.65e-292:
		tmp = (x * y) / z
	elif a <= 1.05e-118:
		tmp = t_1
	elif a <= 3.4e-56:
		tmp = x / (z / y)
	elif a <= 2.1e+57:
		tmp = t_1
	elif a <= 7.6e+154:
		tmp = x
	elif a <= 6.6e+158:
		tmp = z * (t / -a)
	else:
		tmp = t / (a / y)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (a <= -80.0)
		tmp = x;
	elseif (a <= -2.7e-269)
		tmp = t_1;
	elseif (a <= -3.65e-292)
		tmp = Float64(Float64(x * y) / z);
	elseif (a <= 1.05e-118)
		tmp = t_1;
	elseif (a <= 3.4e-56)
		tmp = Float64(x / Float64(z / y));
	elseif (a <= 2.1e+57)
		tmp = t_1;
	elseif (a <= 7.6e+154)
		tmp = x;
	elseif (a <= 6.6e+158)
		tmp = Float64(z * Float64(t / Float64(-a)));
	else
		tmp = Float64(t / Float64(a / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (a <= -80.0)
		tmp = x;
	elseif (a <= -2.7e-269)
		tmp = t_1;
	elseif (a <= -3.65e-292)
		tmp = (x * y) / z;
	elseif (a <= 1.05e-118)
		tmp = t_1;
	elseif (a <= 3.4e-56)
		tmp = x / (z / y);
	elseif (a <= 2.1e+57)
		tmp = t_1;
	elseif (a <= 7.6e+154)
		tmp = x;
	elseif (a <= 6.6e+158)
		tmp = z * (t / -a);
	else
		tmp = t / (a / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -80.0], x, If[LessEqual[a, -2.7e-269], t$95$1, If[LessEqual[a, -3.65e-292], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.05e-118], t$95$1, If[LessEqual[a, 3.4e-56], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.1e+57], t$95$1, If[LessEqual[a, 7.6e+154], x, If[LessEqual[a, 6.6e+158], N[(z * N[(t / (-a)), $MachinePrecision]), $MachinePrecision], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -2.7 \cdot 10^{-269}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -80 or 2.09999999999999991e57 < a < 7.5999999999999996e154

    1. Initial program 85.7%

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

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

    if -80 < a < -2.70000000000000015e-269 or -3.6499999999999999e-292 < a < 1.05e-118 or 3.39999999999999982e-56 < a < 2.09999999999999991e57

    1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \left(\frac{y}{z} - 1\right)} \]
      2. sub-neg52.8%

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

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

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

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

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

        \[\leadsto t \cdot \left(\color{blue}{1} + \left(-\frac{y}{z}\right)\right) \]
      8. sub-neg52.8%

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

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

    if -2.70000000000000015e-269 < a < -3.6499999999999999e-292

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1.05e-118 < a < 3.39999999999999982e-56

    1. Initial program 63.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    9. Step-by-step derivation
      1. clear-num56.6%

        \[\leadsto x \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv56.9%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Applied egg-rr56.9%

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

    if 7.5999999999999996e154 < a < 6.60000000000000035e158

    1. Initial program 99.5%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Step-by-step derivation
      1. div-sub99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.60000000000000035e158 < a

    1. Initial program 88.1%

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Taylor expanded in t around inf 27.8%

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified43.6%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Step-by-step derivation
      1. clear-num43.6%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. un-div-inv43.6%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Applied egg-rr43.6%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 11: 63.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + y \cdot \frac{x}{z}\\ t_2 := x + t \cdot \frac{y - z}{a}\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+258}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{+191}:\\ \;\;\;\;\frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{+119}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-47}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-71}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-121}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 1.42 \cdot 10^{+72}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* y (/ x z)))) (t_2 (+ x (* t (/ (- y z) a)))))
   (if (<= z -5.2e+258)
     t_1
     (if (<= z -2.2e+191)
       (* (/ (- t x) z) (- a y))
       (if (<= z -1.55e+119)
         t_1
         (if (<= z -3.6e-47)
           t_2
           (if (<= z -4.7e-71)
             (* y (/ (- t x) (- a z)))
             (if (<= z -4e-121)
               t_2
               (if (<= z 1.42e+72)
                 (+ x (/ (- t x) (/ a y)))
                 (* t (/ (- y z) (- a z))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (y * (x / z));
	double t_2 = x + (t * ((y - z) / a));
	double tmp;
	if (z <= -5.2e+258) {
		tmp = t_1;
	} else if (z <= -2.2e+191) {
		tmp = ((t - x) / z) * (a - y);
	} else if (z <= -1.55e+119) {
		tmp = t_1;
	} else if (z <= -3.6e-47) {
		tmp = t_2;
	} else if (z <= -4.7e-71) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= -4e-121) {
		tmp = t_2;
	} else if (z <= 1.42e+72) {
		tmp = x + ((t - x) / (a / y));
	} else {
		tmp = t * ((y - z) / (a - z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t + (y * (x / z))
    t_2 = x + (t * ((y - z) / a))
    if (z <= (-5.2d+258)) then
        tmp = t_1
    else if (z <= (-2.2d+191)) then
        tmp = ((t - x) / z) * (a - y)
    else if (z <= (-1.55d+119)) then
        tmp = t_1
    else if (z <= (-3.6d-47)) then
        tmp = t_2
    else if (z <= (-4.7d-71)) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= (-4d-121)) then
        tmp = t_2
    else if (z <= 1.42d+72) then
        tmp = x + ((t - x) / (a / y))
    else
        tmp = t * ((y - z) / (a - z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (y * (x / z));
	double t_2 = x + (t * ((y - z) / a));
	double tmp;
	if (z <= -5.2e+258) {
		tmp = t_1;
	} else if (z <= -2.2e+191) {
		tmp = ((t - x) / z) * (a - y);
	} else if (z <= -1.55e+119) {
		tmp = t_1;
	} else if (z <= -3.6e-47) {
		tmp = t_2;
	} else if (z <= -4.7e-71) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= -4e-121) {
		tmp = t_2;
	} else if (z <= 1.42e+72) {
		tmp = x + ((t - x) / (a / y));
	} else {
		tmp = t * ((y - z) / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (y * (x / z))
	t_2 = x + (t * ((y - z) / a))
	tmp = 0
	if z <= -5.2e+258:
		tmp = t_1
	elif z <= -2.2e+191:
		tmp = ((t - x) / z) * (a - y)
	elif z <= -1.55e+119:
		tmp = t_1
	elif z <= -3.6e-47:
		tmp = t_2
	elif z <= -4.7e-71:
		tmp = y * ((t - x) / (a - z))
	elif z <= -4e-121:
		tmp = t_2
	elif z <= 1.42e+72:
		tmp = x + ((t - x) / (a / y))
	else:
		tmp = t * ((y - z) / (a - z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(y * Float64(x / z)))
	t_2 = Float64(x + Float64(t * Float64(Float64(y - z) / a)))
	tmp = 0.0
	if (z <= -5.2e+258)
		tmp = t_1;
	elseif (z <= -2.2e+191)
		tmp = Float64(Float64(Float64(t - x) / z) * Float64(a - y));
	elseif (z <= -1.55e+119)
		tmp = t_1;
	elseif (z <= -3.6e-47)
		tmp = t_2;
	elseif (z <= -4.7e-71)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= -4e-121)
		tmp = t_2;
	elseif (z <= 1.42e+72)
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y)));
	else
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (y * (x / z));
	t_2 = x + (t * ((y - z) / a));
	tmp = 0.0;
	if (z <= -5.2e+258)
		tmp = t_1;
	elseif (z <= -2.2e+191)
		tmp = ((t - x) / z) * (a - y);
	elseif (z <= -1.55e+119)
		tmp = t_1;
	elseif (z <= -3.6e-47)
		tmp = t_2;
	elseif (z <= -4.7e-71)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= -4e-121)
		tmp = t_2;
	elseif (z <= 1.42e+72)
		tmp = x + ((t - x) / (a / y));
	else
		tmp = t * ((y - z) / (a - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+258], t$95$1, If[LessEqual[z, -2.2e+191], N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.55e+119], t$95$1, If[LessEqual[z, -3.6e-47], t$95$2, If[LessEqual[z, -4.7e-71], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e-121], t$95$2, If[LessEqual[z, 1.42e+72], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -1.55 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3.6 \cdot 10^{-47}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq -4 \cdot 10^{-121}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -5.20000000000000021e258 or -2.2e191 < z < -1.54999999999999998e119

    1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.20000000000000021e258 < z < -2.2e191

    1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.54999999999999998e119 < z < -3.59999999999999991e-47 or -4.69999999999999996e-71 < z < -3.9999999999999999e-121

    1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

    if -3.59999999999999991e-47 < z < -4.69999999999999996e-71

    1. Initial program 78.4%

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

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

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

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

    if -3.9999999999999999e-121 < z < 1.41999999999999997e72

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

    if 1.41999999999999997e72 < z

    1. Initial program 58.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+258}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{+191}:\\ \;\;\;\;\frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{+119}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-47}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-71}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-121}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 1.42 \cdot 10^{+72}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 62.9% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;z \leq -6.4 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq -8.5 \cdot 10^{-59} \lor \neg \left(z \leq 4 \cdot 10^{+71}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -5.20000000000000021e258 or -1.69999999999999992e189 < z < -6.39999999999999979e119

    1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.20000000000000021e258 < z < -1.69999999999999992e189

    1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.39999999999999979e119 < z < -2.79999999999999993e-47

    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. *-commutative83.9%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a}} \]
    8. Simplified58.0%

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

    if -2.79999999999999993e-47 < z < -8.49999999999999933e-59 or 4.0000000000000002e71 < z

    1. Initial program 58.7%

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

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

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

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

    if -8.49999999999999933e-59 < z < 4.0000000000000002e71

    1. Initial program 90.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+258}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{+189}:\\ \;\;\;\;\frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{+119}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-47}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-59} \lor \neg \left(z \leq 4 \cdot 10^{+71}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 50.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} \cdot \left(x - t\right)\\ t_2 := x + \frac{y \cdot t}{a}\\ t_3 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -1.7 \cdot 10^{-85}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-224}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq -7.4 \cdot 10^{-290}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-288}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2200:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (/ y z) (- x t)))
        (t_2 (+ x (/ (* y t) a)))
        (t_3 (* t (- 1.0 (/ y z)))))
   (if (<= a -1.7e-85)
     t_2
     (if (<= a -1.55e-224)
       (- t (/ (* y t) z))
       (if (<= a -7.4e-290)
         t_1
         (if (<= a 1.55e-288)
           t_3
           (if (<= a 6.6e-18) t_1 (if (<= a 2200.0) t_3 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y / z) * (x - t);
	double t_2 = x + ((y * t) / a);
	double t_3 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -1.7e-85) {
		tmp = t_2;
	} else if (a <= -1.55e-224) {
		tmp = t - ((y * t) / z);
	} else if (a <= -7.4e-290) {
		tmp = t_1;
	} else if (a <= 1.55e-288) {
		tmp = t_3;
	} else if (a <= 6.6e-18) {
		tmp = t_1;
	} else if (a <= 2200.0) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (y / z) * (x - t)
    t_2 = x + ((y * t) / a)
    t_3 = t * (1.0d0 - (y / z))
    if (a <= (-1.7d-85)) then
        tmp = t_2
    else if (a <= (-1.55d-224)) then
        tmp = t - ((y * t) / z)
    else if (a <= (-7.4d-290)) then
        tmp = t_1
    else if (a <= 1.55d-288) then
        tmp = t_3
    else if (a <= 6.6d-18) then
        tmp = t_1
    else if (a <= 2200.0d0) then
        tmp = t_3
    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 = (y / z) * (x - t);
	double t_2 = x + ((y * t) / a);
	double t_3 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -1.7e-85) {
		tmp = t_2;
	} else if (a <= -1.55e-224) {
		tmp = t - ((y * t) / z);
	} else if (a <= -7.4e-290) {
		tmp = t_1;
	} else if (a <= 1.55e-288) {
		tmp = t_3;
	} else if (a <= 6.6e-18) {
		tmp = t_1;
	} else if (a <= 2200.0) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y / z) * (x - t)
	t_2 = x + ((y * t) / a)
	t_3 = t * (1.0 - (y / z))
	tmp = 0
	if a <= -1.7e-85:
		tmp = t_2
	elif a <= -1.55e-224:
		tmp = t - ((y * t) / z)
	elif a <= -7.4e-290:
		tmp = t_1
	elif a <= 1.55e-288:
		tmp = t_3
	elif a <= 6.6e-18:
		tmp = t_1
	elif a <= 2200.0:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y / z) * Float64(x - t))
	t_2 = Float64(x + Float64(Float64(y * t) / a))
	t_3 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (a <= -1.7e-85)
		tmp = t_2;
	elseif (a <= -1.55e-224)
		tmp = Float64(t - Float64(Float64(y * t) / z));
	elseif (a <= -7.4e-290)
		tmp = t_1;
	elseif (a <= 1.55e-288)
		tmp = t_3;
	elseif (a <= 6.6e-18)
		tmp = t_1;
	elseif (a <= 2200.0)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y / z) * (x - t);
	t_2 = x + ((y * t) / a);
	t_3 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (a <= -1.7e-85)
		tmp = t_2;
	elseif (a <= -1.55e-224)
		tmp = t - ((y * t) / z);
	elseif (a <= -7.4e-290)
		tmp = t_1;
	elseif (a <= 1.55e-288)
		tmp = t_3;
	elseif (a <= 6.6e-18)
		tmp = t_1;
	elseif (a <= 2200.0)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.7e-85], t$95$2, If[LessEqual[a, -1.55e-224], N[(t - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7.4e-290], t$95$1, If[LessEqual[a, 1.55e-288], t$95$3, If[LessEqual[a, 6.6e-18], t$95$1, If[LessEqual[a, 2200.0], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -7.4 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{-288}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 6.6 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2200:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.7e-85 or 2200 < a

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

    if -1.7e-85 < a < -1.55000000000000004e-224

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \left(\frac{y}{z} - 1\right)} \]
      2. sub-neg59.0%

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

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

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(-1 + \frac{y}{z}\right)}\right) \]
      6. distribute-neg-in59.0%

        \[\leadsto t \cdot \color{blue}{\left(\left(--1\right) + \left(-\frac{y}{z}\right)\right)} \]
      7. metadata-eval59.0%

        \[\leadsto t \cdot \left(\color{blue}{1} + \left(-\frac{y}{z}\right)\right) \]
      8. sub-neg59.0%

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y \cdot t}{z}} \]
    11. Simplified59.0%

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

    if -1.55000000000000004e-224 < a < -7.39999999999999954e-290 or 1.54999999999999992e-288 < a < 6.6000000000000003e-18

    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 74.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+74.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--74.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-sub74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot x}{z}} - y \cdot \frac{t}{z} \]
      3. *-commutative48.7%

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

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

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

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

        \[\leadsto x \cdot \frac{y}{z} - \color{blue}{t \cdot \frac{y}{z}} \]
      8. distribute-rgt-out--62.0%

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

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

    if -7.39999999999999954e-290 < a < 1.54999999999999992e-288 or 6.6000000000000003e-18 < a < 2200

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -t \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)} \]
      3. metadata-eval60.3%

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

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

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

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

        \[\leadsto t \cdot \left(\color{blue}{1} + \left(-\frac{y}{z}\right)\right) \]
      8. sub-neg60.3%

        \[\leadsto t \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
    8. Simplified60.3%

      \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y}{z}\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification57.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{-85}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-224}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq -7.4 \cdot 10^{-290}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-288}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 2200:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 51.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ t_2 := x + \frac{y \cdot t}{a}\\ t_3 := \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{if}\;a \leq -1.7 \cdot 10^{-86}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-235}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-289}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-286}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-25}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 112:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ y z))))
        (t_2 (+ x (/ (* y t) a)))
        (t_3 (* (/ y z) (- x t))))
   (if (<= a -1.7e-86)
     t_2
     (if (<= a -1.15e-235)
       t_1
       (if (<= a -1.2e-289)
         t_3
         (if (<= a 9e-286)
           t_1
           (if (<= a 5.2e-25) t_3 (if (<= a 112.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double t_2 = x + ((y * t) / a);
	double t_3 = (y / z) * (x - t);
	double tmp;
	if (a <= -1.7e-86) {
		tmp = t_2;
	} else if (a <= -1.15e-235) {
		tmp = t_1;
	} else if (a <= -1.2e-289) {
		tmp = t_3;
	} else if (a <= 9e-286) {
		tmp = t_1;
	} else if (a <= 5.2e-25) {
		tmp = t_3;
	} else if (a <= 112.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = t * (1.0d0 - (y / z))
    t_2 = x + ((y * t) / a)
    t_3 = (y / z) * (x - t)
    if (a <= (-1.7d-86)) then
        tmp = t_2
    else if (a <= (-1.15d-235)) then
        tmp = t_1
    else if (a <= (-1.2d-289)) then
        tmp = t_3
    else if (a <= 9d-286) then
        tmp = t_1
    else if (a <= 5.2d-25) then
        tmp = t_3
    else if (a <= 112.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double t_2 = x + ((y * t) / a);
	double t_3 = (y / z) * (x - t);
	double tmp;
	if (a <= -1.7e-86) {
		tmp = t_2;
	} else if (a <= -1.15e-235) {
		tmp = t_1;
	} else if (a <= -1.2e-289) {
		tmp = t_3;
	} else if (a <= 9e-286) {
		tmp = t_1;
	} else if (a <= 5.2e-25) {
		tmp = t_3;
	} else if (a <= 112.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	t_2 = x + ((y * t) / a)
	t_3 = (y / z) * (x - t)
	tmp = 0
	if a <= -1.7e-86:
		tmp = t_2
	elif a <= -1.15e-235:
		tmp = t_1
	elif a <= -1.2e-289:
		tmp = t_3
	elif a <= 9e-286:
		tmp = t_1
	elif a <= 5.2e-25:
		tmp = t_3
	elif a <= 112.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 - Float64(y / z)))
	t_2 = Float64(x + Float64(Float64(y * t) / a))
	t_3 = Float64(Float64(y / z) * Float64(x - t))
	tmp = 0.0
	if (a <= -1.7e-86)
		tmp = t_2;
	elseif (a <= -1.15e-235)
		tmp = t_1;
	elseif (a <= -1.2e-289)
		tmp = t_3;
	elseif (a <= 9e-286)
		tmp = t_1;
	elseif (a <= 5.2e-25)
		tmp = t_3;
	elseif (a <= 112.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 - (y / z));
	t_2 = x + ((y * t) / a);
	t_3 = (y / z) * (x - t);
	tmp = 0.0;
	if (a <= -1.7e-86)
		tmp = t_2;
	elseif (a <= -1.15e-235)
		tmp = t_1;
	elseif (a <= -1.2e-289)
		tmp = t_3;
	elseif (a <= 9e-286)
		tmp = t_1;
	elseif (a <= 5.2e-25)
		tmp = t_3;
	elseif (a <= 112.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.7e-86], t$95$2, If[LessEqual[a, -1.15e-235], t$95$1, If[LessEqual[a, -1.2e-289], t$95$3, If[LessEqual[a, 9e-286], t$95$1, If[LessEqual[a, 5.2e-25], t$95$3, If[LessEqual[a, 112.0], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
t_2 := x + \frac{y \cdot t}{a}\\
t_3 := \frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{if}\;a \leq -1.7 \cdot 10^{-86}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -1.15 \cdot 10^{-235}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-289}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 9 \cdot 10^{-286}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{-25}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 112:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.7e-86 or 112 < a

    1. Initial program 83.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative83.1%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
      2. associate-*l/66.5%

        \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
      3. associate-*r/87.6%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
      4. clear-num87.6%

        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
      5. un-div-inv87.6%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr87.6%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Taylor expanded in z around 0 69.3%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y}}} \]
    6. Taylor expanded in t around inf 55.3%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]

    if -1.7e-86 < a < -1.14999999999999999e-235 or -1.19999999999999997e-289 < a < 9.0000000000000001e-286 or 5.2e-25 < a < 112

    1. Initial program 74.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 47.9%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(t - x\right) \cdot \left(y - z\right)}{z}} \]
    4. Step-by-step derivation
      1. mul-1-neg47.9%

        \[\leadsto x + \color{blue}{\left(-\frac{\left(t - x\right) \cdot \left(y - z\right)}{z}\right)} \]
      2. unsub-neg47.9%

        \[\leadsto \color{blue}{x - \frac{\left(t - x\right) \cdot \left(y - z\right)}{z}} \]
      3. associate-/l*54.6%

        \[\leadsto x - \color{blue}{\left(t - x\right) \cdot \frac{y - z}{z}} \]
      4. div-sub54.7%

        \[\leadsto x - \left(t - x\right) \cdot \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)} \]
      5. sub-neg54.7%

        \[\leadsto x - \left(t - x\right) \cdot \color{blue}{\left(\frac{y}{z} + \left(-\frac{z}{z}\right)\right)} \]
      6. *-inverses54.7%

        \[\leadsto x - \left(t - x\right) \cdot \left(\frac{y}{z} + \left(-\color{blue}{1}\right)\right) \]
      7. metadata-eval54.7%

        \[\leadsto x - \left(t - x\right) \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
    5. Simplified54.7%

      \[\leadsto \color{blue}{x - \left(t - x\right) \cdot \left(\frac{y}{z} + -1\right)} \]
    6. Taylor expanded in x around 0 59.1%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(\frac{y}{z} - 1\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg59.1%

        \[\leadsto \color{blue}{-t \cdot \left(\frac{y}{z} - 1\right)} \]
      2. sub-neg59.1%

        \[\leadsto -t \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)} \]
      3. metadata-eval59.1%

        \[\leadsto -t \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
      4. distribute-rgt-neg-in59.1%

        \[\leadsto \color{blue}{t \cdot \left(-\left(\frac{y}{z} + -1\right)\right)} \]
      5. +-commutative59.1%

        \[\leadsto t \cdot \left(-\color{blue}{\left(-1 + \frac{y}{z}\right)}\right) \]
      6. distribute-neg-in59.1%

        \[\leadsto t \cdot \color{blue}{\left(\left(--1\right) + \left(-\frac{y}{z}\right)\right)} \]
      7. metadata-eval59.1%

        \[\leadsto t \cdot \left(\color{blue}{1} + \left(-\frac{y}{z}\right)\right) \]
      8. sub-neg59.1%

        \[\leadsto t \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
    8. Simplified59.1%

      \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y}{z}\right)} \]

    if -1.14999999999999999e-235 < a < -1.19999999999999997e-289 or 9.0000000000000001e-286 < a < 5.2e-25

    1. Initial program 69.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 75.0%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+75.0%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--75.0%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub74.9%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg74.9%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg74.9%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub75.0%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*82.1%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*74.4%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--82.0%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    5. Simplified82.0%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    6. Taylor expanded in y around inf 71.6%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/78.8%

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    8. Simplified78.8%

      \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    9. Taylor expanded in y around inf 53.0%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)} \]
    10. Step-by-step derivation
      1. distribute-lft-out--53.0%

        \[\leadsto \color{blue}{y \cdot \frac{x}{z} - y \cdot \frac{t}{z}} \]
      2. associate-*r/47.7%

        \[\leadsto \color{blue}{\frac{y \cdot x}{z}} - y \cdot \frac{t}{z} \]
      3. *-commutative47.7%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{z} - y \cdot \frac{t}{z} \]
      4. associate-/l*56.4%

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} - y \cdot \frac{t}{z} \]
      5. associate-*r/54.6%

        \[\leadsto x \cdot \frac{y}{z} - \color{blue}{\frac{y \cdot t}{z}} \]
      6. *-commutative54.6%

        \[\leadsto x \cdot \frac{y}{z} - \frac{\color{blue}{t \cdot y}}{z} \]
      7. associate-*r/58.1%

        \[\leadsto x \cdot \frac{y}{z} - \color{blue}{t \cdot \frac{y}{z}} \]
      8. distribute-rgt-out--61.8%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(x - t\right)} \]
    11. Simplified61.8%

      \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(x - t\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.7 \cdot 10^{-86}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-235}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-289}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-286}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-25}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 112:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 67.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \frac{y - z}{a}\\ t_2 := t + y \cdot \frac{x - t}{z}\\ \mathbf{if}\;z \leq -1.55 \cdot 10^{+119}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-7}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-71}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-123}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-50}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* t (/ (- y z) a)))) (t_2 (+ t (* y (/ (- x t) z)))))
   (if (<= z -1.55e+119)
     t_2
     (if (<= z -3.4e-7)
       t_1
       (if (<= z -4.7e-71)
         (* y (/ (- t x) (- a z)))
         (if (<= z -1.5e-123)
           t_1
           (if (<= z 1.7e-50) (+ x (/ (- t x) (/ a y))) t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * ((y - z) / a));
	double t_2 = t + (y * ((x - t) / z));
	double tmp;
	if (z <= -1.55e+119) {
		tmp = t_2;
	} else if (z <= -3.4e-7) {
		tmp = t_1;
	} else if (z <= -4.7e-71) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= -1.5e-123) {
		tmp = t_1;
	} else if (z <= 1.7e-50) {
		tmp = x + ((t - x) / (a / y));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (t * ((y - z) / a))
    t_2 = t + (y * ((x - t) / z))
    if (z <= (-1.55d+119)) then
        tmp = t_2
    else if (z <= (-3.4d-7)) then
        tmp = t_1
    else if (z <= (-4.7d-71)) then
        tmp = y * ((t - x) / (a - z))
    else if (z <= (-1.5d-123)) then
        tmp = t_1
    else if (z <= 1.7d-50) then
        tmp = x + ((t - x) / (a / y))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * ((y - z) / a));
	double t_2 = t + (y * ((x - t) / z));
	double tmp;
	if (z <= -1.55e+119) {
		tmp = t_2;
	} else if (z <= -3.4e-7) {
		tmp = t_1;
	} else if (z <= -4.7e-71) {
		tmp = y * ((t - x) / (a - z));
	} else if (z <= -1.5e-123) {
		tmp = t_1;
	} else if (z <= 1.7e-50) {
		tmp = x + ((t - x) / (a / y));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t * ((y - z) / a))
	t_2 = t + (y * ((x - t) / z))
	tmp = 0
	if z <= -1.55e+119:
		tmp = t_2
	elif z <= -3.4e-7:
		tmp = t_1
	elif z <= -4.7e-71:
		tmp = y * ((t - x) / (a - z))
	elif z <= -1.5e-123:
		tmp = t_1
	elif z <= 1.7e-50:
		tmp = x + ((t - x) / (a / y))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t * Float64(Float64(y - z) / a)))
	t_2 = Float64(t + Float64(y * Float64(Float64(x - t) / z)))
	tmp = 0.0
	if (z <= -1.55e+119)
		tmp = t_2;
	elseif (z <= -3.4e-7)
		tmp = t_1;
	elseif (z <= -4.7e-71)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (z <= -1.5e-123)
		tmp = t_1;
	elseif (z <= 1.7e-50)
		tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t * ((y - z) / a));
	t_2 = t + (y * ((x - t) / z));
	tmp = 0.0;
	if (z <= -1.55e+119)
		tmp = t_2;
	elseif (z <= -3.4e-7)
		tmp = t_1;
	elseif (z <= -4.7e-71)
		tmp = y * ((t - x) / (a - z));
	elseif (z <= -1.5e-123)
		tmp = t_1;
	elseif (z <= 1.7e-50)
		tmp = x + ((t - x) / (a / y));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.55e+119], t$95$2, If[LessEqual[z, -3.4e-7], t$95$1, If[LessEqual[z, -4.7e-71], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5e-123], t$95$1, If[LessEqual[z, 1.7e-50], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y - z}{a}\\
t_2 := t + y \cdot \frac{x - t}{z}\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{+119}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -3.4 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -4.7 \cdot 10^{-71}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

\mathbf{elif}\;z \leq -1.5 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-50}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.54999999999999998e119 or 1.70000000000000007e-50 < z

    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 59.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+59.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--59.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-sub59.1%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg59.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg59.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub59.1%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*70.3%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*76.6%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--76.6%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    5. Simplified76.6%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    6. Taylor expanded in y around inf 56.5%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/67.7%

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    8. Simplified67.7%

      \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]

    if -1.54999999999999998e119 < z < -3.39999999999999974e-7 or -4.69999999999999996e-71 < z < -1.49999999999999992e-123

    1. Initial program 81.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative81.2%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
      2. associate-*l/82.6%

        \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
      3. associate-*r/91.2%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
      4. clear-num91.1%

        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
      5. un-div-inv91.1%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr91.1%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Taylor expanded in a around inf 68.0%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y - z}}} \]
    6. Taylor expanded in t around inf 62.8%

      \[\leadsto x + \color{blue}{\frac{t \cdot \left(y - z\right)}{a}} \]
    7. Step-by-step derivation
      1. associate-*r/66.2%

        \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a}} \]
    8. Simplified66.2%

      \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a}} \]

    if -3.39999999999999974e-7 < z < -4.69999999999999996e-71

    1. Initial program 90.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 68.6%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub68.6%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified68.6%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if -1.49999999999999992e-123 < z < 1.70000000000000007e-50

    1. Initial program 91.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative91.1%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
      2. associate-*l/87.4%

        \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
      3. associate-*r/96.4%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
      4. clear-num96.4%

        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
      5. un-div-inv96.7%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr96.7%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Taylor expanded in z around 0 81.4%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification73.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.55 \cdot 10^{+119}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-7}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-71}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-123}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-50}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 59.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ \mathbf{if}\;x \leq -2.3 \cdot 10^{+118}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -7.8 \cdot 10^{+73}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;x \leq -2.05 \cdot 10^{-69}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+55}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 10^{+152}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* x (/ y a)))))
   (if (<= x -2.3e+118)
     t_1
     (if (<= x -7.8e+73)
       (+ t (* y (/ x z)))
       (if (<= x -2.05e-69)
         (* y (/ (- t x) (- a z)))
         (if (<= x 2.6e+55)
           (* t (/ (- y z) (- a z)))
           (if (<= x 1e+152) (* (- t x) (/ y (- a z))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double tmp;
	if (x <= -2.3e+118) {
		tmp = t_1;
	} else if (x <= -7.8e+73) {
		tmp = t + (y * (x / z));
	} else if (x <= -2.05e-69) {
		tmp = y * ((t - x) / (a - z));
	} else if (x <= 2.6e+55) {
		tmp = t * ((y - z) / (a - z));
	} else if (x <= 1e+152) {
		tmp = (t - x) * (y / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (x * (y / a))
    if (x <= (-2.3d+118)) then
        tmp = t_1
    else if (x <= (-7.8d+73)) then
        tmp = t + (y * (x / z))
    else if (x <= (-2.05d-69)) then
        tmp = y * ((t - x) / (a - z))
    else if (x <= 2.6d+55) then
        tmp = t * ((y - z) / (a - z))
    else if (x <= 1d+152) then
        tmp = (t - x) * (y / (a - z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double tmp;
	if (x <= -2.3e+118) {
		tmp = t_1;
	} else if (x <= -7.8e+73) {
		tmp = t + (y * (x / z));
	} else if (x <= -2.05e-69) {
		tmp = y * ((t - x) / (a - z));
	} else if (x <= 2.6e+55) {
		tmp = t * ((y - z) / (a - z));
	} else if (x <= 1e+152) {
		tmp = (t - x) * (y / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (x * (y / a))
	tmp = 0
	if x <= -2.3e+118:
		tmp = t_1
	elif x <= -7.8e+73:
		tmp = t + (y * (x / z))
	elif x <= -2.05e-69:
		tmp = y * ((t - x) / (a - z))
	elif x <= 2.6e+55:
		tmp = t * ((y - z) / (a - z))
	elif x <= 1e+152:
		tmp = (t - x) * (y / (a - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(x * Float64(y / a)))
	tmp = 0.0
	if (x <= -2.3e+118)
		tmp = t_1;
	elseif (x <= -7.8e+73)
		tmp = Float64(t + Float64(y * Float64(x / z)));
	elseif (x <= -2.05e-69)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (x <= 2.6e+55)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif (x <= 1e+152)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (x * (y / a));
	tmp = 0.0;
	if (x <= -2.3e+118)
		tmp = t_1;
	elseif (x <= -7.8e+73)
		tmp = t + (y * (x / z));
	elseif (x <= -2.05e-69)
		tmp = y * ((t - x) / (a - z));
	elseif (x <= 2.6e+55)
		tmp = t * ((y - z) / (a - z));
	elseif (x <= 1e+152)
		tmp = (t - x) * (y / (a - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.3e+118], t$95$1, If[LessEqual[x, -7.8e+73], N[(t + N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.05e-69], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.6e+55], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e+152], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - x \cdot \frac{y}{a}\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -7.8 \cdot 10^{+73}:\\
\;\;\;\;t + y \cdot \frac{x}{z}\\

\mathbf{elif}\;x \leq -2.05 \cdot 10^{-69}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

\mathbf{elif}\;x \leq 2.6 \cdot 10^{+55}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

\mathbf{elif}\;x \leq 10^{+152}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -2.30000000000000016e118 or 1e152 < x

    1. Initial program 70.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative70.6%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
      2. associate-*l/52.8%

        \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
      3. associate-*r/73.5%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
      4. clear-num73.5%

        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
      5. un-div-inv73.5%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr73.5%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Step-by-step derivation
      1. div-sub73.5%

        \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y - z} - \frac{z}{y - z}}} \]
    6. Applied egg-rr73.5%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y - z} - \frac{z}{y - z}}} \]
    7. Taylor expanded in t around 0 64.9%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{x}{\frac{a}{y - z} - \frac{z}{y - z}}} \]
    8. Step-by-step derivation
      1. mul-1-neg64.9%

        \[\leadsto x + \color{blue}{\left(-\frac{x}{\frac{a}{y - z} - \frac{z}{y - z}}\right)} \]
      2. div-sub64.9%

        \[\leadsto x + \left(-\frac{x}{\color{blue}{\frac{a - z}{y - z}}}\right) \]
      3. distribute-neg-frac64.9%

        \[\leadsto x + \color{blue}{\frac{-x}{\frac{a - z}{y - z}}} \]
    9. Simplified64.9%

      \[\leadsto x + \color{blue}{\frac{-x}{\frac{a - z}{y - z}}} \]
    10. Taylor expanded in z around 0 44.2%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    11. Step-by-step derivation
      1. mul-1-neg44.2%

        \[\leadsto x + \color{blue}{\left(-\frac{x \cdot y}{a}\right)} \]
      2. unsub-neg44.2%

        \[\leadsto \color{blue}{x - \frac{x \cdot y}{a}} \]
      3. associate-/l*55.9%

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{a}} \]
    12. Simplified55.9%

      \[\leadsto \color{blue}{x - x \cdot \frac{y}{a}} \]

    if -2.30000000000000016e118 < x < -7.8000000000000002e73

    1. Initial program 36.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 84.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+84.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--84.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-sub84.1%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg84.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg84.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub84.1%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*69.3%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*66.7%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--67.6%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    5. Simplified67.6%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    6. Taylor expanded in y around inf 68.7%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/53.9%

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    8. Simplified53.9%

      \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    9. Taylor expanded in t around 0 68.8%

      \[\leadsto t - y \cdot \color{blue}{\left(-1 \cdot \frac{x}{z}\right)} \]
    10. Step-by-step derivation
      1. neg-mul-168.8%

        \[\leadsto t - y \cdot \color{blue}{\left(-\frac{x}{z}\right)} \]
      2. distribute-neg-frac68.8%

        \[\leadsto t - y \cdot \color{blue}{\frac{-x}{z}} \]
    11. Simplified68.8%

      \[\leadsto t - y \cdot \color{blue}{\frac{-x}{z}} \]

    if -7.8000000000000002e73 < x < -2.04999999999999995e-69

    1. Initial program 90.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 60.4%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub60.4%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified60.4%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if -2.04999999999999995e-69 < x < 2.6e55

    1. Initial program 81.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 60.0%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. associate-/l*75.4%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    5. Simplified75.4%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if 2.6e55 < x < 1e152

    1. Initial program 75.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative75.6%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
      2. associate-*l/51.6%

        \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
      3. associate-*r/75.6%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
      4. clear-num75.6%

        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
      5. un-div-inv75.5%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr75.5%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Taylor expanded in y around inf 56.1%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    6. Step-by-step derivation
      1. div-sub60.3%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-*r/36.6%

        \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
      3. *-rgt-identity36.6%

        \[\leadsto \frac{y \cdot \left(t - x\right)}{\color{blue}{\left(a - z\right) \cdot 1}} \]
      4. times-frac60.3%

        \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \frac{t - x}{1}} \]
      5. /-rgt-identity60.3%

        \[\leadsto \frac{y}{a - z} \cdot \color{blue}{\left(t - x\right)} \]
    7. Simplified60.3%

      \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification67.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+118}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -7.8 \cdot 10^{+73}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;x \leq -2.05 \cdot 10^{-69}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+55}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 10^{+152}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 59.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - x \cdot \frac{y}{a}\\ t_2 := y \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;x \leq -6.4 \cdot 10^{+117}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -6.8 \cdot 10^{+73}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-70}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{+55}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+152}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* x (/ y a)))) (t_2 (* y (/ (- t x) (- a z)))))
   (if (<= x -6.4e+117)
     t_1
     (if (<= x -6.8e+73)
       (+ t (* y (/ x z)))
       (if (<= x -5.8e-70)
         t_2
         (if (<= x 1.75e+55)
           (* t (/ (- y z) (- a z)))
           (if (<= x 9.5e+152) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (x * (y / a));
	double t_2 = y * ((t - x) / (a - z));
	double tmp;
	if (x <= -6.4e+117) {
		tmp = t_1;
	} else if (x <= -6.8e+73) {
		tmp = t + (y * (x / z));
	} else if (x <= -5.8e-70) {
		tmp = t_2;
	} else if (x <= 1.75e+55) {
		tmp = t * ((y - z) / (a - z));
	} else if (x <= 9.5e+152) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (x * (y / a))
    t_2 = y * ((t - x) / (a - z))
    if (x <= (-6.4d+117)) then
        tmp = t_1
    else if (x <= (-6.8d+73)) then
        tmp = t + (y * (x / z))
    else if (x <= (-5.8d-70)) then
        tmp = t_2
    else if (x <= 1.75d+55) then
        tmp = t * ((y - z) / (a - z))
    else if (x <= 9.5d+152) then
        tmp = t_2
    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 - (x * (y / a));
	double t_2 = y * ((t - x) / (a - z));
	double tmp;
	if (x <= -6.4e+117) {
		tmp = t_1;
	} else if (x <= -6.8e+73) {
		tmp = t + (y * (x / z));
	} else if (x <= -5.8e-70) {
		tmp = t_2;
	} else if (x <= 1.75e+55) {
		tmp = t * ((y - z) / (a - z));
	} else if (x <= 9.5e+152) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (x * (y / a))
	t_2 = y * ((t - x) / (a - z))
	tmp = 0
	if x <= -6.4e+117:
		tmp = t_1
	elif x <= -6.8e+73:
		tmp = t + (y * (x / z))
	elif x <= -5.8e-70:
		tmp = t_2
	elif x <= 1.75e+55:
		tmp = t * ((y - z) / (a - z))
	elif x <= 9.5e+152:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(x * Float64(y / a)))
	t_2 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	tmp = 0.0
	if (x <= -6.4e+117)
		tmp = t_1;
	elseif (x <= -6.8e+73)
		tmp = Float64(t + Float64(y * Float64(x / z)));
	elseif (x <= -5.8e-70)
		tmp = t_2;
	elseif (x <= 1.75e+55)
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	elseif (x <= 9.5e+152)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (x * (y / a));
	t_2 = y * ((t - x) / (a - z));
	tmp = 0.0;
	if (x <= -6.4e+117)
		tmp = t_1;
	elseif (x <= -6.8e+73)
		tmp = t + (y * (x / z));
	elseif (x <= -5.8e-70)
		tmp = t_2;
	elseif (x <= 1.75e+55)
		tmp = t * ((y - z) / (a - z));
	elseif (x <= 9.5e+152)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.4e+117], t$95$1, If[LessEqual[x, -6.8e+73], N[(t + N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.8e-70], t$95$2, If[LessEqual[x, 1.75e+55], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e+152], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - x \cdot \frac{y}{a}\\
t_2 := y \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;x \leq -6.4 \cdot 10^{+117}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -6.8 \cdot 10^{+73}:\\
\;\;\;\;t + y \cdot \frac{x}{z}\\

\mathbf{elif}\;x \leq -5.8 \cdot 10^{-70}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 1.75 \cdot 10^{+55}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{+152}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -6.4000000000000001e117 or 9.49999999999999916e152 < x

    1. Initial program 70.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative70.6%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
      2. associate-*l/52.8%

        \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
      3. associate-*r/73.5%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
      4. clear-num73.5%

        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
      5. un-div-inv73.5%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr73.5%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Step-by-step derivation
      1. div-sub73.5%

        \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y - z} - \frac{z}{y - z}}} \]
    6. Applied egg-rr73.5%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y - z} - \frac{z}{y - z}}} \]
    7. Taylor expanded in t around 0 64.9%

      \[\leadsto x + \color{blue}{-1 \cdot \frac{x}{\frac{a}{y - z} - \frac{z}{y - z}}} \]
    8. Step-by-step derivation
      1. mul-1-neg64.9%

        \[\leadsto x + \color{blue}{\left(-\frac{x}{\frac{a}{y - z} - \frac{z}{y - z}}\right)} \]
      2. div-sub64.9%

        \[\leadsto x + \left(-\frac{x}{\color{blue}{\frac{a - z}{y - z}}}\right) \]
      3. distribute-neg-frac64.9%

        \[\leadsto x + \color{blue}{\frac{-x}{\frac{a - z}{y - z}}} \]
    9. Simplified64.9%

      \[\leadsto x + \color{blue}{\frac{-x}{\frac{a - z}{y - z}}} \]
    10. Taylor expanded in z around 0 44.2%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot y}{a}} \]
    11. Step-by-step derivation
      1. mul-1-neg44.2%

        \[\leadsto x + \color{blue}{\left(-\frac{x \cdot y}{a}\right)} \]
      2. unsub-neg44.2%

        \[\leadsto \color{blue}{x - \frac{x \cdot y}{a}} \]
      3. associate-/l*55.9%

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{a}} \]
    12. Simplified55.9%

      \[\leadsto \color{blue}{x - x \cdot \frac{y}{a}} \]

    if -6.4000000000000001e117 < x < -6.8000000000000003e73

    1. Initial program 36.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 84.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+84.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--84.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-sub84.1%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg84.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg84.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub84.1%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*69.3%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*66.7%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--67.6%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    5. Simplified67.6%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    6. Taylor expanded in y around inf 68.7%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/53.9%

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    8. Simplified53.9%

      \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    9. Taylor expanded in t around 0 68.8%

      \[\leadsto t - y \cdot \color{blue}{\left(-1 \cdot \frac{x}{z}\right)} \]
    10. Step-by-step derivation
      1. neg-mul-168.8%

        \[\leadsto t - y \cdot \color{blue}{\left(-\frac{x}{z}\right)} \]
      2. distribute-neg-frac68.8%

        \[\leadsto t - y \cdot \color{blue}{\frac{-x}{z}} \]
    11. Simplified68.8%

      \[\leadsto t - y \cdot \color{blue}{\frac{-x}{z}} \]

    if -6.8000000000000003e73 < x < -5.79999999999999943e-70 or 1.75000000000000005e55 < x < 9.49999999999999916e152

    1. Initial program 83.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 58.5%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub60.4%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified60.4%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]

    if -5.79999999999999943e-70 < x < 1.75000000000000005e55

    1. Initial program 81.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 60.0%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    4. Step-by-step derivation
      1. associate-/l*75.4%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    5. Simplified75.4%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification67.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.4 \cdot 10^{+117}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -6.8 \cdot 10^{+73}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-70}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 1.75 \cdot 10^{+55}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+152}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 38.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a}\\ \mathbf{if}\;y \leq -2500000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{-33}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-31}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 7.1 \cdot 10^{+115}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{+164}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) a))))
   (if (<= y -2500000000000.0)
     t_1
     (if (<= y -1.35e-33)
       (* t (- 1.0 (/ y z)))
       (if (<= y 2e-31)
         x
         (if (<= y 7.1e+115)
           t_1
           (if (<= y 5.6e+164) (* (/ y z) (- x t)) (* t (/ y (- a z))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double tmp;
	if (y <= -2500000000000.0) {
		tmp = t_1;
	} else if (y <= -1.35e-33) {
		tmp = t * (1.0 - (y / z));
	} else if (y <= 2e-31) {
		tmp = x;
	} else if (y <= 7.1e+115) {
		tmp = t_1;
	} else if (y <= 5.6e+164) {
		tmp = (y / z) * (x - t);
	} else {
		tmp = t * (y / (a - z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * ((t - x) / a)
    if (y <= (-2500000000000.0d0)) then
        tmp = t_1
    else if (y <= (-1.35d-33)) then
        tmp = t * (1.0d0 - (y / z))
    else if (y <= 2d-31) then
        tmp = x
    else if (y <= 7.1d+115) then
        tmp = t_1
    else if (y <= 5.6d+164) then
        tmp = (y / z) * (x - t)
    else
        tmp = t * (y / (a - z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double tmp;
	if (y <= -2500000000000.0) {
		tmp = t_1;
	} else if (y <= -1.35e-33) {
		tmp = t * (1.0 - (y / z));
	} else if (y <= 2e-31) {
		tmp = x;
	} else if (y <= 7.1e+115) {
		tmp = t_1;
	} else if (y <= 5.6e+164) {
		tmp = (y / z) * (x - t);
	} else {
		tmp = t * (y / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / a)
	tmp = 0
	if y <= -2500000000000.0:
		tmp = t_1
	elif y <= -1.35e-33:
		tmp = t * (1.0 - (y / z))
	elif y <= 2e-31:
		tmp = x
	elif y <= 7.1e+115:
		tmp = t_1
	elif y <= 5.6e+164:
		tmp = (y / z) * (x - t)
	else:
		tmp = t * (y / (a - z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / a))
	tmp = 0.0
	if (y <= -2500000000000.0)
		tmp = t_1;
	elseif (y <= -1.35e-33)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif (y <= 2e-31)
		tmp = x;
	elseif (y <= 7.1e+115)
		tmp = t_1;
	elseif (y <= 5.6e+164)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	else
		tmp = Float64(t * Float64(y / Float64(a - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / a);
	tmp = 0.0;
	if (y <= -2500000000000.0)
		tmp = t_1;
	elseif (y <= -1.35e-33)
		tmp = t * (1.0 - (y / z));
	elseif (y <= 2e-31)
		tmp = x;
	elseif (y <= 7.1e+115)
		tmp = t_1;
	elseif (y <= 5.6e+164)
		tmp = (y / z) * (x - t);
	else
		tmp = t * (y / (a - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2500000000000.0], t$95$1, If[LessEqual[y, -1.35e-33], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e-31], x, If[LessEqual[y, 7.1e+115], t$95$1, If[LessEqual[y, 5.6e+164], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a}\\
\mathbf{if}\;y \leq -2500000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -1.35 \cdot 10^{-33}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

\mathbf{elif}\;y \leq 2 \cdot 10^{-31}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 7.1 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 5.6 \cdot 10^{+164}:\\
\;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.5e12 or 2e-31 < y < 7.0999999999999997e115

    1. Initial program 80.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 66.8%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub66.8%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified66.8%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in a around inf 44.3%

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]

    if -2.5e12 < y < -1.35e-33

    1. Initial program 71.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 19.7%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(t - x\right) \cdot \left(y - z\right)}{z}} \]
    4. Step-by-step derivation
      1. mul-1-neg19.7%

        \[\leadsto x + \color{blue}{\left(-\frac{\left(t - x\right) \cdot \left(y - z\right)}{z}\right)} \]
      2. unsub-neg19.7%

        \[\leadsto \color{blue}{x - \frac{\left(t - x\right) \cdot \left(y - z\right)}{z}} \]
      3. associate-/l*36.5%

        \[\leadsto x - \color{blue}{\left(t - x\right) \cdot \frac{y - z}{z}} \]
      4. div-sub36.5%

        \[\leadsto x - \left(t - x\right) \cdot \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)} \]
      5. sub-neg36.5%

        \[\leadsto x - \left(t - x\right) \cdot \color{blue}{\left(\frac{y}{z} + \left(-\frac{z}{z}\right)\right)} \]
      6. *-inverses36.5%

        \[\leadsto x - \left(t - x\right) \cdot \left(\frac{y}{z} + \left(-\color{blue}{1}\right)\right) \]
      7. metadata-eval36.5%

        \[\leadsto x - \left(t - x\right) \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
    5. Simplified36.5%

      \[\leadsto \color{blue}{x - \left(t - x\right) \cdot \left(\frac{y}{z} + -1\right)} \]
    6. Taylor expanded in x around 0 58.1%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(\frac{y}{z} - 1\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg58.1%

        \[\leadsto \color{blue}{-t \cdot \left(\frac{y}{z} - 1\right)} \]
      2. sub-neg58.1%

        \[\leadsto -t \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)} \]
      3. metadata-eval58.1%

        \[\leadsto -t \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
      4. distribute-rgt-neg-in58.1%

        \[\leadsto \color{blue}{t \cdot \left(-\left(\frac{y}{z} + -1\right)\right)} \]
      5. +-commutative58.1%

        \[\leadsto t \cdot \left(-\color{blue}{\left(-1 + \frac{y}{z}\right)}\right) \]
      6. distribute-neg-in58.1%

        \[\leadsto t \cdot \color{blue}{\left(\left(--1\right) + \left(-\frac{y}{z}\right)\right)} \]
      7. metadata-eval58.1%

        \[\leadsto t \cdot \left(\color{blue}{1} + \left(-\frac{y}{z}\right)\right) \]
      8. sub-neg58.1%

        \[\leadsto t \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
    8. Simplified58.1%

      \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y}{z}\right)} \]

    if -1.35e-33 < y < 2e-31

    1. Initial program 73.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 41.6%

      \[\leadsto \color{blue}{x} \]

    if 7.0999999999999997e115 < y < 5.6000000000000004e164

    1. Initial program 87.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 75.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+75.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--75.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-sub76.2%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg76.2%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg76.2%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub75.8%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*76.0%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*76.0%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--76.4%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    5. Simplified76.4%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    6. Taylor expanded in y around inf 75.9%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/76.1%

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    8. Simplified76.1%

      \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    9. Taylor expanded in y around inf 76.1%

      \[\leadsto \color{blue}{y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)} \]
    10. Step-by-step derivation
      1. distribute-lft-out--76.1%

        \[\leadsto \color{blue}{y \cdot \frac{x}{z} - y \cdot \frac{t}{z}} \]
      2. associate-*r/75.9%

        \[\leadsto \color{blue}{\frac{y \cdot x}{z}} - y \cdot \frac{t}{z} \]
      3. *-commutative75.9%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{z} - y \cdot \frac{t}{z} \]
      4. associate-/l*75.9%

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} - y \cdot \frac{t}{z} \]
      5. associate-*r/75.9%

        \[\leadsto x \cdot \frac{y}{z} - \color{blue}{\frac{y \cdot t}{z}} \]
      6. *-commutative75.9%

        \[\leadsto x \cdot \frac{y}{z} - \frac{\color{blue}{t \cdot y}}{z} \]
      7. associate-*r/75.9%

        \[\leadsto x \cdot \frac{y}{z} - \color{blue}{t \cdot \frac{y}{z}} \]
      8. distribute-rgt-out--75.9%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(x - t\right)} \]
    11. Simplified75.9%

      \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(x - t\right)} \]

    if 5.6000000000000004e164 < y

    1. Initial program 88.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 76.4%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub82.5%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified82.5%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in t around inf 49.3%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. associate-/l*59.0%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
    8. Simplified59.0%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 19: 44.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -5 \cdot 10^{+136}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -6.1 \cdot 10^{+63}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -6.3 \cdot 10^{-68}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-173}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-44}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ y z)))))
   (if (<= z -5e+136)
     t_1
     (if (<= z -6.1e+63)
       (* x (/ (- y a) z))
       (if (<= z -6.3e-68)
         (* t (/ y (- a z)))
         (if (<= z -6.2e-173)
           x
           (if (<= z 3.1e-44) (* y (/ (- t x) a)) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double tmp;
	if (z <= -5e+136) {
		tmp = t_1;
	} else if (z <= -6.1e+63) {
		tmp = x * ((y - a) / z);
	} else if (z <= -6.3e-68) {
		tmp = t * (y / (a - z));
	} else if (z <= -6.2e-173) {
		tmp = x;
	} else if (z <= 3.1e-44) {
		tmp = y * ((t - x) / a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (1.0d0 - (y / z))
    if (z <= (-5d+136)) then
        tmp = t_1
    else if (z <= (-6.1d+63)) then
        tmp = x * ((y - a) / z)
    else if (z <= (-6.3d-68)) then
        tmp = t * (y / (a - z))
    else if (z <= (-6.2d-173)) then
        tmp = x
    else if (z <= 3.1d-44) then
        tmp = y * ((t - x) / a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double tmp;
	if (z <= -5e+136) {
		tmp = t_1;
	} else if (z <= -6.1e+63) {
		tmp = x * ((y - a) / z);
	} else if (z <= -6.3e-68) {
		tmp = t * (y / (a - z));
	} else if (z <= -6.2e-173) {
		tmp = x;
	} else if (z <= 3.1e-44) {
		tmp = y * ((t - x) / a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	tmp = 0
	if z <= -5e+136:
		tmp = t_1
	elif z <= -6.1e+63:
		tmp = x * ((y - a) / z)
	elif z <= -6.3e-68:
		tmp = t * (y / (a - z))
	elif z <= -6.2e-173:
		tmp = x
	elif z <= 3.1e-44:
		tmp = y * ((t - x) / a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -5e+136)
		tmp = t_1;
	elseif (z <= -6.1e+63)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= -6.3e-68)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= -6.2e-173)
		tmp = x;
	elseif (z <= 3.1e-44)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -5e+136)
		tmp = t_1;
	elseif (z <= -6.1e+63)
		tmp = x * ((y - a) / z);
	elseif (z <= -6.3e-68)
		tmp = t * (y / (a - z));
	elseif (z <= -6.2e-173)
		tmp = x;
	elseif (z <= 3.1e-44)
		tmp = y * ((t - x) / a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+136], t$95$1, If[LessEqual[z, -6.1e+63], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.3e-68], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-173], x, If[LessEqual[z, 3.1e-44], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -5 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -6.1 \cdot 10^{+63}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

\mathbf{elif}\;z \leq -6.3 \cdot 10^{-68}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\

\mathbf{elif}\;z \leq -6.2 \cdot 10^{-173}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3.1 \cdot 10^{-44}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -5.0000000000000002e136 or 3.09999999999999984e-44 < z

    1. Initial program 64.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 29.5%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(t - x\right) \cdot \left(y - z\right)}{z}} \]
    4. Step-by-step derivation
      1. mul-1-neg29.5%

        \[\leadsto x + \color{blue}{\left(-\frac{\left(t - x\right) \cdot \left(y - z\right)}{z}\right)} \]
      2. unsub-neg29.5%

        \[\leadsto \color{blue}{x - \frac{\left(t - x\right) \cdot \left(y - z\right)}{z}} \]
      3. associate-/l*47.3%

        \[\leadsto x - \color{blue}{\left(t - x\right) \cdot \frac{y - z}{z}} \]
      4. div-sub47.3%

        \[\leadsto x - \left(t - x\right) \cdot \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)} \]
      5. sub-neg47.3%

        \[\leadsto x - \left(t - x\right) \cdot \color{blue}{\left(\frac{y}{z} + \left(-\frac{z}{z}\right)\right)} \]
      6. *-inverses47.3%

        \[\leadsto x - \left(t - x\right) \cdot \left(\frac{y}{z} + \left(-\color{blue}{1}\right)\right) \]
      7. metadata-eval47.3%

        \[\leadsto x - \left(t - x\right) \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
    5. Simplified47.3%

      \[\leadsto \color{blue}{x - \left(t - x\right) \cdot \left(\frac{y}{z} + -1\right)} \]
    6. Taylor expanded in x around 0 53.2%

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(\frac{y}{z} - 1\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg53.2%

        \[\leadsto \color{blue}{-t \cdot \left(\frac{y}{z} - 1\right)} \]
      2. sub-neg53.2%

        \[\leadsto -t \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)} \]
      3. metadata-eval53.2%

        \[\leadsto -t \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
      4. distribute-rgt-neg-in53.2%

        \[\leadsto \color{blue}{t \cdot \left(-\left(\frac{y}{z} + -1\right)\right)} \]
      5. +-commutative53.2%

        \[\leadsto t \cdot \left(-\color{blue}{\left(-1 + \frac{y}{z}\right)}\right) \]
      6. distribute-neg-in53.2%

        \[\leadsto t \cdot \color{blue}{\left(\left(--1\right) + \left(-\frac{y}{z}\right)\right)} \]
      7. metadata-eval53.2%

        \[\leadsto t \cdot \left(\color{blue}{1} + \left(-\frac{y}{z}\right)\right) \]
      8. sub-neg53.2%

        \[\leadsto t \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
    8. Simplified53.2%

      \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y}{z}\right)} \]

    if -5.0000000000000002e136 < z < -6.09999999999999968e63

    1. Initial program 63.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 46.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+46.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--46.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-sub46.5%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg46.5%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg46.5%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub46.5%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*54.1%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*58.8%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--58.8%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    5. Simplified58.8%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    6. Taylor expanded in t around 0 38.9%

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-/l*51.2%

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    8. Simplified51.2%

      \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]

    if -6.09999999999999968e63 < z < -6.2999999999999998e-68

    1. Initial program 81.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 50.0%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub50.0%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified50.0%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in t around inf 31.5%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. associate-/l*40.2%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
    8. Simplified40.2%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]

    if -6.2999999999999998e-68 < z < -6.20000000000000011e-173

    1. Initial program 83.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 40.3%

      \[\leadsto \color{blue}{x} \]

    if -6.20000000000000011e-173 < z < 3.09999999999999984e-44

    1. Initial program 92.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 52.4%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub56.6%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified56.6%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in a around inf 48.8%

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 20: 34.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ \mathbf{if}\;z \leq -6.6 \cdot 10^{+150}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-50}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{-50}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-246}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+86}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y a))))
   (if (<= z -6.6e+150)
     t
     (if (<= z -3.6e-50)
       t_1
       (if (<= z -2.05e-50)
         t
         (if (<= z -1.2e-246)
           x
           (if (<= z 5.3e-55) t_1 (if (<= z 2e+86) x t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -6.6e+150) {
		tmp = t;
	} else if (z <= -3.6e-50) {
		tmp = t_1;
	} else if (z <= -2.05e-50) {
		tmp = t;
	} else if (z <= -1.2e-246) {
		tmp = x;
	} else if (z <= 5.3e-55) {
		tmp = t_1;
	} else if (z <= 2e+86) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (y / a)
    if (z <= (-6.6d+150)) then
        tmp = t
    else if (z <= (-3.6d-50)) then
        tmp = t_1
    else if (z <= (-2.05d-50)) then
        tmp = t
    else if (z <= (-1.2d-246)) then
        tmp = x
    else if (z <= 5.3d-55) then
        tmp = t_1
    else if (z <= 2d+86) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (z <= -6.6e+150) {
		tmp = t;
	} else if (z <= -3.6e-50) {
		tmp = t_1;
	} else if (z <= -2.05e-50) {
		tmp = t;
	} else if (z <= -1.2e-246) {
		tmp = x;
	} else if (z <= 5.3e-55) {
		tmp = t_1;
	} else if (z <= 2e+86) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / a)
	tmp = 0
	if z <= -6.6e+150:
		tmp = t
	elif z <= -3.6e-50:
		tmp = t_1
	elif z <= -2.05e-50:
		tmp = t
	elif z <= -1.2e-246:
		tmp = x
	elif z <= 5.3e-55:
		tmp = t_1
	elif z <= 2e+86:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / a))
	tmp = 0.0
	if (z <= -6.6e+150)
		tmp = t;
	elseif (z <= -3.6e-50)
		tmp = t_1;
	elseif (z <= -2.05e-50)
		tmp = t;
	elseif (z <= -1.2e-246)
		tmp = x;
	elseif (z <= 5.3e-55)
		tmp = t_1;
	elseif (z <= 2e+86)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / a);
	tmp = 0.0;
	if (z <= -6.6e+150)
		tmp = t;
	elseif (z <= -3.6e-50)
		tmp = t_1;
	elseif (z <= -2.05e-50)
		tmp = t;
	elseif (z <= -1.2e-246)
		tmp = x;
	elseif (z <= 5.3e-55)
		tmp = t_1;
	elseif (z <= 2e+86)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e+150], t, If[LessEqual[z, -3.6e-50], t$95$1, If[LessEqual[z, -2.05e-50], t, If[LessEqual[z, -1.2e-246], x, If[LessEqual[z, 5.3e-55], t$95$1, If[LessEqual[z, 2e+86], x, t]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+150}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -3.6 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.05 \cdot 10^{-50}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -1.2 \cdot 10^{-246}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.3 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2 \cdot 10^{+86}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.59999999999999962e150 or -3.59999999999999979e-50 < z < -2.04999999999999993e-50 or 2e86 < z

    1. Initial program 56.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 50.3%

      \[\leadsto \color{blue}{t} \]

    if -6.59999999999999962e150 < z < -3.59999999999999979e-50 or -1.1999999999999999e-246 < z < 5.3000000000000003e-55

    1. Initial program 86.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 53.8%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub57.5%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified57.5%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in a around inf 45.5%

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Taylor expanded in t around inf 29.6%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*36.6%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified36.6%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]

    if -2.04999999999999993e-50 < z < -1.1999999999999999e-246 or 5.3000000000000003e-55 < z < 2e86

    1. Initial program 90.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 43.8%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 21: 75.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{if}\;z \leq -7.5 \cdot 10^{+42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-186}:\\ \;\;\;\;x + \frac{x - t}{\frac{a}{z - y}}\\ \mathbf{elif}\;z \leq -2.85 \cdot 10^{-186}:\\ \;\;\;\;x \cdot \frac{y}{-a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+63}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* (/ (- t x) z) (- a y)))))
   (if (<= z -7.5e+42)
     t_1
     (if (<= z -2.9e-186)
       (+ x (/ (- x t) (/ a (- z y))))
       (if (<= z -2.85e-186)
         (* x (/ y (- a)))
         (if (<= z 7.5e+63) (+ x (* (- t x) (/ (- y z) a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (((t - x) / z) * (a - y));
	double tmp;
	if (z <= -7.5e+42) {
		tmp = t_1;
	} else if (z <= -2.9e-186) {
		tmp = x + ((x - t) / (a / (z - y)));
	} else if (z <= -2.85e-186) {
		tmp = x * (y / -a);
	} else if (z <= 7.5e+63) {
		tmp = x + ((t - x) * ((y - z) / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t + (((t - x) / z) * (a - y))
    if (z <= (-7.5d+42)) then
        tmp = t_1
    else if (z <= (-2.9d-186)) then
        tmp = x + ((x - t) / (a / (z - y)))
    else if (z <= (-2.85d-186)) then
        tmp = x * (y / -a)
    else if (z <= 7.5d+63) then
        tmp = x + ((t - x) * ((y - z) / a))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (((t - x) / z) * (a - y));
	double tmp;
	if (z <= -7.5e+42) {
		tmp = t_1;
	} else if (z <= -2.9e-186) {
		tmp = x + ((x - t) / (a / (z - y)));
	} else if (z <= -2.85e-186) {
		tmp = x * (y / -a);
	} else if (z <= 7.5e+63) {
		tmp = x + ((t - x) * ((y - z) / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (((t - x) / z) * (a - y))
	tmp = 0
	if z <= -7.5e+42:
		tmp = t_1
	elif z <= -2.9e-186:
		tmp = x + ((x - t) / (a / (z - y)))
	elif z <= -2.85e-186:
		tmp = x * (y / -a)
	elif z <= 7.5e+63:
		tmp = x + ((t - x) * ((y - z) / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y)))
	tmp = 0.0
	if (z <= -7.5e+42)
		tmp = t_1;
	elseif (z <= -2.9e-186)
		tmp = Float64(x + Float64(Float64(x - t) / Float64(a / Float64(z - y))));
	elseif (z <= -2.85e-186)
		tmp = Float64(x * Float64(y / Float64(-a)));
	elseif (z <= 7.5e+63)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (((t - x) / z) * (a - y));
	tmp = 0.0;
	if (z <= -7.5e+42)
		tmp = t_1;
	elseif (z <= -2.9e-186)
		tmp = x + ((x - t) / (a / (z - y)));
	elseif (z <= -2.85e-186)
		tmp = x * (y / -a);
	elseif (z <= 7.5e+63)
		tmp = x + ((t - x) * ((y - z) / a));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+42], t$95$1, If[LessEqual[z, -2.9e-186], N[(x + N[(N[(x - t), $MachinePrecision] / N[(a / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.85e-186], N[(x * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+63], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -2.9 \cdot 10^{-186}:\\
\;\;\;\;x + \frac{x - t}{\frac{a}{z - y}}\\

\mathbf{elif}\;z \leq -2.85 \cdot 10^{-186}:\\
\;\;\;\;x \cdot \frac{y}{-a}\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+63}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.50000000000000041e42 or 7.5000000000000005e63 < z

    1. Initial program 61.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 61.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+61.3%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--61.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-sub61.3%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg61.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg61.3%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub61.3%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*73.1%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*80.2%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--80.2%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    5. Simplified80.2%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]

    if -7.50000000000000041e42 < z < -2.90000000000000019e-186

    1. Initial program 84.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative84.4%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
      2. associate-*l/86.6%

        \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
      3. associate-*r/94.9%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
      4. clear-num94.8%

        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
      5. un-div-inv95.0%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Applied egg-rr95.0%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    5. Taylor expanded in a around inf 74.4%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y - z}}} \]

    if -2.90000000000000019e-186 < z < -2.85000000000000001e-186

    1. Initial program 100.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 100.0%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub100.0%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in a around inf 0.0%

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Taylor expanded in t around 0 5.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
    8. Step-by-step derivation
      1. mul-1-neg5.3%

        \[\leadsto \color{blue}{-\frac{x \cdot y}{a}} \]
      2. associate-/l*100.0%

        \[\leadsto -\color{blue}{x \cdot \frac{y}{a}} \]
    9. Simplified100.0%

      \[\leadsto \color{blue}{-x \cdot \frac{y}{a}} \]

    if -2.85000000000000001e-186 < z < 7.5000000000000005e63

    1. Initial program 91.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 69.9%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*83.2%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a}} \]
    5. Simplified83.2%

      \[\leadsto \color{blue}{x + \left(t - x\right) \cdot \frac{y - z}{a}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification80.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+42}:\\ \;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-186}:\\ \;\;\;\;x + \frac{x - t}{\frac{a}{z - y}}\\ \mathbf{elif}\;z \leq -2.85 \cdot 10^{-186}:\\ \;\;\;\;x \cdot \frac{y}{-a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+63}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 34.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+150}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-67}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -2.15 \cdot 10^{-246}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{-55}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+97}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.6e+150)
   t
   (if (<= z -4.5e-67)
     (/ t (/ a y))
     (if (<= z -2.15e-246)
       x
       (if (<= z 5.3e-55) (* t (/ y a)) (if (<= z 1.55e+97) x t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.6e+150) {
		tmp = t;
	} else if (z <= -4.5e-67) {
		tmp = t / (a / y);
	} else if (z <= -2.15e-246) {
		tmp = x;
	} else if (z <= 5.3e-55) {
		tmp = t * (y / a);
	} else if (z <= 1.55e+97) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-6.6d+150)) then
        tmp = t
    else if (z <= (-4.5d-67)) then
        tmp = t / (a / y)
    else if (z <= (-2.15d-246)) then
        tmp = x
    else if (z <= 5.3d-55) then
        tmp = t * (y / a)
    else if (z <= 1.55d+97) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.6e+150) {
		tmp = t;
	} else if (z <= -4.5e-67) {
		tmp = t / (a / y);
	} else if (z <= -2.15e-246) {
		tmp = x;
	} else if (z <= 5.3e-55) {
		tmp = t * (y / a);
	} else if (z <= 1.55e+97) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6.6e+150:
		tmp = t
	elif z <= -4.5e-67:
		tmp = t / (a / y)
	elif z <= -2.15e-246:
		tmp = x
	elif z <= 5.3e-55:
		tmp = t * (y / a)
	elif z <= 1.55e+97:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.6e+150)
		tmp = t;
	elseif (z <= -4.5e-67)
		tmp = Float64(t / Float64(a / y));
	elseif (z <= -2.15e-246)
		tmp = x;
	elseif (z <= 5.3e-55)
		tmp = Float64(t * Float64(y / a));
	elseif (z <= 1.55e+97)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6.6e+150)
		tmp = t;
	elseif (z <= -4.5e-67)
		tmp = t / (a / y);
	elseif (z <= -2.15e-246)
		tmp = x;
	elseif (z <= 5.3e-55)
		tmp = t * (y / a);
	elseif (z <= 1.55e+97)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.6e+150], t, If[LessEqual[z, -4.5e-67], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.15e-246], x, If[LessEqual[z, 5.3e-55], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+97], x, t]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{+150}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -4.5 \cdot 10^{-67}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

\mathbf{elif}\;z \leq -2.15 \cdot 10^{-246}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 5.3 \cdot 10^{-55}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 1.55 \cdot 10^{+97}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.59999999999999962e150 or 1.54999999999999991e97 < z

    1. Initial program 56.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 50.8%

      \[\leadsto \color{blue}{t} \]

    if -6.59999999999999962e150 < z < -4.50000000000000015e-67

    1. Initial program 77.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 49.2%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub49.2%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified49.2%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in a around inf 30.2%

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Taylor expanded in t around inf 22.8%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*30.6%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified30.6%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Step-by-step derivation
      1. clear-num30.6%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. un-div-inv30.7%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Applied egg-rr30.7%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]

    if -4.50000000000000015e-67 < z < -2.14999999999999996e-246 or 5.3000000000000003e-55 < z < 1.54999999999999991e97

    1. Initial program 90.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 44.7%

      \[\leadsto \color{blue}{x} \]

    if -2.14999999999999996e-246 < z < 5.3000000000000003e-55

    1. Initial program 90.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 56.0%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub61.6%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified61.6%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    6. Taylor expanded in a around inf 53.4%

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Taylor expanded in t around inf 33.6%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. associate-/l*40.1%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Simplified40.1%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 23: 71.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+128} \lor \neg \left(z \leq 4100\right):\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -2.2e+128) (not (<= z 4100.0)))
   (+ t (* y (/ (- x t) z)))
   (+ x (* (- t x) (/ (- y z) a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2.2e+128) || !(z <= 4100.0)) {
		tmp = t + (y * ((x - t) / z));
	} else {
		tmp = x + ((t - x) * ((y - z) / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-2.2d+128)) .or. (.not. (z <= 4100.0d0))) then
        tmp = t + (y * ((x - t) / z))
    else
        tmp = x + ((t - x) * ((y - z) / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2.2e+128) || !(z <= 4100.0)) {
		tmp = t + (y * ((x - t) / z));
	} else {
		tmp = x + ((t - x) * ((y - z) / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -2.2e+128) or not (z <= 4100.0):
		tmp = t + (y * ((x - t) / z))
	else:
		tmp = x + ((t - x) * ((y - z) / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -2.2e+128) || !(z <= 4100.0))
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	else
		tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -2.2e+128) || ~((z <= 4100.0)))
		tmp = t + (y * ((x - t) / z));
	else
		tmp = x + ((t - x) * ((y - z) / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.2e+128], N[Not[LessEqual[z, 4100.0]], $MachinePrecision]], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+128} \lor \neg \left(z \leq 4100\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\

\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.20000000000000017e128 or 4100 < z

    1. Initial program 61.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 61.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+61.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--61.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-sub61.8%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg61.8%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg61.8%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub61.8%

        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      7. associate-/l*73.6%

        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
      8. associate-/l*80.7%

        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      9. distribute-rgt-out--80.7%

        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
    5. Simplified80.7%

      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
    6. Taylor expanded in y around inf 58.6%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/70.4%

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    8. Simplified70.4%

      \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]

    if -2.20000000000000017e128 < z < 4100

    1. Initial program 88.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 66.7%

      \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*77.3%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a}} \]
    5. Simplified77.3%

      \[\leadsto \color{blue}{x + \left(t - x\right) \cdot \frac{y - z}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification74.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+128} \lor \neg \left(z \leq 4100\right):\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 37.7% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+136}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+60}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2e+136) t (if (<= z 4.8e+60) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2e+136) {
		tmp = t;
	} else if (z <= 4.8e+60) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-2d+136)) then
        tmp = t
    else if (z <= 4.8d+60) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2e+136) {
		tmp = t;
	} else if (z <= 4.8e+60) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2e+136:
		tmp = t
	elif z <= 4.8e+60:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2e+136)
		tmp = t;
	elseif (z <= 4.8e+60)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2e+136)
		tmp = t;
	elseif (z <= 4.8e+60)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2e+136], t, If[LessEqual[z, 4.8e+60], x, t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+136}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 4.8 \cdot 10^{+60}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.00000000000000012e136 or 4.8e60 < z

    1. Initial program 60.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 47.2%

      \[\leadsto \color{blue}{t} \]

    if -2.00000000000000012e136 < z < 4.8e60

    1. Initial program 87.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 32.3%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 25: 24.4% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 78.3%

    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
  2. Add Preprocessing
  3. Taylor expanded in z around inf 21.3%

    \[\leadsto \color{blue}{t} \]
  4. Add Preprocessing

Alternative 26: 2.8% accurate, 13.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
def code(x, y, z, t, a):
	return 0.0
function code(x, y, z, t, a)
	return 0.0
end
function tmp = code(x, y, z, t, a)
	tmp = 0.0;
end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 78.3%

    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutative78.3%

      \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
    2. associate-*l/67.3%

      \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
    3. associate-*r/83.8%

      \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
    4. clear-num83.7%

      \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
    5. un-div-inv83.8%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
  4. Applied egg-rr83.8%

    \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
  5. Step-by-step derivation
    1. div-sub83.4%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y - z} - \frac{z}{y - z}}} \]
  6. Applied egg-rr83.4%

    \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y - z} - \frac{z}{y - z}}} \]
  7. Taylor expanded in t around 0 42.1%

    \[\leadsto x + \color{blue}{-1 \cdot \frac{x}{\frac{a}{y - z} - \frac{z}{y - z}}} \]
  8. Step-by-step derivation
    1. mul-1-neg42.1%

      \[\leadsto x + \color{blue}{\left(-\frac{x}{\frac{a}{y - z} - \frac{z}{y - z}}\right)} \]
    2. div-sub41.8%

      \[\leadsto x + \left(-\frac{x}{\color{blue}{\frac{a - z}{y - z}}}\right) \]
    3. distribute-neg-frac41.8%

      \[\leadsto x + \color{blue}{\frac{-x}{\frac{a - z}{y - z}}} \]
  9. Simplified41.8%

    \[\leadsto x + \color{blue}{\frac{-x}{\frac{a - z}{y - z}}} \]
  10. Taylor expanded in z around inf 2.8%

    \[\leadsto \color{blue}{x + -1 \cdot x} \]
  11. Step-by-step derivation
    1. mul-1-neg2.8%

      \[\leadsto x + \color{blue}{\left(-x\right)} \]
    2. sub-neg2.8%

      \[\leadsto \color{blue}{x - x} \]
    3. +-inverses2.8%

      \[\leadsto \color{blue}{0} \]
  12. Simplified2.8%

    \[\leadsto \color{blue}{0} \]
  13. Add Preprocessing

Reproduce

?
herbie shell --seed 2024107 
(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)))))