Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.8% → 90.9%
Time: 26.9s
Alternatives: 20
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

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

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

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

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

\mathbf{elif}\;a \leq -5.4 \cdot 10^{-30}:\\
\;\;\;\;t_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -4.79999999999999986e96 or -2.84999999999999984e48 < a < -5.39999999999999975e-30 or 1.05000000000000006e-38 < a

    1. Initial program 89.7%

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

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

        \[\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 -4.79999999999999986e96 < a < -2.84999999999999984e48

    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 -5.39999999999999975e-30 < a < 1.15e-290

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e-290 < a < 1.50000000000000013e-197

    1. Initial program 57.8%

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

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

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

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

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

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

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

    if 1.50000000000000013e-197 < a < 1.05000000000000006e-38

    1. Initial program 73.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+96}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -2.85 \cdot 10^{+48}:\\ \;\;\;\;t + \frac{a}{\frac{-z}{x}}\\ \mathbf{elif}\;a \leq -5.4 \cdot 10^{-30}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-290}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-197}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-38}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 60.0% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;a \leq -4.8 \cdot 10^{-32}:\\
\;\;\;\;t_1\\

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

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

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

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


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

    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 -6.5e96 < a < -1.22000000000000004e48

    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 -1.22000000000000004e48 < a < -4.8000000000000003e-32 or 3.3000000000000002e-38 < a

    1. Initial program 88.3%

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

        \[\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 -4.8000000000000003e-32 < a < 2.00000000000000012e-288

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000012e-288 < a < 6.0000000000000002e-198

    1. Initial program 57.8%

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

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

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

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

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

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

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

    if 6.0000000000000002e-198 < a < 3.3000000000000002e-38

    1. Initial program 73.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.5 \cdot 10^{+96}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -1.22 \cdot 10^{+48}:\\ \;\;\;\;t + \frac{a}{\frac{-z}{x}}\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-32}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-288}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-198}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{-38}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 54.1% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 9.4 \cdot 10^{-293}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 8.2 \cdot 10^{-24}:\\
