Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.3% → 94.0%
Time: 15.6s
Alternatives: 22
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 22 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.3% 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: 94.0% accurate, 0.1× speedup?

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

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

\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)))) < -1e-216 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.6%

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

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub90.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*93.2%

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

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

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

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

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

Alternative 2: 90.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-216} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \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 (* (- y z) (/ (- t x) (- a z))))))
   (if (or (<= t_1 -1e-216) (not (<= t_1 0.0)))
     (+ x (/ (- y z) (/ (- a z) (- t x))))
     (+ t (* (/ (- t x) z) (- a y))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if ((t_1 <= -1e-216) || !(t_1 <= 0.0)) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} 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 + ((y - z) * ((t - x) / (a - z)))
    if ((t_1 <= (-1d-216)) .or. (.not. (t_1 <= 0.0d0))) then
        tmp = x + ((y - z) / ((a - z) / (t - x)))
    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 + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if ((t_1 <= -1e-216) || !(t_1 <= 0.0)) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t + (((t - x) / z) * (a - y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((t - x) / (a - z)))
	tmp = 0
	if (t_1 <= -1e-216) or not (t_1 <= 0.0):
		tmp = x + ((y - z) / ((a - z) / (t - x)))
	else:
		tmp = t + (((t - x) / z) * (a - y))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if ((t_1 <= -1e-216) || !(t_1 <= 0.0))
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
	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 + ((y - z) * ((t - x) / (a - z)));
	tmp = 0.0;
	if ((t_1 <= -1e-216) || ~((t_1 <= 0.0)))
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-216], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $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 + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-216} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

\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)))) < -1e-216 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 90.8%

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

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

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

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

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

    1. Initial program 3.6%

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

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub90.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*93.2%

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

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

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

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

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

