Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 81.2% → 93.0%
Time: 18.7s
Alternatives: 25
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 25 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: 81.2% 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: 93.0% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\

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


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

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

    1. Initial program 3.7%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Step-by-step derivation
      1. div-inv3.9%

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

      \[\leadsto x + \frac{t - x}{\color{blue}{\left(a - z\right) \cdot \frac{1}{y - z}}} \]
    6. Taylor expanded in z around inf 79.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}} \]
    7. Step-by-step derivation
      1. sub-neg79.6%

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

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

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

        \[\leadsto \color{blue}{\left(t - \frac{y \cdot \left(t - x\right)}{z}\right)} + \left(--1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      5. associate-/l*87.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-neg87.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-neg87.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.6%

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

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

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

    1. Initial program 94.2%

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

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

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

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

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

Alternative 2: 93.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\

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


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

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

    1. Initial program 3.7%

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t - x}{\frac{a - z}{y - z}}} \]
    4. Step-by-step derivation
      1. div-inv3.9%

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

      \[\leadsto x + \frac{t - x}{\color{blue}{\left(a - z\right) \cdot \frac{1}{y - z}}} \]
    6. Taylor expanded in z around inf 79.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}} \]
    7. Step-by-step derivation
      1. sub-neg79.6%

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

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

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

        \[\leadsto \color{blue}{\left(t - \frac{y \cdot \left(t - x\right)}{z}\right)} + \left(--1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right) \]
      5. associate-/l*87.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-neg87.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-neg87.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.6%

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

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

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

    1. Initial program 94.2%

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

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

Alternative 3: 90.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 94.9%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y + -1 \cdot a}}} \]
      8. mul-1-neg89.6%

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

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

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

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

Alternative 4: 92.8% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\

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


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

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

    1. Initial program 3.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 94.2%

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

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

Alternative 5: 49.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -720000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1 \cdot 10^{-20}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\

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

