Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.4% → 92.8%
Time: 20.7s
Alternatives: 21
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 80.4% 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: 92.8% accurate, 0.1× 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}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_1 -4e-265)
     (fma (- t x) (/ (- y z) (- a z)) x)
     (if (<= t_1 0.0)
       (+ t (/ (* (- t x) (- a y)) z))
       (+ x (/ (- t x) (/ (- a z) (- y z))))))))
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) {
		tmp = fma((t - x), ((y - z) / (a - z)), x);
	} else if (t_1 <= 0.0) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else {
		tmp = x + ((t - x) / ((a - z) / (y - z)));
	}
	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)
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x);
	elseif (t_1 <= 0.0)
		tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z));
	else
		tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z))));
	end
	return 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[LessEqual[t$95$1, -4e-265], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $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}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\

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

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


\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 93.8%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 89.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

\\
\begin{array}{l}
t_1 := x + \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 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\

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


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

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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 0\right):\\ \;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 88.7% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := x + \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 10^{-196}\right):\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 93.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)))) < 1e-196

    1. Initial program 9.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 45.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-t\right) \cdot \left(-1 + \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -7.5 \cdot 10^{+170}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{+25}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{-51}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-153}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-167}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-272}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+52}:\\ \;\;\;\;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 -7.5e+170)
     x
     (if (<= a -1.25e+25)
       (* (- y z) (/ t a))
       (if (<= a -3.3e-51)
         t_1
         (if (<= a -1.9e-153)
           (* t (/ y (- a z)))
           (if (<= a -3e-167)
             t_1
             (if (<= a -3e-272)
               (* y (/ (- x t) z))
               (if (<= a 3.1e+52) 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 <= -7.5e+170) {
		tmp = x;
	} else if (a <= -1.25e+25) {
		tmp = (y - z) * (t / a);
	} else if (a <= -3.3e-51) {
		tmp = t_1;
	} else if (a <= -1.9e-153) {
		tmp = t * (y / (a - z));
	} else if (a <= -3e-167) {
		tmp = t_1;
	} else if (a <= -3e-272) {
		tmp = y * ((x - t) / z);
	} else if (a <= 3.1e+52) {
		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 <= (-7.5d+170)) then
        tmp = x
    else if (a <= (-1.25d+25)) then
        tmp = (y - z) * (t / a)
    else if (a <= (-3.3d-51)) then
        tmp = t_1
    else if (a <= (-1.9d-153)) then
        tmp = t * (y / (a - z))
    else if (a <= (-3d-167)) then
        tmp = t_1
    else if (a <= (-3d-272)) then
        tmp = y * ((x - t) / z)
    else if (a <= 3.1d+52) 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 <= -7.5e+170) {
		tmp = x;
	} else if (a <= -1.25e+25) {
		tmp = (y - z) * (t / a);
	} else if (a <= -3.3e-51) {
		tmp = t_1;
	} else if (a <= -1.9e-153) {
		tmp = t * (y / (a - z));
	} else if (a <= -3e-167) {
		tmp = t_1;
	} else if (a <= -3e-272) {
		tmp = y * ((x - t) / z);
	} else if (a <= 3.1e+52) {
		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 <= -7.5e+170:
		tmp = x
	elif a <= -1.25e+25:
		tmp = (y - z) * (t / a)
	elif a <= -3.3e-51:
		tmp = t_1
	elif a <= -1.9e-153:
		tmp = t * (y / (a - z))
	elif a <= -3e-167:
		tmp = t_1
	elif a <= -3e-272:
		tmp = y * ((x - t) / z)
	elif a <= 3.1e+52:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(-t) * Float64(-1.0 + Float64(y / z)))
	tmp = 0.0
	if (a <= -7.5e+170)
		tmp = x;
	elseif (a <= -1.25e+25)
		tmp = Float64(Float64(y - z) * Float64(t / a));
	elseif (a <= -3.3e-51)
		tmp = t_1;
	elseif (a <= -1.9e-153)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (a <= -3e-167)
		tmp = t_1;
	elseif (a <= -3e-272)
		tmp = Float64(y * Float64(Float64(x - t) / z));
	elseif (a <= 3.1e+52)
		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 <= -7.5e+170)
		tmp = x;
	elseif (a <= -1.25e+25)
		tmp = (y - z) * (t / a);
	elseif (a <= -3.3e-51)
		tmp = t_1;
	elseif (a <= -1.9e-153)
		tmp = t * (y / (a - z));
	elseif (a <= -3e-167)
		tmp = t_1;
	elseif (a <= -3e-272)
		tmp = y * ((x - t) / z);
	elseif (a <= 3.1e+52)
		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, -7.5e+170], x, If[LessEqual[a, -1.25e+25], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.3e-51], t$95$1, If[LessEqual[a, -1.9e-153], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3e-167], t$95$1, If[LessEqual[a, -3e-272], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.1e+52], t$95$1, x]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -3.3 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq -3 \cdot 10^{-167}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 3.1 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -7.5000000000000002e170 or 3.1e52 < a

    1. Initial program 86.4%

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

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

    if -7.5000000000000002e170 < a < -1.25000000000000006e25

    1. Initial program 85.6%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a}} \]
    6. Applied egg-rr44.1%

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

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

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

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

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

    if -1.25000000000000006e25 < a < -3.29999999999999973e-51 or -1.90000000000000011e-153 < a < -2.9999999999999998e-167 or -3.0000000000000003e-272 < a < 3.1e52

    1. Initial program 77.7%

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. distribute-lft-neg-in67.7%

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

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

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

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

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

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

    if -3.29999999999999973e-51 < a < -1.90000000000000011e-153

    1. Initial program 86.1%

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

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

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

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

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

    if -2.9999999999999998e-167 < a < -3.0000000000000003e-272

    1. Initial program 74.2%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{t - x}{-z}}, x\right) \]
    7. Simplified69.8%

      \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{t - x}{-z}}, x\right) \]
    8. Taylor expanded in y around inf 67.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7.5 \cdot 10^{+170}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.25 \cdot 10^{+25}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{-51}:\\ \;\;\;\;\left(-t\right) \cdot \left(-1 + \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-153}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-167}:\\ \;\;\;\;\left(-t\right) \cdot \left(-1 + \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -3 \cdot 10^{-272}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+52}:\\ \;\;\;\;\left(-t\right) \cdot \left(-1 + \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 36.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -7.8 \cdot 10^{+43}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.15 \cdot 10^{-49}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -1.22 \cdot 10^{-156}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -3.4 \cdot 10^{-272}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq -2.8 \cdot 10^{-298}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 10^{-279}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1550:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y a))))
   (if (<= a -7.8e+43)
     x
     (if (<= a -2.1e+24)
       t_1
       (if (<= a -1.15e-49)
         t
         (if (<= a -1.22e-156)
           t_1
           (if (<= a -3.4e-272)
             (* x (/ y z))
             (if (<= a -2.8e-298)
               t
               (if (<= a 1e-279) t_1 (if (<= a 1550.0) t x))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (a <= -7.8e+43) {
		tmp = x;
	} else if (a <= -2.1e+24) {
		tmp = t_1;
	} else if (a <= -1.15e-49) {
		tmp = t;
	} else if (a <= -1.22e-156) {
		tmp = t_1;
	} else if (a <= -3.4e-272) {
		tmp = x * (y / z);
	} else if (a <= -2.8e-298) {
		tmp = t;
	} else if (a <= 1e-279) {
		tmp = t_1;
	} else if (a <= 1550.0) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (y / a)
    if (a <= (-7.8d+43)) then
        tmp = x
    else if (a <= (-2.1d+24)) then
        tmp = t_1
    else if (a <= (-1.15d-49)) then
        tmp = t
    else if (a <= (-1.22d-156)) then
        tmp = t_1
    else if (a <= (-3.4d-272)) then
        tmp = x * (y / z)
    else if (a <= (-2.8d-298)) then
        tmp = t
    else if (a <= 1d-279) then
        tmp = t_1
    else if (a <= 1550.0d0) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / a);
	double tmp;
	if (a <= -7.8e+43) {
		tmp = x;
	} else if (a <= -2.1e+24) {
		tmp = t_1;
	} else if (a <= -1.15e-49) {
		tmp = t;
	} else if (a <= -1.22e-156) {
		tmp = t_1;
	} else if (a <= -3.4e-272) {
		tmp = x * (y / z);
	} else if (a <= -2.8e-298) {
		tmp = t;
	} else if (a <= 1e-279) {
		tmp = t_1;
	} else if (a <= 1550.0) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / a)
	tmp = 0
	if a <= -7.8e+43:
		tmp = x
	elif a <= -2.1e+24:
		tmp = t_1
	elif a <= -1.15e-49:
		tmp = t
	elif a <= -1.22e-156:
		tmp = t_1
	elif a <= -3.4e-272:
		tmp = x * (y / z)
	elif a <= -2.8e-298:
		tmp = t
	elif a <= 1e-279:
		tmp = t_1
	elif a <= 1550.0:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / a))
	tmp = 0.0
	if (a <= -7.8e+43)
		tmp = x;
	elseif (a <= -2.1e+24)
		tmp = t_1;
	elseif (a <= -1.15e-49)
		tmp = t;
	elseif (a <= -1.22e-156)
		tmp = t_1;
	elseif (a <= -3.4e-272)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= -2.8e-298)
		tmp = t;
	elseif (a <= 1e-279)
		tmp = t_1;
	elseif (a <= 1550.0)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / a);
	tmp = 0.0;
	if (a <= -7.8e+43)
		tmp = x;
	elseif (a <= -2.1e+24)
		tmp = t_1;
	elseif (a <= -1.15e-49)
		tmp = t;
	elseif (a <= -1.22e-156)
		tmp = t_1;
	elseif (a <= -3.4e-272)
		tmp = x * (y / z);
	elseif (a <= -2.8e-298)
		tmp = t;
	elseif (a <= 1e-279)
		tmp = t_1;
	elseif (a <= 1550.0)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.8e+43], x, If[LessEqual[a, -2.1e+24], t$95$1, If[LessEqual[a, -1.15e-49], t, If[LessEqual[a, -1.22e-156], t$95$1, If[LessEqual[a, -3.4e-272], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.8e-298], t, If[LessEqual[a, 1e-279], t$95$1, If[LessEqual[a, 1550.0], t, x]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -1.15 \cdot 10^{-49}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq -1.22 \cdot 10^{-156}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;a \leq 10^{-279}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1550:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.8000000000000001e43 or 1550 < a

    1. Initial program 85.2%

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

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

    if -7.8000000000000001e43 < a < -2.1000000000000001e24 or -1.15e-49 < a < -1.21999999999999995e-156 or -2.79999999999999992e-298 < a < 1.00000000000000006e-279

    1. Initial program 92.0%

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

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

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

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

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

    if -2.1000000000000001e24 < a < -1.15e-49 or -3.4000000000000003e-272 < a < -2.79999999999999992e-298 or 1.00000000000000006e-279 < a < 1550

    1. Initial program 75.7%

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

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

    if -1.21999999999999995e-156 < a < -3.4000000000000003e-272

    1. Initial program 71.4%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{t - x}{z}}, x\right) \]
      2. distribute-neg-frac267.1%

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{t - x}{-z}}, x\right) \]
    7. Simplified67.1%

      \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{t - x}{-z}}, x\right) \]
    8. Taylor expanded in x around inf 52.2%

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    10. Simplified52.3%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 6: 46.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-t\right) \cdot \left(-1 + \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -1.6 \cdot 10^{+173}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{+25}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-50}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-153}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 5.1 \cdot 10^{+50}:\\ \;\;\;\;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 -1.6e+173)
     x
     (if (<= a -1.2e+25)
       (* (- y z) (/ t a))
       (if (<= a -2.4e-50)
         t_1
         (if (<= a -1.9e-153)
           (* t (/ y (- a z)))
           (if (<= a 5.1e+50) 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 <= -1.6e+173) {
		tmp = x;
	} else if (a <= -1.2e+25) {
		tmp = (y - z) * (t / a);
	} else if (a <= -2.4e-50) {
		tmp = t_1;
	} else if (a <= -1.9e-153) {
		tmp = t * (y / (a - z));
	} else if (a <= 5.1e+50) {
		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 <= (-1.6d+173)) then
        tmp = x
    else if (a <= (-1.2d+25)) then
        tmp = (y - z) * (t / a)
    else if (a <= (-2.4d-50)) then
        tmp = t_1
    else if (a <= (-1.9d-153)) then
        tmp = t * (y / (a - z))
    else if (a <= 5.1d+50) 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 <= -1.6e+173) {
		tmp = x;
	} else if (a <= -1.2e+25) {
		tmp = (y - z) * (t / a);
	} else if (a <= -2.4e-50) {
		tmp = t_1;
	} else if (a <= -1.9e-153) {
		tmp = t * (y / (a - z));
	} else if (a <= 5.1e+50) {
		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 <= -1.6e+173:
		tmp = x
	elif a <= -1.2e+25:
		tmp = (y - z) * (t / a)
	elif a <= -2.4e-50:
		tmp = t_1
	elif a <= -1.9e-153:
		tmp = t * (y / (a - z))
	elif a <= 5.1e+50:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(-t) * Float64(-1.0 + Float64(y / z)))
	tmp = 0.0
	if (a <= -1.6e+173)
		tmp = x;
	elseif (a <= -1.2e+25)
		tmp = Float64(Float64(y - z) * Float64(t / a));
	elseif (a <= -2.4e-50)
		tmp = t_1;
	elseif (a <= -1.9e-153)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (a <= 5.1e+50)
		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 <= -1.6e+173)
		tmp = x;
	elseif (a <= -1.2e+25)
		tmp = (y - z) * (t / a);
	elseif (a <= -2.4e-50)
		tmp = t_1;
	elseif (a <= -1.9e-153)
		tmp = t * (y / (a - z));
	elseif (a <= 5.1e+50)
		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, -1.6e+173], x, If[LessEqual[a, -1.2e+25], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.4e-50], t$95$1, If[LessEqual[a, -1.9e-153], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.1e+50], t$95$1, x]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -2.4 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 5.1 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.6000000000000001e173 or 5.0999999999999998e50 < a

    1. Initial program 86.4%

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

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

    if -1.6000000000000001e173 < a < -1.19999999999999998e25

    1. Initial program 85.6%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y - z}{a}} \]
    6. Applied egg-rr44.1%

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

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

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

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

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

    if -1.19999999999999998e25 < a < -2.40000000000000002e-50 or -1.90000000000000011e-153 < a < 5.0999999999999998e50

    1. Initial program 76.9%

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
      3. distribute-lft-neg-in64.3%

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

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

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

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

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

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

    if -2.40000000000000002e-50 < a < -1.90000000000000011e-153

    1. Initial program 86.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+173}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{+25}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-50}:\\ \;\;\;\;\left(-t\right) \cdot \left(-1 + \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-153}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 5.1 \cdot 10^{+50}:\\ \;\;\;\;\left(-t\right) \cdot \left(-1 + \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 72.2% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 350:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.9500000000000001e28 or 350 < a

    1. Initial program 85.8%

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

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

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

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

    if -2.9500000000000001e28 < a < -5.8e-49 or -1.90000000000000011e-153 < a < 350

    1. Initial program 77.2%

      \[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. associate-*r/81.5%

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

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

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

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

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

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

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

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

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

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

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

    if -5.8e-49 < a < -1.90000000000000011e-153

    1. Initial program 86.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.95 \cdot 10^{+28}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -5.8 \cdot 10^{-49}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-153}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 350:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 37.2% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;a \leq -4 \cdot 10^{-51}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq -1.65 \cdot 10^{-194}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 0.125:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.30000000000000013e44 or 0.125 < a

    1. Initial program 85.2%

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

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

    if -3.30000000000000013e44 < a < -5.9999999999999999e24 or -4e-51 < a < -1.6499999999999999e-194

    1. Initial program 82.4%

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

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

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

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

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

    if -5.9999999999999999e24 < a < -4e-51 or -1.6499999999999999e-194 < a < 0.125

    1. Initial program 78.2%

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

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

Alternative 9: 73.1% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.00000000000000024e25 or 1.45000000000000008e78 < z

    1. Initial program 65.7%

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

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

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

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

    if -5.00000000000000024e25 < z < 6.5000000000000003e-121

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.5000000000000003e-121 < z < 1.45000000000000008e78

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 68.1% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.1999999999999997e24 or 1.7999999999999999e77 < z

    1. Initial program 65.7%

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

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

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

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

    if -3.1999999999999997e24 < z < -6.79999999999999988e-90

    1. Initial program 82.6%

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

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

    if -6.79999999999999988e-90 < z < 1.7999999999999999e77

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 68.1% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.00000000000000006e25 or 1.1999999999999999e78 < z

    1. Initial program 65.7%

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

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

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

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

    if -3.00000000000000006e25 < z < -7.19999999999999961e-90

    1. Initial program 82.6%

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

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

    if -7.19999999999999961e-90 < z < 1.1999999999999999e78

    1. Initial program 96.5%

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

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

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

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

Alternative 12: 67.0% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.9999999999999997e23 or 2.8000000000000002e-29 < z

    1. Initial program 71.9%

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

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

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

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

    if -3.9999999999999997e23 < z < -7.19999999999999961e-90

    1. Initial program 82.6%

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

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

    if -7.19999999999999961e-90 < z < 2.8000000000000002e-29

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 67.4% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.4999999999999996e23 or 1.05000000000000008e-27 < z

    1. Initial program 71.9%

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

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

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

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

    if -6.4999999999999996e23 < z < -7.80000000000000009e-90

    1. Initial program 82.6%

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

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

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

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

    if -7.80000000000000009e-90 < z < 1.05000000000000008e-27

    1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 66.6% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.6500000000000001e23 or 2.15e-28 < z

    1. Initial program 71.9%

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

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

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

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

    if -2.6500000000000001e23 < z < -3.64999999999999999e-90

    1. Initial program 82.6%

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

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

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

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

    if -3.64999999999999999e-90 < z < 2.15e-28

    1. Initial program 97.0%

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

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

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

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

Alternative 15: 56.2% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;x \leq 1.35 \cdot 10^{+185}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.9000000000000001e82 or 8.20000000000000029e-24 < x < 1.35000000000000003e185

    1. Initial program 77.8%

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

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

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

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

    if -4.9000000000000001e82 < x < 8.20000000000000029e-24

    1. Initial program 84.5%

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

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

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

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

    if 1.35000000000000003e185 < x

    1. Initial program 85.2%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 16: 71.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{-35} \lor \neg \left(y \leq 2.5 \cdot 10^{-7}\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.7e-35 or 2.49999999999999989e-7 < y

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.7e-35 < y < 2.49999999999999989e-7

    1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{t - x}{\color{blue}{-1 \cdot \frac{a - z}{z}}} \]
    7. Step-by-step derivation
      1. mul-1-neg75.0%

        \[\leadsto x + \frac{t - x}{\color{blue}{-\frac{a - z}{z}}} \]
      2. div-sub75.1%

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

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

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

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

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

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

Alternative 17: 57.0% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.35000000000000007e173 or 2.09999999999999989e159 < a

    1. Initial program 83.9%

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

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

    if -2.35000000000000007e173 < a < 2.09999999999999989e159

    1. Initial program 81.5%

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

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

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

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

Alternative 18: 36.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+48} \lor \neg \left(y \leq 1.6 \cdot 10^{+118}\right):\\
\;\;\;\;t \cdot \frac{y}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.10000000000000005e48 or 1.60000000000000008e118 < y

    1. Initial program 91.2%

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

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

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

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

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

    if -3.10000000000000005e48 < y < 1.60000000000000008e118

    1. Initial program 76.4%

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

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

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

