Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.8% → 90.9%
Time: 22.8s
Alternatives: 21
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 79.8% accurate, 1.0× speedup?

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

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

Alternative 1: 90.9% accurate, 0.1× speedup?

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

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

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

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


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

    1. Initial program 89.7%

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

    if -3.99999999999999994e-265 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.0000000000000001e-292

    1. Initial program 3.2%

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e-292 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 92.4%

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

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

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

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

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

Alternative 2: 90.9% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 91.0%

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

    if -3.99999999999999994e-265 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.0000000000000001e-292

    1. Initial program 3.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 47.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -2.4 \cdot 10^{-126}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -9.6 \cdot 10^{-140}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-212}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 8.8 \cdot 10^{-120}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.25 \cdot 10^{+95}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.65000000000000005e35 or 1.25000000000000006e95 < z

    1. Initial program 60.8%

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

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

    if -2.65000000000000005e35 < z < -2.40000000000000007e-126 or -9.59999999999999947e-140 < z < 1.69999999999999999e-212 or 8.8000000000000005e-120 < z < 1.25000000000000006e95

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

    if -2.40000000000000007e-126 < z < -9.59999999999999947e-140 or 1.69999999999999999e-212 < z < 8.8000000000000005e-120

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.65 \cdot 10^{+35}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-126}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{-140}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-212}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-120}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 47.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -1.45 \cdot 10^{-126}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq -1 \cdot 10^{-139}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 4.1 \cdot 10^{-212}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-119}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+94}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 67.5%

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

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

    if -6.5000000000000003e35 < z < -1.44999999999999994e-126 or -1.00000000000000003e-139 < z < 4.10000000000000014e-212 or 2.40000000000000009e-119 < z < 1.8999999999999998e94

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

    if -1.44999999999999994e-126 < z < -1.00000000000000003e-139 or 4.10000000000000014e-212 < z < 2.40000000000000009e-119

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

    if 1.8999999999999998e94 < z

    1. Initial program 50.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t}}} \]
    11. Simplified52.7%

      \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification55.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+35}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-126}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-139}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{-212}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-119}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+94}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 54.5% accurate, 0.4× speedup?

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

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

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

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

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

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

\mathbf{elif}\;a \leq 3.5 \cdot 10^{-28}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -9.5000000000000002e139

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

    if -9.5000000000000002e139 < a < -6.49999999999999988e47

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.49999999999999988e47 < a < -8.79999999999999948e-27

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

    if -8.79999999999999948e-27 < a < -6.1999999999999998e-139 or 4.40000000000000029e-170 < a < 3.5e-28

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.1999999999999998e-139 < a < 4.40000000000000029e-170

    1. Initial program 62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5e-28 < a

    1. Initial program 85.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified68.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{+139}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{+47}:\\ \;\;\;\;t + \frac{a}{\frac{-z}{x}}\\ \mathbf{elif}\;a \leq -8.8 \cdot 10^{-27}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -6.2 \cdot 10^{-139}:\\ \;\;\;\;t - y \cdot \frac{t}{z}\\ \mathbf{elif}\;a \leq 4.4 \cdot 10^{-170}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-28}:\\ \;\;\;\;t - y \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 39.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -3.2 \cdot 10^{-119}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -1.3 \cdot 10^{-283}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.5 \cdot 10^{-266}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-116}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2000000000000001e37 or 1.16e8 < z

    1. Initial program 63.0%

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

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

    if -2.2000000000000001e37 < z < -3.19999999999999993e-119 or -1.3000000000000001e-283 < z < 1.5e-266 or 2.0999999999999999e-116 < z < 1.16e8

    1. Initial program 89.6%

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

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

    if -3.19999999999999993e-119 < z < -1.3000000000000001e-283 or 1.5e-266 < z < 2.0999999999999999e-116

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-119}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-283}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-266}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-116}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 116000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 71.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+141}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\

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