\mathbf{elif}\;z \leq -5.2 \cdot 10^{-124}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+51}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -9.0000000000000006e56 or 8.4999999999999999e51 < z

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.0000000000000006e56 < z < -7.2e5 or -8.1999999999999994e-67 < z < -5.1999999999999999e-124 or -2.7999999999999999e-166 < z < 8.4999999999999999e51

    1. Initial program 91.5%

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

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

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

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

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

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

    if -7.2e5 < z < -9.99999999999999945e-21

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

    if -9.99999999999999945e-21 < z < -8.1999999999999994e-67

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.1999999999999999e-124 < z < -2.7999999999999999e-166

    1. Initial program 89.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+56}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -720000:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-20}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-67}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-124}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-166}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+51}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 6: 49.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -6 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-15}:\\ \;\;\;\;\left(-y\right) \cdot \frac{x}{a - z}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-67}:\\ \;\;\;\;\frac{y \cdot t}{a - z}\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-168}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+52}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= z -6e+54)
     (* t (- 1.0 (/ y z)))
     (if (<= z -2.2e-15)
       (* (- y) (/ x (- a z)))
       (if (<= z -2.3e-67)
         (/ (* y t) (- a z))
         (if (<= z -2.4e-125)
           t_1
           (if (<= z -4.2e-168)
             (/ t (/ a (- y z)))
             (if (<= z 1.7e+52) t_1 (/ (- t) (/ z (- y z)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (z <= -6e+54) {
		tmp = t * (1.0 - (y / z));
	} else if (z <= -2.2e-15) {
		tmp = -y * (x / (a - z));
	} else if (z <= -2.3e-67) {
		tmp = (y * t) / (a - z);
	} else if (z <= -2.4e-125) {
		tmp = t_1;
	} else if (z <= -4.2e-168) {
		tmp = t / (a / (y - z));
	} else if (z <= 1.7e+52) {
		tmp = t_1;
	} else {
		tmp = -t / (z / (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 * (1.0d0 - (y / a))
    if (z <= (-6d+54)) then
        tmp = t * (1.0d0 - (y / z))
    else if (z <= (-2.2d-15)) then
        tmp = -y * (x / (a - z))
    else if (z <= (-2.3d-67)) then
        tmp = (y * t) / (a - z)
    else if (z <= (-2.4d-125)) then
        tmp = t_1
    else if (z <= (-4.2d-168)) then
        tmp = t / (a / (y - z))
    else if (z <= 1.7d+52) then
        tmp = t_1
    else
        tmp = -t / (z / (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 * (1.0 - (y / a));
	double tmp;
	if (z <= -6e+54) {
		tmp = t * (1.0 - (y / z));
	} else if (z <= -2.2e-15) {
		tmp = -y * (x / (a - z));
	} else if (z <= -2.3e-67) {
		tmp = (y * t) / (a - z);
	} else if (z <= -2.4e-125) {
		tmp = t_1;
	} else if (z <= -4.2e-168) {
		tmp = t / (a / (y - z));
	} else if (z <= 1.7e+52) {
		tmp = t_1;
	} else {
		tmp = -t / (z / (y - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if z <= -6e+54:
		tmp = t * (1.0 - (y / z))
	elif z <= -2.2e-15:
		tmp = -y * (x / (a - z))
	elif z <= -2.3e-67:
		tmp = (y * t) / (a - z)
	elif z <= -2.4e-125:
		tmp = t_1
	elif z <= -4.2e-168:
		tmp = t / (a / (y - z))
	elif z <= 1.7e+52:
		tmp = t_1
	else:
		tmp = -t / (z / (y - z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (z <= -6e+54)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif (z <= -2.2e-15)
		tmp = Float64(Float64(-y) * Float64(x / Float64(a - z)));
	elseif (z <= -2.3e-67)
		tmp = Float64(Float64(y * t) / Float64(a - z));
	elseif (z <= -2.4e-125)
		tmp = t_1;
	elseif (z <= -4.2e-168)
		tmp = Float64(t / Float64(a / Float64(y - z)));
	elseif (z <= 1.7e+52)
		tmp = t_1;
	else
		tmp = Float64(Float64(-t) / Float64(z / Float64(y - z)));
	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 <= -6e+54)
		tmp = t * (1.0 - (y / z));
	elseif (z <= -2.2e-15)
		tmp = -y * (x / (a - z));
	elseif (z <= -2.3e-67)
		tmp = (y * t) / (a - z);
	elseif (z <= -2.4e-125)
		tmp = t_1;
	elseif (z <= -4.2e-168)
		tmp = t / (a / (y - z));
	elseif (z <= 1.7e+52)
		tmp = t_1;
	else
		tmp = -t / (z / (y - z));
	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, -6e+54], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.2e-15], N[((-y) * N[(x / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e-67], N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.4e-125], t$95$1, If[LessEqual[z, -4.2e-168], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+52], t$95$1, N[((-t) / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

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

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

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

\mathbf{elif}\;z \leq 1.7 \cdot 10^{+52}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 71.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.9999999999999998e54 < z < -2.19999999999999986e-15

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-y}{\frac{a - z}{x}}} \]
    8. Taylor expanded in y around 0 55.6%

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

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

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

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

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

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

    if -2.19999999999999986e-15 < z < -2.3e-67

    1. Initial program 99.7%

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

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

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

    if -2.3e-67 < z < -2.4000000000000001e-125 or -4.19999999999999988e-168 < z < 1.7e52

    1. Initial program 91.6%

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

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

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

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

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

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

    if -2.4000000000000001e-125 < z < -4.19999999999999988e-168

    1. Initial program 89.8%

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

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

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

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

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

    if 1.7e52 < z

    1. Initial program 75.0%

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{z}{y - z}}} \]
      3. distribute-neg-frac55.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-15}:\\ \;\;\;\;\left(-y\right) \cdot \frac{x}{a - z}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-67}:\\ \;\;\;\;\frac{y \cdot t}{a - z}\\ \mathbf{elif}\;z \leq -2.4 \cdot 10^{-125}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-168}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+52}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{z}{y - z}}\\ \end{array} \]

Alternative 7: 49.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ t_2 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -5.9 \cdot 10^{+54}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-16}:\\ \;\;\;\;\left(-y\right) \cdot \frac{x}{a - z}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-67}:\\ \;\;\;\;\frac{y \cdot t}{a - z}\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-161}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+52}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* t (- 1.0 (/ y z)))))
   (if (<= z -5.9e+54)
     t_2
     (if (<= z -6.5e-16)
       (* (- y) (/ x (- a z)))
       (if (<= z -2.3e-67)
         (/ (* y t) (- a z))
         (if (<= z -3.2e-125)
           t_1
           (if (<= z -3.5e-161)
             (/ t (/ a (- y z)))
             (if (<= z 1.12e+52) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (z <= -5.9e+54) {
		tmp = t_2;
	} else if (z <= -6.5e-16) {
		tmp = -y * (x / (a - z));
	} else if (z <= -2.3e-67) {
		tmp = (y * t) / (a - z);
	} else if (z <= -3.2e-125) {
		tmp = t_1;
	} else if (z <= -3.5e-161) {
		tmp = t / (a / (y - z));
	} else if (z <= 1.12e+52) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    t_2 = t * (1.0d0 - (y / z))
    if (z <= (-5.9d+54)) then
        tmp = t_2
    else if (z <= (-6.5d-16)) then
        tmp = -y * (x / (a - z))
    else if (z <= (-2.3d-67)) then
        tmp = (y * t) / (a - z)
    else if (z <= (-3.2d-125)) then
        tmp = t_1
    else if (z <= (-3.5d-161)) then
        tmp = t / (a / (y - z))
    else if (z <= 1.12d+52) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double t_2 = t * (1.0 - (y / z));
	double tmp;
	if (z <= -5.9e+54) {
		tmp = t_2;
	} else if (z <= -6.5e-16) {
		tmp = -y * (x / (a - z));
	} else if (z <= -2.3e-67) {
		tmp = (y * t) / (a - z);
	} else if (z <= -3.2e-125) {
		tmp = t_1;
	} else if (z <= -3.5e-161) {
		tmp = t / (a / (y - z));
	} else if (z <= 1.12e+52) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	t_2 = t * (1.0 - (y / z))
	tmp = 0
	if z <= -5.9e+54:
		tmp = t_2
	elif z <= -6.5e-16:
		tmp = -y * (x / (a - z))
	elif z <= -2.3e-67:
		tmp = (y * t) / (a - z)
	elif z <= -3.2e-125:
		tmp = t_1
	elif z <= -3.5e-161:
		tmp = t / (a / (y - z))
	elif z <= 1.12e+52:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	t_2 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (z <= -5.9e+54)
		tmp = t_2;
	elseif (z <= -6.5e-16)
		tmp = Float64(Float64(-y) * Float64(x / Float64(a - z)));
	elseif (z <= -2.3e-67)
		tmp = Float64(Float64(y * t) / Float64(a - z));
	elseif (z <= -3.2e-125)
		tmp = t_1;
	elseif (z <= -3.5e-161)
		tmp = Float64(t / Float64(a / Float64(y - z)));
	elseif (z <= 1.12e+52)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	t_2 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (z <= -5.9e+54)
		tmp = t_2;
	elseif (z <= -6.5e-16)
		tmp = -y * (x / (a - z));
	elseif (z <= -2.3e-67)
		tmp = (y * t) / (a - z);
	elseif (z <= -3.2e-125)
		tmp = t_1;
	elseif (z <= -3.5e-161)
		tmp = t / (a / (y - z));
	elseif (z <= 1.12e+52)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.9e+54], t$95$2, If[LessEqual[z, -6.5e-16], N[((-y) * N[(x / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e-67], N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.2e-125], t$95$1, If[LessEqual[z, -3.5e-161], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.12e+52], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq -3.2 \cdot 10^{-125}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 1.12 \cdot 10^{+52}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -5.8999999999999997e54 or 1.12000000000000002e52 < z

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.8999999999999997e54 < z < -6.50000000000000011e-16

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-y}{\frac{a - z}{x}}} \]
    8. Taylor expanded in y around 0 55.6%

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

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

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

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

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

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

    if -6.50000000000000011e-16 < z < -2.3e-67

    1. Initial program 99.7%

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

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

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

    if -2.3e-67 < z < -3.1999999999999998e-125 or -3.5000000000000002e-161 < z < 1.12000000000000002e52

    1. Initial program 91.6%

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

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

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

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

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

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

    if -3.1999999999999998e-125 < z < -3.5000000000000002e-161

    1. Initial program 89.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.9 \cdot 10^{+54}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -6.5 \cdot 10^{-16}:\\ \;\;\;\;\left(-y\right) \cdot \frac{x}{a - z}\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-67}:\\ \;\;\;\;\frac{y \cdot t}{a - z}\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-125}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{-161}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{+52}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 8: 58.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := y \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;y \leq -1.35 \cdot 10^{+84}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-255}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-239}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+103}:\\ \;\;\;\;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 (* y (/ (- t x) (- a z)))))
   (if (<= y -1.35e+84)
     t_2
     (if (<= y -1.1e-255)
       t_1
       (if (<= y 2e-239) x (if (<= y 2.8e+103) 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 = y * ((t - x) / (a - z));
	double tmp;
	if (y <= -1.35e+84) {
		tmp = t_2;
	} else if (y <= -1.1e-255) {
		tmp = t_1;
	} else if (y <= 2e-239) {
		tmp = x;
	} else if (y <= 2.8e+103) {
		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 = y * ((t - x) / (a - z))
    if (y <= (-1.35d+84)) then
        tmp = t_2
    else if (y <= (-1.1d-255)) then
        tmp = t_1
    else if (y <= 2d-239) then
        tmp = x
    else if (y <= 2.8d+103) 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 = y * ((t - x) / (a - z));
	double tmp;
	if (y <= -1.35e+84) {
		tmp = t_2;
	} else if (y <= -1.1e-255) {
		tmp = t_1;
	} else if (y <= 2e-239) {
		tmp = x;
	} else if (y <= 2.8e+103) {
		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 = y * ((t - x) / (a - z))
	tmp = 0
	if y <= -1.35e+84:
		tmp = t_2
	elif y <= -1.1e-255:
		tmp = t_1
	elif y <= 2e-239:
		tmp = x
	elif y <= 2.8e+103:
		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(y * Float64(Float64(t - x) / Float64(a - z)))
	tmp = 0.0
	if (y <= -1.35e+84)
		tmp = t_2;
	elseif (y <= -1.1e-255)
		tmp = t_1;
	elseif (y <= 2e-239)
		tmp = x;
	elseif (y <= 2.8e+103)
		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 = y * ((t - x) / (a - z));
	tmp = 0.0;
	if (y <= -1.35e+84)
		tmp = t_2;
	elseif (y <= -1.1e-255)
		tmp = t_1;
	elseif (y <= 2e-239)
		tmp = x;
	elseif (y <= 2.8e+103)
		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[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.35e+84], t$95$2, If[LessEqual[y, -1.1e-255], t$95$1, If[LessEqual[y, 2e-239], x, If[LessEqual[y, 2.8e+103], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-255}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2 \cdot 10^{-239}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 2.8 \cdot 10^{+103}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.35e84 or 2.80000000000000008e103 < y

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.35e84 < y < -1.1e-255 or 2.0000000000000002e-239 < y < 2.80000000000000008e103

    1. Initial program 80.7%

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

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

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

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

    if -1.1e-255 < y < 2.0000000000000002e-239

    1. Initial program 93.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+84}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-255}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-239}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+103}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \end{array} \]

Alternative 9: 67.5% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.19999999999999985e63 or 3.2000000000000002e70 < z

    1. Initial program 72.1%

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

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

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

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

    if -8.19999999999999985e63 < z < -1.4999999999999999e-75

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.4999999999999999e-75 < z < 3.2000000000000002e70

    1. Initial program 92.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{+63}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-75}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+70}:\\ \;\;\;\;x + \left(z - y\right) \cdot \frac{x - t}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 10: 66.8% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 70.6%

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

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

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

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

    if -2.2e61 < z < -3.60000000000000012e-83

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

    if -3.60000000000000012e-83 < z < 5.5e71

    1. Initial program 92.2%

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

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

    if 5.5e71 < z

    1. Initial program 73.6%

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

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

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

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

        \[\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/71.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+61}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-83}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+71}:\\ \;\;\;\;x + \left(z - y\right) \cdot \frac{x - t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \end{array} \]