Alternative 19: 36.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{+49}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y}}\\

\mathbf{elif}\;y \leq 2.2 \cdot 10^{+125}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.8000000000000002e49

    1. Initial program 88.6%

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
      2. clear-num56.1%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
      4. add-cube-cbrt55.7%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot \sqrt[3]{t}}}{\frac{a - z}{y}} \]
      5. *-un-lft-identity55.7%

        \[\leadsto \frac{\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot \sqrt[3]{t}}{\color{blue}{1 \cdot \frac{a - z}{y}}} \]
      6. times-frac55.6%

        \[\leadsto \color{blue}{\frac{\sqrt[3]{t} \cdot \sqrt[3]{t}}{1} \cdot \frac{\sqrt[3]{t}}{\frac{a - z}{y}}} \]
      7. pow255.6%

        \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{t}\right)}^{2}}}{1} \cdot \frac{\sqrt[3]{t}}{\frac{a - z}{y}} \]
    6. Applied egg-rr55.6%

      \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{t}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{t}}{\frac{a - z}{y}}} \]
    7. Step-by-step derivation
      1. /-rgt-identity55.6%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{t}\right)}^{2}} \cdot \frac{\sqrt[3]{t}}{\frac{a - z}{y}} \]
      2. associate-*r/55.7%

        \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{t}\right)}^{2} \cdot \sqrt[3]{t}}{\frac{a - z}{y}}} \]
      3. unpow255.7%

        \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right)} \cdot \sqrt[3]{t}}{\frac{a - z}{y}} \]
      4. rem-3cbrt-lft56.2%

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

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

    if -7.8000000000000002e49 < y < 2.19999999999999991e125

    1. Initial program 76.4%

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

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

    if 2.19999999999999991e125 < y

    1. Initial program 95.1%

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

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

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

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

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

Alternative 20: 38.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+54}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 260:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -3.5e+54) x (if (<= a 260.0) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.5e+54) {
		tmp = x;
	} else if (a <= 260.0) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-3.5d+54)) then
        tmp = x
    else if (a <= 260.0d0) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.5e+54) {
		tmp = x;
	} else if (a <= 260.0) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -3.5e+54:
		tmp = x
	elif a <= 260.0:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -3.5e+54)
		tmp = x;
	elseif (a <= 260.0)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -3.5e+54)
		tmp = x;
	elseif (a <= 260.0)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.5e+54], x, If[LessEqual[a, 260.0], t, x]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 260:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.5000000000000001e54 or 260 < a

    1. Initial program 85.5%

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

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

    if -3.5000000000000001e54 < a < 260

    1. Initial program 79.3%

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 21: 25.7% accurate, 13.0× speedup?

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

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

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

    \[\leadsto \color{blue}{t} \]
  4. Add Preprocessing

Reproduce

?
herbie shell --seed 2024110 
(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)))))