\mathbf{elif}\;a \leq -2.3 \cdot 10^{-27} \lor \neg \left(a \leq 4.2 \cdot 10^{-30}\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\

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


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

    1. Initial program 91.9%

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

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

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

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

    if -1.00000000000000002e141 < a < -7.7999999999999999e45

    1. Initial program 71.6%

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

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

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

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

    if -7.7999999999999999e45 < a < -2.2999999999999999e-27 or 4.2000000000000004e-30 < a

    1. Initial program 88.6%

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

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

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

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

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

    if -2.2999999999999999e-27 < a < 4.2000000000000004e-30

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{+141}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{+45}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq -2.3 \cdot 10^{-27} \lor \neg \left(a \leq 4.2 \cdot 10^{-30}\right):\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 69.7% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -5.59999999999999982e141

    1. Initial program 91.9%

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

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

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

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

    if -5.59999999999999982e141 < a < -9.4999999999999998e45

    1. Initial program 71.6%

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

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

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

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

    if -9.4999999999999998e45 < a < -1.1e-26

    1. Initial program 99.9%

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

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

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

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

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

    if -1.1e-26 < a < 2.64999999999999987e-30

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

    if 2.64999999999999987e-30 < a

    1. Initial program 85.9%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z}{\frac{a - z}{t - x}}} \]
      4. associate-/r/73.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.6 \cdot 10^{+141}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{+45}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-26}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 2.65 \cdot 10^{-30}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{a - z} \cdot \left(x - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 66.8% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{+98}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\

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

\mathbf{elif}\;a \leq -6.6 \cdot 10^{-28} \lor \neg \left(a \leq 3 \cdot 10^{-30}\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\

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


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

    1. Initial program 92.8%

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

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

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

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

    if -3.0000000000000001e98 < a < -6.9999999999999995e49

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \frac{a}{\frac{\color{blue}{-z}}{x}} \]
    11. Simplified71.9%

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

    if -6.9999999999999995e49 < a < -6.6000000000000003e-28 or 2.9999999999999999e-30 < a

    1. Initial program 87.8%

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

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

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

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

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

    if -6.6000000000000003e-28 < a < 2.9999999999999999e-30

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3 \cdot 10^{+98}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -7 \cdot 10^{+49}:\\ \;\;\;\;t + \frac{a}{\frac{-z}{x}}\\ \mathbf{elif}\;a \leq -6.6 \cdot 10^{-28} \lor \neg \left(a \leq 3 \cdot 10^{-30}\right):\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 66.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+140}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{+45}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-27} \lor \neg \left(a \leq 4.2 \cdot 10^{-30}\right):\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -4.8e+140)
   (+ x (/ y (/ a (- t x))))
   (if (<= a -1.2e+45)
     (/ t (/ (- a z) (- y z)))
     (if (or (<= a -1.2e-27) (not (<= a 4.2e-30)))
       (+ x (* (- t x) (/ y a)))
       (+ t (/ (* y (- x t)) z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -4.8e+140) {
		tmp = x + (y / (a / (t - x)));
	} else if (a <= -1.2e+45) {
		tmp = t / ((a - z) / (y - z));
	} else if ((a <= -1.2e-27) || !(a <= 4.2e-30)) {
		tmp = x + ((t - x) * (y / a));
	} else {
		tmp = t + ((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) :: tmp
    if (a <= (-4.8d+140)) then
        tmp = x + (y / (a / (t - x)))
    else if (a <= (-1.2d+45)) then
        tmp = t / ((a - z) / (y - z))
    else if ((a <= (-1.2d-27)) .or. (.not. (a <= 4.2d-30))) then
        tmp = x + ((t - x) * (y / a))
    else
        tmp = t + ((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 tmp;
	if (a <= -4.8e+140) {
		tmp = x + (y / (a / (t - x)));
	} else if (a <= -1.2e+45) {
		tmp = t / ((a - z) / (y - z));
	} else if ((a <= -1.2e-27) || !(a <= 4.2e-30)) {
		tmp = x + ((t - x) * (y / a));
	} else {
		tmp = t + ((y * (x - t)) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -4.8e+140:
		tmp = x + (y / (a / (t - x)))
	elif a <= -1.2e+45:
		tmp = t / ((a - z) / (y - z))
	elif (a <= -1.2e-27) or not (a <= 4.2e-30):
		tmp = x + ((t - x) * (y / a))
	else:
		tmp = t + ((y * (x - t)) / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -4.8e+140)
		tmp = Float64(x + Float64(y / Float64(a / Float64(t - x))));
	elseif (a <= -1.2e+45)
		tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z)));
	elseif ((a <= -1.2e-27) || !(a <= 4.2e-30))
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	else
		tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -4.8e+140)
		tmp = x + (y / (a / (t - x)));
	elseif (a <= -1.2e+45)
		tmp = t / ((a - z) / (y - z));
	elseif ((a <= -1.2e-27) || ~((a <= 4.2e-30)))
		tmp = x + ((t - x) * (y / a));
	else
		tmp = t + ((y * (x - t)) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.8e+140], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.2e+45], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -1.2e-27], N[Not[LessEqual[a, 4.2e-30]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{+140}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\

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

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-27} \lor \neg \left(a \leq 4.2 \cdot 10^{-30}\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\

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


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

    1. Initial program 91.9%

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

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

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

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

    if -4.7999999999999999e140 < a < -1.19999999999999995e45

    1. Initial program 71.6%

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

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

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

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

    if -1.19999999999999995e45 < a < -1.20000000000000001e-27 or 4.2000000000000004e-30 < a

    1. Initial program 88.6%

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

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

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

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

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

    if -1.20000000000000001e-27 < a < 4.2000000000000004e-30

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+140}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{+45}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-27} \lor \neg \left(a \leq 4.2 \cdot 10^{-30}\right):\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 62.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+36}:\\
\;\;\;\;t + \frac{a}{\frac{-z}{x}}\\

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

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

\mathbf{elif}\;z \leq 7 \cdot 10^{+94}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.05000000000000002e36

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05000000000000002e36 < z < 5.4999999999999997e-35

    1. Initial program 91.4%

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

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

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

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

    if 5.4999999999999997e-35 < z < 2.6999999999999999e73

    1. Initial program 81.7%

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

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

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

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

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

    if 2.6999999999999999e73 < z < 6.9999999999999994e94

    1. Initial program 72.5%

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

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

    if 6.9999999999999994e94 < z

    1. Initial program 50.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{1}{\frac{z}{t - x}}} \]
      2. clear-num68.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+36}:\\ \;\;\;\;t + \frac{a}{\frac{-z}{x}}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-35}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+73}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+94}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t + a \cdot \frac{t - x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 52.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.6 \cdot 10^{+139}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -4.6e139

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

    if -4.6e139 < a < -7.8000000000000002e48

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.8000000000000002e48 < a < -7.0000000000000003e-27

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

    if -7.0000000000000003e-27 < a < 5.09999999999999991e-26

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.09999999999999991e-26 < a

    1. Initial program 85.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified68.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.6 \cdot 10^{+139}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{+48}:\\ \;\;\;\;t + \frac{a}{\frac{-z}{x}}\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-27}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 5.1 \cdot 10^{-26}:\\ \;\;\;\;t - y \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 52.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+146}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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

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

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


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

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

    if -4.2000000000000001e146 < a < -6.5000000000000005e-30

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    8. Simplified46.6%

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

    if -6.5000000000000005e-30 < a < 6.0999999999999999e-27

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.0999999999999999e-27 < a

    1. Initial program 85.5%

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified68.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{+146}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-30}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{-27}:\\ \;\;\;\;t - y \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 39.2% accurate, 0.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.8000000000000001e36 or 5.3e9 < z

    1. Initial program 63.0%

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

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

    if -2.8000000000000001e36 < z < 9.2000000000000002e-267 or 1.81999999999999991e-146 < z < 5.3e9

    1. Initial program 90.4%

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

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

    if 9.2000000000000002e-267 < z < 1.81999999999999991e-146

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+36}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-267}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.82 \cdot 10^{-146}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5300000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 39.0% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-265}:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.99999999999999991e37 or 2.55e11 < z

    1. Initial program 63.0%

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

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

    if -1.99999999999999991e37 < z < 1.05000000000000002e-265 or 4.3000000000000001e-147 < z < 2.55e11

    1. Initial program 90.4%

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

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

    if 1.05000000000000002e-265 < z < 4.3000000000000001e-147

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t \cdot \color{blue}{\frac{y}{a}} \]
    10. Taylor expanded in t around 0 48.3%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
    12. Simplified55.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-265}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-147}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 255000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 59.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.76 \cdot 10^{-65} \lor \neg \left(t \leq 1.35 \cdot 10^{-63}\right):\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.7600000000000001e-65 or 1.3500000000000001e-63 < t

    1. Initial program 81.3%

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

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

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

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

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

    if -1.7600000000000001e-65 < t < 1.3500000000000001e-63

    1. Initial program 73.7%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-x \cdot y}{a}} \]
      3. distribute-lft-neg-out50.9%

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

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

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

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

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

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

        \[\leadsto x + x \cdot \color{blue}{\frac{1 \cdot y}{-1 \cdot a}} \]
      10. *-lft-identity55.2%

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

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

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

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