Alternative 11: 50.1% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 9 \cdot 10^{+28}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.1999999999999999e83 or 8.9999999999999994e28 < z

    1. Initial program 73.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z}} \]
    7. Step-by-step derivation
      1. mul-1-neg31.4%

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

        \[\leadsto -\color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      3. distribute-neg-frac55.9%

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

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

    if -3.1999999999999999e83 < z < -9.20000000000000043e-126 or -2.29999999999999999e-166 < z < 8.9999999999999994e28

    1. Initial program 93.0%

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

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

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

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

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

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

    if -9.20000000000000043e-126 < z < -2.29999999999999999e-166

    1. Initial program 89.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+83}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-126}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-166}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+28}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \end{array} \]

Alternative 12: 48.0% 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.38 \cdot 10^{+109}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-123}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-162}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{+70}:\\ \;\;\;\;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.38e+109)
     t
     (if (<= z -1.7e-123)
       t_1
       (if (<= z -2.5e-162) (* (- y z) (/ t a)) (if (<= z 5.1e+70) 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.38e+109) {
		tmp = t;
	} else if (z <= -1.7e-123) {
		tmp = t_1;
	} else if (z <= -2.5e-162) {
		tmp = (y - z) * (t / a);
	} else if (z <= 5.1e+70) {
		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.38d+109)) then
        tmp = t
    else if (z <= (-1.7d-123)) then
        tmp = t_1
    else if (z <= (-2.5d-162)) then
        tmp = (y - z) * (t / a)
    else if (z <= 5.1d+70) 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.38e+109) {
		tmp = t;
	} else if (z <= -1.7e-123) {
		tmp = t_1;
	} else if (z <= -2.5e-162) {
		tmp = (y - z) * (t / a);
	} else if (z <= 5.1e+70) {
		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.38e+109:
		tmp = t
	elif z <= -1.7e-123:
		tmp = t_1
	elif z <= -2.5e-162:
		tmp = (y - z) * (t / a)
	elif z <= 5.1e+70:
		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.38e+109)
		tmp = t;
	elseif (z <= -1.7e-123)
		tmp = t_1;
	elseif (z <= -2.5e-162)
		tmp = Float64(Float64(y - z) * Float64(t / a));
	elseif (z <= 5.1e+70)
		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.38e+109)
		tmp = t;
	elseif (z <= -1.7e-123)
		tmp = t_1;
	elseif (z <= -2.5e-162)
		tmp = (y - z) * (t / a);
	elseif (z <= 5.1e+70)
		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.38e+109], t, If[LessEqual[z, -1.7e-123], t$95$1, If[LessEqual[z, -2.5e-162], N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.1e+70], 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.38 \cdot 10^{+109}:\\
\;\;\;\;t\\

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

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

\mathbf{elif}\;z \leq 5.1 \cdot 10^{+70}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.37999999999999994e109 or 5.10000000000000014e70 < z

    1. Initial program 70.3%

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

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

    if -1.37999999999999994e109 < z < -1.7e-123 or -2.50000000000000007e-162 < z < 5.10000000000000014e70

    1. Initial program 93.0%

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

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

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

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

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

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

    if -1.7e-123 < z < -2.50000000000000007e-162

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.38 \cdot 10^{+109}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-123}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-162}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{+70}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 13: 48.1% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq -7.7 \cdot 10^{-125}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3 \cdot 10^{+70}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t}}\\


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

    1. Initial program 66.4%

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

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

    if -4.05e108 < z < -7.7000000000000005e-125 or -3.0000000000000001e-164 < z < 2.99999999999999976e70

    1. Initial program 93.0%

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

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

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

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

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

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

    if -7.7000000000000005e-125 < z < -3.0000000000000001e-164

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.99999999999999976e70 < z

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t}}} \]
    8. Simplified50.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.05 \cdot 10^{+108}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.7 \cdot 10^{-125}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-164}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+70}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t}}\\ \end{array} \]

