Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.0% → 95.2%
Time: 15.4s
Alternatives: 26
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 26 alternatives:

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

Initial Program: 80.0% 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: 95.2% accurate, 0.1× speedup?

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

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

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

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


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

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{t - x}{a - z} \cdot \left(z - y\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;x - \frac{x - t}{\frac{a - z}{y}}\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-265} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* (/ (- t x) (- a z)) (- z y)))))
   (if (<= t_1 (- INFINITY))
     (- x (/ (- x t) (/ (- a z) y)))
     (if (or (<= t_1 -1e-265) (not (<= t_1 0.0)))
       t_1
       (+ t (* (/ (- t x) z) (- a y)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((t - x) / (a - z)) * (z - y));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = x - ((x - t) / ((a - z) / y));
	} else if ((t_1 <= -1e-265) || !(t_1 <= 0.0)) {
		tmp = t_1;
	} else {
		tmp = t + (((t - x) / z) * (a - y));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((t - x) / (a - z)) * (z - y));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = x - ((x - t) / ((a - z) / y));
	} else if ((t_1 <= -1e-265) || !(t_1 <= 0.0)) {
		tmp = t_1;
	} else {
		tmp = t + (((t - x) / z) * (a - y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (((t - x) / (a - z)) * (z - y))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = x - ((x - t) / ((a - z) / y))
	elif (t_1 <= -1e-265) or not (t_1 <= 0.0):
		tmp = t_1
	else:
		tmp = t + (((t - x) / z) * (a - y))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(Float64(t - x) / Float64(a - z)) * Float64(z - y)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(x - Float64(Float64(x - t) / Float64(Float64(a - z) / y)));
	elseif ((t_1 <= -1e-265) || !(t_1 <= 0.0))
		tmp = t_1;
	else
		tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (((t - x) / (a - z)) * (z - y));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = x - ((x - t) / ((a - z) / y));
	elseif ((t_1 <= -1e-265) || ~((t_1 <= 0.0)))
		tmp = t_1;
	else
		tmp = t + (((t - x) / z) * (a - y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x - N[(N[(x - t), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, -1e-265], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-265} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.99999999999999985e-266 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 94.9%

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

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

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 95.2% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 47.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;z \leq -1.12 \cdot 10^{+191}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -5500000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-59}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-231}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-289}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{+119}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* y t) a))))
   (if (<= z -1.12e+191)
     t
     (if (<= z -5.8e+85)
       (* t (/ (- y z) a))
       (if (<= z -5500000000.0)
         t_1
         (if (<= z -8.2e-59)
           (* y (/ t (- a z)))
           (if (<= z -1.8e-231)
             t_1
             (if (<= z -5.4e-289)
               (* y (/ (- t x) a))
               (if (<= z 7.6e+119) t_1 t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y * t) / a);
	double tmp;
	if (z <= -1.12e+191) {
		tmp = t;
	} else if (z <= -5.8e+85) {
		tmp = t * ((y - z) / a);
	} else if (z <= -5500000000.0) {
		tmp = t_1;
	} else if (z <= -8.2e-59) {
		tmp = y * (t / (a - z));
	} else if (z <= -1.8e-231) {
		tmp = t_1;
	} else if (z <= -5.4e-289) {
		tmp = y * ((t - x) / a);
	} else if (z <= 7.6e+119) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + ((y * t) / a)
    if (z <= (-1.12d+191)) then
        tmp = t
    else if (z <= (-5.8d+85)) then
        tmp = t * ((y - z) / a)
    else if (z <= (-5500000000.0d0)) then
        tmp = t_1
    else if (z <= (-8.2d-59)) then
        tmp = y * (t / (a - z))
    else if (z <= (-1.8d-231)) then
        tmp = t_1
    else if (z <= (-5.4d-289)) then
        tmp = y * ((t - x) / a)
    else if (z <= 7.6d+119) then
        tmp = t_1
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y * t) / a);
	double tmp;
	if (z <= -1.12e+191) {
		tmp = t;
	} else if (z <= -5.8e+85) {
		tmp = t * ((y - z) / a);
	} else if (z <= -5500000000.0) {
		tmp = t_1;
	} else if (z <= -8.2e-59) {
		tmp = y * (t / (a - z));
	} else if (z <= -1.8e-231) {
		tmp = t_1;
	} else if (z <= -5.4e-289) {
		tmp = y * ((t - x) / a);
	} else if (z <= 7.6e+119) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y * t) / a)
	tmp = 0
	if z <= -1.12e+191:
		tmp = t
	elif z <= -5.8e+85:
		tmp = t * ((y - z) / a)
	elif z <= -5500000000.0:
		tmp = t_1
	elif z <= -8.2e-59:
		tmp = y * (t / (a - z))
	elif z <= -1.8e-231:
		tmp = t_1
	elif z <= -5.4e-289:
		tmp = y * ((t - x) / a)
	elif z <= 7.6e+119:
		tmp = t_1
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y * t) / a))
	tmp = 0.0
	if (z <= -1.12e+191)
		tmp = t;
	elseif (z <= -5.8e+85)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= -5500000000.0)
		tmp = t_1;
	elseif (z <= -8.2e-59)
		tmp = Float64(y * Float64(t / Float64(a - z)));
	elseif (z <= -1.8e-231)
		tmp = t_1;
	elseif (z <= -5.4e-289)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 7.6e+119)
		tmp = t_1;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y * t) / a);
	tmp = 0.0;
	if (z <= -1.12e+191)
		tmp = t;
	elseif (z <= -5.8e+85)
		tmp = t * ((y - z) / a);
	elseif (z <= -5500000000.0)
		tmp = t_1;
	elseif (z <= -8.2e-59)
		tmp = y * (t / (a - z));
	elseif (z <= -1.8e-231)
		tmp = t_1;
	elseif (z <= -5.4e-289)
		tmp = y * ((t - x) / a);
	elseif (z <= 7.6e+119)
		tmp = t_1;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.12e+191], t, If[LessEqual[z, -5.8e+85], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5500000000.0], t$95$1, If[LessEqual[z, -8.2e-59], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.8e-231], t$95$1, If[LessEqual[z, -5.4e-289], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e+119], t$95$1, t]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -5500000000:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq -1.8 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.11999999999999999e191 or 7.59999999999999979e119 < z

    1. Initial program 56.8%

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

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

    if -1.11999999999999999e191 < z < -5.79999999999999995e85

    1. Initial program 80.8%

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

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

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

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

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

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

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

    if -5.79999999999999995e85 < z < -5.5e9 or -8.1999999999999991e-59 < z < -1.79999999999999987e-231 or -5.4e-289 < z < 7.59999999999999979e119

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

    if -5.5e9 < z < -8.1999999999999991e-59

    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 inf 51.8%

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

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

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

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

    if -1.79999999999999987e-231 < z < -5.4e-289

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{+191}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -5500000000:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-59}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-231}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-289}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{+119}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 35.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+177}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.26 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{z}{-a}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{+45}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-179}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-231}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-279}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-234}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5.5e+177)
   t
   (if (<= z -1.26e+85)
     (* t (/ z (- a)))
     (if (<= z -6.2e+45)
       t
       (if (<= z -4.1e-179)
         x
         (if (<= z -1.85e-231)
           (* t (/ y a))
           (if (<= z -3.3e-279)
             (* (/ y a) (- x))
             (if (<= z 7.2e-234) (* y (/ t a)) (if (<= z 2.6e+118) x t)))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.5e+177) {
		tmp = t;
	} else if (z <= -1.26e+85) {
		tmp = t * (z / -a);
	} else if (z <= -6.2e+45) {
		tmp = t;
	} else if (z <= -4.1e-179) {
		tmp = x;
	} else if (z <= -1.85e-231) {
		tmp = t * (y / a);
	} else if (z <= -3.3e-279) {
		tmp = (y / a) * -x;
	} else if (z <= 7.2e-234) {
		tmp = y * (t / a);
	} else if (z <= 2.6e+118) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-5.5d+177)) then
        tmp = t
    else if (z <= (-1.26d+85)) then
        tmp = t * (z / -a)
    else if (z <= (-6.2d+45)) then
        tmp = t
    else if (z <= (-4.1d-179)) then
        tmp = x
    else if (z <= (-1.85d-231)) then
        tmp = t * (y / a)
    else if (z <= (-3.3d-279)) then
        tmp = (y / a) * -x
    else if (z <= 7.2d-234) then
        tmp = y * (t / a)
    else if (z <= 2.6d+118) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.5e+177) {
		tmp = t;
	} else if (z <= -1.26e+85) {
		tmp = t * (z / -a);
	} else if (z <= -6.2e+45) {
		tmp = t;
	} else if (z <= -4.1e-179) {
		tmp = x;
	} else if (z <= -1.85e-231) {
		tmp = t * (y / a);
	} else if (z <= -3.3e-279) {
		tmp = (y / a) * -x;
	} else if (z <= 7.2e-234) {
		tmp = y * (t / a);
	} else if (z <= 2.6e+118) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -5.5e+177:
		tmp = t
	elif z <= -1.26e+85:
		tmp = t * (z / -a)
	elif z <= -6.2e+45:
		tmp = t
	elif z <= -4.1e-179:
		tmp = x
	elif z <= -1.85e-231:
		tmp = t * (y / a)
	elif z <= -3.3e-279:
		tmp = (y / a) * -x
	elif z <= 7.2e-234:
		tmp = y * (t / a)
	elif z <= 2.6e+118:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5.5e+177)
		tmp = t;
	elseif (z <= -1.26e+85)
		tmp = Float64(t * Float64(z / Float64(-a)));
	elseif (z <= -6.2e+45)
		tmp = t;
	elseif (z <= -4.1e-179)
		tmp = x;
	elseif (z <= -1.85e-231)
		tmp = Float64(t * Float64(y / a));
	elseif (z <= -3.3e-279)
		tmp = Float64(Float64(y / a) * Float64(-x));
	elseif (z <= 7.2e-234)
		tmp = Float64(y * Float64(t / a));
	elseif (z <= 2.6e+118)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -5.5e+177)
		tmp = t;
	elseif (z <= -1.26e+85)
		tmp = t * (z / -a);
	elseif (z <= -6.2e+45)
		tmp = t;
	elseif (z <= -4.1e-179)
		tmp = x;
	elseif (z <= -1.85e-231)
		tmp = t * (y / a);
	elseif (z <= -3.3e-279)
		tmp = (y / a) * -x;
	elseif (z <= 7.2e-234)
		tmp = y * (t / a);
	elseif (z <= 2.6e+118)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.5e+177], t, If[LessEqual[z, -1.26e+85], N[(t * N[(z / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e+45], t, If[LessEqual[z, -4.1e-179], x, If[LessEqual[z, -1.85e-231], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.3e-279], N[(N[(y / a), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[z, 7.2e-234], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+118], x, t]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -6.2 \cdot 10^{+45}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -4.1 \cdot 10^{-179}:\\
\;\;\;\;x\\

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

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

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -5.49999999999999993e177 or -1.26000000000000003e85 < z < -6.19999999999999975e45 or 2.60000000000000016e118 < z

    1. Initial program 62.6%

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

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

    if -5.49999999999999993e177 < z < -1.26000000000000003e85

    1. Initial program 79.9%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{z}{\color{blue}{0 - \left(a - z\right)}} \]
      4. associate--r-55.4%

        \[\leadsto t \cdot \frac{z}{\color{blue}{\left(0 - a\right) + z}} \]
      5. neg-sub055.4%

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

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

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

        \[\leadsto \color{blue}{-\frac{t \cdot z}{a}} \]
      2. associate-/l*44.1%

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

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

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

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

    if -6.19999999999999975e45 < z < -4.1e-179 or 7.1999999999999997e-234 < z < 2.60000000000000016e118

    1. Initial program 91.2%

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

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

    if -4.1e-179 < z < -1.84999999999999997e-231

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

    if -1.84999999999999997e-231 < z < -3.3e-279

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

    if -3.3e-279 < z < 7.1999999999999997e-234

    1. Initial program 93.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+177}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.26 \cdot 10^{+85}:\\ \;\;\;\;t \cdot \frac{z}{-a}\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{+45}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-179}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-231}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-279}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-234}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 48.0% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-178}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3.8 \cdot 10^{-231}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -6.5 \cdot 10^{-279}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.79999999999999964e190 or 6.39999999999999979e119 < z

    1. Initial program 56.8%

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

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

    if -3.79999999999999964e190 < z < -2.64999999999999996e45

    1. Initial program 82.2%

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

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

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

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

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

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

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

    if -2.64999999999999996e45 < z < -1.24999999999999994e-178 or -3.80000000000000013e-231 < z < -6.4999999999999997e-279

    1. Initial program 92.0%

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

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

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

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

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

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

        \[\leadsto x + x \cdot \frac{y - z}{\color{blue}{0 - \left(a - z\right)}} \]
      6. associate--r-57.0%

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

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

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

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

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

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

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

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

    if -1.24999999999999994e-178 < z < -3.80000000000000013e-231 or -6.4999999999999997e-279 < z < 6.39999999999999979e119

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+190}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{+45}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-178}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-231}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-279}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{+119}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 38.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+190}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.9 \cdot 10^{+26}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -1020000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-61}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-179}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-233}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.8e+190)
   t
   (if (<= z -5.9e+26)
     (* t (/ (- y z) a))
     (if (<= z -1020000000.0)
       x
       (if (<= z -1.15e-61)
         (* y (/ t (- a z)))
         (if (<= z -9e-179)
           x
           (if (<= z 6.2e-233)
             (* y (/ (- t x) a))
             (if (<= z 2.6e+118) x t))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.8e+190) {
		tmp = t;
	} else if (z <= -5.9e+26) {
		tmp = t * ((y - z) / a);
	} else if (z <= -1020000000.0) {
		tmp = x;
	} else if (z <= -1.15e-61) {
		tmp = y * (t / (a - z));
	} else if (z <= -9e-179) {
		tmp = x;
	} else if (z <= 6.2e-233) {
		tmp = y * ((t - x) / a);
	} else if (z <= 2.6e+118) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-3.8d+190)) then
        tmp = t
    else if (z <= (-5.9d+26)) then
        tmp = t * ((y - z) / a)
    else if (z <= (-1020000000.0d0)) then
        tmp = x
    else if (z <= (-1.15d-61)) then
        tmp = y * (t / (a - z))
    else if (z <= (-9d-179)) then
        tmp = x
    else if (z <= 6.2d-233) then
        tmp = y * ((t - x) / a)
    else if (z <= 2.6d+118) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.8e+190) {
		tmp = t;
	} else if (z <= -5.9e+26) {
		tmp = t * ((y - z) / a);
	} else if (z <= -1020000000.0) {
		tmp = x;
	} else if (z <= -1.15e-61) {
		tmp = y * (t / (a - z));
	} else if (z <= -9e-179) {
		tmp = x;
	} else if (z <= 6.2e-233) {
		tmp = y * ((t - x) / a);
	} else if (z <= 2.6e+118) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.8e+190:
		tmp = t
	elif z <= -5.9e+26:
		tmp = t * ((y - z) / a)
	elif z <= -1020000000.0:
		tmp = x
	elif z <= -1.15e-61:
		tmp = y * (t / (a - z))
	elif z <= -9e-179:
		tmp = x
	elif z <= 6.2e-233:
		tmp = y * ((t - x) / a)
	elif z <= 2.6e+118:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.8e+190)
		tmp = t;
	elseif (z <= -5.9e+26)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= -1020000000.0)
		tmp = x;
	elseif (z <= -1.15e-61)
		tmp = Float64(y * Float64(t / Float64(a - z)));
	elseif (z <= -9e-179)
		tmp = x;
	elseif (z <= 6.2e-233)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 2.6e+118)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.8e+190)
		tmp = t;
	elseif (z <= -5.9e+26)
		tmp = t * ((y - z) / a);
	elseif (z <= -1020000000.0)
		tmp = x;
	elseif (z <= -1.15e-61)
		tmp = y * (t / (a - z));
	elseif (z <= -9e-179)
		tmp = x;
	elseif (z <= 6.2e-233)
		tmp = y * ((t - x) / a);
	elseif (z <= 2.6e+118)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+190], t, If[LessEqual[z, -5.9e+26], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1020000000.0], x, If[LessEqual[z, -1.15e-61], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9e-179], x, If[LessEqual[z, 6.2e-233], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+118], x, t]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -1020000000:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq -9 \cdot 10^{-179}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.79999999999999964e190 or 2.60000000000000016e118 < z

    1. Initial program 58.6%

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

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

    if -3.79999999999999964e190 < z < -5.9000000000000003e26

    1. Initial program 83.5%

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

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

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

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

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

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

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

    if -5.9000000000000003e26 < z < -1.02e9 or -1.14999999999999996e-61 < z < -8.99999999999999984e-179 or 6.2000000000000003e-233 < z < 2.60000000000000016e118

    1. Initial program 91.6%

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

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

    if -1.02e9 < z < -1.14999999999999996e-61

    1. Initial program 86.9%

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

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

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

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

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

    if -8.99999999999999984e-179 < z < 6.2000000000000003e-233

    1. Initial program 94.9%

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

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

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

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

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

