Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.5% → 95.0%
Time: 17.7s
Alternatives: 21
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 80.5% accurate, 1.0× speedup?

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

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

Alternative 1: 95.0% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

    1. Initial program 4.0%

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

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

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

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

      \[\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}} \]
    5. Step-by-step derivation
      1. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.3% 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^{-285} \lor \neg \left(t_1 \leq 10^{-256}\right):\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y \cdot \left(t - x\right) + a \cdot \left(x - t\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-285) (not (<= t_1 1e-256)))
     (+ x (/ (- y z) (/ (- a z) (- t x))))
     (- t (/ (+ (* y (- t x)) (* a (- x t))) 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-285) || !(t_1 <= 1e-256)) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t - (((y * (t - x)) + (a * (x - t))) / 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-285)) .or. (.not. (t_1 <= 1d-256))) then
        tmp = x + ((y - z) / ((a - z) / (t - x)))
    else
        tmp = t - (((y * (t - x)) + (a * (x - t))) / 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-285) || !(t_1 <= 1e-256)) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t - (((y * (t - x)) + (a * (x - t))) / 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-285) or not (t_1 <= 1e-256):
		tmp = x + ((y - z) / ((a - z) / (t - x)))
	else:
		tmp = t - (((y * (t - x)) + (a * (x - t))) / 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-285) || !(t_1 <= 1e-256))
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
	else
		tmp = Float64(t - Float64(Float64(Float64(y * Float64(t - x)) + Float64(a * Float64(x - t))) / 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-285) || ~((t_1 <= 1e-256)))
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	else
		tmp = t - (((y * (t - x)) + (a * (x - t))) / 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-285], N[Not[LessEqual[t$95$1, 1e-256]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] + N[(a * N[(x - t), $MachinePrecision]), $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^{-285} \lor \neg \left(t_1 \leq 10^{-256}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

\mathbf{else}:\\
\;\;\;\;t - \frac{y \cdot \left(t - x\right) + a \cdot \left(x - t\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.00000000000000007e-285 or 9.99999999999999977e-257 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 92.5%

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

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

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

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

    if -1.00000000000000007e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999977e-257

    1. Initial program 8.0%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} + t} \]
  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^{-285} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 10^{-256}\right):\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y \cdot \left(t - x\right) + a \cdot \left(x - t\right)}{z}\\ \end{array} \]