Alternative 17: 63.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+37}:\\
\;\;\;\;t + \frac{a}{\frac{-z}{x}}\\

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

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


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

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5999999999999999e37 < z < 1.12e11

    1. Initial program 91.4%

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

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

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

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

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

    if 1.12e11 < z

    1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t + \frac{a}{\frac{z}{t - x}}} \]
    9. Step-by-step derivation
      1. div-inv60.7%

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

        \[\leadsto t + a \cdot \color{blue}{\frac{t - x}{z}} \]
    10. Applied egg-rr60.8%

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

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

Alternative 18: 55.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-28} \lor \neg \left(a \leq 2 \cdot 10^{-23}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.59999999999999991e-28 or 1.99999999999999992e-23 < a

    1. Initial program 87.2%

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

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

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

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

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

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

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

    if -1.59999999999999991e-28 < a < 1.99999999999999992e-23

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 52.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 19000000000000:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


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

    1. Initial program 67.5%

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

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

    if -1.89999999999999995e37 < z < 1.9e13

    1. Initial program 91.4%

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified62.1%

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

    if 1.9e13 < z

    1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t}}} \]
    11. Simplified46.4%

      \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification56.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 19000000000000:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 39.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq 2.55 \cdot 10^{+14}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.79999999999999989e35 or 2.55e14 < z

    1. Initial program 63.0%

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

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

    if -5.79999999999999989e35 < z < 2.55e14

    1. Initial program 91.4%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+35}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 25.7% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 78.3%

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

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

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024024 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))