Alternative 3: 90.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-216} \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 (* (- y z) (/ (- t x) (- a z))))))
   (if (or (<= t_1 -1e-216) (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 + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if ((t_1 <= -1e-216) || !(t_1 <= 0.0)) {
		tmp = t_1;
	} 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 + ((y - z) * ((t - x) / (a - z)))
    if ((t_1 <= (-1d-216)) .or. (.not. (t_1 <= 0.0d0))) then
        tmp = t_1
    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 + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if ((t_1 <= -1e-216) || !(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 + ((y - z) * ((t - x) / (a - z)))
	tmp = 0
	if (t_1 <= -1e-216) 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(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if ((t_1 <= -1e-216) || !(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 + ((y - z) * ((t - x) / (a - z)));
	tmp = 0.0;
	if ((t_1 <= -1e-216) || ~((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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-216], 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 + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-216} \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 2 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1e-216 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 90.8%

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

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

    1. Initial program 3.6%

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

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub90.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*93.2%

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

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

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

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

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

Alternative 4: 60.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \frac{y}{a}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ t_3 := y \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;z \leq -7.5 \cdot 10^{+35}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-94}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-248}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-196}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+27}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* t (/ y a))))
        (t_2 (* t (/ (- y z) (- a z))))
        (t_3 (* y (/ (- t x) (- a z)))))
   (if (<= z -7.5e+35)
     t_2
     (if (<= z -2.8e-64)
       t_1
       (if (<= z -1.85e-94)
         t_3
         (if (<= z 9e-248)
           t_1
           (if (<= z 2.4e-196) t_3 (if (<= z 3.4e+27) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double t_3 = y * ((t - x) / (a - z));
	double tmp;
	if (z <= -7.5e+35) {
		tmp = t_2;
	} else if (z <= -2.8e-64) {
		tmp = t_1;
	} else if (z <= -1.85e-94) {
		tmp = t_3;
	} else if (z <= 9e-248) {
		tmp = t_1;
	} else if (z <= 2.4e-196) {
		tmp = t_3;
	} else if (z <= 3.4e+27) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + (t * (y / a))
    t_2 = t * ((y - z) / (a - z))
    t_3 = y * ((t - x) / (a - z))
    if (z <= (-7.5d+35)) then
        tmp = t_2
    else if (z <= (-2.8d-64)) then
        tmp = t_1
    else if (z <= (-1.85d-94)) then
        tmp = t_3
    else if (z <= 9d-248) then
        tmp = t_1
    else if (z <= 2.4d-196) then
        tmp = t_3
    else if (z <= 3.4d+27) 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 + (t * (y / a));
	double t_2 = t * ((y - z) / (a - z));
	double t_3 = y * ((t - x) / (a - z));
	double tmp;
	if (z <= -7.5e+35) {
		tmp = t_2;
	} else if (z <= -2.8e-64) {
		tmp = t_1;
	} else if (z <= -1.85e-94) {
		tmp = t_3;
	} else if (z <= 9e-248) {
		tmp = t_1;
	} else if (z <= 2.4e-196) {
		tmp = t_3;
	} else if (z <= 3.4e+27) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t * (y / a))
	t_2 = t * ((y - z) / (a - z))
	t_3 = y * ((t - x) / (a - z))
	tmp = 0
	if z <= -7.5e+35:
		tmp = t_2
	elif z <= -2.8e-64:
		tmp = t_1
	elif z <= -1.85e-94:
		tmp = t_3
	elif z <= 9e-248:
		tmp = t_1
	elif z <= 2.4e-196:
		tmp = t_3
	elif z <= 3.4e+27:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t * Float64(y / a)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_3 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	tmp = 0.0
	if (z <= -7.5e+35)
		tmp = t_2;
	elseif (z <= -2.8e-64)
		tmp = t_1;
	elseif (z <= -1.85e-94)
		tmp = t_3;
	elseif (z <= 9e-248)
		tmp = t_1;
	elseif (z <= 2.4e-196)
		tmp = t_3;
	elseif (z <= 3.4e+27)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t * (y / a));
	t_2 = t * ((y - z) / (a - z));
	t_3 = y * ((t - x) / (a - z));
	tmp = 0.0;
	if (z <= -7.5e+35)
		tmp = t_2;
	elseif (z <= -2.8e-64)
		tmp = t_1;
	elseif (z <= -1.85e-94)
		tmp = t_3;
	elseif (z <= 9e-248)
		tmp = t_1;
	elseif (z <= 2.4e-196)
		tmp = t_3;
	elseif (z <= 3.4e+27)
		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[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+35], t$95$2, If[LessEqual[z, -2.8e-64], t$95$1, If[LessEqual[z, -1.85e-94], t$95$3, If[LessEqual[z, 9e-248], t$95$1, If[LessEqual[z, 2.4e-196], t$95$3, If[LessEqual[z, 3.4e+27], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.8 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.85 \cdot 10^{-94}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 9 \cdot 10^{-248}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-196}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;z \leq 3.4 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.4999999999999999e35 or 3.4e27 < z

    1. Initial program 64.7%

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

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

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

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

    if -7.4999999999999999e35 < z < -2.80000000000000004e-64 or -1.8499999999999999e-94 < z < 8.9999999999999992e-248 or 2.40000000000000021e-196 < z < 3.4e27

    1. Initial program 93.2%

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative58.2%

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

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

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

    if -2.80000000000000004e-64 < z < -1.8499999999999999e-94 or 8.9999999999999992e-248 < z < 2.40000000000000021e-196

    1. Initial program 95.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-64}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{-94}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{-248}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-196}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+27}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 51.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.10000000000000015e59 or 1.44999999999999987e136 < z

    1. Initial program 63.2%

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

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

    if -3.10000000000000015e59 < z < 1.15e-247 or 2.89999999999999987e-196 < z < 7.5000000000000004e-37

    1. Initial program 91.4%

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative55.6%

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

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

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

    if 1.15e-247 < z < 2.89999999999999987e-196

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{a - z}} \]
      6. neg-mul-178.3%

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

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

    if 7.5000000000000004e-37 < z < 1.44999999999999987e136

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+59}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-247}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-196}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-37}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+136}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 51.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 6.8 \cdot 10^{-248}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 2 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.1999999999999998e61 or 2.7e134 < z

    1. Initial program 63.2%

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

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

    if -9.1999999999999998e61 < z < 6.7999999999999996e-248 or 2.0000000000000001e-196 < z < 1.99999999999999992e28

    1. Initial program 91.3%

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative54.6%

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

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

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

    if 6.7999999999999996e-248 < z < 2.0000000000000001e-196

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{a - z}} \]
      6. neg-mul-178.3%

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

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

    if 1.99999999999999992e28 < z < 2.7e134

    1. Initial program 74.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+61}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-248}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-196}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+28}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+134}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 51.9% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 1.95 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.9999999999999998e61 or 2.0999999999999999e137 < z

    1. Initial program 63.2%

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

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

    if -3.9999999999999998e61 < z < 6.5e-248 or 8.2000000000000005e-194 < z < 1.9499999999999999e28

    1. Initial program 91.3%

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative54.6%

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

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

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

    if 6.5e-248 < z < 8.2000000000000005e-194

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

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

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

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

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

    if 1.9499999999999999e28 < z < 2.0999999999999999e137

    1. Initial program 74.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+61}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-248}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{-194}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+28}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+137}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 75.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{if}\;z \leq -1.22 \cdot 10^{+67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.48 \cdot 10^{-64}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-101}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-37}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* (/ (- t x) z) (- a y)))))
   (if (<= z -1.22e+67)
     t_1
     (if (<= z -1.48e-64)
       (+ x (* (- y z) (/ t (- a z))))
       (if (<= z -3.6e-101)
         (/ y (/ (- a z) (- t x)))
         (if (<= z 8e-37) (+ x (* (- t x) (/ (- y z) a))) 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.22e+67) {
		tmp = t_1;
	} else if (z <= -1.48e-64) {
		tmp = x + ((y - z) * (t / (a - z)));
	} else if (z <= -3.6e-101) {
		tmp = y / ((a - z) / (t - x));
	} else if (z <= 8e-37) {
		tmp = x + ((t - x) * ((y - z) / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t + (((t - x) / z) * (a - y))
    if (z <= (-1.22d+67)) then
        tmp = t_1
    else if (z <= (-1.48d-64)) then
        tmp = x + ((y - z) * (t / (a - z)))
    else if (z <= (-3.6d-101)) then
        tmp = y / ((a - z) / (t - x))
    else if (z <= 8d-37) then
        tmp = x + ((t - x) * ((y - z) / a))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (((t - x) / z) * (a - y));
	double tmp;
	if (z <= -1.22e+67) {
		tmp = t_1;
	} else if (z <= -1.48e-64) {
		tmp = x + ((y - z) * (t / (a - z)));
	} else if (z <= -3.6e-101) {
		tmp = y / ((a - z) / (t - x));
	} else if (z <= 8e-37) {
		tmp = x + ((t - x) * ((y - z) / a));
	} 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.22e+67:
		tmp = t_1
	elif z <= -1.48e-64:
		tmp = x + ((y - z) * (t / (a - z)))
	elif z <= -3.6e-101:
		tmp = y / ((a - z) / (t - x))
	elif z <= 8e-37:
		tmp = x + ((t - x) * ((y - z) / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y)))
	tmp = 0.0
	if (z <= -1.22e+67)
		tmp = t_1;
	elseif (z <= -1.48e-64)
		tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z))));
	elseif (z <= -3.6e-101)
		tmp = Float64(y / Float64(Float64(a - z) / Float64(t - x)));
	elseif (z <= 8e-37)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (((t - x) / z) * (a - y));
	tmp = 0.0;
	if (z <= -1.22e+67)
		tmp = t_1;
	elseif (z <= -1.48e-64)
		tmp = x + ((y - z) * (t / (a - z)));
	elseif (z <= -3.6e-101)
		tmp = y / ((a - z) / (t - x));
	elseif (z <= 8e-37)
		tmp = x + ((t - x) * ((y - z) / a));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.22e+67], t$95$1, If[LessEqual[z, -1.48e-64], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.6e-101], N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-37], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.22000000000000004e67 or 8.00000000000000053e-37 < z

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.22000000000000004e67 < z < -1.48e-64

    1. Initial program 91.3%

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

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

    if -1.48e-64 < z < -3.6e-101

    1. Initial program 91.1%

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

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

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

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

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

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

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

    if -3.6e-101 < z < 8.00000000000000053e-37

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

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

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

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

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

