Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3

Percentage Accurate: 68.6% → 90.7%
Time: 22.6s
Alternatives: 30
Speedup: 0.6×

Specification

?
\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 30 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: 68.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 90.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-283}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 10^{+188}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 52.2%

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

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

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

    if -5.00000000000000031e289 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.99999999999999947e-284 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1e188

    1. Initial program 96.8%

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

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

    1. Initial program 4.5%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 95.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}} \]
    6. Step-by-step derivation
      1. associate--l+95.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. associate-*r/95.1%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.0% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 76.0%

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

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

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

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

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

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

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

    1. Initial program 4.5%

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

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

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

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

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

Alternative 3: 90.9% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.5%

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

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

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

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

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

Alternative 4: 36.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+57}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-257}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-112}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-52}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 280:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+20}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+91}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5.4e+57)
   t
   (if (<= z -5.4e-257)
     x
     (if (<= z 5.5e-112)
       (* t (/ y (- a z)))
       (if (<= z 4.8e-52)
         x
         (if (<= z 280.0)
           t
           (if (<= z 3e+20)
             (* t (/ (- y z) a))
             (if (<= z 2.9e+91)
               (/ (* x y) z)
               (if (<= z 4.4e+163) x (* t (+ 1.0 (/ a z))))))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.4e+57) {
		tmp = t;
	} else if (z <= -5.4e-257) {
		tmp = x;
	} else if (z <= 5.5e-112) {
		tmp = t * (y / (a - z));
	} else if (z <= 4.8e-52) {
		tmp = x;
	} else if (z <= 280.0) {
		tmp = t;
	} else if (z <= 3e+20) {
		tmp = t * ((y - z) / a);
	} else if (z <= 2.9e+91) {
		tmp = (x * y) / z;
	} else if (z <= 4.4e+163) {
		tmp = x;
	} else {
		tmp = t * (1.0 + (a / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-5.4d+57)) then
        tmp = t
    else if (z <= (-5.4d-257)) then
        tmp = x
    else if (z <= 5.5d-112) then
        tmp = t * (y / (a - z))
    else if (z <= 4.8d-52) then
        tmp = x
    else if (z <= 280.0d0) then
        tmp = t
    else if (z <= 3d+20) then
        tmp = t * ((y - z) / a)
    else if (z <= 2.9d+91) then
        tmp = (x * y) / z
    else if (z <= 4.4d+163) then
        tmp = x
    else
        tmp = t * (1.0d0 + (a / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.4e+57) {
		tmp = t;
	} else if (z <= -5.4e-257) {
		tmp = x;
	} else if (z <= 5.5e-112) {
		tmp = t * (y / (a - z));
	} else if (z <= 4.8e-52) {
		tmp = x;
	} else if (z <= 280.0) {
		tmp = t;
	} else if (z <= 3e+20) {
		tmp = t * ((y - z) / a);
	} else if (z <= 2.9e+91) {
		tmp = (x * y) / z;
	} else if (z <= 4.4e+163) {
		tmp = x;
	} else {
		tmp = t * (1.0 + (a / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -5.4e+57:
		tmp = t
	elif z <= -5.4e-257:
		tmp = x
	elif z <= 5.5e-112:
		tmp = t * (y / (a - z))
	elif z <= 4.8e-52:
		tmp = x
	elif z <= 280.0:
		tmp = t
	elif z <= 3e+20:
		tmp = t * ((y - z) / a)
	elif z <= 2.9e+91:
		tmp = (x * y) / z
	elif z <= 4.4e+163:
		tmp = x
	else:
		tmp = t * (1.0 + (a / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5.4e+57)
		tmp = t;
	elseif (z <= -5.4e-257)
		tmp = x;
	elseif (z <= 5.5e-112)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= 4.8e-52)
		tmp = x;
	elseif (z <= 280.0)
		tmp = t;
	elseif (z <= 3e+20)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= 2.9e+91)
		tmp = Float64(Float64(x * y) / z);
	elseif (z <= 4.4e+163)
		tmp = x;
	else
		tmp = Float64(t * Float64(1.0 + Float64(a / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -5.4e+57)
		tmp = t;
	elseif (z <= -5.4e-257)
		tmp = x;
	elseif (z <= 5.5e-112)
		tmp = t * (y / (a - z));
	elseif (z <= 4.8e-52)
		tmp = x;
	elseif (z <= 280.0)
		tmp = t;
	elseif (z <= 3e+20)
		tmp = t * ((y - z) / a);
	elseif (z <= 2.9e+91)
		tmp = (x * y) / z;
	elseif (z <= 4.4e+163)
		tmp = x;
	else
		tmp = t * (1.0 + (a / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.4e+57], t, If[LessEqual[z, -5.4e-257], x, If[LessEqual[z, 5.5e-112], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e-52], x, If[LessEqual[z, 280.0], t, If[LessEqual[z, 3e+20], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+91], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 4.4e+163], x, N[(t * N[(1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -5.4 \cdot 10^{-257}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 4.8 \cdot 10^{-52}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 280:\\
\;\;\;\;t\\

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

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+91}:\\
\;\;\;\;\frac{x \cdot y}{z}\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -5.3999999999999997e57 or 4.8000000000000003e-52 < z < 280

    1. Initial program 48.8%

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

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

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

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

    if -5.3999999999999997e57 < z < -5.3999999999999997e-257 or 5.5e-112 < z < 4.8000000000000003e-52 or 2.90000000000000014e91 < z < 4.39999999999999973e163

    1. Initial program 80.2%

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

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

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

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

    if -5.3999999999999997e-257 < z < 5.5e-112

    1. Initial program 89.3%

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

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

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

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

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

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

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

    if 280 < z < 3e20

    1. Initial program 99.6%

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

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

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

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

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

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

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

    if 3e20 < z < 2.90000000000000014e91

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

    if 4.39999999999999973e163 < z

    1. Initial program 34.4%

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    8. Simplified78.3%

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

      \[\leadsto \color{blue}{t \cdot \left(1 + \frac{a}{z}\right)} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification48.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+57}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-257}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-112}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-52}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 280:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+20}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+91}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 36.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := t \cdot \left(1 + \frac{a}{z}\right)\\ \mathbf{if}\;z \leq -1.56 \cdot 10^{+59}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{-94}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-258}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-111}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 165:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+18}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+121}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+175}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z))) (t_2 (* t (+ 1.0 (/ a z)))))
   (if (<= z -1.56e+59)
     t_2
     (if (<= z -2.35e-94)
       t_1
       (if (<= z -6.4e-258)
         x
         (if (<= z 1.6e-111)
           (* t (/ y (- a z)))
           (if (<= z 165.0)
             x
             (if (<= z 8e+18)
               (* t (/ (- y z) a))
               (if (<= z 7.8e+121) t_1 (if (<= z 1.2e+175) x t_2))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = t * (1.0 + (a / z));
	double tmp;
	if (z <= -1.56e+59) {
		tmp = t_2;
	} else if (z <= -2.35e-94) {
		tmp = t_1;
	} else if (z <= -6.4e-258) {
		tmp = x;
	} else if (z <= 1.6e-111) {
		tmp = t * (y / (a - z));
	} else if (z <= 165.0) {
		tmp = x;
	} else if (z <= 8e+18) {
		tmp = t * ((y - z) / a);
	} else if (z <= 7.8e+121) {
		tmp = t_1;
	} else if (z <= 1.2e+175) {
		tmp = x;
	} 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 * ((y - a) / z)
    t_2 = t * (1.0d0 + (a / z))
    if (z <= (-1.56d+59)) then
        tmp = t_2
    else if (z <= (-2.35d-94)) then
        tmp = t_1
    else if (z <= (-6.4d-258)) then
        tmp = x
    else if (z <= 1.6d-111) then
        tmp = t * (y / (a - z))
    else if (z <= 165.0d0) then
        tmp = x
    else if (z <= 8d+18) then
        tmp = t * ((y - z) / a)
    else if (z <= 7.8d+121) then
        tmp = t_1
    else if (z <= 1.2d+175) then
        tmp = x
    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 * ((y - a) / z);
	double t_2 = t * (1.0 + (a / z));
	double tmp;
	if (z <= -1.56e+59) {
		tmp = t_2;
	} else if (z <= -2.35e-94) {
		tmp = t_1;
	} else if (z <= -6.4e-258) {
		tmp = x;
	} else if (z <= 1.6e-111) {
		tmp = t * (y / (a - z));
	} else if (z <= 165.0) {
		tmp = x;
	} else if (z <= 8e+18) {
		tmp = t * ((y - z) / a);
	} else if (z <= 7.8e+121) {
		tmp = t_1;
	} else if (z <= 1.2e+175) {
		tmp = x;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = t * (1.0 + (a / z))
	tmp = 0
	if z <= -1.56e+59:
		tmp = t_2
	elif z <= -2.35e-94:
		tmp = t_1
	elif z <= -6.4e-258:
		tmp = x
	elif z <= 1.6e-111:
		tmp = t * (y / (a - z))
	elif z <= 165.0:
		tmp = x
	elif z <= 8e+18:
		tmp = t * ((y - z) / a)
	elif z <= 7.8e+121:
		tmp = t_1
	elif z <= 1.2e+175:
		tmp = x
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(t * Float64(1.0 + Float64(a / z)))
	tmp = 0.0
	if (z <= -1.56e+59)
		tmp = t_2;
	elseif (z <= -2.35e-94)
		tmp = t_1;
	elseif (z <= -6.4e-258)
		tmp = x;
	elseif (z <= 1.6e-111)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= 165.0)
		tmp = x;
	elseif (z <= 8e+18)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= 7.8e+121)
		tmp = t_1;
	elseif (z <= 1.2e+175)
		tmp = x;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = t * (1.0 + (a / z));
	tmp = 0.0;
	if (z <= -1.56e+59)
		tmp = t_2;
	elseif (z <= -2.35e-94)
		tmp = t_1;
	elseif (z <= -6.4e-258)
		tmp = x;
	elseif (z <= 1.6e-111)
		tmp = t * (y / (a - z));
	elseif (z <= 165.0)
		tmp = x;
	elseif (z <= 8e+18)
		tmp = t * ((y - z) / a);
	elseif (z <= 7.8e+121)
		tmp = t_1;
	elseif (z <= 1.2e+175)
		tmp = x;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.56e+59], t$95$2, If[LessEqual[z, -2.35e-94], t$95$1, If[LessEqual[z, -6.4e-258], x, If[LessEqual[z, 1.6e-111], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 165.0], x, If[LessEqual[z, 8e+18], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+121], t$95$1, If[LessEqual[z, 1.2e+175], x, t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.35 \cdot 10^{-94}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -6.4 \cdot 10^{-258}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 165:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 7.8 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+175}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.56000000000000004e59 or 1.2e175 < z

    1. Initial program 35.6%

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    8. Simplified73.0%

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

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

    if -1.56000000000000004e59 < z < -2.35000000000000002e-94 or 8e18 < z < 7.79999999999999967e121

    1. Initial program 74.9%

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

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

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

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

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

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

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

    if -2.35000000000000002e-94 < z < -6.4000000000000004e-258 or 1.5999999999999999e-111 < z < 165 or 7.79999999999999967e121 < z < 1.2e175

    1. Initial program 86.1%

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

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

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

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

    if -6.4000000000000004e-258 < z < 1.5999999999999999e-111

    1. Initial program 89.3%

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

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

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

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

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

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

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

    if 165 < z < 8e18

    1. Initial program 99.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.56 \cdot 10^{+59}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{-94}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{-258}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-111}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 165:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8 \cdot 10^{+18}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+121}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{+175}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 90.9% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.5%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 95.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}} \]
    6. Step-by-step derivation
      1. associate--l+95.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. associate-*r/95.1%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 67.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{if}\;a \leq -7900:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-74}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-203}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-257}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-96}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-64}:\\ \;\;\;\;x - \frac{y \cdot \left(x - t\right)}{a}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+18}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (/ (- t x) (/ a y)))))
   (if (<= a -7900.0)
     t_2
     (if (<= a -7.5e-74)
       t_1
       (if (<= a -8.5e-203)
         (* (- t x) (/ y (- a z)))
         (if (<= a -5.8e-257)
           t_1
           (if (<= a 2.45e-96)
             (+ t (* y (/ (- x t) z)))
             (if (<= a 5.5e-64)
               (- x (/ (* y (- x t)) a))
               (if (<= a 1.85e+18) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + ((t - x) / (a / y));
	double tmp;
	if (a <= -7900.0) {
		tmp = t_2;
	} else if (a <= -7.5e-74) {
		tmp = t_1;
	} else if (a <= -8.5e-203) {
		tmp = (t - x) * (y / (a - z));
	} else if (a <= -5.8e-257) {
		tmp = t_1;
	} else if (a <= 2.45e-96) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 5.5e-64) {
		tmp = x - ((y * (x - t)) / a);
	} else if (a <= 1.85e+18) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = x + ((t - x) / (a / y))
    if (a <= (-7900.0d0)) then
        tmp = t_2
    else if (a <= (-7.5d-74)) then
        tmp = t_1
    else if (a <= (-8.5d-203)) then
        tmp = (t - x) * (y / (a - z))
    else if (a <= (-5.8d-257)) then
        tmp = t_1
    else if (a <= 2.45d-96) then
        tmp = t + (y * ((x - t) / z))
    else if (a <= 5.5d-64) then
        tmp = x - ((y * (x - t)) / a)
    else if (a <= 1.85d+18) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + ((t - x) / (a / y));
	double tmp;
	if (a <= -7900.0) {
		tmp = t_2;
	} else if (a <= -7.5e-74) {
		tmp = t_1;
	} else if (a <= -8.5e-203) {
		tmp = (t - x) * (y / (a - z));
	} else if (a <= -5.8e-257) {
		tmp = t_1;
	} else if (a <= 2.45e-96) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 5.5e-64) {
		tmp = x - ((y * (x - t)) / a);
	} else if (a <= 1.85e+18) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + ((t - x) / (a / y))
	tmp = 0
	if a <= -7900.0:
		tmp = t_2
	elif a <= -7.5e-74:
		tmp = t_1
	elif a <= -8.5e-203:
		tmp = (t - x) * (y / (a - z))
	elif a <= -5.8e-257:
		tmp = t_1
	elif a <= 2.45e-96:
		tmp = t + (y * ((x - t) / z))
	elif a <= 5.5e-64:
		tmp = x - ((y * (x - t)) / a)
	elif a <= 1.85e+18:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x + Float64(Float64(t - x) / Float64(a / y)))
	tmp = 0.0
	if (a <= -7900.0)
		tmp = t_2;
	elseif (a <= -7.5e-74)
		tmp = t_1;
	elseif (a <= -8.5e-203)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	elseif (a <= -5.8e-257)
		tmp = t_1;
	elseif (a <= 2.45e-96)
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	elseif (a <= 5.5e-64)
		tmp = Float64(x - Float64(Float64(y * Float64(x - t)) / a));
	elseif (a <= 1.85e+18)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x + ((t - x) / (a / y));
	tmp = 0.0;
	if (a <= -7900.0)
		tmp = t_2;
	elseif (a <= -7.5e-74)
		tmp = t_1;
	elseif (a <= -8.5e-203)
		tmp = (t - x) * (y / (a - z));
	elseif (a <= -5.8e-257)
		tmp = t_1;
	elseif (a <= 2.45e-96)
		tmp = t + (y * ((x - t) / z));
	elseif (a <= 5.5e-64)
		tmp = x - ((y * (x - t)) / a);
	elseif (a <= 1.85e+18)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7900.0], t$95$2, If[LessEqual[a, -7.5e-74], t$95$1, If[LessEqual[a, -8.5e-203], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.8e-257], t$95$1, If[LessEqual[a, 2.45e-96], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e-64], N[(x - N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.85e+18], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -7.5 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq -5.8 \cdot 10^{-257}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;a \leq 1.85 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -7900 or 1.85e18 < a

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

    if -7900 < a < -7.5e-74 or -8.50000000000000031e-203 < a < -5.8000000000000003e-257 or 5.4999999999999999e-64 < a < 1.85e18

    1. Initial program 75.8%

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

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

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

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

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

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

    if -7.5e-74 < a < -8.50000000000000031e-203

    1. Initial program 81.0%

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

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

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

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

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

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

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

    if -5.8000000000000003e-257 < a < 2.45000000000000008e-96

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

    if 2.45000000000000008e-96 < a < 5.4999999999999999e-64

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7900:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-74}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-203}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-257}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-96}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-64}:\\ \;\;\;\;x - \frac{y \cdot \left(x - t\right)}{a}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+18}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 66.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + \frac{t - x}{\frac{a}{y}}\\ t_3 := y \cdot \left(x - t\right)\\ \mathbf{if}\;a \leq -26000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-203}:\\ \;\;\;\;\frac{t\_3}{z - a}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-257}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-96}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-65}:\\ \;\;\;\;x - \frac{t\_3}{a}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+18}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z))))
        (t_2 (+ x (/ (- t x) (/ a y))))
        (t_3 (* y (- x t))))
   (if (<= a -26000.0)
     t_2
     (if (<= a -1.75e-75)
       t_1
       (if (<= a -1e-203)
         (/ t_3 (- z a))
         (if (<= a -5e-257)
           t_1
           (if (<= a 2.45e-96)
             (+ t (* y (/ (- x t) z)))
             (if (<= a 1.45e-65)
               (- x (/ t_3 a))
               (if (<= a 2.7e+18) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + ((t - x) / (a / y));
	double t_3 = y * (x - t);
	double tmp;
	if (a <= -26000.0) {
		tmp = t_2;
	} else if (a <= -1.75e-75) {
		tmp = t_1;
	} else if (a <= -1e-203) {
		tmp = t_3 / (z - a);
	} else if (a <= -5e-257) {
		tmp = t_1;
	} else if (a <= 2.45e-96) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 1.45e-65) {
		tmp = x - (t_3 / a);
	} else if (a <= 2.7e+18) {
		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 * ((y - z) / (a - z))
    t_2 = x + ((t - x) / (a / y))
    t_3 = y * (x - t)
    if (a <= (-26000.0d0)) then
        tmp = t_2
    else if (a <= (-1.75d-75)) then
        tmp = t_1
    else if (a <= (-1d-203)) then
        tmp = t_3 / (z - a)
    else if (a <= (-5d-257)) then
        tmp = t_1
    else if (a <= 2.45d-96) then
        tmp = t + (y * ((x - t) / z))
    else if (a <= 1.45d-65) then
        tmp = x - (t_3 / a)
    else if (a <= 2.7d+18) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + ((t - x) / (a / y));
	double t_3 = y * (x - t);
	double tmp;
	if (a <= -26000.0) {
		tmp = t_2;
	} else if (a <= -1.75e-75) {
		tmp = t_1;
	} else if (a <= -1e-203) {
		tmp = t_3 / (z - a);
	} else if (a <= -5e-257) {
		tmp = t_1;
	} else if (a <= 2.45e-96) {
		tmp = t + (y * ((x - t) / z));
	} else if (a <= 1.45e-65) {
		tmp = x - (t_3 / a);
	} else if (a <= 2.7e+18) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + ((t - x) / (a / y))
	t_3 = y * (x - t)
	tmp = 0
	if a <= -26000.0:
		tmp = t_2
	elif a <= -1.75e-75:
		tmp = t_1
	elif a <= -1e-203:
		tmp = t_3 / (z - a)
	elif a <= -5e-257:
		tmp = t_1
	elif a <= 2.45e-96:
		tmp = t + (y * ((x - t) / z))
	elif a <= 1.45e-65:
		tmp = x - (t_3 / a)
	elif a <= 2.7e+18:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x + Float64(Float64(t - x) / Float64(a / y)))
	t_3 = Float64(y * Float64(x - t))
	tmp = 0.0
	if (a <= -26000.0)
		tmp = t_2;
	elseif (a <= -1.75e-75)
		tmp = t_1;
	elseif (a <= -1e-203)
		tmp = Float64(t_3 / Float64(z - a));
	elseif (a <= -5e-257)
		tmp = t_1;
	elseif (a <= 2.45e-96)
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	elseif (a <= 1.45e-65)
		tmp = Float64(x - Float64(t_3 / a));
	elseif (a <= 2.7e+18)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x + ((t - x) / (a / y));
	t_3 = y * (x - t);
	tmp = 0.0;
	if (a <= -26000.0)
		tmp = t_2;
	elseif (a <= -1.75e-75)
		tmp = t_1;
	elseif (a <= -1e-203)
		tmp = t_3 / (z - a);
	elseif (a <= -5e-257)
		tmp = t_1;
	elseif (a <= 2.45e-96)
		tmp = t + (y * ((x - t) / z));
	elseif (a <= 1.45e-65)
		tmp = x - (t_3 / a);
	elseif (a <= 2.7e+18)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -26000.0], t$95$2, If[LessEqual[a, -1.75e-75], t$95$1, If[LessEqual[a, -1e-203], N[(t$95$3 / N[(z - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5e-257], t$95$1, If[LessEqual[a, 2.45e-96], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.45e-65], N[(x - N[(t$95$3 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e+18], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.75 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -1 \cdot 10^{-203}:\\
\;\;\;\;\frac{t\_3}{z - a}\\

\mathbf{elif}\;a \leq -5 \cdot 10^{-257}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.45 \cdot 10^{-65}:\\
\;\;\;\;x - \frac{t\_3}{a}\\

\mathbf{elif}\;a \leq 2.7 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -26000 or 2.7e18 < a

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

    if -26000 < a < -1.74999999999999993e-75 or -1e-203 < a < -4.99999999999999989e-257 or 1.4499999999999999e-65 < a < 2.7e18

    1. Initial program 75.8%

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

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

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

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

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

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

    if -1.74999999999999993e-75 < a < -1e-203

    1. Initial program 81.0%

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

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

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

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

    if -4.99999999999999989e-257 < a < 2.45000000000000008e-96

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

    if 2.45000000000000008e-96 < a < 1.4499999999999999e-65

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -26000:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-75}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-203}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z - a}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-257}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-96}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{-65}:\\ \;\;\;\;x - \frac{y \cdot \left(x - t\right)}{a}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+18}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 70.8% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;a \leq -4.1 \cdot 10^{-199}:\\
\;\;\;\;\frac{t\_2}{z - a}\\

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

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-67}:\\
\;\;\;\;x - \frac{t\_2}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -1.06000000000000006e-8 or 5.3e13 < a

    1. Initial program 69.1%

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

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

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

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

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

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

    if -1.06000000000000006e-8 < a < -4.8e-31

    1. Initial program 77.8%

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    8. Simplified97.1%

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

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

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

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

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

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

        \[\leadsto t + x \cdot \color{blue}{\frac{a}{-z}} \]
    11. Simplified97.1%

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

    if -4.8e-31 < a < -4.10000000000000022e-199

    1. Initial program 80.9%

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

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

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

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

    if -4.10000000000000022e-199 < a < 2.45000000000000008e-96

    1. Initial program 64.6%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 84.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}} \]
    6. Step-by-step derivation
      1. associate--l+84.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. associate-*r/84.5%

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

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

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

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

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

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

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

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

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

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

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

    if 2.45000000000000008e-96 < a < 1.0500000000000001e-67

    1. Initial program 99.8%

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

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

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

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

    if 1.0500000000000001e-67 < a < 5.3e13

    1. Initial program 70.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.06 \cdot 10^{-8}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-31}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \mathbf{elif}\;a \leq -4.1 \cdot 10^{-199}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z - a}\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-96}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-67}:\\ \;\;\;\;x - \frac{y \cdot \left(x - t\right)}{a}\\ \mathbf{elif}\;a \leq 53000000000000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 49.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -2.8 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;a \leq 4.8 \cdot 10^{-44} \lor \neg \left(a \leq 8.9 \cdot 10^{+15}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2600 or 4.09999999999999993e-97 < a < 4.80000000000000017e-44 or 8.9e15 < a

    1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

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

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

    if -2600 < a < -2.79999999999999995e-52 or 4.80000000000000017e-44 < a < 8.9e15

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \frac{z}{a - z}} \]
    10. Applied egg-rr67.1%

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

    if -2.79999999999999995e-52 < a < -8.1999999999999998e-208

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    10. Applied egg-rr47.0%

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

    if -8.1999999999999998e-208 < a < 4.09999999999999993e-97

    1. Initial program 65.9%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. div-sub66.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2600:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-52}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-208}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;a \leq 4.1 \cdot 10^{-97}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-44} \lor \neg \left(a \leq 8.9 \cdot 10^{+15}\right):\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 49.8% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y \cdot t}{a}\\