Alternative 8: 36.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+190}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{+29}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -6000000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -6 \cdot 10^{-60}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-178}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-233}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.8e+190)
   t
   (if (<= z -3.5e+29)
     (* t (/ (- y z) a))
     (if (<= z -6000000.0)
       x
       (if (<= z -6e-60)
         (* y (/ t (- a z)))
         (if (<= z -3.2e-178)
           x
           (if (<= z 4e-233)
             (* t (/ y (- a z)))
             (if (<= z 2.6e+118) x t))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.8e+190) {
		tmp = t;
	} else if (z <= -3.5e+29) {
		tmp = t * ((y - z) / a);
	} else if (z <= -6000000.0) {
		tmp = x;
	} else if (z <= -6e-60) {
		tmp = y * (t / (a - z));
	} else if (z <= -3.2e-178) {
		tmp = x;
	} else if (z <= 4e-233) {
		tmp = t * (y / (a - z));
	} else if (z <= 2.6e+118) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-3.8d+190)) then
        tmp = t
    else if (z <= (-3.5d+29)) then
        tmp = t * ((y - z) / a)
    else if (z <= (-6000000.0d0)) then
        tmp = x
    else if (z <= (-6d-60)) then
        tmp = y * (t / (a - z))
    else if (z <= (-3.2d-178)) then
        tmp = x
    else if (z <= 4d-233) then
        tmp = t * (y / (a - z))
    else if (z <= 2.6d+118) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.8e+190) {
		tmp = t;
	} else if (z <= -3.5e+29) {
		tmp = t * ((y - z) / a);
	} else if (z <= -6000000.0) {
		tmp = x;
	} else if (z <= -6e-60) {
		tmp = y * (t / (a - z));
	} else if (z <= -3.2e-178) {
		tmp = x;
	} else if (z <= 4e-233) {
		tmp = t * (y / (a - z));
	} else if (z <= 2.6e+118) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.8e+190:
		tmp = t
	elif z <= -3.5e+29:
		tmp = t * ((y - z) / a)
	elif z <= -6000000.0:
		tmp = x
	elif z <= -6e-60:
		tmp = y * (t / (a - z))
	elif z <= -3.2e-178:
		tmp = x
	elif z <= 4e-233:
		tmp = t * (y / (a - z))
	elif z <= 2.6e+118:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.8e+190)
		tmp = t;
	elseif (z <= -3.5e+29)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= -6000000.0)
		tmp = x;
	elseif (z <= -6e-60)
		tmp = Float64(y * Float64(t / Float64(a - z)));
	elseif (z <= -3.2e-178)
		tmp = x;
	elseif (z <= 4e-233)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	elseif (z <= 2.6e+118)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.8e+190)
		tmp = t;
	elseif (z <= -3.5e+29)
		tmp = t * ((y - z) / a);
	elseif (z <= -6000000.0)
		tmp = x;
	elseif (z <= -6e-60)
		tmp = y * (t / (a - z));
	elseif (z <= -3.2e-178)
		tmp = x;
	elseif (z <= 4e-233)
		tmp = t * (y / (a - z));
	elseif (z <= 2.6e+118)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+190], t, If[LessEqual[z, -3.5e+29], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6000000.0], x, If[LessEqual[z, -6e-60], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.2e-178], x, If[LessEqual[z, 4e-233], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+118], x, t]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -6000000:\\