Alternative 9: 73.1% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t + a \cdot t\_2\\


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

    1. Initial program 68.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.75e67 < z < -0.14000000000000001 or 5.8000000000000003e-52 < z < 3.79999999999999989e150

    1. Initial program 83.5%

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

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

    if -0.14000000000000001 < z < 5.8000000000000003e-52

    1. Initial program 92.8%

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

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

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

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

    if 3.79999999999999989e150 < z

    1. Initial program 50.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \left(-\color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      3. distribute-rgt-neg-in74.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+67}:\\ \;\;\;\;t - y \cdot \frac{t - x}{z}\\ \mathbf{elif}\;z \leq -0.14:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-52}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+150}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + a \cdot \frac{t - x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 60.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -2.22 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 5.8 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.79999999999999989e110 or 5.80000000000000027e142 < a

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative60.8%

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

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

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

    if -3.79999999999999989e110 < a < -2.22000000000000002e-169 or -1.000000000000002e-309 < a < 5.80000000000000027e142

    1. Initial program 78.0%

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

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

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

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

    if -2.22000000000000002e-169 < a < -1.000000000000002e-309

    1. Initial program 64.4%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
      2. clear-num67.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.8 \cdot 10^{+110}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq -2.22 \cdot 10^{-169}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+142}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 59.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 1.35 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.20000000000000013e35 or 3.20000000000000015e27 < z

    1. Initial program 64.7%

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

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

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

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

    if -5.20000000000000013e35 < z < 1.35000000000000004e-247 or 2.0000000000000001e-196 < z < 3.20000000000000015e27

    1. Initial program 93.0%

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    5. Step-by-step derivation
      1. +-commutative55.9%

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

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

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

    if 1.35000000000000004e-247 < z < 2.0000000000000001e-196

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{a - z}} \]
      6. neg-mul-178.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+35}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-247}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-196}:\\ \;\;\;\;x \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+27}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 44.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq 5.2 \cdot 10^{-45}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;y \leq 5.8 \cdot 10^{+79}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.15e42 or 5.79999999999999984e79 < y

    1. Initial program 88.2%

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

      \[\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 a around inf 45.0%

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

    if -1.15e42 < y < 5.19999999999999973e-45 or 6.1999999999999998e-13 < y < 5.79999999999999984e79

    1. Initial program 75.8%

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

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

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

    if 5.19999999999999973e-45 < y < 6.1999999999999998e-13

    1. Initial program 64.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 42.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y}{a - z}\\ \mathbf{if}\;y \leq -5.4 \cdot 10^{+42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 5.4 \cdot 10^{-45}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-13}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+79}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ y (- a z)))))
   (if (<= y -5.4e+42)
     t_1
     (if (<= y 5.4e-45)
       (+ x t)
       (if (<= y 6.2e-13)
         (* x (/ (- y a) z))
         (if (<= y 6.5e+79) (+ x t) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (y / (a - z));
	double tmp;
	if (y <= -5.4e+42) {
		tmp = t_1;
	} else if (y <= 5.4e-45) {
		tmp = x + t;
	} else if (y <= 6.2e-13) {
		tmp = x * ((y - a) / z);
	} else if (y <= 6.5e+79) {
		tmp = x + t;
	} 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 / (a - z))
    if (y <= (-5.4d+42)) then
        tmp = t_1
    else if (y <= 5.4d-45) then
        tmp = x + t
    else if (y <= 6.2d-13) then
        tmp = x * ((y - a) / z)
    else if (y <= 6.5d+79) then
        tmp = x + t
    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 / (a - z));
	double tmp;
	if (y <= -5.4e+42) {
		tmp = t_1;
	} else if (y <= 5.4e-45) {
		tmp = x + t;
	} else if (y <= 6.2e-13) {
		tmp = x * ((y - a) / z);
	} else if (y <= 6.5e+79) {
		tmp = x + t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (y / (a - z))
	tmp = 0
	if y <= -5.4e+42:
		tmp = t_1
	elif y <= 5.4e-45:
		tmp = x + t
	elif y <= 6.2e-13:
		tmp = x * ((y - a) / z)
	elif y <= 6.5e+79:
		tmp = x + t
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (y <= -5.4e+42)
		tmp = t_1;
	elseif (y <= 5.4e-45)
		tmp = Float64(x + t);
	elseif (y <= 6.2e-13)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (y <= 6.5e+79)
		tmp = Float64(x + t);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (y / (a - z));
	tmp = 0.0;
	if (y <= -5.4e+42)
		tmp = t_1;
	elseif (y <= 5.4e-45)
		tmp = x + t;
	elseif (y <= 6.2e-13)
		tmp = x * ((y - a) / z);
	elseif (y <= 6.5e+79)
		tmp = x + t;
	else
		tmp = t_1;
	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[y, -5.4e+42], t$95$1, If[LessEqual[y, 5.4e-45], N[(x + t), $MachinePrecision], If[LessEqual[y, 6.2e-13], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+79], N[(x + t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 5.4 \cdot 10^{-45}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;y \leq 6.5 \cdot 10^{+79}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.4000000000000001e42 or 6.49999999999999954e79 < y

    1. Initial program 88.2%

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

      \[\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 29.6%

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

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

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

    if -5.4000000000000001e42 < y < 5.3999999999999997e-45 or 6.1999999999999998e-13 < y < 6.49999999999999954e79

    1. Initial program 75.8%

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

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

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

    if 5.3999999999999997e-45 < y < 6.1999999999999998e-13

    1. Initial program 64.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 70.9% accurate, 0.5× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t + a \cdot t\_1\\


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

    1. Initial program 68.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.50000000000000062e35 < z < 6.8e27

    1. Initial program 93.5%

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

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

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

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

    if 6.8e27 < z < 3.69999999999999987e150

    1. Initial program 74.8%

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

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

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

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

    if 3.69999999999999987e150 < z

    1. Initial program 50.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \left(-\color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      3. distribute-rgt-neg-in74.1%

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

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

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

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

Alternative 15: 67.8% accurate, 0.5× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t + a \cdot t\_1\\


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

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8 < z < 1.99999999999999992e28

    1. Initial program 92.9%

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

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

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

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

    if 1.99999999999999992e28 < z < 1.0199999999999999e150

    1. Initial program 74.8%

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

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

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

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

    if 1.0199999999999999e150 < z

    1. Initial program 50.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \left(-\color{blue}{a \cdot \frac{t - x}{z}}\right) \]
      3. distribute-rgt-neg-in74.1%

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

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

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

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

Alternative 16: 39.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 1.06 \cdot 10^{-247}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.9 \cdot 10^{+28}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.7000000000000001e59 or 1.8999999999999999e28 < z

    1. Initial program 65.2%

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

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

    if -5.7000000000000001e59 < z < 1.06e-247 or 3e-196 < z < 1.8999999999999999e28

    1. Initial program 91.3%

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

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

    if 1.06e-247 < z < 3e-196

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{a - z}} \]
      6. neg-mul-178.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.7 \cdot 10^{+59}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{-247}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-196}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{a}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 39.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 7.8 \cdot 10^{-249}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.56 \cdot 10^{+28}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.00000000000000004e64 or 1.5599999999999999e28 < z

    1. Initial program 65.2%

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

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

    if -2.00000000000000004e64 < z < 7.7999999999999998e-249 or 2.40000000000000021e-196 < z < 1.5599999999999999e28

    1. Initial program 91.3%

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

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

    if 7.7999999999999998e-249 < z < 2.40000000000000021e-196

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\frac{-1 \cdot y}{a - z}} \]
      6. neg-mul-178.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+64}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{-249}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-196}:\\ \;\;\;\;x \cdot \frac{y}{-a}\\ \mathbf{elif}\;z \leq 1.56 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 69.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -400 \lor \neg \left(z \leq 2.7 \cdot 10^{-37}\right):\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -400 or 2.70000000000000016e-37 < z

    1. Initial program 69.7%

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

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. div-sub65.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*71.4%

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

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

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

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

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

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

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

    if -400 < z < 2.70000000000000016e-37

    1. Initial program 93.1%

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

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

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

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

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

Alternative 19: 66.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -680 \lor \neg \left(z \leq 1.55 \cdot 10^{+28}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -680 or 1.55e28 < z

    1. Initial program 68.0%

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

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

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

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

    if -680 < z < 1.55e28

    1. Initial program 92.9%

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

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

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

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

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

Alternative 20: 43.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+41} \lor \neg \left(y \leq 5.4 \cdot 10^{+79}\right):\\
\;\;\;\;t \cdot \frac{y}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.8000000000000003e41 or 5.3999999999999999e79 < y

    1. Initial program 88.2%

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

      \[\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 29.6%

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

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

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

    if -4.8000000000000003e41 < y < 5.3999999999999999e79

    1. Initial program 74.9%

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

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

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

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

Alternative 21: 40.1% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq 2 \cdot 10^{+28}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.89999999999999987e61 or 1.99999999999999992e28 < z

    1. Initial program 65.2%

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

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

    if -3.89999999999999987e61 < z < 1.99999999999999992e28

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

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

Alternative 22: 25.8% 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 80.6%

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

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

Reproduce

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