Alternative 3: 89.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-285} \lor \neg \left(t_1 \leq 10^{-256}\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-285) (not (<= t_1 1e-256)))
     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-285) || !(t_1 <= 1e-256)) {
		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-285)) .or. (.not. (t_1 <= 1d-256))) 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-285) || !(t_1 <= 1e-256)) {
		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-285) or not (t_1 <= 1e-256):
		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-285) || !(t_1 <= 1e-256))
		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-285) || ~((t_1 <= 1e-256)))
		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-285], N[Not[LessEqual[t$95$1, 1e-256]], $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^{-285} \lor \neg \left(t_1 \leq 10^{-256}\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.00000000000000007e-285 or 9.99999999999999977e-257 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 92.5%

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

    if -1.00000000000000007e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999977e-257

    1. Initial program 8.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-285} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 10^{-256}\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 4: 89.3% 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^{-285} \lor \neg \left(t_1 \leq 10^{-256}\right):\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \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-285) (not (<= t_1 1e-256)))
     (+ x (/ (- y z) (/ (- a z) (- t x))))
     (+ 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-285) || !(t_1 <= 1e-256)) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} 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-285)) .or. (.not. (t_1 <= 1d-256))) then
        tmp = x + ((y - z) / ((a - z) / (t - x)))
    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-285) || !(t_1 <= 1e-256)) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} 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-285) or not (t_1 <= 1e-256):
		tmp = x + ((y - z) / ((a - z) / (t - x)))
	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-285) || !(t_1 <= 1e-256))
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
	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-285) || ~((t_1 <= 1e-256)))
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	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-285], N[Not[LessEqual[t$95$1, 1e-256]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * 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^{-285} \lor \neg \left(t_1 \leq 10^{-256}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

\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.00000000000000007e-285 or 9.99999999999999977e-257 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 92.5%

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

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

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

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

    if -1.00000000000000007e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999977e-257

    1. Initial program 8.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\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^{-285} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 10^{-256}\right):\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \end{array} \]

Alternative 5: 58.6% accurate, 0.6× speedup?

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

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

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

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

\mathbf{elif}\;x \leq 1.05 \cdot 10^{-113}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 9 \cdot 10^{+50}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -4.50000000000000025e216 or 9.00000000000000027e50 < x

    1. Initial program 86.2%

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

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

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

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

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

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

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

    if -4.50000000000000025e216 < x < -1.9e152

    1. Initial program 55.2%

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

      \[\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. +-commutative84.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9e152 < x < -2.19999999999999987e81

    1. Initial program 84.8%

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

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

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

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

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

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

    if -2.19999999999999987e81 < x < 1.05e-113 or 2.1e-82 < x < 9.00000000000000027e50

    1. Initial program 85.2%

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

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

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

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

    if 1.05e-113 < x < 2.1e-82

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{+216}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -1.9 \cdot 10^{+152}:\\ \;\;\;\;\frac{y - a}{\frac{z}{x}}\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{+81}:\\ \;\;\;\;y \cdot \left(-\frac{x}{a - z}\right)\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-113}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-82}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+50}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 6: 59.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;x \leq -4.2 \cdot 10^{+212}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x \leq -3 \cdot 10^{+154}:\\ \;\;\;\;\frac{y - a}{\frac{z}{x}}\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{+80}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-113}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-82}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{+50}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= x -4.2e+212)
     t_2
     (if (<= x -3e+154)
       (/ (- y a) (/ z x))
       (if (<= x -1.15e+80)
         (* (- t x) (/ y (- a z)))
         (if (<= x 1.05e-113)
           t_1
           (if (<= x 2.1e-82)
             (- x (/ y (/ a x)))
             (if (<= x 6.2e+50) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (x <= -4.2e+212) {
		tmp = t_2;
	} else if (x <= -3e+154) {
		tmp = (y - a) / (z / x);
	} else if (x <= -1.15e+80) {
		tmp = (t - x) * (y / (a - z));
	} else if (x <= 1.05e-113) {
		tmp = t_1;
	} else if (x <= 2.1e-82) {
		tmp = x - (y / (a / x));
	} else if (x <= 6.2e+50) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = x * (1.0d0 - (y / a))
    if (x <= (-4.2d+212)) then
        tmp = t_2
    else if (x <= (-3d+154)) then
        tmp = (y - a) / (z / x)
    else if (x <= (-1.15d+80)) then
        tmp = (t - x) * (y / (a - z))
    else if (x <= 1.05d-113) then
        tmp = t_1
    else if (x <= 2.1d-82) then
        tmp = x - (y / (a / x))
    else if (x <= 6.2d+50) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (x <= -4.2e+212) {
		tmp = t_2;
	} else if (x <= -3e+154) {
		tmp = (y - a) / (z / x);
	} else if (x <= -1.15e+80) {
		tmp = (t - x) * (y / (a - z));
	} else if (x <= 1.05e-113) {
		tmp = t_1;
	} else if (x <= 2.1e-82) {
		tmp = x - (y / (a / x));
	} else if (x <= 6.2e+50) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if x <= -4.2e+212:
		tmp = t_2
	elif x <= -3e+154:
		tmp = (y - a) / (z / x)
	elif x <= -1.15e+80:
		tmp = (t - x) * (y / (a - z))
	elif x <= 1.05e-113:
		tmp = t_1
	elif x <= 2.1e-82:
		tmp = x - (y / (a / x))
	elif x <= 6.2e+50:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (x <= -4.2e+212)
		tmp = t_2;
	elseif (x <= -3e+154)
		tmp = Float64(Float64(y - a) / Float64(z / x));
	elseif (x <= -1.15e+80)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	elseif (x <= 1.05e-113)
		tmp = t_1;
	elseif (x <= 2.1e-82)
		tmp = Float64(x - Float64(y / Float64(a / x)));
	elseif (x <= 6.2e+50)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (x <= -4.2e+212)
		tmp = t_2;
	elseif (x <= -3e+154)
		tmp = (y - a) / (z / x);
	elseif (x <= -1.15e+80)
		tmp = (t - x) * (y / (a - z));
	elseif (x <= 1.05e-113)
		tmp = t_1;
	elseif (x <= 2.1e-82)
		tmp = x - (y / (a / x));
	elseif (x <= 6.2e+50)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.2e+212], t$95$2, If[LessEqual[x, -3e+154], N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.15e+80], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e-113], t$95$1, If[LessEqual[x, 2.1e-82], N[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+50], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;x \leq 1.05 \cdot 10^{-113}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;x \leq 6.2 \cdot 10^{+50}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -4.2e212 or 6.20000000000000006e50 < x

    1. Initial program 86.2%

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

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

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

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

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

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

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

    if -4.2e212 < x < -3.00000000000000026e154

    1. Initial program 55.2%

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

      \[\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. +-commutative84.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.00000000000000026e154 < x < -1.15000000000000002e80

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

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

    if -1.15000000000000002e80 < x < 1.05e-113 or 2.1e-82 < x < 6.20000000000000006e50

    1. Initial program 85.2%

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

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

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

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

    if 1.05e-113 < x < 2.1e-82

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.2 \cdot 10^{+212}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq -3 \cdot 10^{+154}:\\ \;\;\;\;\frac{y - a}{\frac{z}{x}}\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{+80}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-113}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-82}:\\ \;\;\;\;x - \frac{y}{\frac{a}{x}}\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{+50}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 7: 46.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -2.9 \cdot 10^{-270}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3.1 \cdot 10^{-203}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.3 \cdot 10^{-69}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.1199999999999999e196 or 1.3000000000000001e-69 < z

    1. Initial program 70.0%

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

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

    if -1.1199999999999999e196 < z < -2.89999999999999983e-270 or 3.30000000000000009e-252 < z < 3.09999999999999977e-203 or 4.5000000000000002e-150 < z < 1.3000000000000001e-69

    1. Initial program 91.2%

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

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

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

    if -2.89999999999999983e-270 < z < 3.30000000000000009e-252

    1. Initial program 94.7%

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

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

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

    if 3.09999999999999977e-203 < z < 4.5000000000000002e-150

    1. Initial program 93.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{+196}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-270}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-252}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-203}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-150}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{-69}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 8: 51.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-270}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.7 \cdot 10^{-190}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.8 \cdot 10^{-69}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.50000000000000011e149 or 1.80000000000000009e-69 < z

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.50000000000000011e149 < z < -2.6000000000000002e-270 or 2.4000000000000002e-252 < z < 1.69999999999999991e-190 or 4.2000000000000002e-144 < z < 1.80000000000000009e-69

    1. Initial program 91.2%

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

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

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

    if -2.6000000000000002e-270 < z < 2.4000000000000002e-252

    1. Initial program 94.7%

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

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

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

    if 1.69999999999999991e-190 < z < 4.2000000000000002e-144

    1. Initial program 93.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+149}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-270}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-252}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-190}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-144}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-69}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \end{array} \]

