Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.4% → 94.0%
Time: 19.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: 79.4% accurate, 1.0× speedup?

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

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

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

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

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


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

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-306} \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}:\\ \;\;\;\;\left(t - \frac{y}{\frac{z}{t - x}}\right) + \frac{\left(t - x\right) \cdot a}{z}\\ \end{array} \]

Alternative 2: 88.9% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 91.9%

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

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

    1. Initial program 3.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-306} \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{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \end{array} \]

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

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

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


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

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.6%

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

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

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

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

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

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

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

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

Alternative 4: 47.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -4.8 \cdot 10^{-250}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 5.6 \cdot 10^{-191}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 4.8 \cdot 10^{-66}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.6000000000000001e61 or 4.80000000000000052e-66 < z

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg55.8%

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

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

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

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

    if -3.6000000000000001e61 < z < -4.7999999999999998e-250 or -1.2599999999999999e-297 < z < 5.60000000000000023e-191 or 2.0500000000000001e-88 < z < 4.80000000000000052e-66

    1. Initial program 92.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.7999999999999998e-250 < z < -1.2599999999999999e-297

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    8. Simplified79.3%

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

    if 5.60000000000000023e-191 < z < 2.0500000000000001e-88

    1. Initial program 91.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+61}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-250}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.26 \cdot 10^{-297}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-191}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-88}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-66}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \end{array} \]

Alternative 5: 47.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -3.5 \cdot 10^{-249}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;z \leq 8 \cdot 10^{-66}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.6999999999999999e63 or 7.9999999999999998e-66 < z

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg55.8%

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

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

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

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

    if -1.6999999999999999e63 < z < -3.50000000000000013e-249 or 1.64999999999999997e-88 < z < 7.9999999999999998e-66

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.50000000000000013e-249 < z < -1.7e-298

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    8. Simplified79.3%

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

    if -1.7e-298 < z < 5.1999999999999998e-189

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot x}{a}} \]
      2. mul-1-neg83.6%

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{x}}} \]
    8. Simplified83.6%

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

    if 5.1999999999999998e-189 < z < 1.64999999999999997e-88

    1. Initial program 91.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+63}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-249}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-298}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-189}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-88}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-66}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \end{array} \]

Alternative 6: 47.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := t - \frac{y}{\frac{z}{t}}\\ \mathbf{if}\;z \leq -7.8 \cdot 10^{+61}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-250}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -1.66 \cdot 10^{-301}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-188}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-88}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-66}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (- t (/ y (/ z t)))))
   (if (<= z -7.8e+61)
     t_2
     (if (<= z -5.5e-250)
       t_1
       (if (<= z -1.66e-301)
         (/ y (/ a t))
         (if (<= z 1.95e-188)
           (- x (/ y (/ a x)))
           (if (<= z 2.05e-88)
             (/ t (/ a (- y z)))
             (if (<= z 9.2e-66) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t - (y / (z / t));
	double tmp;
	if (z <= -7.8e+61) {
		tmp = t_2;
	} else if (z <= -5.5e-250) {
		tmp = t_1;
	} else if (z <= -1.66e-301) {
		tmp = y / (a / t);
	} else if (z <= 1.95e-188) {
		tmp = x - (y / (a / x));
	} else if (z <= 2.05e-88) {
		tmp = t / (a / (y - z));
	} else if (z <= 9.2e-66) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    t_2 = t - (y / (z / t))
    if (z <= (-7.8d+61)) then
        tmp = t_2
    else if (z <= (-5.5d-250)) then
        tmp = t_1
    else if (z <= (-1.66d-301)) then
        tmp = y / (a / t)
    else if (z <= 1.95d-188) then
        tmp = x - (y / (a / x))
    else if (z <= 2.05d-88) then
        tmp = t / (a / (y - z))
    else if (z <= 9.2d-66) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t - (y / (z / t));
	double tmp;
	if (z <= -7.8e+61) {
		tmp = t_2;
	} else if (z <= -5.5e-250) {
		tmp = t_1;
	} else if (z <= -1.66e-301) {
		tmp = y / (a / t);
	} else if (z <= 1.95e-188) {
		tmp = x - (y / (a / x));
	} else if (z <= 2.05e-88) {
		tmp = t / (a / (y - z));
	} else if (z <= 9.2e-66) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = t - (y / (z / t))
	tmp = 0
	if z <= -7.8e+61:
		tmp = t_2
	elif z <= -5.5e-250:
		tmp = t_1
	elif z <= -1.66e-301:
		tmp = y / (a / t)
	elif z <= 1.95e-188:
		tmp = x - (y / (a / x))
	elif z <= 2.05e-88:
		tmp = t / (a / (y - z))
	elif z <= 9.2e-66:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(t - Float64(y / Float64(z / t)))
	tmp = 0.0
	if (z <= -7.8e+61)
		tmp = t_2;
	elseif (z <= -5.5e-250)
		tmp = t_1;
	elseif (z <= -1.66e-301)
		tmp = Float64(y / Float64(a / t));
	elseif (z <= 1.95e-188)
		tmp = Float64(x - Float64(y / Float64(a / x)));
	elseif (z <= 2.05e-88)
		tmp = Float64(t / Float64(a / Float64(y - z)));
	elseif (z <= 9.2e-66)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = t - (y / (z / t));
	tmp = 0.0;
	if (z <= -7.8e+61)
		tmp = t_2;
	elseif (z <= -5.5e-250)
		tmp = t_1;
	elseif (z <= -1.66e-301)
		tmp = y / (a / t);
	elseif (z <= 1.95e-188)
		tmp = x - (y / (a / x));
	elseif (z <= 2.05e-88)
		tmp = t / (a / (y - z));
	elseif (z <= 9.2e-66)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.8e+61], t$95$2, If[LessEqual[z, -5.5e-250], t$95$1, If[LessEqual[z, -1.66e-301], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e-188], N[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e-88], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-66], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -5.5 \cdot 10^{-250}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;z \leq 9.2 \cdot 10^{-66}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -7.79999999999999975e61 or 9.19999999999999967e-66 < z

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg55.8%

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

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

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

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

    if -7.79999999999999975e61 < z < -5.5e-250 or 2.0500000000000001e-88 < z < 9.19999999999999967e-66

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.5e-250 < z < -1.65999999999999991e-301

    1. Initial program 99.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    8. Simplified79.3%

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

    if -1.65999999999999991e-301 < z < 1.94999999999999988e-188

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot x}{a}} \]
      2. mul-1-neg83.6%

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{x}}} \]
    8. Simplified83.6%

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

    if 1.94999999999999988e-188 < z < 2.0500000000000001e-88

    1. Initial program 91.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.8 \cdot 10^{+61}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-250}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.66 \cdot 10^{-301}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-188}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-88}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-66}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \end{array} \]