Alternative 14: 48.1% accurate, 0.9× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+71}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t}}\\


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

    1. Initial program 66.4%

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

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

    if -9.1999999999999996e108 < z < -1.4500000000000001e-125 or -1.89999999999999991e-166 < z < 4.19999999999999978e71

    1. Initial program 93.0%

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

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

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

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

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

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

    if -1.4500000000000001e-125 < z < -1.89999999999999991e-166

    1. Initial program 89.8%

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

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

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

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

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

    if 4.19999999999999978e71 < z

    1. Initial program 73.6%

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{a}{\frac{z}{t}}} \]
    8. Simplified50.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+108}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-125}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-166}:\\ \;\;\;\;\frac{t}{\frac{a}{y - z}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+71}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t}}\\ \end{array} \]

Alternative 15: 65.9% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.1999999999999998e61 or 3.8000000000000002e26 < z

    1. Initial program 73.5%

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

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

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

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

    if -3.1999999999999998e61 < z < -1.69999999999999988e-79

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

    if -1.69999999999999988e-79 < z < 3.8000000000000002e26

    1. Initial program 92.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+61}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-79}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+26}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 16: 66.7% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.14999999999999992e62 or 1.1400000000000001e27 < z

    1. Initial program 73.5%

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

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

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

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

    if -1.14999999999999992e62 < z < -5.2000000000000002e-77

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

    if -5.2000000000000002e-77 < z < 1.1400000000000001e27

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+62}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-77}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 1.14 \cdot 10^{+27}:\\ \;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 17: 73.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{-123} \lor \neg \left(a \leq 3.6 \cdot 10^{+16}\right):\\
\;\;\;\;x + \left(z - y\right) \cdot \frac{x - t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.8000000000000001e-123 or 3.6e16 < a

    1. Initial program 87.6%

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

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

    if -6.8000000000000001e-123 < a < 3.6e16

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y + -1 \cdot a}}} \]
      8. mul-1-neg77.7%

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

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

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

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