\mathbf{if}\;a \leq -49000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -5 \cdot 10^{-53}:\\
\;\;\;\;t \cdot \frac{z}{z - a}\\

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

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

\mathbf{elif}\;a \leq 1.2 \cdot 10^{-43} \lor \neg \left(a \leq 1.08 \cdot 10^{+18}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -49000 or 2.45000000000000008e-96 < a < 1.2000000000000001e-43 or 1.08e18 < a

    1. Initial program 69.8%

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

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

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

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

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

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

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

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

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

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

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

    if -49000 < a < -5e-53

    1. Initial program 85.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \frac{z}{a - z}} \]
    10. Applied egg-rr65.6%

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

    if -5e-53 < a < -8.1999999999999998e-208

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    10. Applied egg-rr47.0%

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

    if -8.1999999999999998e-208 < a < 2.45000000000000008e-96

    1. Initial program 65.9%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. div-sub66.3%

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

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

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

    if 1.2000000000000001e-43 < a < 1.08e18

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \frac{z}{a - z}} \]
    10. Applied egg-rr68.7%

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      3. div-sub68.8%

        \[\leadsto -\frac{t}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      4. sub-neg68.8%

        \[\leadsto -\frac{t}{\color{blue}{\frac{a}{z} + \left(-\frac{z}{z}\right)}} \]
      5. *-inverses68.8%

        \[\leadsto -\frac{t}{\frac{a}{z} + \left(-\color{blue}{1}\right)} \]
      6. metadata-eval68.8%

        \[\leadsto -\frac{t}{\frac{a}{z} + \color{blue}{-1}} \]
    13. Simplified68.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -49000:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-53}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-208}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-96}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-43} \lor \neg \left(a \leq 1.08 \cdot 10^{+18}\right):\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{1 - \frac{a}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 36.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -3.9 \cdot 10^{-258}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 6 \cdot 10^{+92} \lor \neg \left(z \leq 4.4 \cdot 10^{+163}\right):\\
\;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\

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


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

    1. Initial program 36.4%

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

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

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

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

    if -2.10000000000000017e56 < z < -3.90000000000000004e-258 or 6.00000000000000026e92 < z < 4.39999999999999973e163

    1. Initial program 81.5%

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

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

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

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

    if -3.90000000000000004e-258 < z < 4.2999999999999999e-39

    1. Initial program 85.4%

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

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

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

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

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

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

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

    if 4.2999999999999999e-39 < z < 6.00000000000000026e92 or 4.39999999999999973e163 < z

    1. Initial program 66.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+56}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-258}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-39}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+92} \lor \neg \left(z \leq 4.4 \cdot 10^{+163}\right):\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 47.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y - a}{z}\\ t_2 := t \cdot \left(1 + \frac{a}{z}\right)\\ t_3 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+59}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-92}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+20}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+105}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ (- y a) z)))
        (t_2 (* t (+ 1.0 (/ a z))))
        (t_3 (+ x (/ (* y t) a))))
   (if (<= z -1.4e+59)
     t_2
     (if (<= z -2.2e-92)
       t_1
       (if (<= z 3e+20)
         t_3
         (if (<= z 4.1e+105) t_1 (if (<= z 4.4e+163) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * ((y - a) / z);
	double t_2 = t * (1.0 + (a / z));
	double t_3 = x + ((y * t) / a);
	double tmp;
	if (z <= -1.4e+59) {
		tmp = t_2;
	} else if (z <= -2.2e-92) {
		tmp = t_1;
	} else if (z <= 3e+20) {
		tmp = t_3;
	} else if (z <= 4.1e+105) {
		tmp = t_1;
	} else if (z <= 4.4e+163) {
		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 = x * ((y - a) / z)
    t_2 = t * (1.0d0 + (a / z))
    t_3 = x + ((y * t) / a)
    if (z <= (-1.4d+59)) then
        tmp = t_2
    else if (z <= (-2.2d-92)) then
        tmp = t_1
    else if (z <= 3d+20) then
        tmp = t_3
    else if (z <= 4.1d+105) then
        tmp = t_1
    else if (z <= 4.4d+163) 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 = x * ((y - a) / z);
	double t_2 = t * (1.0 + (a / z));
	double t_3 = x + ((y * t) / a);
	double tmp;
	if (z <= -1.4e+59) {
		tmp = t_2;
	} else if (z <= -2.2e-92) {
		tmp = t_1;
	} else if (z <= 3e+20) {
		tmp = t_3;
	} else if (z <= 4.1e+105) {
		tmp = t_1;
	} else if (z <= 4.4e+163) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * ((y - a) / z)
	t_2 = t * (1.0 + (a / z))
	t_3 = x + ((y * t) / a)
	tmp = 0
	if z <= -1.4e+59:
		tmp = t_2
	elif z <= -2.2e-92:
		tmp = t_1
	elif z <= 3e+20:
		tmp = t_3
	elif z <= 4.1e+105:
		tmp = t_1
	elif z <= 4.4e+163:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(y - a) / z))
	t_2 = Float64(t * Float64(1.0 + Float64(a / z)))
	t_3 = Float64(x + Float64(Float64(y * t) / a))
	tmp = 0.0
	if (z <= -1.4e+59)
		tmp = t_2;
	elseif (z <= -2.2e-92)
		tmp = t_1;
	elseif (z <= 3e+20)
		tmp = t_3;
	elseif (z <= 4.1e+105)
		tmp = t_1;
	elseif (z <= 4.4e+163)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * ((y - a) / z);
	t_2 = t * (1.0 + (a / z));
	t_3 = x + ((y * t) / a);
	tmp = 0.0;
	if (z <= -1.4e+59)
		tmp = t_2;
	elseif (z <= -2.2e-92)
		tmp = t_1;
	elseif (z <= 3e+20)
		tmp = t_3;
	elseif (z <= 4.1e+105)
		tmp = t_1;
	elseif (z <= 4.4e+163)
		tmp = t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+59], t$95$2, If[LessEqual[z, -2.2e-92], t$95$1, If[LessEqual[z, 3e+20], t$95$3, If[LessEqual[z, 4.1e+105], t$95$1, If[LessEqual[z, 4.4e+163], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.2 \cdot 10^{-92}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+20}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 4.1 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3999999999999999e59 or 4.39999999999999973e163 < z

    1. Initial program 36.1%

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

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

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

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

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

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

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

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

    if -1.3999999999999999e59 < z < -2.19999999999999987e-92 or 3e20 < z < 4.1000000000000002e105

    1. Initial program 78.5%

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

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

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

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

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

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

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

    if -2.19999999999999987e-92 < z < 3e20 or 4.1000000000000002e105 < z < 4.39999999999999973e163

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+59}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-92}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+20}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+105}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 47.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 + \frac{a}{z}\right)\\ t_2 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;z \leq -1.42 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-92}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+22}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+105}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (+ 1.0 (/ a z)))) (t_2 (+ x (/ (* y t) a))))
   (if (<= z -1.42e+59)
     t_1
     (if (<= z -2.2e-92)
       (/ x (/ z (- y a)))
       (if (<= z 5.8e+22)
         t_2
         (if (<= z 4.1e+105)
           (* x (/ (- y a) z))
           (if (<= z 4.4e+163) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 + (a / z));
	double t_2 = x + ((y * t) / a);
	double tmp;
	if (z <= -1.42e+59) {
		tmp = t_1;
	} else if (z <= -2.2e-92) {
		tmp = x / (z / (y - a));
	} else if (z <= 5.8e+22) {
		tmp = t_2;
	} else if (z <= 4.1e+105) {
		tmp = x * ((y - a) / z);
	} else if (z <= 4.4e+163) {
		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 = t * (1.0d0 + (a / z))
    t_2 = x + ((y * t) / a)
    if (z <= (-1.42d+59)) then
        tmp = t_1
    else if (z <= (-2.2d-92)) then
        tmp = x / (z / (y - a))
    else if (z <= 5.8d+22) then
        tmp = t_2
    else if (z <= 4.1d+105) then
        tmp = x * ((y - a) / z)
    else if (z <= 4.4d+163) 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 = t * (1.0 + (a / z));
	double t_2 = x + ((y * t) / a);
	double tmp;
	if (z <= -1.42e+59) {
		tmp = t_1;
	} else if (z <= -2.2e-92) {
		tmp = x / (z / (y - a));
	} else if (z <= 5.8e+22) {
		tmp = t_2;
	} else if (z <= 4.1e+105) {
		tmp = x * ((y - a) / z);
	} else if (z <= 4.4e+163) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 + (a / z))
	t_2 = x + ((y * t) / a)
	tmp = 0
	if z <= -1.42e+59:
		tmp = t_1
	elif z <= -2.2e-92:
		tmp = x / (z / (y - a))
	elif z <= 5.8e+22:
		tmp = t_2
	elif z <= 4.1e+105:
		tmp = x * ((y - a) / z)
	elif z <= 4.4e+163:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 + Float64(a / z)))
	t_2 = Float64(x + Float64(Float64(y * t) / a))
	tmp = 0.0
	if (z <= -1.42e+59)
		tmp = t_1;
	elseif (z <= -2.2e-92)
		tmp = Float64(x / Float64(z / Float64(y - a)));
	elseif (z <= 5.8e+22)
		tmp = t_2;
	elseif (z <= 4.1e+105)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= 4.4e+163)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 + (a / z));
	t_2 = x + ((y * t) / a);
	tmp = 0.0;
	if (z <= -1.42e+59)
		tmp = t_1;
	elseif (z <= -2.2e-92)
		tmp = x / (z / (y - a));
	elseif (z <= 5.8e+22)
		tmp = t_2;
	elseif (z <= 4.1e+105)
		tmp = x * ((y - a) / z);
	elseif (z <= 4.4e+163)
		tmp = t_2;
	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[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.42e+59], t$95$1, If[LessEqual[z, -2.2e-92], N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+22], t$95$2, If[LessEqual[z, 4.1e+105], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+163], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 5.8 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.42000000000000005e59 or 4.39999999999999973e163 < z

    1. Initial program 36.1%

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

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

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

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

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

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

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

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

    if -1.42000000000000005e59 < z < -2.19999999999999987e-92

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
    10. Applied egg-rr37.2%

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

    if -2.19999999999999987e-92 < z < 5.8e22 or 4.1000000000000002e105 < z < 4.39999999999999973e163

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

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

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

    if 5.8e22 < z < 4.1000000000000002e105

    1. Initial program 85.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.42 \cdot 10^{+59}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-92}:\\ \;\;\;\;\frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+22}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+105}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 47.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 + \frac{a}{z}\right)\\ t_2 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-92}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+22}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+104}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (+ 1.0 (/ a z)))) (t_2 (+ x (/ (* y t) a))))
   (if (<= z -1.8e+59)
     t_1
     (if (<= z -2.2e-92)
       (/ (* x (- y a)) z)
       (if (<= z 1.6e+22)
         t_2
         (if (<= z 2.1e+104)
           (* x (/ (- y a) z))
           (if (<= z 4.4e+163) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 + (a / z));
	double t_2 = x + ((y * t) / a);
	double tmp;
	if (z <= -1.8e+59) {
		tmp = t_1;
	} else if (z <= -2.2e-92) {
		tmp = (x * (y - a)) / z;
	} else if (z <= 1.6e+22) {
		tmp = t_2;
	} else if (z <= 2.1e+104) {
		tmp = x * ((y - a) / z);
	} else if (z <= 4.4e+163) {
		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 = t * (1.0d0 + (a / z))
    t_2 = x + ((y * t) / a)
    if (z <= (-1.8d+59)) then
        tmp = t_1
    else if (z <= (-2.2d-92)) then
        tmp = (x * (y - a)) / z
    else if (z <= 1.6d+22) then
        tmp = t_2
    else if (z <= 2.1d+104) then
        tmp = x * ((y - a) / z)
    else if (z <= 4.4d+163) 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 = t * (1.0 + (a / z));
	double t_2 = x + ((y * t) / a);
	double tmp;
	if (z <= -1.8e+59) {
		tmp = t_1;
	} else if (z <= -2.2e-92) {
		tmp = (x * (y - a)) / z;
	} else if (z <= 1.6e+22) {
		tmp = t_2;
	} else if (z <= 2.1e+104) {
		tmp = x * ((y - a) / z);
	} else if (z <= 4.4e+163) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 + (a / z))
	t_2 = x + ((y * t) / a)
	tmp = 0
	if z <= -1.8e+59:
		tmp = t_1
	elif z <= -2.2e-92:
		tmp = (x * (y - a)) / z
	elif z <= 1.6e+22:
		tmp = t_2
	elif z <= 2.1e+104:
		tmp = x * ((y - a) / z)
	elif z <= 4.4e+163:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 + Float64(a / z)))
	t_2 = Float64(x + Float64(Float64(y * t) / a))
	tmp = 0.0
	if (z <= -1.8e+59)
		tmp = t_1;
	elseif (z <= -2.2e-92)
		tmp = Float64(Float64(x * Float64(y - a)) / z);
	elseif (z <= 1.6e+22)
		tmp = t_2;
	elseif (z <= 2.1e+104)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= 4.4e+163)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 + (a / z));
	t_2 = x + ((y * t) / a);
	tmp = 0.0;
	if (z <= -1.8e+59)
		tmp = t_1;
	elseif (z <= -2.2e-92)
		tmp = (x * (y - a)) / z;
	elseif (z <= 1.6e+22)
		tmp = t_2;
	elseif (z <= 2.1e+104)
		tmp = x * ((y - a) / z);
	elseif (z <= 4.4e+163)
		tmp = t_2;
	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[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+59], t$95$1, If[LessEqual[z, -2.2e-92], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.6e+22], t$95$2, If[LessEqual[z, 2.1e+104], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+163], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.7999999999999999e59 or 4.39999999999999973e163 < z

    1. Initial program 36.1%

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

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

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

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

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

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

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

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

    if -1.7999999999999999e59 < z < -2.19999999999999987e-92

    1. Initial program 74.0%

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

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

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

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

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

    if -2.19999999999999987e-92 < z < 1.6e22 or 2.0999999999999998e104 < z < 4.39999999999999973e163

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1.6e22 < z < 2.0999999999999998e104

    1. Initial program 85.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+59}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-92}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+22}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+104}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 50.2% 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}\\ \mathbf{if}\;z \leq -1.25 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-92}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+22}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+106}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\ \;\;\;\;t\_2\\ \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 (+ x (/ (* y t) a))))
   (if (<= z -1.25e+59)
     t_1
     (if (<= z -2.2e-92)
       (/ (* x (- y a)) z)
       (if (<= z 6.8e+22)
         t_2
         (if (<= z 5.2e+106)
           (* x (/ (- y a) z))
           (if (<= z 4.4e+163) t_2 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 = x + ((y * t) / a);
	double tmp;
	if (z <= -1.25e+59) {
		tmp = t_1;
	} else if (z <= -2.2e-92) {
		tmp = (x * (y - a)) / z;
	} else if (z <= 6.8e+22) {
		tmp = t_2;
	} else if (z <= 5.2e+106) {
		tmp = x * ((y - a) / z);
	} else if (z <= 4.4e+163) {
		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 = t * (1.0d0 - (y / z))
    t_2 = x + ((y * t) / a)
    if (z <= (-1.25d+59)) then
        tmp = t_1
    else if (z <= (-2.2d-92)) then
        tmp = (x * (y - a)) / z
    else if (z <= 6.8d+22) then
        tmp = t_2
    else if (z <= 5.2d+106) then
        tmp = x * ((y - a) / z)
    else if (z <= 4.4d+163) 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 = t * (1.0 - (y / z));
	double t_2 = x + ((y * t) / a);
	double tmp;
	if (z <= -1.25e+59) {
		tmp = t_1;
	} else if (z <= -2.2e-92) {
		tmp = (x * (y - a)) / z;
	} else if (z <= 6.8e+22) {
		tmp = t_2;
	} else if (z <= 5.2e+106) {
		tmp = x * ((y - a) / z);
	} else if (z <= 4.4e+163) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	t_2 = x + ((y * t) / a)
	tmp = 0
	if z <= -1.25e+59:
		tmp = t_1
	elif z <= -2.2e-92:
		tmp = (x * (y - a)) / z
	elif z <= 6.8e+22:
		tmp = t_2
	elif z <= 5.2e+106:
		tmp = x * ((y - a) / z)
	elif z <= 4.4e+163:
		tmp = t_2
	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(x + Float64(Float64(y * t) / a))
	tmp = 0.0
	if (z <= -1.25e+59)
		tmp = t_1;
	elseif (z <= -2.2e-92)
		tmp = Float64(Float64(x * Float64(y - a)) / z);
	elseif (z <= 6.8e+22)
		tmp = t_2;
	elseif (z <= 5.2e+106)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= 4.4e+163)
		tmp = t_2;
	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 = x + ((y * t) / a);
	tmp = 0.0;
	if (z <= -1.25e+59)
		tmp = t_1;
	elseif (z <= -2.2e-92)
		tmp = (x * (y - a)) / z;
	elseif (z <= 6.8e+22)
		tmp = t_2;
	elseif (z <= 5.2e+106)
		tmp = x * ((y - a) / z);
	elseif (z <= 4.4e+163)
		tmp = t_2;
	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[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+59], t$95$1, If[LessEqual[z, -2.2e-92], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 6.8e+22], t$95$2, If[LessEqual[z, 5.2e+106], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+163], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 6.8 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.2499999999999999e59 or 4.39999999999999973e163 < z

    1. Initial program 36.1%

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. div-sub64.7%

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

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

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

    if -1.2499999999999999e59 < z < -2.19999999999999987e-92

    1. Initial program 74.0%

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

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

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

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

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

    if -2.19999999999999987e-92 < z < 6.8e22 or 5.20000000000000039e106 < z < 4.39999999999999973e163

    1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

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

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

    if 6.8e22 < z < 5.20000000000000039e106

    1. Initial program 85.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+59}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-92}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+22}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+106}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+163}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 71.0% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.6000000000000001e-8 or 2.45000000000000008e-96 < a

    1. Initial program 70.7%

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

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

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

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

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

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

    if -1.6000000000000001e-8 < a < -2.34999999999999985e-30

    1. Initial program 77.8%

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    8. Simplified97.1%

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

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

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

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

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

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

        \[\leadsto t + x \cdot \color{blue}{\frac{a}{-z}} \]
    11. Simplified97.1%

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

    if -2.34999999999999985e-30 < a < -8.1999999999999998e-208

    1. Initial program 76.9%

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

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

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

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

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

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

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

    if -8.1999999999999998e-208 < a < 2.45000000000000008e-96

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{-8}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -2.35 \cdot 10^{-30}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-208}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{-96}:\\ \;\;\;\;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 18: 57.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -2 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 3.9 \cdot 10^{+146}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.8e5

    1. Initial program 76.2%

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

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

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

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

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

        \[\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}}} \]
    6. Applied egg-rr92.9%

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

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

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

    if -3.8e5 < a < -2.0000000000000001e-142 or -9.0000000000000003e-203 < a < 3.9e146

    1. Initial program 68.6%

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

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

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

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

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

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

    if -2.0000000000000001e-142 < a < -9.0000000000000003e-203

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

    if 3.9e146 < a

    1. Initial program 56.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + x \cdot \color{blue}{\frac{-y}{a}} \]
    10. Simplified59.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -380000:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -2 \cdot 10^{-142}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -9 \cdot 10^{-203}:\\ \;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+146}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 57.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -3.4 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.8e5

    1. Initial program 76.2%

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

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

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

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

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

        \[\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}}} \]
    6. Applied egg-rr92.9%

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

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

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

    if -3.8e5 < a < -3.40000000000000015e-75 or -3.2e-204 < a < 1.2e144

    1. Initial program 68.9%

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

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

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

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

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

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

    if -3.40000000000000015e-75 < a < -3.2e-204

    1. Initial program 81.0%

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

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

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

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

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

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

    if 1.2e144 < a

    1. Initial program 56.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + x \cdot \color{blue}{\frac{-y}{a}} \]
    10. Simplified59.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -380000:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -3.4 \cdot 10^{-75}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-204}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{+144}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 57.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -1.08 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.22 \cdot 10^{+147}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.8e5

    1. Initial program 76.2%

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

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

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

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

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

        \[\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}}} \]
    6. Applied egg-rr92.9%

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

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

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

    if -3.8e5 < a < -1.08e-75 or -3.4000000000000002e-204 < a < 1.21999999999999996e147

    1. Initial program 68.9%

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

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

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

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

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

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

    if -1.08e-75 < a < -3.4000000000000002e-204

    1. Initial program 81.0%

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

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

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

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

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

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

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

    if 1.21999999999999996e147 < a

    1. Initial program 56.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + x \cdot \color{blue}{\frac{-y}{a}} \]
    10. Simplified59.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -380000:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -1.08 \cdot 10^{-75}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -3.4 \cdot 10^{-204}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{+147}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 63.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x - y \cdot \frac{x - t}{a}\\