\;\;\;\;t_1\\

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


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

    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.1000000000000002e139 < a < -8.0000000000000004e47

    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 -8.0000000000000004e47 < a < -5.5000000000000002e-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-*r/60.4%

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

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

    if -5.5000000000000002e-27 < a < 9.40000000000000026e-293 or 2.50000000000000001e-168 < a < 8.20000000000000029e-24

    1. Initial program 70.6%

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

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

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

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

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

    if 9.40000000000000026e-293 < a < 2.50000000000000001e-168

    1. Initial program 60.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.20000000000000029e-24 < 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-/l*68.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.1 \cdot 10^{+139}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -8 \cdot 10^{+47}:\\ \;\;\;\;t + \frac{a}{\frac{-z}{x}}\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{-27}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq 9.4 \cdot 10^{-293}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-168}:\\ \;\;\;\;t + \frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-24}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 48.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -9.5 \cdot 10^{+47}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;a \leq 2.25 \cdot 10^{-23}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.80000000000000008e73 or 2.24999999999999987e-23 < a

    1. Initial program 86.9%

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

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

    if -2.80000000000000008e73 < a < -9.50000000000000001e47 or -1.85e-20 < a < 2.24999999999999987e-23

    1. Initial program 68.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000001e47 < a < -1.6499999999999999

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Simplified36.2%

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

    if -1.6499999999999999 < a < -1.85e-20

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{x \cdot \frac{y}{-a}} \]
    9. Step-by-step derivation
      1. *-commutative67.3%

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

        \[\leadsto x + \color{blue}{\frac{-y}{-\left(-a\right)}} \cdot x \]
      3. remove-double-neg67.3%

        \[\leadsto x + \frac{-y}{\color{blue}{a}} \cdot x \]
      4. distribute-frac-neg67.3%

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

        \[\leadsto x + \left(-\frac{y}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}}\right) \cdot x \]
      6. sqrt-unprod1.2%

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

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

        \[\leadsto x + \left(-\frac{y}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}}\right) \cdot x \]
      9. add-sqr-sqrt1.2%

        \[\leadsto x + \left(-\frac{y}{\color{blue}{-a}}\right) \cdot x \]
      10. cancel-sign-sub-inv1.2%

        \[\leadsto \color{blue}{x - \frac{y}{-a} \cdot x} \]
      11. *-commutative1.2%

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{-a}} \]
      12. add-sqr-sqrt1.2%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}} \]
      13. sqrt-unprod1.2%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}} \]
      14. sqr-neg1.2%

        \[\leadsto x - x \cdot \frac{y}{\sqrt{\color{blue}{a \cdot a}}} \]
      15. sqrt-unprod0.0%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}} \]
      16. add-sqr-sqrt67.3%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{a}} \]
    10. Applied egg-rr67.3%

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{a} \cdot x} \]
      4. distribute-rgt-neg-in67.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{+73}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{+47}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -1.65:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -1.85 \cdot 10^{-20}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-x\right)\\ \mathbf{elif}\;a \leq 2.25 \cdot 10^{-23}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 38.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+36}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-182}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.52 \cdot 10^{-236}:\\ \;\;\;\;a \cdot \frac{t - x}{z}\\ \mathbf{elif}\;z \leq 10^{-265}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.85 \cdot 10^{-149}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 7800000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.9e+36)
   t
   (if (<= z -8e-182)
     x
     (if (<= z -1.52e-236)
       (* a (/ (- t x) z))
       (if (<= z 1e-265)
         x
         (if (<= z 2.85e-149) (/ t (/ a y)) (if (<= z 7800000.0) x t)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.9e+36) {
		tmp = t;
	} else if (z <= -8e-182) {
		tmp = x;
	} else if (z <= -1.52e-236) {
		tmp = a * ((t - x) / z);
	} else if (z <= 1e-265) {
		tmp = x;
	} else if (z <= 2.85e-149) {
		tmp = t / (a / y);
	} else if (z <= 7800000.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 <= (-3.9d+36)) then
        tmp = t
    else if (z <= (-8d-182)) then
        tmp = x
    else if (z <= (-1.52d-236)) then
        tmp = a * ((t - x) / z)
    else if (z <= 1d-265) then
        tmp = x
    else if (z <= 2.85d-149) then
        tmp = t / (a / y)
    else if (z <= 7800000.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 <= -3.9e+36) {
		tmp = t;
	} else if (z <= -8e-182) {
		tmp = x;
	} else if (z <= -1.52e-236) {
		tmp = a * ((t - x) / z);
	} else if (z <= 1e-265) {
		tmp = x;
	} else if (z <= 2.85e-149) {
		tmp = t / (a / y);
	} else if (z <= 7800000.0) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.9e+36:
		tmp = t
	elif z <= -8e-182:
		tmp = x
	elif z <= -1.52e-236:
		tmp = a * ((t - x) / z)
	elif z <= 1e-265:
		tmp = x
	elif z <= 2.85e-149:
		tmp = t / (a / y)
	elif z <= 7800000.0:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.9e+36)
		tmp = t;
	elseif (z <= -8e-182)
		tmp = x;
	elseif (z <= -1.52e-236)
		tmp = Float64(a * Float64(Float64(t - x) / z));
	elseif (z <= 1e-265)
		tmp = x;
	elseif (z <= 2.85e-149)
		tmp = Float64(t / Float64(a / y));
	elseif (z <= 7800000.0)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.9e+36)
		tmp = t;
	elseif (z <= -8e-182)
		tmp = x;
	elseif (z <= -1.52e-236)
		tmp = a * ((t - x) / z);
	elseif (z <= 1e-265)
		tmp = x;
	elseif (z <= 2.85e-149)
		tmp = t / (a / y);
	elseif (z <= 7800000.0)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.9e+36], t, If[LessEqual[z, -8e-182], x, If[LessEqual[z, -1.52e-236], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-265], x, If[LessEqual[z, 2.85e-149], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7800000.0], x, t]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -8 \cdot 10^{-182}:\\
