Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.1% → 95.4%
Time: 15.0s
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.1% accurate, 1.0× speedup?

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

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

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

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

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

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


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

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 86.8%

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

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

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

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

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

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

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

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

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

Alternative 3: 89.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-112} \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 -4e-112) (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 <= -4e-112) || !(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 <= (-4d-112)) .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 <= -4e-112) || !(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 <= -4e-112) 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 <= -4e-112) || !(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 <= -4e-112) || ~((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, -4e-112], 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 -4 \cdot 10^{-112} \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)))) < -3.9999999999999998e-112 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 90.0%

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

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

    1. Initial program 11.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -4 \cdot 10^{-112} \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: 62.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + t \cdot \frac{y - z}{a}\\ \mathbf{if}\;a \leq -0.6:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-224}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-235}:\\ \;\;\;\;\frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-119}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-25}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{+56}:\\ \;\;\;\;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 z) a)))))
   (if (<= a -0.6)
     t_2
     (if (<= a -2.7e-224)
       t_1
       (if (<= a 6e-235)
         (* (/ (- t x) z) (- a y))
         (if (<= a 7.5e-119)
           t_1
           (if (<= a 5.4e-25)
             (* (- t x) (/ y (- a z)))
             (if (<= a 7.6e+56) 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 - z) / a));
	double tmp;
	if (a <= -0.6) {
		tmp = t_2;
	} else if (a <= -2.7e-224) {
		tmp = t_1;
	} else if (a <= 6e-235) {
		tmp = ((t - x) / z) * (a - y);
	} else if (a <= 7.5e-119) {
		tmp = t_1;
	} else if (a <= 5.4e-25) {
		tmp = (t - x) * (y / (a - z));
	} else if (a <= 7.6e+56) {
		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 - z) / a))
    if (a <= (-0.6d0)) then
        tmp = t_2
    else if (a <= (-2.7d-224)) then
        tmp = t_1
    else if (a <= 6d-235) then
        tmp = ((t - x) / z) * (a - y)
    else if (a <= 7.5d-119) then
        tmp = t_1
    else if (a <= 5.4d-25) then
        tmp = (t - x) * (y / (a - z))
    else if (a <= 7.6d+56) 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 - z) / a));
	double tmp;
	if (a <= -0.6) {
		tmp = t_2;
	} else if (a <= -2.7e-224) {
		tmp = t_1;
	} else if (a <= 6e-235) {
		tmp = ((t - x) / z) * (a - y);
	} else if (a <= 7.5e-119) {
		tmp = t_1;
	} else if (a <= 5.4e-25) {
		tmp = (t - x) * (y / (a - z));
	} else if (a <= 7.6e+56) {
		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 - z) / a))
	tmp = 0
	if a <= -0.6:
		tmp = t_2
	elif a <= -2.7e-224:
		tmp = t_1
	elif a <= 6e-235:
		tmp = ((t - x) / z) * (a - y)
	elif a <= 7.5e-119:
		tmp = t_1
	elif a <= 5.4e-25:
		tmp = (t - x) * (y / (a - z))
	elif a <= 7.6e+56:
		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(Float64(y - z) / a)))
	tmp = 0.0
	if (a <= -0.6)
		tmp = t_2;
	elseif (a <= -2.7e-224)
		tmp = t_1;
	elseif (a <= 6e-235)
		tmp = Float64(Float64(Float64(t - x) / z) * Float64(a - y));
	elseif (a <= 7.5e-119)
		tmp = t_1;
	elseif (a <= 5.4e-25)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	elseif (a <= 7.6e+56)
		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 - z) / a));
	tmp = 0.0;
	if (a <= -0.6)
		tmp = t_2;
	elseif (a <= -2.7e-224)
		tmp = t_1;
	elseif (a <= 6e-235)
		tmp = ((t - x) / z) * (a - y);
	elseif (a <= 7.5e-119)
		tmp = t_1;
	elseif (a <= 5.4e-25)
		tmp = (t - x) * (y / (a - z));
	elseif (a <= 7.6e+56)
		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[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -0.6], t$95$2, If[LessEqual[a, -2.7e-224], t$95$1, If[LessEqual[a, 6e-235], N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.5e-119], t$95$1, If[LessEqual[a, 5.4e-25], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.6e+56], 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 - z}{a}\\