Alternative 7: 47.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -2.8 \cdot 10^{-248}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-66}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.25e64 or 4.2000000000000001e-66 < z

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg55.8%

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

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

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

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

    if -1.25e64 < z < -2.8000000000000001e-248 or 1.34999999999999997e-88 < z < 4.2000000000000001e-66

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8000000000000001e-248 < z < -1.9000000000000001e-299

    1. Initial program 99.9%

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

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

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

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

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

    if -1.9000000000000001e-299 < z < 2.7499999999999999e-189

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot x}{a}} \]
      2. mul-1-neg83.6%

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{x}}} \]
    8. Simplified83.6%

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

    if 2.7499999999999999e-189 < z < 1.34999999999999997e-88

    1. Initial program 91.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+64}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-248}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-299}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t}}\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{-189}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-88}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-66}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \end{array} \]

Alternative 8: 47.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -4.8 \cdot 10^{-250}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-66}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -3.70000000000000003e61

    1. Initial program 68.8%

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

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

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

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

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

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

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

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

    if -3.70000000000000003e61 < z < -4.7999999999999998e-250 or 2.4e-88 < z < 2.40000000000000026e-66

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.7999999999999998e-250 < z < -7.7999999999999998e-303

    1. Initial program 99.9%

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

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

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

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

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

    if -7.7999999999999998e-303 < z < 4.8e-188

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot x}{a}} \]
      2. mul-1-neg83.6%

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{x}}} \]
    8. Simplified83.6%

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

    if 4.8e-188 < z < 2.4e-88

    1. Initial program 91.3%

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

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

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

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

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

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

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

    if 2.40000000000000026e-66 < z

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot t}{z} + t} \]
    9. Step-by-step derivation
      1. +-commutative58.6%

        \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot t}{z}} \]
      2. mul-1-neg58.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{+61}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-250}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -7.8 \cdot 10^{-303}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t}}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-188}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-88}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-66}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \end{array} \]