\;\;\;\;x\\

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

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

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.79999999999999964e190 or 2.60000000000000016e118 < z

    1. Initial program 58.6%

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

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

    if -3.79999999999999964e190 < z < -3.49999999999999979e29

    1. Initial program 83.5%

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

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

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

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

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

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

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

    if -3.49999999999999979e29 < z < -6e6 or -6.00000000000000038e-60 < z < -3.2000000000000001e-178 or 3.99999999999999983e-233 < z < 2.60000000000000016e118

    1. Initial program 91.5%

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

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

    if -6e6 < z < -6.00000000000000038e-60

    1. Initial program 86.9%

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

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

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

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

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

    if -3.2000000000000001e-178 < z < 3.99999999999999983e-233

    1. Initial program 95.0%

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

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

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

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

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

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

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

Alternative 9: 36.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;z \leq -3.8 \cdot 10^{+190}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{+30}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -390000:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-177}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-233}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y (- a z)))))
   (if (<= z -3.8e+190)
     t
     (if (<= z -2.7e+30)
       (* t (/ (- y z) a))
       (if (<= z -390000.0)
         x
         (if (<= z -8.8e-60)
           t_1
           (if (<= z -1.3e-177)
             x
             (if (<= z 1.9e-233) t_1 (if (<= z 2.6e+118) x t)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (z <= -3.8e+190) {
		tmp = t;
	} else if (z <= -2.7e+30) {
		tmp = t * ((y - z) / a);
	} else if (z <= -390000.0) {
		tmp = x;
	} else if (z <= -8.8e-60) {
		tmp = t_1;
	} else if (z <= -1.3e-177) {
		tmp = x;
	} else if (z <= 1.9e-233) {
		tmp = t_1;
	} else if (z <= 2.6e+118) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (y / (a - z))
    if (z <= (-3.8d+190)) then
        tmp = t
    else if (z <= (-2.7d+30)) then
        tmp = t * ((y - z) / a)
    else if (z <= (-390000.0d0)) then
        tmp = x
    else if (z <= (-8.8d-60)) then
        tmp = t_1
    else if (z <= (-1.3d-177)) then
        tmp = x
    else if (z <= 1.9d-233) then
        tmp = t_1
    else if (z <= 2.6d+118) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (z <= -3.8e+190) {
		tmp = t;
	} else if (z <= -2.7e+30) {
		tmp = t * ((y - z) / a);
	} else if (z <= -390000.0) {
		tmp = x;
	} else if (z <= -8.8e-60) {
		tmp = t_1;
	} else if (z <= -1.3e-177) {
		tmp = x;
	} else if (z <= 1.9e-233) {
		tmp = t_1;
	} else if (z <= 2.6e+118) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / (a - z))
	tmp = 0
	if z <= -3.8e+190:
		tmp = t
	elif z <= -2.7e+30:
		tmp = t * ((y - z) / a)
	elif z <= -390000.0:
		tmp = x
	elif z <= -8.8e-60:
		tmp = t_1
	elif z <= -1.3e-177:
		tmp = x
	elif z <= 1.9e-233:
		tmp = t_1
	elif z <= 2.6e+118:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (z <= -3.8e+190)
		tmp = t;
	elseif (z <= -2.7e+30)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= -390000.0)
		tmp = x;
	elseif (z <= -8.8e-60)
		tmp = t_1;
	elseif (z <= -1.3e-177)
		tmp = x;
	elseif (z <= 1.9e-233)
		tmp = t_1;
	elseif (z <= 2.6e+118)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / (a - z));
	tmp = 0.0;
	if (z <= -3.8e+190)
		tmp = t;
	elseif (z <= -2.7e+30)
		tmp = t * ((y - z) / a);
	elseif (z <= -390000.0)
		tmp = x;
	elseif (z <= -8.8e-60)
		tmp = t_1;
	elseif (z <= -1.3e-177)
		tmp = x;
	elseif (z <= 1.9e-233)
		tmp = t_1;
	elseif (z <= 2.6e+118)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+190], t, If[LessEqual[z, -2.7e+30], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -390000.0], x, If[LessEqual[z, -8.8e-60], t$95$1, If[LessEqual[z, -1.3e-177], x, If[LessEqual[z, 1.9e-233], t$95$1, If[LessEqual[z, 2.6e+118], x, t]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -390000:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -8.8 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.3 \cdot 10^{-177}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.9 \cdot 10^{-233}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.79999999999999964e190 or 2.60000000000000016e118 < z

    1. Initial program 58.6%

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

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

    if -3.79999999999999964e190 < z < -2.6999999999999999e30

    1. Initial program 83.5%

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

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

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

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

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

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

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

    if -2.6999999999999999e30 < z < -3.9e5 or -8.7999999999999995e-60 < z < -1.3e-177 or 1.9e-233 < z < 2.60000000000000016e118

    1. Initial program 91.5%

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

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

    if -3.9e5 < z < -8.7999999999999995e-60 or -1.3e-177 < z < 1.9e-233

    1. Initial program 93.3%

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

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

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

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

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

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

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

Alternative 10: 35.5% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -23000000000:\\
\;\;\;\;t\\

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

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

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -5.49999999999999993e177 or -1.65e86 < z < -2.3e10 or 2.60000000000000016e118 < z

    1. Initial program 66.2%

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

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

    if -5.49999999999999993e177 < z < -1.65e86

    1. Initial program 79.9%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{z}{\color{blue}{0 - \left(a - z\right)}} \]
      4. associate--r-55.4%

        \[\leadsto t \cdot \frac{z}{\color{blue}{\left(0 - a\right) + z}} \]
      5. neg-sub055.4%

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

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

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

        \[\leadsto \color{blue}{-\frac{t \cdot z}{a}} \]
      2. associate-/l*44.1%

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

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

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

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

    if -2.3e10 < z < -1.79999999999999987e-231

    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 inf 48.1%

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

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

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

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

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

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

    if -1.79999999999999987e-231 < z < -5.5000000000000002e-279

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

    if -5.5000000000000002e-279 < z < 1.78000000000000009e-233

    1. Initial program 93.6%

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

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

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

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

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

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

    if 1.78000000000000009e-233 < z < 2.60000000000000016e118

    1. Initial program 91.8%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification51.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+177}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{+86}:\\ \;\;\;\;t \cdot \frac{z}{-a}\\ \mathbf{elif}\;z \leq -23000000000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-231}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-279}:\\ \;\;\;\;\frac{y}{a} \cdot \left(-x\right)\\ \mathbf{elif}\;z \leq 1.78 \cdot 10^{-233}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 36.5% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -7 \cdot 10^{+42}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -7.2 \cdot 10^{-179}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.49999999999999993e177 or -3.5999999999999999e84 < z < -7.00000000000000047e42 or 2.60000000000000016e118 < z

    1. Initial program 62.6%

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

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

    if -5.49999999999999993e177 < z < -3.5999999999999999e84

    1. Initial program 79.9%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{z}{\color{blue}{0 - \left(a - z\right)}} \]
      4. associate--r-55.4%

        \[\leadsto t \cdot \frac{z}{\color{blue}{\left(0 - a\right) + z}} \]
      5. neg-sub055.4%

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

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

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

        \[\leadsto \color{blue}{-\frac{t \cdot z}{a}} \]
      2. associate-/l*44.1%

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

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

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

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

    if -7.00000000000000047e42 < z < -7.20000000000000015e-179 or 1.96000000000000003e-233 < z < 2.60000000000000016e118

    1. Initial program 91.2%

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

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

    if -7.20000000000000015e-179 < z < 1.96000000000000003e-233

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+177}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{+84}:\\ \;\;\;\;t \cdot \frac{z}{-a}\\ \mathbf{elif}\;z \leq -7 \cdot 10^{+42}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-179}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.96 \cdot 10^{-233}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 62.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -1.8 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.1799999999999999e55 or 6.2000000000000003e-74 < t

    1. Initial program 89.2%

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

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

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

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

    if -1.1799999999999999e55 < t < -1.79999999999999996e-32 or -2.9500000000000001e-89 < t < 6.2000000000000003e-74

    1. Initial program 78.2%

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

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

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

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

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

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

        \[\leadsto x + x \cdot \frac{y - z}{\color{blue}{0 - \left(a - z\right)}} \]
      6. associate--r-70.5%

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

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

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

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

    if -1.79999999999999996e-32 < t < -2.9500000000000001e-89

    1. Initial program 94.0%

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

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

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

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