\;\;\;\;x\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.90000000000000021e36 or 7.8e6 < 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 -3.90000000000000021e36 < z < -8.0000000000000004e-182 or -1.52000000000000009e-236 < z < 9.99999999999999985e-266 or 2.8499999999999999e-149 < z < 7.8e6

    1. Initial program 89.7%

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

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

    if -8.0000000000000004e-182 < z < -1.52000000000000009e-236

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999985e-266 < z < 2.8499999999999999e-149

    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 48.3%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Simplified53.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.9 \cdot 10^{+36}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-182}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.52 \cdot 10^{-236}:\\ \;\;\;\;a \cdot \frac{t - x}{z}\\ \mathbf{elif}\;z \leq 10^{-265}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.85 \cdot 10^{-149}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 7800000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 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 9: 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 10: 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 11: 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 12: 52.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{+78} \lor \neg \left(a \leq -9.2 \cdot 10^{+45}\right) \land \left(a \leq -1.28 \cdot 10^{-20} \lor \neg \left(a \leq 4.5 \cdot 10^{-30}\right)\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.99999999999999982e78 or -9.20000000000000049e45 < a < -1.2800000000000001e-20 or 4.49999999999999967e-30 < a

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

    if -2.99999999999999982e78 < a < -9.20000000000000049e45 or -1.2800000000000001e-20 < a < 4.49999999999999967e-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 77.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+77.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--77.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-sub79.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3 \cdot 10^{+78} \lor \neg \left(a \leq -9.2 \cdot 10^{+45}\right) \land \left(a \leq -1.28 \cdot 10^{-20} \lor \neg \left(a \leq 4.5 \cdot 10^{-30}\right)\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 53.5% accurate, 0.5× speedup?

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

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

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

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

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

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


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

    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.1000000000000002e139 < a < -2.59999999999999995e48

    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 -2.59999999999999995e48 < a < -3.8e-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-*r/60.4%

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

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

    if -3.8e-27 < a < 2.34999999999999996e-24

    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 63.5%

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

    if 2.34999999999999996e-24 < 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-/l*68.1%

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

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

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

Alternative 14: 51.4% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.60000000000000001e146 or 4e-30 < a

    1. Initial program 87.6%

      \[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*73.3%

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

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

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

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

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

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

    if -4.60000000000000001e146 < a < -2.70000000000000014e-31

    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-*r/46.7%

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

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

    if -2.70000000000000014e-31 < a < 4e-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}} \]
    7. Taylor expanded in t around inf 63.2%

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

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

Alternative 15: 53.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 -8.5 \cdot 10^{-27}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -4.2e+146)
   (* x (- 1.0 (/ y a)))
   (if (<= a -8.5e-27)
     (* y (/ (- t x) a))
     (if (<= a 2.6e-25) (* t (- 1.0 (/ y z))) (+ x (/ t (/ a y)))))))
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 <= -8.5e-27) {
		tmp = y * ((t - x) / a);
	} else if (a <= 2.6e-25) {
		tmp = t * (1.0 - (y / z));
	} else {
		tmp = x + (t / (a / y));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-4.2d+146)) then
        tmp = x * (1.0d0 - (y / a))
    else if (a <= (-8.5d-27)) then
        tmp = y * ((t - x) / a)
    else if (a <= 2.6d-25) then
        tmp = t * (1.0d0 - (y / z))
    else
        tmp = x + (t / (a / y))
    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 <= -8.5e-27) {
		tmp = y * ((t - x) / a);
	} else if (a <= 2.6e-25) {
		tmp = t * (1.0 - (y / z));
	} else {
		tmp = x + (t / (a / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -4.2e+146:
		tmp = x * (1.0 - (y / a))
	elif a <= -8.5e-27:
		tmp = y * ((t - x) / a)
	elif a <= 2.6e-25:
		tmp = t * (1.0 - (y / z))
	else:
		tmp = x + (t / (a / y))
	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 <= -8.5e-27)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (a <= 2.6e-25)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	else
		tmp = Float64(x + Float64(t / Float64(a / y)));
	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 <= -8.5e-27)
		tmp = y * ((t - x) / a);
	elseif (a <= 2.6e-25)
		tmp = t * (1.0 - (y / z));
	else
		tmp = x + (t / (a / y));
	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, -8.5e-27], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.6e-25], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(a / y), $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 -8.5 \cdot 10^{-27}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\

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

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