Alternative 9: 71.7% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.2000000000000002e-8 or 3.1e5 < a

    1. Initial program 92.1%

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

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

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

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

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

    if -5.2000000000000002e-8 < a < -1.51999999999999992e-142

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    7. Simplified79.1%

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

    if -1.51999999999999992e-142 < a < 3.1e5

    1. Initial program 71.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.2 \cdot 10^{-8}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -1.52 \cdot 10^{-142}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq 310000:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 10: 73.0% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.15999999999999992e-9 or 205000 < a

    1. Initial program 92.1%

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

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

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

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

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

    if -1.15999999999999992e-9 < a < -1.29999999999999998e-131

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    7. Simplified79.1%

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

    if -1.29999999999999998e-131 < a < 205000

    1. Initial program 71.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.16 \cdot 10^{-9}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-131}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq 205000:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 11: 36.1% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq -3.4 \cdot 10^{-300}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 4.3 \cdot 10^{-191}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 9.8 \cdot 10^{+123}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.50000000000000003e91 or 9.79999999999999952e123 < z

    1. Initial program 60.1%

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

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

    if -1.50000000000000003e91 < z < -3.40000000000000018e-300 or 4.29999999999999983e-191 < z < 9.79999999999999952e123

    1. Initial program 91.4%

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

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

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

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

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

    if -3.40000000000000018e-300 < z < 4.29999999999999983e-191

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+91}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-300}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-191}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+123}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 12: 56.0% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.1e-36 or 2.20000000000000001e-94 < t

    1. Initial program 87.5%

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

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

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

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

    if -1.1e-36 < t < -8.1999999999999998e-268

    1. Initial program 68.0%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot x}{a - z}} \]
    4. Step-by-step derivation
      1. mul-1-neg52.2%

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{a - z}{x}}} \]
      3. distribute-neg-frac60.4%

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

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

    if -8.1999999999999998e-268 < t < 2.20000000000000001e-94

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a}{x}}} \]
    8. Simplified58.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{-36}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-268}:\\ \;\;\;\;\frac{-y}{\frac{a - z}{x}}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-94}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 13: 57.2% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.6e-36 or 2.4e-94 < t

    1. Initial program 87.5%

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

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

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

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

    if -2.6e-36 < t < -1.6999999999999999e-299

    1. Initial program 71.4%

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

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

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

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

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

    if -1.6999999999999999e-299 < t < 2.4e-94

    1. Initial program 76.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot x}{a}} \]
      2. mul-1-neg56.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{-36}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-299}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-94}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 14: 68.4% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.74999999999999997e-6 or 225000 < a

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.74999999999999997e-6 < a < -1.0999999999999999e-130

    1. Initial program 84.1%

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

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

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

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

    if -1.0999999999999999e-130 < a < 225000

    1. Initial program 71.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.75 \cdot 10^{-6}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-130}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq 225000:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \end{array} \]

Alternative 15: 68.4% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.1999999999999998e-7 or 6e6 < a

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.1999999999999998e-7 < a < -2.9e-121

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9e-121 < a < 6e6

    1. Initial program 71.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.2 \cdot 10^{-7}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -2.9 \cdot 10^{-121}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;a \leq 6000000:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \end{array} \]

Alternative 16: 36.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -14500000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-173}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.85 \cdot 10^{+71}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.45e10 or 1.85e71 < a

    1. Initial program 92.2%

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

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

    if -1.45e10 < a < -1.20000000000000008e-173 or 1.1e8 < a < 1.85e71

    1. Initial program 84.9%

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

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

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

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

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

    if -1.20000000000000008e-173 < a < 1.1e8

    1. Initial program 72.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -14500000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-173}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 110000000:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+71}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 17: 36.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -980000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -2.05 \cdot 10^{-175}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 3.8 \cdot 10^{+70}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.8e8 or 3.7999999999999998e70 < a

    1. Initial program 92.2%

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

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

    if -9.8e8 < a < -2.04999999999999999e-175 or 1.8e8 < a < 3.7999999999999998e70

    1. Initial program 84.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    7. Applied egg-rr43.6%

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

    if -2.04999999999999999e-175 < a < 1.8e8

    1. Initial program 72.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -980000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -2.05 \cdot 10^{-175}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 180000000:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{+70}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 18: 64.1% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.50000000000000014e62 or 2.8e-117 < z

    1. Initial program 72.8%

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

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

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

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

    if -2.50000000000000014e62 < z < 2.8e-117

    1. Initial program 94.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+62} \lor \neg \left(z \leq 2.8 \cdot 10^{-117}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 19: 66.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+62} \lor \neg \left(z \leq 1.7 \cdot 10^{-66}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.19999999999999984e62 or 1.69999999999999999e-66 < z

    1. Initial program 71.8%

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

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

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

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

    if -3.19999999999999984e62 < z < 1.69999999999999999e-66

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\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}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification73.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+62} \lor \neg \left(z \leq 1.7 \cdot 10^{-66}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x - t}{\frac{a}{y}}\\ \end{array} \]

Alternative 20: 40.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{+48}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.6999999999999999e48

    1. Initial program 93.3%

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

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

    if -3.6999999999999999e48 < t < 1.7000000000000002e85

    1. Initial program 75.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7000000000000002e85 < t

    1. Initial program 90.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{+48}:\\ \;\;\;\;t\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{+85}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \end{array} \]

Alternative 21: 36.0% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;z \leq 4 \cdot 10^{-121}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2000000000000001e122 or 3.9999999999999999e-121 < z

    1. Initial program 71.8%

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

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

    if -1.2000000000000001e122 < z < 3.9999999999999999e-121

    1. Initial program 92.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+122}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-121}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 22: 24.9% accurate, 13.0× speedup?

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

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

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

    \[\leadsto \color{blue}{t} \]
  3. Final simplification24.2%

    \[\leadsto t \]

Reproduce

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