Alternative 9: 51.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-269}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.45 \cdot 10^{-207}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.6 \cdot 10^{-69}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.50000000000000011e149

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.50000000000000011e149 < z < -1.24999999999999995e-269 or 2.5999999999999999e-252 < z < 1.45000000000000006e-207 or 2.69999999999999989e-154 < z < 1.59999999999999999e-69

    1. Initial program 91.2%

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

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

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

    if -1.24999999999999995e-269 < z < 2.5999999999999999e-252

    1. Initial program 94.7%

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

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

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

    if 1.45000000000000006e-207 < z < 2.69999999999999989e-154

    1. Initial program 93.4%

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

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

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

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

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

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

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

    if 1.59999999999999999e-69 < z

    1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+149}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-269}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-252}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-207}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-154}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-69}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z}{z - y}}\\ \end{array} \]

Alternative 10: 52.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-270}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{elif}\;z \leq 1.75 \cdot 10^{-69}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -5.99999999999999953e27

    1. Initial program 83.0%

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

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

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

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

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

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

        \[\leadsto \frac{t}{\frac{\color{blue}{-\left(a - z\right)}}{z}} \]
    7. Simplified52.7%

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

    if -5.99999999999999953e27 < z < -2.6000000000000002e-270 or 2.99999999999999995e-252 < z < 4.19999999999999991e-209 or 2.6e-154 < z < 1.7500000000000001e-69

    1. Initial program 91.9%

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

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

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

    if -2.6000000000000002e-270 < z < 2.99999999999999995e-252

    1. Initial program 94.7%

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

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

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

    if 4.19999999999999991e-209 < z < 2.6e-154

    1. Initial program 93.4%

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

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

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

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

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

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

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

    if 1.7500000000000001e-69 < z

    1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+27}:\\ \;\;\;\;\frac{t}{\frac{z - a}{z}}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{-270}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-252}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-209}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-154}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-69}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{z}{z - y}}\\ \end{array} \]