\mathbf{if}\;a \leq -0.6:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -2.7 \cdot 10^{-224}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 7.5 \cdot 10^{-119}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 7.6 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -0.599999999999999978 or 7.59999999999999991e56 < a

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

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

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

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

    if -0.599999999999999978 < a < -2.69999999999999998e-224 or 5.9999999999999997e-235 < a < 7.50000000000000044e-119 or 5.40000000000000032e-25 < a < 7.59999999999999991e56

    1. Initial program 68.9%

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

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

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

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

    if -2.69999999999999998e-224 < a < 5.9999999999999997e-235

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.50000000000000044e-119 < a < 5.40000000000000032e-25

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.6:\\ \;\;\;\;x + t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-224}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-235}:\\ \;\;\;\;\frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-119}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-25}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{+56}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 38.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -4.6 \cdot 10^{+70}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -5.2 \cdot 10^{-85}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.85 \cdot 10^{-222}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.4 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.99999999999999986e122 or -4.59999999999999987e70 < a < -5.20000000000000023e-85

    1. Initial program 80.9%

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

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

    if -2.99999999999999986e122 < a < -4.59999999999999987e70 or 1.39999999999999999e94 < a

    1. Initial program 90.4%

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

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

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

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

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

    if -5.20000000000000023e-85 < a < -1.8499999999999999e-222 or 2.4999999999999999e-17 < a < 1.39999999999999999e94

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \left(\frac{y}{z} - 1\right)} \]
      2. sub-neg48.4%

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

        \[\leadsto -t \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
      4. distribute-rgt-neg-in48.4%

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(-1 + \frac{y}{z}\right)}\right) \]
      6. distribute-neg-in48.4%

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{t \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-neg48.5%

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

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

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

        \[\leadsto t - \color{blue}{\frac{y}{z} \cdot t} \]
      5. associate-*l/48.5%

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

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

    if -1.8499999999999999e-222 < a < 2.4999999999999999e-17

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3 \cdot 10^{+122}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{+70}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-85}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.85 \cdot 10^{-222}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-17}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+94}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 32.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{-68}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -2.2 \cdot 10^{-215}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 8 \cdot 10^{+57}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.45e-68 or 8.00000000000000039e57 < a < 5.60000000000000037e102

    1. Initial program 81.3%

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

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

    if -1.45e-68 < a < -2.19999999999999996e-215 or 2.0500000000000001e-290 < a < 8.00000000000000039e57

    1. Initial program 67.8%

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

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

    if -2.19999999999999996e-215 < a < 2.0500000000000001e-290

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -t \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
      4. distribute-rgt-neg-in59.3%

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \color{blue}{\left(t \cdot \frac{y}{z}\right)} \]
      2. neg-mul-142.7%

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

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

        \[\leadsto t \cdot \color{blue}{\frac{y}{-z}} \]
    11. Simplified42.7%

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

    if 5.60000000000000037e102 < a

    1. Initial program 90.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Applied egg-rr40.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{-68}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-215}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{-290}:\\ \;\;\;\;t \cdot \frac{-y}{z}\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+57}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{+102}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 30.6% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -1.02 \cdot 10^{+154}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;t \leq -2 \cdot 10^{-128}:\\
\;\;\;\;t\\

\mathbf{elif}\;t \leq 19000000000000:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.60000000000000052e241 or 1.9e13 < t

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

    if -5.60000000000000052e241 < t < -1.02000000000000007e154 or -5.39999999999999997e100 < t < -2.00000000000000011e-128

    1. Initial program 71.6%

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

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

    if -1.02000000000000007e154 < t < -5.39999999999999997e100 or -2.00000000000000011e-128 < t < 1.9e13

    1. Initial program 74.2%

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

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