\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 < -8.50000000000000033e-27

    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-*r/46.7%

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

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

    if -8.50000000000000033e-27 < a < 2.6e-25

    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 63.5%

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

    if 2.6e-25 < 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-/l*68.1%

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

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

    \[\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 -8.5 \cdot 10^{-27}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-25}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 39.2% accurate, 0.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.85e37 or 5e14 < 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.85e37 < z < 7.4999999999999995e-266 or 3.5e-149 < z < 5e14

    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 7.4999999999999995e-266 < z < 3.5e-149

    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 -1.85 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-266}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-149}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+14}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 39.2% accurate, 0.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.20000000000000009e36 or 2.5e12 < 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 -4.20000000000000009e36 < z < 2e-266 or 2.25e-146 < z < 2.5e12

    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 2e-266 < z < 2.25e-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 48.3%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Simplified53.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+36}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-266}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{-146}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2500000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 59.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{-66} \lor \neg \left(t \leq 5.5 \cdot 10^{-62}\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 -8e-66) (not (<= t 5.5e-62)))
   (* (- 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 <= -8e-66) || !(t <= 5.5e-62)) {
		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 <= (-8d-66)) .or. (.not. (t <= 5.5d-62))) 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 <= -8e-66) || !(t <= 5.5e-62)) {
		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 <= -8e-66) or not (t <= 5.5e-62):
		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 <= -8e-66) || !(t <= 5.5e-62))
		tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z)));
	else
		tmp = Float64(x - Float64(x * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -8e-66) || ~((t <= 5.5e-62)))
		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, -8e-66], N[Not[LessEqual[t, 5.5e-62]], $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 -8 \cdot 10^{-66} \lor \neg \left(t \leq 5.5 \cdot 10^{-62}\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 < -7.9999999999999998e-66 or 5.50000000000000022e-62 < 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 -7.9999999999999998e-66 < t < 5.50000000000000022e-62

    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}} \]
    9. Step-by-step derivation
      1. *-commutative55.2%

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

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

        \[\leadsto x + \frac{-y}{\color{blue}{a}} \cdot x \]
      4. distribute-frac-neg55.2%

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

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

        \[\leadsto x + \left(-\frac{y}{\color{blue}{\sqrt{a \cdot a}}}\right) \cdot x \]
      7. sqr-neg45.5%

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

        \[\leadsto x + \left(-\frac{y}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}}\right) \cdot x \]
      9. add-sqr-sqrt43.2%

        \[\leadsto x + \left(-\frac{y}{\color{blue}{-a}}\right) \cdot x \]
      10. cancel-sign-sub-inv43.2%

        \[\leadsto \color{blue}{x - \frac{y}{-a} \cdot x} \]
      11. *-commutative43.2%

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{-a}} \]
      12. add-sqr-sqrt18.9%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}} \]
      13. sqrt-unprod45.5%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}} \]
      14. sqr-neg45.5%

        \[\leadsto x - x \cdot \frac{y}{\sqrt{\color{blue}{a \cdot a}}} \]
      15. sqrt-unprod29.4%

        \[\leadsto x - x \cdot \frac{y}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}} \]
      16. add-sqr-sqrt55.2%

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

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

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

Alternative 19: 39.3% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.89999999999999978e37 or 1.4e6 < 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.89999999999999978e37 < z < 1.4e6

    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 -2.9 \cdot 10^{+37}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1400000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 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)))))