Alternative 11: 72.9% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 1.15 \cdot 10^{+70} \lor \neg \left(a \leq 2.8 \cdot 10^{+105}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.5000000000000001e-40 or 6.3999999999999997e-125 < a < 1.14999999999999997e70 or 2.8000000000000001e105 < a

    1. Initial program 89.4%

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

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

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

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

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

    if -4.5000000000000001e-40 < a < 6.3999999999999997e-125

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.14999999999999997e70 < a < 2.8000000000000001e105

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.5 \cdot 10^{-40}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{-125}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+70} \lor \neg \left(a \leq 2.8 \cdot 10^{+105}\right):\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 12: 73.9% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 9.2 \cdot 10^{+69} \lor \neg \left(a \leq 7 \cdot 10^{+105}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.1999999999999996e-37 or 3.0000000000000002e-126 < a < 9.20000000000000067e69 or 6.99999999999999982e105 < a

    1. Initial program 89.4%

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

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

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

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

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

    if -8.1999999999999996e-37 < a < 3.0000000000000002e-126

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.20000000000000067e69 < a < 6.99999999999999982e105

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.2 \cdot 10^{-37}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-126}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+69} \lor \neg \left(a \leq 7 \cdot 10^{+105}\right):\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 13: 65.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -118 \lor \neg \left(z \leq -5.4 \cdot 10^{-74} \lor \neg \left(z \leq -7.4 \cdot 10^{-91}\right) \land z \leq 8.2 \cdot 10^{-38}\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 -118.0)
         (not (or (<= z -5.4e-74) (and (not (<= z -7.4e-91)) (<= z 8.2e-38)))))
   (* 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 <= -118.0) || !((z <= -5.4e-74) || (!(z <= -7.4e-91) && (z <= 8.2e-38)))) {
		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 <= (-118.0d0)) .or. (.not. (z <= (-5.4d-74)) .or. (.not. (z <= (-7.4d-91))) .and. (z <= 8.2d-38))) 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 <= -118.0) || !((z <= -5.4e-74) || (!(z <= -7.4e-91) && (z <= 8.2e-38)))) {
		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 <= -118.0) or not ((z <= -5.4e-74) or (not (z <= -7.4e-91) and (z <= 8.2e-38))):
		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 <= -118.0) || !((z <= -5.4e-74) || (!(z <= -7.4e-91) && (z <= 8.2e-38))))
		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 <= -118.0) || ~(((z <= -5.4e-74) || (~((z <= -7.4e-91)) && (z <= 8.2e-38)))))
		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, -118.0], N[Not[Or[LessEqual[z, -5.4e-74], And[N[Not[LessEqual[z, -7.4e-91]], $MachinePrecision], LessEqual[z, 8.2e-38]]]], $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 -118 \lor \neg \left(z \leq -5.4 \cdot 10^{-74} \lor \neg \left(z \leq -7.4 \cdot 10^{-91}\right) \land z \leq 8.2 \cdot 10^{-38}\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 < -118 or -5.40000000000000036e-74 < z < -7.4000000000000004e-91 or 8.1999999999999996e-38 < z

    1. Initial program 75.2%

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

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

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

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

    if -118 < z < -5.40000000000000036e-74 or -7.4000000000000004e-91 < z < 8.1999999999999996e-38

    1. Initial program 93.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -118 \lor \neg \left(z \leq -5.4 \cdot 10^{-74} \lor \neg \left(z \leq -7.4 \cdot 10^{-91}\right) \land z \leq 8.2 \cdot 10^{-38}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 14: 46.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{+159}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-236}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-189}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-37}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= z -1.45e+159)
     t
     (if (<= z 1.15e-236)
       t_1
       (if (<= z 2.45e-189) (* y (/ t (- a z))) (if (<= z 8.8e-37) t_1 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 <= -1.45e+159) {
		tmp = t;
	} else if (z <= 1.15e-236) {
		tmp = t_1;
	} else if (z <= 2.45e-189) {
		tmp = y * (t / (a - z));
	} else if (z <= 8.8e-37) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    if (z <= (-1.45d+159)) then
        tmp = t
    else if (z <= 1.15d-236) then
        tmp = t_1
    else if (z <= 2.45d-189) then
        tmp = y * (t / (a - z))
    else if (z <= 8.8d-37) then
        tmp = t_1
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -1.45e+159) {
		tmp = t;
	} else if (z <= 1.15e-236) {
		tmp = t_1;
	} else if (z <= 2.45e-189) {
		tmp = y * (t / (a - z));
	} else if (z <= 8.8e-37) {
		tmp = t_1;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -1.45e+159:
		tmp = t
	elif z <= 1.15e-236:
		tmp = t_1
	elif z <= 2.45e-189:
		tmp = y * (t / (a - z))
	elif z <= 8.8e-37:
		tmp = t_1
	else:
		tmp = 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 <= -1.45e+159)
		tmp = t;
	elseif (z <= 1.15e-236)
		tmp = t_1;
	elseif (z <= 2.45e-189)
		tmp = Float64(y * Float64(t / Float64(a - z)));
	elseif (z <= 8.8e-37)
		tmp = t_1;
	else
		tmp = 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 <= -1.45e+159)
		tmp = t;
	elseif (z <= 1.15e-236)
		tmp = t_1;
	elseif (z <= 2.45e-189)
		tmp = y * (t / (a - z));
	elseif (z <= 8.8e-37)
		tmp = t_1;
	else
		tmp = 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, -1.45e+159], t, If[LessEqual[z, 1.15e-236], t$95$1, If[LessEqual[z, 2.45e-189], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e-37], t$95$1, t]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 1.15 \cdot 10^{-236}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 8.8 \cdot 10^{-37}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.45000000000000007e159 or 8.80000000000000008e-37 < z

    1. Initial program 70.8%

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

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

    if -1.45000000000000007e159 < z < 1.15000000000000003e-236 or 2.4499999999999999e-189 < z < 8.80000000000000008e-37

    1. Initial program 91.1%

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

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

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

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

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

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

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

    if 1.15000000000000003e-236 < z < 2.4499999999999999e-189

    1. Initial program 100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+159}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{-236}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-189}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-37}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 15: 68.4% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.59999999999999986e-40 or 1.84999999999999999e68 < a

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

    if -6.59999999999999986e-40 < a < 4.60000000000000025e-139

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.60000000000000025e-139 < a < 1.84999999999999999e68

    1. Initial program 80.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.6 \cdot 10^{-40}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-139}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+68}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 16: 68.4% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.00000000000000081e-37 or 2.6000000000000002e69 < a

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

    if -9.00000000000000081e-37 < a < 5.79999999999999989e-136

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.79999999999999989e-136 < a < 2.6000000000000002e69

    1. Initial program 80.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{-37}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-136}:\\ \;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+69}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \end{array} \]