Alternative 13: 58.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;t \leq -8.5 \cdot 10^{+65}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-21}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;t \leq -4.3 \cdot 10^{-90}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-104}:\\ \;\;\;\;x - x \cdot \frac{y}{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 (<= t -8.5e+65)
     t_1
     (if (<= t -4.6e-21)
       (+ x (/ (* y t) a))
       (if (<= t -4.3e-90)
         (* y (/ (- t x) (- a z)))
         (if (<= t 1.45e-104) (- x (* x (/ y 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 (t <= -8.5e+65) {
		tmp = t_1;
	} else if (t <= -4.6e-21) {
		tmp = x + ((y * t) / a);
	} else if (t <= -4.3e-90) {
		tmp = y * ((t - x) / (a - z));
	} else if (t <= 1.45e-104) {
		tmp = x - (x * (y / 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 (t <= (-8.5d+65)) then
        tmp = t_1
    else if (t <= (-4.6d-21)) then
        tmp = x + ((y * t) / a)
    else if (t <= (-4.3d-90)) then
        tmp = y * ((t - x) / (a - z))
    else if (t <= 1.45d-104) then
        tmp = x - (x * (y / 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 (t <= -8.5e+65) {
		tmp = t_1;
	} else if (t <= -4.6e-21) {
		tmp = x + ((y * t) / a);
	} else if (t <= -4.3e-90) {
		tmp = y * ((t - x) / (a - z));
	} else if (t <= 1.45e-104) {
		tmp = x - (x * (y / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if t <= -8.5e+65:
		tmp = t_1
	elif t <= -4.6e-21:
		tmp = x + ((y * t) / a)
	elif t <= -4.3e-90:
		tmp = y * ((t - x) / (a - z))
	elif t <= 1.45e-104:
		tmp = x - (x * (y / 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 (t <= -8.5e+65)
		tmp = t_1;
	elseif (t <= -4.6e-21)
		tmp = Float64(x + Float64(Float64(y * t) / a));
	elseif (t <= -4.3e-90)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (t <= 1.45e-104)
		tmp = Float64(x - Float64(x * Float64(y / 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 (t <= -8.5e+65)
		tmp = t_1;
	elseif (t <= -4.6e-21)
		tmp = x + ((y * t) / a);
	elseif (t <= -4.3e-90)
		tmp = y * ((t - x) / (a - z));
	elseif (t <= 1.45e-104)
		tmp = x - (x * (y / 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[t, -8.5e+65], t$95$1, If[LessEqual[t, -4.6e-21], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.3e-90], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e-104], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4.6 \cdot 10^{-21}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.50000000000000075e65 or 1.4500000000000001e-104 < t

    1. Initial program 89.2%

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

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

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

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

    if -8.50000000000000075e65 < t < -4.59999999999999999e-21

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

    if -4.59999999999999999e-21 < t < -4.3000000000000002e-90

    1. Initial program 83.5%

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

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

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

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

    if -4.3000000000000002e-90 < t < 1.4500000000000001e-104

    1. Initial program 77.6%

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

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

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

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

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

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

        \[\leadsto x + x \cdot \frac{y - z}{\color{blue}{0 - \left(a - z\right)}} \]
      6. associate--r-73.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.5 \cdot 10^{+65}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-21}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;t \leq -4.3 \cdot 10^{-90}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-104}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 50.6% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;z \leq -6.6 \cdot 10^{-59} \lor \neg \left(z \leq 6 \cdot 10^{+119}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.49999999999999993e177 or -1.49999999999999988e86 < z < -6.59999999999999964e-59 or 6.00000000000000002e119 < z

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

    if -5.49999999999999993e177 < z < -1.49999999999999988e86

    1. Initial program 79.9%

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

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

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

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

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

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

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

    if -6.59999999999999964e-59 < z < 6.00000000000000002e119

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+177}:\\ \;\;\;\;t \cdot \left(\frac{y}{-z} - -1\right)\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{+86}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq -6.6 \cdot 10^{-59} \lor \neg \left(z \leq 6 \cdot 10^{+119}\right):\\ \;\;\;\;t \cdot \left(\frac{y}{-z} - -1\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 51.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -1.8 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 10^{+120}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.99999999999999937e81 or 9.9999999999999998e119 < z

    1. Initial program 64.4%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{z}{\color{blue}{0 - \left(a - z\right)}} \]
      4. associate--r-66.9%

        \[\leadsto t \cdot \frac{z}{\color{blue}{\left(0 - a\right) + z}} \]
      5. neg-sub066.9%

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

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

    if -7.99999999999999937e81 < z < -1.79999999999999987e-231 or -5.5000000000000004e-289 < z < 9.9999999999999998e119

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

    if -1.79999999999999987e-231 < z < -5.5000000000000004e-289

    1. Initial program 99.9%

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a}} \]
    7. Step-by-step derivation
      1. clear-num75.5%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
    8. Applied egg-rr75.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+81}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -1.8 \cdot 10^{-231}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-289}:\\ \;\;\;\;\frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 10^{+120}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 69.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -4.3 \cdot 10^{-146} \lor \neg \left(z \leq 25000\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\

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


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

    1. Initial program 58.4%

      \[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. Step-by-step derivation
      1. associate-/l*80.6%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    7. Applied egg-rr80.8%

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

    if -7.4999999999999997e115 < z < -4.2999999999999999e-146 or 25000 < z

    1. Initial program 83.8%

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

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

    if -4.2999999999999999e-146 < z < 25000

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

Alternative 17: 79.0% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.8499999999999999e161 or 2.60000000000000016e118 < z

    1. Initial program 58.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8499999999999999e161 < z < -3.3000000000000002e-67

    1. Initial program 88.1%

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

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

    if -3.3000000000000002e-67 < z < 2.60000000000000016e118

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

Alternative 18: 74.3% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.2e116 or 3.9e124 < z

    1. Initial program 60.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    7. Applied egg-rr75.8%

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

    if -3.2e116 < z < -7.0000000000000003e-69

    1. Initial program 91.0%

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

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

    if -7.0000000000000003e-69 < z < 3.9e124

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

Alternative 19: 38.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -6.8 \cdot 10^{-179}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.5000000000000003e41 or 2.60000000000000016e118 < z

    1. Initial program 66.9%

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

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

    if -5.5000000000000003e41 < z < -6.7999999999999995e-179 or 2.5999999999999998e-233 < z < 2.60000000000000016e118

    1. Initial program 91.2%

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

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

    if -6.7999999999999995e-179 < z < 2.5999999999999998e-233

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

Alternative 20: 58.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+55} \lor \neg \left(t \leq 3.4 \cdot 10^{-93}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.3e55 or 3.40000000000000001e-93 < t

    1. Initial program 88.7%

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

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

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

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

    if -1.3e55 < t < 3.40000000000000001e-93

    1. Initial program 80.0%

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

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

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

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

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

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

        \[\leadsto x + x \cdot \frac{y - z}{\color{blue}{0 - \left(a - z\right)}} \]
      6. associate--r-68.2%

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

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

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

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

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

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

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

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

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

Alternative 21: 64.4% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.70000000000000009e-59

    1. Initial program 75.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    7. Applied egg-rr72.9%

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

    if -1.70000000000000009e-59 < z < 2.60000000000000016e118

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

    if 2.60000000000000016e118 < z

    1. Initial program 62.9%

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{z}{\color{blue}{\left(0 - a\right) + z}} \]
      5. neg-sub065.3%

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

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

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

Alternative 22: 64.4% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.09999999999999999e-59

    1. Initial program 75.6%

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

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

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

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

    if -3.09999999999999999e-59 < z < 2.60000000000000016e118

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

    if 2.60000000000000016e118 < z

    1. Initial program 62.9%

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{z}{\color{blue}{\left(0 - a\right) + z}} \]
      5. neg-sub065.3%

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

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

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

Alternative 23: 63.3% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.1999999999999991e-59

    1. Initial program 75.6%

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

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

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

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

    if -8.1999999999999991e-59 < z < 2.60000000000000016e118

    1. Initial program 93.0%

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

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

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

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

    if 2.60000000000000016e118 < z

    1. Initial program 62.9%

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{z}{\color{blue}{\left(0 - a\right) + z}} \]
      5. neg-sub065.3%

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

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

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

Alternative 24: 38.1% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+118}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.39999999999999999e41 or 2.60000000000000016e118 < z

    1. Initial program 66.9%

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

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

    if -5.39999999999999999e41 < z < 2.60000000000000016e118

    1. Initial program 92.4%

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

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

Alternative 25: 25.4% accurate, 13.0× speedup?

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

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

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

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

Alternative 26: 2.8% accurate, 13.0× speedup?

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

\\
0
\end{array}
Derivation
  1. Initial program 84.7%

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

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

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

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

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

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

      \[\leadsto x + x \cdot \frac{y - z}{\color{blue}{0 - \left(a - z\right)}} \]
    6. associate--r-48.5%

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

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

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

    \[\leadsto \color{blue}{x + -1 \cdot x} \]
  7. Step-by-step derivation
    1. distribute-rgt1-in2.8%

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

      \[\leadsto \color{blue}{0} \cdot x \]
    3. mul0-lft2.8%

      \[\leadsto \color{blue}{0} \]
  8. Simplified2.8%

    \[\leadsto \color{blue}{0} \]
  9. Add Preprocessing

Reproduce

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