Alternative 8: 66.8% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 9 \cdot 10^{+188} \lor \neg \left(z \leq 5.5 \cdot 10^{+203}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.30000000000000008e27 or 2.0500000000000001e71 < z < 9.00000000000000021e188 or 5.50000000000000029e203 < z

    1. Initial program 63.4%

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

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

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

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

    if -4.30000000000000008e27 < z < 2.0500000000000001e71

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

    if 9.00000000000000021e188 < z < 5.50000000000000029e203

    1. Initial program 41.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+27}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+71}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+188} \lor \neg \left(z \leq 5.5 \cdot 10^{+203}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - x}{z} \cdot \left(a - y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 65.6% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 9.5 \cdot 10^{+188} \lor \neg \left(z \leq 6.8 \cdot 10^{+203}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8e20 or 2.49999999999999986e71 < z < 9.4999999999999996e188 or 6.8000000000000002e203 < z

    1. Initial program 62.8%

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

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

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

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

    if -8e20 < z < 2.49999999999999986e71

    1. Initial program 90.1%

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

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

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

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

    if 9.4999999999999996e188 < z < 6.8000000000000002e203

    1. Initial program 41.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+20}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+71}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+188} \lor \neg \left(z \leq 6.8 \cdot 10^{+203}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\frac{t - x}{z} \cdot \left(a - y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 42.0% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;a \leq -5.2 \cdot 10^{-85}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.9999999999999998e119 or -4.20000000000000015e70 < a < -5.20000000000000023e-85

    1. Initial program 80.9%

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

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

    if -9.9999999999999998e119 < a < -4.20000000000000015e70 or 1.65000000000000004e93 < a

    1. Initial program 90.4%

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

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

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

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

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

    if -5.20000000000000023e-85 < a < 1.65000000000000004e93

    1. Initial program 72.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -t \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
      4. distribute-rgt-neg-in48.3%

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

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

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

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

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

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

Alternative 11: 40.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq 1.9 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.9 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.20000000000000023e-85

    1. Initial program 82.2%

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

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

    if -5.20000000000000023e-85 < a < 1.9e-118 or 1.0000000000000001e-15 < a < 1.8999999999999999e91

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-t \cdot \left(\frac{y}{z} - 1\right)} \]
      2. sub-neg52.2%

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

        \[\leadsto -t \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
      4. distribute-rgt-neg-in52.2%

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(-1 + \frac{y}{z}\right)}\right) \]
      6. distribute-neg-in52.2%

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

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

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

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

    if 1.9e-118 < a < 1.0000000000000001e-15

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

    if 1.8999999999999999e91 < a

    1. Initial program 90.8%

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

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

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

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

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

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

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

Alternative 12: 40.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq 2.35 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 4.7 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.6000000000000001e-86

    1. Initial program 82.2%

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

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

    if -2.6000000000000001e-86 < a < 2.34999999999999995e-118 or 1.50000000000000001e-23 < a < 4.7e92

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -t \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
      4. distribute-rgt-neg-in51.7%

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

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

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

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

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

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

    if 2.34999999999999995e-118 < a < 1.50000000000000001e-23

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \color{blue}{\left(1 + \left(--1 \cdot \left(\frac{y}{z} - 1\right)\right)\right)} \]
      2. sub-neg40.8%

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

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

        \[\leadsto x \cdot \left(1 + \left(-\color{blue}{\left(-\left(\frac{y}{z} + -1\right)\right)}\right)\right) \]
      5. remove-double-neg40.8%

        \[\leadsto x \cdot \left(1 + \color{blue}{\left(\frac{y}{z} + -1\right)}\right) \]
      6. +-commutative40.8%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + \left(-1 + \frac{y}{z}\right)\right)} \]
    9. Step-by-step derivation
      1. associate-+r+49.6%

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

        \[\leadsto x \cdot \left(\color{blue}{0} + \frac{y}{z}\right) \]
      3. +-lft-identity49.6%

        \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
      4. div-inv49.6%

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \frac{1}{z}\right)} \]
    10. Applied egg-rr49.6%

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

    if 4.7e92 < a

    1. Initial program 90.8%

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

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

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

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

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

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

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