Alternative 17: 37.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq -2.95 \cdot 10^{-269}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-77}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.50000000000000011e149 or 2.10000000000000015e-77 < z

    1. Initial program 72.7%

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

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

    if -3.50000000000000011e149 < z < -2.95e-269 or 5.89999999999999972e-291 < z < 2.10000000000000015e-77

    1. Initial program 91.7%

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

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

    if -2.95e-269 < z < 5.89999999999999972e-291

    1. Initial program 92.3%

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

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

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

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

      \[\leadsto \frac{t}{\color{blue}{\frac{a}{y}}} \]
    6. Step-by-step derivation
      1. associate-/r/54.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+149}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -2.95 \cdot 10^{-269}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{-291}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 18: 37.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+149}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-268}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-291}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -7e+149)
   t
   (if (<= z -4.5e-268)
     x
     (if (<= z 2.7e-291) (/ y (/ a t)) (if (<= z 2.1e-77) x t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -7e+149) {
		tmp = t;
	} else if (z <= -4.5e-268) {
		tmp = x;
	} else if (z <= 2.7e-291) {
		tmp = y / (a / t);
	} else if (z <= 2.1e-77) {
		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 <= (-7d+149)) then
        tmp = t
    else if (z <= (-4.5d-268)) then
        tmp = x
    else if (z <= 2.7d-291) then
        tmp = y / (a / t)
    else if (z <= 2.1d-77) 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 <= -7e+149) {
		tmp = t;
	} else if (z <= -4.5e-268) {
		tmp = x;
	} else if (z <= 2.7e-291) {
		tmp = y / (a / t);
	} else if (z <= 2.1e-77) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -7e+149:
		tmp = t
	elif z <= -4.5e-268:
		tmp = x
	elif z <= 2.7e-291:
		tmp = y / (a / t)
	elif z <= 2.1e-77:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -7e+149)
		tmp = t;
	elseif (z <= -4.5e-268)
		tmp = x;
	elseif (z <= 2.7e-291)
		tmp = Float64(y / Float64(a / t));
	elseif (z <= 2.1e-77)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -7e+149)
		tmp = t;
	elseif (z <= -4.5e-268)
		tmp = x;
	elseif (z <= 2.7e-291)
		tmp = y / (a / t);
	elseif (z <= 2.1e-77)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7e+149], t, If[LessEqual[z, -4.5e-268], x, If[LessEqual[z, 2.7e-291], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-77], x, t]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.5 \cdot 10^{-268}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-77}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.00000000000000023e149 or 2.10000000000000015e-77 < z

    1. Initial program 72.7%

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

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

    if -7.00000000000000023e149 < z < -4.5000000000000001e-268 or 2.69999999999999992e-291 < z < 2.10000000000000015e-77

    1. Initial program 91.7%

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

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

    if -4.5000000000000001e-268 < z < 2.69999999999999992e-291

    1. Initial program 92.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    7. Simplified54.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+149}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-268}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{-291}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 19: 47.5% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 70.8%

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

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

    if -1.45000000000000007e159 < z < 1.12e-37

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

Alternative 20: 37.0% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;z \leq 2.05 \cdot 10^{-77}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.50000000000000011e149 or 2.04999999999999981e-77 < z

    1. Initial program 72.7%

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

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

    if -3.50000000000000011e149 < z < 2.04999999999999981e-77

    1. Initial program 91.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+149}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 21: 25.6% accurate, 13.0× speedup?

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

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

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

    \[\leadsto \color{blue}{t} \]
  3. Final simplification23.8%

    \[\leadsto t \]

Reproduce

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