\mathbf{if}\;a \leq -43000:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -3.6 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 9 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -43000 or 9e16 < a

    1. Initial program 68.1%

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

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

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

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

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

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

    if -43000 < a < -3.6e-75 or -2.10000000000000002e-203 < a < 9e16

    1. Initial program 70.5%

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

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

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

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

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

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

    if -3.6e-75 < a < -2.10000000000000002e-203

    1. Initial program 81.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -43000:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-75}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-203}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+16}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 63.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -5 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -44000

    1. Initial program 76.2%

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

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

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

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

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

        \[\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}}} \]
    6. Applied egg-rr92.9%

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

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

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

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

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

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

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

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

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

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

    if -44000 < a < -4.99999999999999998e-74 or -7.50000000000000027e-203 < a < 1.4e18

    1. Initial program 70.5%

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

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

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

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

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

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

    if -4.99999999999999998e-74 < a < -7.50000000000000027e-203

    1. Initial program 81.0%

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

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

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

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

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

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

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

    if 1.4e18 < a

    1. Initial program 59.4%

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    7. Simplified67.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -44000:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-74}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -7.5 \cdot 10^{-203}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+18}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{x - t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 63.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -8.2 \cdot 10^{-74}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 4.2 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.4e5 or 4.2e19 < a

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

    if -1.4e5 < a < -8.20000000000000063e-74 or -9.40000000000000012e-203 < a < 4.2e19

    1. Initial program 70.5%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 58.6%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Step-by-step derivation
      1. associate-/l*69.9%

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified69.9%

      \[\leadsto \color{blue}{t \cdot \frac{y - z}{a - z}} \]

    if -8.20000000000000063e-74 < a < -9.40000000000000012e-203

    1. Initial program 81.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*78.2%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified78.2%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around -inf 81.6%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    6. Step-by-step derivation
      1. *-commutative81.6%

        \[\leadsto \frac{\color{blue}{\left(t - x\right) \cdot y}}{a - z} \]
      2. associate-/l*81.4%

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a - z}} \]
    7. Applied egg-rr81.4%

      \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -140000:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-74}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -9.4 \cdot 10^{-203}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+19}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 51.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;a \leq -55000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-31}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-208}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;a \leq 3000000000000:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* y t) a))))
   (if (<= a -55000.0)
     t_1
     (if (<= a -2.25e-31)
       (* t (/ z (- z a)))
       (if (<= a -8.2e-208)
         (* x (/ y (- z a)))
         (if (<= a 3000000000000.0) (* t (- 1.0 (/ y z))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y * t) / a);
	double tmp;
	if (a <= -55000.0) {
		tmp = t_1;
	} else if (a <= -2.25e-31) {
		tmp = t * (z / (z - a));
	} else if (a <= -8.2e-208) {
		tmp = x * (y / (z - a));
	} else if (a <= 3000000000000.0) {
		tmp = t * (1.0 - (y / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + ((y * t) / a)
    if (a <= (-55000.0d0)) then
        tmp = t_1
    else if (a <= (-2.25d-31)) then
        tmp = t * (z / (z - a))
    else if (a <= (-8.2d-208)) then
        tmp = x * (y / (z - a))
    else if (a <= 3000000000000.0d0) then
        tmp = t * (1.0d0 - (y / z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y * t) / a);
	double tmp;
	if (a <= -55000.0) {
		tmp = t_1;
	} else if (a <= -2.25e-31) {
		tmp = t * (z / (z - a));
	} else if (a <= -8.2e-208) {
		tmp = x * (y / (z - a));
	} else if (a <= 3000000000000.0) {
		tmp = t * (1.0 - (y / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y * t) / a)
	tmp = 0
	if a <= -55000.0:
		tmp = t_1
	elif a <= -2.25e-31:
		tmp = t * (z / (z - a))
	elif a <= -8.2e-208:
		tmp = x * (y / (z - a))
	elif a <= 3000000000000.0:
		tmp = t * (1.0 - (y / z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y * t) / a))
	tmp = 0.0
	if (a <= -55000.0)
		tmp = t_1;
	elseif (a <= -2.25e-31)
		tmp = Float64(t * Float64(z / Float64(z - a)));
	elseif (a <= -8.2e-208)
		tmp = Float64(x * Float64(y / Float64(z - a)));
	elseif (a <= 3000000000000.0)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y * t) / a);
	tmp = 0.0;
	if (a <= -55000.0)
		tmp = t_1;
	elseif (a <= -2.25e-31)
		tmp = t * (z / (z - a));
	elseif (a <= -8.2e-208)
		tmp = x * (y / (z - a));
	elseif (a <= 3000000000000.0)
		tmp = t * (1.0 - (y / z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -55000.0], t$95$1, If[LessEqual[a, -2.25e-31], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -8.2e-208], N[(x * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3000000000000.0], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y \cdot t}{a}\\
\mathbf{if}\;a \leq -55000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -2.25 \cdot 10^{-31}:\\
\;\;\;\;t \cdot \frac{z}{z - a}\\

\mathbf{elif}\;a \leq -8.2 \cdot 10^{-208}:\\
\;\;\;\;x \cdot \frac{y}{z - a}\\

\mathbf{elif}\;a \leq 3000000000000:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -55000 or 3e12 < a

    1. Initial program 68.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*87.2%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified87.2%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative87.2%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
      2. associate-*l/68.3%

        \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
      3. associate-*r/90.4%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
      4. clear-num90.4%

        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
      5. un-div-inv90.4%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    6. Applied egg-rr90.4%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    7. Taylor expanded in z around 0 72.4%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y}}} \]
    8. Taylor expanded in t around inf 55.1%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]

    if -55000 < a < -2.2500000000000002e-31

    1. Initial program 84.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*75.1%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified75.1%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 80.5%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Taylor expanded in y around 0 71.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    7. Step-by-step derivation
      1. associate-*r/71.4%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot z\right)}{a - z}} \]
      2. associate-*r*71.4%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot t\right) \cdot z}}{a - z} \]
      3. mul-1-neg71.4%

        \[\leadsto \frac{\color{blue}{\left(-t\right)} \cdot z}{a - z} \]
    8. Simplified71.4%

      \[\leadsto \color{blue}{\frac{\left(-t\right) \cdot z}{a - z}} \]
    9. Step-by-step derivation
      1. associate-/l*71.6%

        \[\leadsto \color{blue}{\left(-t\right) \cdot \frac{z}{a - z}} \]
      2. distribute-lft-neg-out71.6%

        \[\leadsto \color{blue}{-t \cdot \frac{z}{a - z}} \]
    10. Applied egg-rr71.6%

      \[\leadsto \color{blue}{-t \cdot \frac{z}{a - z}} \]

    if -2.2500000000000002e-31 < a < -8.1999999999999998e-208

    1. Initial program 76.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*77.7%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified77.7%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around -inf 74.5%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    6. Taylor expanded in t around 0 51.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg51.7%

        \[\leadsto \color{blue}{-\frac{x \cdot y}{a - z}} \]
      2. associate-/l*51.6%

        \[\leadsto -\color{blue}{x \cdot \frac{y}{a - z}} \]
      3. distribute-rgt-neg-in51.6%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{a - z}\right)} \]
      4. distribute-frac-neg251.6%

        \[\leadsto x \cdot \color{blue}{\frac{y}{-\left(a - z\right)}} \]
      5. sub-neg51.6%

        \[\leadsto x \cdot \frac{y}{-\color{blue}{\left(a + \left(-z\right)\right)}} \]
      6. distribute-neg-in51.6%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-z\right)\right)}} \]
      7. remove-double-neg51.6%

        \[\leadsto x \cdot \frac{y}{\left(-a\right) + \color{blue}{z}} \]
    8. Simplified51.6%

      \[\leadsto \color{blue}{x \cdot \frac{y}{\left(-a\right) + z}} \]

    if -8.1999999999999998e-208 < a < 3e12

    1. Initial program 69.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*77.7%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified77.7%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 56.3%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Taylor expanded in a around 0 46.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot \left(y - z\right)}{z}} \]
    7. Step-by-step derivation
      1. mul-1-neg46.9%

        \[\leadsto \color{blue}{-\frac{t \cdot \left(y - z\right)}{z}} \]
      2. associate-/l*60.6%

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. div-sub60.6%

        \[\leadsto -t \cdot \color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)} \]
      4. *-inverses60.6%

        \[\leadsto -t \cdot \left(\frac{y}{z} - \color{blue}{1}\right) \]
    8. Simplified60.6%

      \[\leadsto \color{blue}{-t \cdot \left(\frac{y}{z} - 1\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification57.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -55000:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq -2.25 \cdot 10^{-31}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;a \leq -8.2 \cdot 10^{-208}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;a \leq 3000000000000:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 83.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+176}:\\ \;\;\;\;t + a \cdot \frac{t - x}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+225}:\\ \;\;\;\;x - \left(y - z\right) \cdot \frac{x - t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.2e+176)
   (+ t (* a (/ (- t x) z)))
   (if (<= z 5.8e+225)
     (- x (* (- y z) (/ (- x t) (- a z))))
     (- t (* x (/ a z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.2e+176) {
		tmp = t + (a * ((t - x) / z));
	} else if (z <= 5.8e+225) {
		tmp = x - ((y - z) * ((x - t) / (a - z)));
	} else {
		tmp = t - (x * (a / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-2.2d+176)) then
        tmp = t + (a * ((t - x) / z))
    else if (z <= 5.8d+225) then
        tmp = x - ((y - z) * ((x - t) / (a - z)))
    else
        tmp = t - (x * (a / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.2e+176) {
		tmp = t + (a * ((t - x) / z));
	} else if (z <= 5.8e+225) {
		tmp = x - ((y - z) * ((x - t) / (a - z)));
	} else {
		tmp = t - (x * (a / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.2e+176:
		tmp = t + (a * ((t - x) / z))
	elif z <= 5.8e+225:
		tmp = x - ((y - z) * ((x - t) / (a - z)))
	else:
		tmp = t - (x * (a / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.2e+176)
		tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z)));
	elseif (z <= 5.8e+225)
		tmp = Float64(x - Float64(Float64(y - z) * Float64(Float64(x - t) / Float64(a - z))));
	else
		tmp = Float64(t - Float64(x * Float64(a / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.2e+176)
		tmp = t + (a * ((t - x) / z));
	elseif (z <= 5.8e+225)
		tmp = x - ((y - z) * ((x - t) / (a - z)));
	else
		tmp = t - (x * (a / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.2e+176], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+225], N[(x - N[(N[(y - z), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(x * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+176}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{+225}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{x - t}{a - z}\\

\mathbf{else}:\\
\;\;\;\;t - x \cdot \frac{a}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.20000000000000007e176

    1. Initial program 28.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*42.9%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified42.9%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around -inf 54.1%

      \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
    6. Taylor expanded in y around 0 49.2%

      \[\leadsto \color{blue}{t + \frac{a \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/78.8%

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    8. Simplified78.8%

      \[\leadsto \color{blue}{t + a \cdot \frac{t - x}{z}} \]

    if -2.20000000000000007e176 < z < 5.8000000000000003e225

    1. Initial program 78.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*88.3%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified88.3%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing

    if 5.8000000000000003e225 < z

    1. Initial program 13.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*59.8%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified59.8%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around -inf 68.3%

      \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
    6. Taylor expanded in y around 0 76.1%

      \[\leadsto \color{blue}{t + \frac{a \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/92.0%

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    8. Simplified92.0%

      \[\leadsto \color{blue}{t + a \cdot \frac{t - x}{z}} \]
    9. Taylor expanded in t around 0 76.1%

      \[\leadsto t + \color{blue}{-1 \cdot \frac{a \cdot x}{z}} \]
    10. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto t + -1 \cdot \color{blue}{\left(\frac{a}{z} \cdot x\right)} \]
      2. associate-*l*99.9%

        \[\leadsto t + \color{blue}{\left(-1 \cdot \frac{a}{z}\right) \cdot x} \]
      3. *-commutative99.9%

        \[\leadsto t + \color{blue}{x \cdot \left(-1 \cdot \frac{a}{z}\right)} \]
      4. mul-1-neg99.9%

        \[\leadsto t + x \cdot \color{blue}{\left(-\frac{a}{z}\right)} \]
      5. distribute-frac-neg299.9%

        \[\leadsto t + x \cdot \color{blue}{\frac{a}{-z}} \]
    11. Simplified99.9%

      \[\leadsto t + \color{blue}{x \cdot \frac{a}{-z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification87.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+176}:\\ \;\;\;\;t + a \cdot \frac{t - x}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{+225}:\\ \;\;\;\;x - \left(y - z\right) \cdot \frac{x - t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 52.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - x \cdot \frac{a}{z}\\ \mathbf{if}\;z \leq -3.4 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-91}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+22}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (* x (/ a z)))))
   (if (<= z -3.4e+24)
     t_1
     (if (<= z -1.12e-91)
       (* x (/ y (- z a)))
       (if (<= z 3e+22) (+ x (/ (* y t) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - (x * (a / z));
	double tmp;
	if (z <= -3.4e+24) {
		tmp = t_1;
	} else if (z <= -1.12e-91) {
		tmp = x * (y / (z - a));
	} else if (z <= 3e+22) {
		tmp = x + ((y * t) / 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 - (x * (a / z))
    if (z <= (-3.4d+24)) then
        tmp = t_1
    else if (z <= (-1.12d-91)) then
        tmp = x * (y / (z - a))
    else if (z <= 3d+22) then
        tmp = x + ((y * t) / 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 - (x * (a / z));
	double tmp;
	if (z <= -3.4e+24) {
		tmp = t_1;
	} else if (z <= -1.12e-91) {
		tmp = x * (y / (z - a));
	} else if (z <= 3e+22) {
		tmp = x + ((y * t) / a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - (x * (a / z))
	tmp = 0
	if z <= -3.4e+24:
		tmp = t_1
	elif z <= -1.12e-91:
		tmp = x * (y / (z - a))
	elif z <= 3e+22:
		tmp = x + ((y * t) / a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(x * Float64(a / z)))
	tmp = 0.0
	if (z <= -3.4e+24)
		tmp = t_1;
	elseif (z <= -1.12e-91)
		tmp = Float64(x * Float64(y / Float64(z - a)));
	elseif (z <= 3e+22)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - (x * (a / z));
	tmp = 0.0;
	if (z <= -3.4e+24)
		tmp = t_1;
	elseif (z <= -1.12e-91)
		tmp = x * (y / (z - a));
	elseif (z <= 3e+22)
		tmp = x + ((y * t) / a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(x * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e+24], t$95$1, If[LessEqual[z, -1.12e-91], N[(x * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+22], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t - x \cdot \frac{a}{z}\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.12 \cdot 10^{-91}:\\
\;\;\;\;x \cdot \frac{y}{z - a}\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+22}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.4000000000000001e24 or 3e22 < z

    1. Initial program 47.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*68.9%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified68.9%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around -inf 61.1%

      \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
    6. Taylor expanded in y around 0 50.0%

      \[\leadsto \color{blue}{t + \frac{a \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-*r/60.1%

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    8. Simplified60.1%

      \[\leadsto \color{blue}{t + a \cdot \frac{t - x}{z}} \]
    9. Taylor expanded in t around 0 54.1%

      \[\leadsto t + \color{blue}{-1 \cdot \frac{a \cdot x}{z}} \]
    10. Step-by-step derivation
      1. associate-*l/60.8%

        \[\leadsto t + -1 \cdot \color{blue}{\left(\frac{a}{z} \cdot x\right)} \]
      2. associate-*l*60.8%

        \[\leadsto t + \color{blue}{\left(-1 \cdot \frac{a}{z}\right) \cdot x} \]
      3. *-commutative60.8%

        \[\leadsto t + \color{blue}{x \cdot \left(-1 \cdot \frac{a}{z}\right)} \]
      4. mul-1-neg60.8%

        \[\leadsto t + x \cdot \color{blue}{\left(-\frac{a}{z}\right)} \]
      5. distribute-frac-neg260.8%

        \[\leadsto t + x \cdot \color{blue}{\frac{a}{-z}} \]
    11. Simplified60.8%

      \[\leadsto t + \color{blue}{x \cdot \frac{a}{-z}} \]

    if -3.4000000000000001e24 < z < -1.12e-91

    1. Initial program 74.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*83.3%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified83.3%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around -inf 56.5%

      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
    6. Taylor expanded in t around 0 44.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg44.3%

        \[\leadsto \color{blue}{-\frac{x \cdot y}{a - z}} \]
      2. associate-/l*48.5%

        \[\leadsto -\color{blue}{x \cdot \frac{y}{a - z}} \]
      3. distribute-rgt-neg-in48.5%

        \[\leadsto \color{blue}{x \cdot \left(-\frac{y}{a - z}\right)} \]
      4. distribute-frac-neg248.5%

        \[\leadsto x \cdot \color{blue}{\frac{y}{-\left(a - z\right)}} \]
      5. sub-neg48.5%

        \[\leadsto x \cdot \frac{y}{-\color{blue}{\left(a + \left(-z\right)\right)}} \]
      6. distribute-neg-in48.5%

        \[\leadsto x \cdot \frac{y}{\color{blue}{\left(-a\right) + \left(-\left(-z\right)\right)}} \]
      7. remove-double-neg48.5%

        \[\leadsto x \cdot \frac{y}{\left(-a\right) + \color{blue}{z}} \]
    8. Simplified48.5%

      \[\leadsto \color{blue}{x \cdot \frac{y}{\left(-a\right) + z}} \]

    if -1.12e-91 < z < 3e22

    1. Initial program 91.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*94.5%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified94.5%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative94.5%

        \[\leadsto x + \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} \]
      2. associate-*l/91.3%

        \[\leadsto x + \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} \]
      3. associate-*r/96.7%

        \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} \]
      4. clear-num96.7%

        \[\leadsto x + \left(t - x\right) \cdot \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \]
      5. un-div-inv96.8%

        \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    6. Applied egg-rr96.8%

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    7. Taylor expanded in z around 0 78.1%

      \[\leadsto x + \frac{t - x}{\color{blue}{\frac{a}{y}}} \]
    8. Taylor expanded in t around inf 59.2%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+24}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-91}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+22}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t - x \cdot \frac{a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 36.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+54}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-257}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-38}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -9.2e+54)
   t
   (if (<= z -2.7e-257) x (if (<= z 2.05e-38) (* t (/ y a)) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9.2e+54) {
		tmp = t;
	} else if (z <= -2.7e-257) {
		tmp = x;
	} else if (z <= 2.05e-38) {
		tmp = t * (y / a);
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-9.2d+54)) then
        tmp = t
    else if (z <= (-2.7d-257)) then
        tmp = x
    else if (z <= 2.05d-38) then
        tmp = t * (y / a)
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -9.2e+54) {
		tmp = t;
	} else if (z <= -2.7e-257) {
		tmp = x;
	} else if (z <= 2.05e-38) {
		tmp = t * (y / a);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -9.2e+54:
		tmp = t
	elif z <= -2.7e-257:
		tmp = x
	elif z <= 2.05e-38:
		tmp = t * (y / a)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -9.2e+54)
		tmp = t;
	elseif (z <= -2.7e-257)
		tmp = x;
	elseif (z <= 2.05e-38)
		tmp = Float64(t * Float64(y / a));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -9.2e+54)
		tmp = t;
	elseif (z <= -2.7e-257)
		tmp = x;
	elseif (z <= 2.05e-38)
		tmp = t * (y / a);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e+54], t, If[LessEqual[z, -2.7e-257], x, If[LessEqual[z, 2.05e-38], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+54}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -2.7 \cdot 10^{-257}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.05 \cdot 10^{-38}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.19999999999999977e54 or 2.0499999999999999e-38 < z

    1. Initial program 52.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*72.2%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified72.2%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 47.0%

      \[\leadsto \color{blue}{t} \]

    if -9.19999999999999977e54 < z < -2.6999999999999999e-257

    1. Initial program 88.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*90.6%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified90.6%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 33.0%

      \[\leadsto \color{blue}{x} \]

    if -2.6999999999999999e-257 < z < 2.0499999999999999e-38

    1. Initial program 85.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*92.5%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified92.5%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 46.7%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Taylor expanded in z around 0 39.0%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*46.8%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified46.8%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+54}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-257}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-38}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 28: 36.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+54}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-257}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-38}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.8e+54)
   t
   (if (<= z -1.15e-257) x (if (<= z 6.6e-38) (/ t (/ a y)) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.8e+54) {
		tmp = t;
	} else if (z <= -1.15e-257) {
		tmp = x;
	} else if (z <= 6.6e-38) {
		tmp = t / (a / y);
	} 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.8d+54)) then
        tmp = t
    else if (z <= (-1.15d-257)) then
        tmp = x
    else if (z <= 6.6d-38) then
        tmp = t / (a / y)
    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.8e+54) {
		tmp = t;
	} else if (z <= -1.15e-257) {
		tmp = x;
	} else if (z <= 6.6e-38) {
		tmp = t / (a / y);
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6.8e+54:
		tmp = t
	elif z <= -1.15e-257:
		tmp = x
	elif z <= 6.6e-38:
		tmp = t / (a / y)
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.8e+54)
		tmp = t;
	elseif (z <= -1.15e-257)
		tmp = x;
	elseif (z <= 6.6e-38)
		tmp = Float64(t / Float64(a / y));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6.8e+54)
		tmp = t;
	elseif (z <= -1.15e-257)
		tmp = x;
	elseif (z <= 6.6e-38)
		tmp = t / (a / y);
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e+54], t, If[LessEqual[z, -1.15e-257], x, If[LessEqual[z, 6.6e-38], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+54}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -1.15 \cdot 10^{-257}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 6.6 \cdot 10^{-38}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.8000000000000001e54 or 6.6000000000000005e-38 < z

    1. Initial program 52.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*72.2%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified72.2%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 47.0%

      \[\leadsto \color{blue}{t} \]

    if -6.8000000000000001e54 < z < -1.15e-257

    1. Initial program 88.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*90.6%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified90.6%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 33.0%

      \[\leadsto \color{blue}{x} \]

    if -1.15e-257 < z < 6.6000000000000005e-38

    1. Initial program 85.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*92.5%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified92.5%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 46.7%

      \[\leadsto \color{blue}{\frac{t \cdot \left(y - z\right)}{a - z}} \]
    6. Taylor expanded in z around 0 39.0%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*46.8%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified46.8%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    9. Step-by-step derivation
      1. clear-num46.8%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. div-inv46.9%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    10. Applied egg-rr46.9%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+54}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-257}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-38}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 29: 37.7% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+55}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{-39}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.4e+55) t (if (<= z 4.9e-39) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.4e+55) {
		tmp = t;
	} else if (z <= 4.9e-39) {
		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 <= (-1.4d+55)) then
        tmp = t
    else if (z <= 4.9d-39) 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 <= -1.4e+55) {
		tmp = t;
	} else if (z <= 4.9e-39) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.4e+55:
		tmp = t
	elif z <= 4.9e-39:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.4e+55)
		tmp = t;
	elseif (z <= 4.9e-39)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.4e+55)
		tmp = t;
	elseif (z <= 4.9e-39)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.4e+55], t, If[LessEqual[z, 4.9e-39], x, t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+55}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 4.9 \cdot 10^{-39}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;t\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e55 or 4.89999999999999974e-39 < z

    1. Initial program 52.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*72.2%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified72.2%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 47.0%

      \[\leadsto \color{blue}{t} \]

    if -1.4e55 < z < 4.89999999999999974e-39

    1. Initial program 87.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*91.6%

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    3. Simplified91.6%

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 29.4%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+55}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{-39}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 30: 24.5% 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 70.4%

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Step-by-step derivation
    1. associate-/l*82.2%

      \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
  3. Simplified82.2%

    \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
  4. Add Preprocessing
  5. Taylor expanded in z around inf 25.5%

    \[\leadsto \color{blue}{t} \]
  6. Final simplification25.5%

    \[\leadsto t \]
  7. Add Preprocessing

Developer target: 83.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (* (/ y z) (- t x)))))
   (if (< z -1.2536131056095036e+188)
     t_1
     (if (< z 4.446702369113811e+64)
       (+ x (/ (- y z) (/ (- a z) (- t x))))
       t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t - ((y / z) * (t - x))
    if (z < (-1.2536131056095036d+188)) then
        tmp = t_1
    else if (z < 4.446702369113811d+64) then
        tmp = x + ((y - z) / ((a - z) / (t - x)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - ((y / z) * (t - x))
	tmp = 0
	if z < -1.2536131056095036e+188:
		tmp = t_1
	elif z < 4.446702369113811e+64:
		tmp = x + ((y - z) / ((a - z) / (t - x)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x)))
	tmp = 0.0
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - ((y / z) * (t - x));
	tmp = 0.0;
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024082 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :alt
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))