Alternative 13: 40.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 9.5 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.20000000000000023e-85

    1. Initial program 82.2%

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

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

    if -5.20000000000000023e-85 < a < 1.05e-118 or 3.29999999999999984e-24 < a < 9.5000000000000004e95

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -t \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
      4. distribute-rgt-neg-in51.7%

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

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

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

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

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

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

    if 1.05e-118 < a < 3.29999999999999984e-24

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.5000000000000004e95 < a

    1. Initial program 90.8%

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

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

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

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

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

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

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

Alternative 14: 40.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq 2.35 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 2.75 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.20000000000000023e-85

    1. Initial program 82.2%

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

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

    if -5.20000000000000023e-85 < a < 2.34999999999999995e-118 or 2.2999999999999998e-22 < a < 2.7499999999999999e91

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -t \cdot \left(\frac{y}{z} + \color{blue}{-1}\right) \]
      4. distribute-rgt-neg-in51.7%

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

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

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

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

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

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

    if 2.34999999999999995e-118 < a < 2.2999999999999998e-22

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7499999999999999e91 < a

    1. Initial program 90.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Step-by-step derivation
      1. clear-num39.0%

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    11. Applied egg-rr39.1%

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

Alternative 15: 53.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{+118}:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.09999999999999993e118 or 1.05999999999999997e164 < x

    1. Initial program 68.4%

      \[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.09999999999999993e118 < x < 8.4999999999999995e91

    1. Initial program 81.5%

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

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

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

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

    if 8.4999999999999995e91 < x < 1.05999999999999997e164

    1. Initial program 80.7%

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

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

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

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

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

Alternative 16: 75.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+42} \lor \neg \left(z \leq 1.2 \cdot 10^{+67}\right):\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.50000000000000041e42 or 1.20000000000000001e67 < z

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.50000000000000041e42 < z < 1.20000000000000001e67

    1. Initial program 89.6%

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

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

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

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

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

Alternative 17: 71.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+116} \lor \neg \left(z \leq 9.5 \cdot 10^{+65}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5000000000000002e116 or 9.5000000000000005e65 < z

    1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.5000000000000002e116 < z < 9.5000000000000005e65

    1. Initial program 89.6%

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

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

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

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

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

Alternative 18: 69.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+42} \lor \neg \left(z \leq 2.2 \cdot 10^{+67}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.20000000000000002e42 or 2.2e67 < z

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000002e42 < z < 2.2e67

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

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

Alternative 19: 56.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-75} \lor \neg \left(x \leq 9 \cdot 10^{+65}\right):\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.99999999999999979e-75 or 9e65 < x

    1. Initial program 74.5%

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

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

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

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

    if -4.99999999999999979e-75 < x < 9e65

    1. Initial program 82.1%

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

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

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

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

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

Alternative 20: 57.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{-70}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.60000000000000002e-70

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.60000000000000002e-70 < x < 1.02000000000000002e67

    1. Initial program 82.1%

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

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

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

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

    if 1.02000000000000002e67 < x

    1. Initial program 75.9%

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

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

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

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

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

Alternative 21: 37.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq 9.5 \cdot 10^{+101}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8999999999999998e94 or 9.49999999999999947e101 < z

    1. Initial program 56.7%

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

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

    if -2.8999999999999998e94 < z < 9.49999999999999947e101

    1. Initial program 89.7%

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

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

Alternative 22: 24.4% accurate, 13.0× speedup?

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

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

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

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

Reproduce

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