Alternative 18: 63.6% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.64999999999999999e-27

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

    if -1.64999999999999999e-27 < t < 3.65e-156

    1. Initial program 74.0%

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

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

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

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

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

    if 3.65e-156 < t

    1. Initial program 88.2%

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

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

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

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

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

Alternative 19: 36.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq -1 \cdot 10^{-201}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq -1.18 \cdot 10^{-267}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 3.4 \cdot 10^{+52}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.50000000000000042e54 or 3.4e52 < z

    1. Initial program 73.4%

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

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

    if -7.50000000000000042e54 < z < -9.99999999999999946e-202 or -1.17999999999999999e-267 < z < 8.4999999999999995e-300

    1. Initial program 93.9%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    5. Simplified31.6%

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

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

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

    if -9.99999999999999946e-202 < z < -1.17999999999999999e-267 or 8.4999999999999995e-300 < z < 3.4e52

    1. Initial program 91.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+54}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-201}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -1.18 \cdot 10^{-267}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-300}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+52}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 20: 37.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+34}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-90}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-267}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-300}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+51}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.8e+34)
   t
   (if (<= z -1.2e-90)
     (* x (/ y z))
     (if (<= z -1.25e-267)
       x
       (if (<= z 4.3e-300) (* t (/ y a)) (if (<= z 9.5e+51) x t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.8e+34) {
		tmp = t;
	} else if (z <= -1.2e-90) {
		tmp = x * (y / z);
	} else if (z <= -1.25e-267) {
		tmp = x;
	} else if (z <= 4.3e-300) {
		tmp = t * (y / a);
	} else if (z <= 9.5e+51) {
		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 <= (-4.8d+34)) then
        tmp = t
    else if (z <= (-1.2d-90)) then
        tmp = x * (y / z)
    else if (z <= (-1.25d-267)) then
        tmp = x
    else if (z <= 4.3d-300) then
        tmp = t * (y / a)
    else if (z <= 9.5d+51) 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 <= -4.8e+34) {
		tmp = t;
	} else if (z <= -1.2e-90) {
		tmp = x * (y / z);
	} else if (z <= -1.25e-267) {
		tmp = x;
	} else if (z <= 4.3e-300) {
		tmp = t * (y / a);
	} else if (z <= 9.5e+51) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.8e+34:
		tmp = t
	elif z <= -1.2e-90:
		tmp = x * (y / z)
	elif z <= -1.25e-267:
		tmp = x
	elif z <= 4.3e-300:
		tmp = t * (y / a)
	elif z <= 9.5e+51:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.8e+34)
		tmp = t;
	elseif (z <= -1.2e-90)
		tmp = Float64(x * Float64(y / z));
	elseif (z <= -1.25e-267)
		tmp = x;
	elseif (z <= 4.3e-300)
		tmp = Float64(t * Float64(y / a));
	elseif (z <= 9.5e+51)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4.8e+34)
		tmp = t;
	elseif (z <= -1.2e-90)
		tmp = x * (y / z);
	elseif (z <= -1.25e-267)
		tmp = x;
	elseif (z <= 4.3e-300)
		tmp = t * (y / a);
	elseif (z <= 9.5e+51)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.8e+34], t, If[LessEqual[z, -1.2e-90], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.25e-267], x, If[LessEqual[z, 4.3e-300], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+51], x, t]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-267}:\\
\;\;\;\;x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.79999999999999974e34 or 9.4999999999999999e51 < z

    1. Initial program 73.0%

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

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

    if -4.79999999999999974e34 < z < -1.2000000000000001e-90

    1. Initial program 96.5%

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

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

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

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

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

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

    if -1.2000000000000001e-90 < z < -1.25e-267 or 4.3000000000000001e-300 < z < 9.4999999999999999e51

    1. Initial program 92.1%

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

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

    if -1.25e-267 < z < 4.3000000000000001e-300

    1. Initial program 89.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+34}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{-90}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-267}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{-300}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+51}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 21: 59.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{-36} \lor \neg \left(t \leq 1.3 \cdot 10^{-187}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.0000000000000003e-36 or 1.3e-187 < t

    1. Initial program 89.5%

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

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

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

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

    if -6.0000000000000003e-36 < t < 1.3e-187

    1. Initial program 75.2%

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

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

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

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

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

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

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

Alternative 22: 38.7% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;z \leq 5.3 \cdot 10^{+51}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.90000000000000014e69 or 5.2999999999999997e51 < z

    1. Initial program 72.9%

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

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

    if -1.90000000000000014e69 < z < -2.9999999999999999e-88

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

    if -2.9999999999999999e-88 < z < 5.2999999999999997e51

    1. Initial program 91.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+69}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3 \cdot 10^{-88}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+51}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 23: 48.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+111}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.65 \cdot 10^{+70}:\\ \;\;\;\;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 -5.8e+111) t (if (<= z 2.65e+70) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.8e+111) {
		tmp = t;
	} else if (z <= 2.65e+70) {
		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 <= (-5.8d+111)) then
        tmp = t
    else if (z <= 2.65d+70) 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 <= -5.8e+111) {
		tmp = t;
	} else if (z <= 2.65e+70) {
		tmp = x * (1.0 - (y / a));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -5.8e+111:
		tmp = t
	elif z <= 2.65e+70:
		tmp = x * (1.0 - (y / a))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5.8e+111)
		tmp = t;
	elseif (z <= 2.65e+70)
		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 <= -5.8e+111)
		tmp = t;
	elseif (z <= 2.65e+70)
		tmp = x * (1.0 - (y / a));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.8e+111], t, If[LessEqual[z, 2.65e+70], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 2.65 \cdot 10^{+70}:\\
\;\;\;\;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 < -5.7999999999999999e111 or 2.65e70 < z

    1. Initial program 70.3%

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

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

    if -5.7999999999999999e111 < z < 2.65e70

    1. Initial program 92.8%

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

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

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

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

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

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

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

Alternative 24: 37.8% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+52}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4999999999999998e111 or 1.3e52 < z

    1. Initial program 71.3%

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

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

    if -2.4999999999999998e111 < z < 1.3e52

    1. Initial program 92.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+111}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+52}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 25: 24.7% 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.6%

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

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

    \[\leadsto t \]

Reproduce

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