Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.4% → 94.0%
Time: 23.1s
Alternatives: 27
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 27 alternatives:

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

Initial Program: 80.4% accurate, 1.0× speedup?

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

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

Alternative 1: 94.0% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{z \cdot \frac{1}{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)))) < -5.0000000000000005e-209 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 2.9%

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

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

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

        \[\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) \]
      3. associate-*r/77.3%

        \[\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) \]
      4. div-sub77.3%

        \[\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}} \]
      5. distribute-lft-out--77.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    5. Step-by-step derivation
      1. div-inv99.8%

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

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

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

Alternative 2: 91.9% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-209} \lor \neg \left(t_1 \leq 5 \cdot 10^{-293}\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 (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_1 (- INFINITY))
     (+ x (/ (* (- y z) (- t x)) (- a z)))
     (if (or (<= t_1 -5e-209) (not (<= t_1 5e-293)))
       t_1
       (+ t (/ (- x t) (/ z (- y a))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = x + (((y - z) * (t - x)) / (a - z));
	} else if ((t_1 <= -5e-209) || !(t_1 <= 5e-293)) {
		tmp = t_1;
	} else {
		tmp = t + ((x - t) / (z / (y - a)));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = x + (((y - z) * (t - x)) / (a - z));
	} else if ((t_1 <= -5e-209) || !(t_1 <= 5e-293)) {
		tmp = t_1;
	} else {
		tmp = t + ((x - t) / (z / (y - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((t - x) / (a - z)))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = x + (((y - z) * (t - x)) / (a - z))
	elif (t_1 <= -5e-209) or not (t_1 <= 5e-293):
		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(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)));
	elseif ((t_1 <= -5e-209) || !(t_1 <= 5e-293))
		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 + ((y - z) * ((t - x) / (a - z)));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = x + (((y - z) * (t - x)) / (a - z));
	elseif ((t_1 <= -5e-209) || ~((t_1 <= 5e-293)))
		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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, -5e-209], N[Not[LessEqual[t$95$1, 5e-293]], $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(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\

\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-209} \lor \neg \left(t_1 \leq 5 \cdot 10^{-293}\right):\\
\;\;\;\;t_1\\

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


\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)))) < -inf.0

    1. Initial program 77.4%

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

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

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

    if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.0000000000000005e-209 or 5.0000000000000003e-293 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 92.6%

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

    if -5.0000000000000005e-209 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.0000000000000003e-293

    1. Initial program 3.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 75.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}} \]
    3. Step-by-step derivation
      1. associate--l+75.8%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/75.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) \]
      3. associate-*r/75.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) \]
      4. div-sub75.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}} \]
      5. distribute-lft-out--75.8%

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

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

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

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

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

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

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

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

Alternative 3: 94.0% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x + \frac{1}{\frac{t_1}{t - x}}\\


\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.0000000000000005e-209

    1. Initial program 91.3%

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

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

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

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

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

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

    1. Initial program 2.9%

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

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

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

        \[\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) \]
      3. associate-*r/77.3%

        \[\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) \]
      4. div-sub77.3%

        \[\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}} \]
      5. distribute-lft-out--77.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    5. Step-by-step derivation
      1. div-inv99.8%

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

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

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

    1. Initial program 89.4%

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

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

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

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

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

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

Alternative 4: 90.9% accurate, 0.3× speedup?

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

    1. Initial program 91.1%

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

    if -5.0000000000000005e-209 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.0000000000000003e-293

    1. Initial program 3.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Taylor expanded in z around inf 75.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}} \]
    3. Step-by-step derivation
      1. associate--l+75.8%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. associate-*r/75.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) \]
      3. associate-*r/75.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) \]
      4. div-sub75.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}} \]
      5. distribute-lft-out--75.8%

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

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

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

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

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

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

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

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

Alternative 5: 94.1% accurate, 0.3× speedup?

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

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

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

    1. Initial program 90.3%

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

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

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

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

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

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

    1. Initial program 2.9%

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

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

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

        \[\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) \]
      3. associate-*r/77.3%

        \[\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) \]
      4. div-sub77.3%

        \[\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}} \]
      5. distribute-lft-out--77.3%

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

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

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

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

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

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

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

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

Alternative 6: 94.1% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{z \cdot \frac{1}{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)))) < -5.0000000000000005e-209 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 90.3%

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

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

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

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

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

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

    1. Initial program 2.9%

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

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

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

        \[\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) \]
      3. associate-*r/77.3%

        \[\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) \]
      4. div-sub77.3%

        \[\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}} \]
      5. distribute-lft-out--77.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    5. Step-by-step derivation
      1. div-inv99.8%

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

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

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

Alternative 7: 51.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x - x \cdot \frac{y}{a}\\
t_2 := \frac{z}{a - z} \cdot \left(-t\right)\\
t_3 := \frac{t}{\frac{a - z}{y}}\\
\mathbf{if}\;z \leq -36000:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq -2.8 \cdot 10^{-119}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;z \leq 1.56 \cdot 10^{+49}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+72}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -36000 or 3.80000000000000006e72 < z

    1. Initial program 66.8%

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

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

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

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

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

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

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

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

    if -36000 < z < -1.7000000000000001e-31 or 1.45e-91 < z < 1.56e49

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7000000000000001e-31 < z < -2.8e-119 or 1.56e49 < z < 3.80000000000000006e72

    1. Initial program 84.9%

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

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

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

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

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

    if -2.8e-119 < z < 1.45e-91

    1. Initial program 92.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -36000:\\ \;\;\;\;\frac{z}{a - z} \cdot \left(-t\right)\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-31}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-119}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y}}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{-91}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.56 \cdot 10^{+49}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+72}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{a - z} \cdot \left(-t\right)\\ \end{array} \]

Alternative 8: 54.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -1.95 \cdot 10^{+24}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -1.35 \cdot 10^{-98}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;t \leq 1.35 \cdot 10^{-64}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.0999999999999999e74 or -1.9499999999999999e24 < t < -1.3499999999999999e-98 or 1.34999999999999993e-64 < t

    1. Initial program 87.0%

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

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

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

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

    if -2.0999999999999999e74 < t < -1.9499999999999999e24 or 6.5000000000000002e-131 < t < 1.34999999999999993e-64

    1. Initial program 80.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3499999999999999e-98 < t < 6.5000000000000002e-131

    1. Initial program 62.7%

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

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

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

        \[\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) \]
      3. associate-*r/56.2%

        \[\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) \]
      4. div-sub56.3%

        \[\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}} \]
      5. distribute-lft-out--56.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot \left(y - a\right)}{z}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity42.9%

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

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

        \[\leadsto 1 \cdot \color{blue}{\frac{y - a}{\frac{z}{x}}} \]
    7. Applied egg-rr52.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+74}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -1.95 \cdot 10^{+24}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-98}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-131}:\\ \;\;\;\;\frac{y - a}{\frac{z}{x}}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-64}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 9: 58.4% 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 -3.6 \cdot 10^{+120}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-164}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{+117}:\\ \;\;\;\;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 -3.6e+120)
     t_2
     (if (<= y -1.75e-94)
       t_1
       (if (<= y -9e-164)
         (- x (/ (* x y) a))
         (if (<= y 1.02e+117) 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 <= -3.6e+120) {
		tmp = t_2;
	} else if (y <= -1.75e-94) {
		tmp = t_1;
	} else if (y <= -9e-164) {
		tmp = x - ((x * y) / a);
	} else if (y <= 1.02e+117) {
		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 <= (-3.6d+120)) then
        tmp = t_2
    else if (y <= (-1.75d-94)) then
        tmp = t_1
    else if (y <= (-9d-164)) then
        tmp = x - ((x * y) / a)
    else if (y <= 1.02d+117) 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 <= -3.6e+120) {
		tmp = t_2;
	} else if (y <= -1.75e-94) {
		tmp = t_1;
	} else if (y <= -9e-164) {
		tmp = x - ((x * y) / a);
	} else if (y <= 1.02e+117) {
		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 <= -3.6e+120:
		tmp = t_2
	elif y <= -1.75e-94:
		tmp = t_1
	elif y <= -9e-164:
		tmp = x - ((x * y) / a)
	elif y <= 1.02e+117:
		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 <= -3.6e+120)
		tmp = t_2;
	elseif (y <= -1.75e-94)
		tmp = t_1;
	elseif (y <= -9e-164)
		tmp = Float64(x - Float64(Float64(x * y) / a));
	elseif (y <= 1.02e+117)
		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 <= -3.6e+120)
		tmp = t_2;
	elseif (y <= -1.75e-94)
		tmp = t_1;
	elseif (y <= -9e-164)
		tmp = x - ((x * y) / a);
	elseif (y <= 1.02e+117)
		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, -3.6e+120], t$95$2, If[LessEqual[y, -1.75e-94], t$95$1, If[LessEqual[y, -9e-164], N[(x - N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.02e+117], 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 -3.6 \cdot 10^{+120}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -1.75 \cdot 10^{-94}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.02 \cdot 10^{+117}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.60000000000000016e120 or 1.02e117 < y

    1. Initial program 90.7%

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

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

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

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

    if -3.60000000000000016e120 < y < -1.74999999999999999e-94 or -8.9999999999999995e-164 < y < 1.02e117

    1. Initial program 70.9%

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

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

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

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

    if -1.74999999999999999e-94 < y < -8.9999999999999995e-164

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+120}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;y \leq -1.75 \cdot 10^{-94}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;y \leq -9 \cdot 10^{-164}:\\ \;\;\;\;x - \frac{x \cdot y}{a}\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{+117}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \end{array} \]

Alternative 10: 59.1% 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 -9.8 \cdot 10^{+120}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-95}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -8.6 \cdot 10^{-163}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 10^{+117}:\\ \;\;\;\;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 -9.8e+120)
     t_2
     (if (<= y -5.6e-95)
       t_1
       (if (<= y -8.6e-163)
         (+ x (* (- y z) (/ t a)))
         (if (<= y 1e+117) 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 <= -9.8e+120) {
		tmp = t_2;
	} else if (y <= -5.6e-95) {
		tmp = t_1;
	} else if (y <= -8.6e-163) {
		tmp = x + ((y - z) * (t / a));
	} else if (y <= 1e+117) {
		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 <= (-9.8d+120)) then
        tmp = t_2
    else if (y <= (-5.6d-95)) then
        tmp = t_1
    else if (y <= (-8.6d-163)) then
        tmp = x + ((y - z) * (t / a))
    else if (y <= 1d+117) 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 <= -9.8e+120) {
		tmp = t_2;
	} else if (y <= -5.6e-95) {
		tmp = t_1;
	} else if (y <= -8.6e-163) {
		tmp = x + ((y - z) * (t / a));
	} else if (y <= 1e+117) {
		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 <= -9.8e+120:
		tmp = t_2
	elif y <= -5.6e-95:
		tmp = t_1
	elif y <= -8.6e-163:
		tmp = x + ((y - z) * (t / a))
	elif y <= 1e+117:
		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 <= -9.8e+120)
		tmp = t_2;
	elseif (y <= -5.6e-95)
		tmp = t_1;
	elseif (y <= -8.6e-163)
		tmp = Float64(x + Float64(Float64(y - z) * Float64(t / a)));
	elseif (y <= 1e+117)
		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 <= -9.8e+120)
		tmp = t_2;
	elseif (y <= -5.6e-95)
		tmp = t_1;
	elseif (y <= -8.6e-163)
		tmp = x + ((y - z) * (t / a));
	elseif (y <= 1e+117)
		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, -9.8e+120], t$95$2, If[LessEqual[y, -5.6e-95], t$95$1, If[LessEqual[y, -8.6e-163], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+117], 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 -9.8 \cdot 10^{+120}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -5.6 \cdot 10^{-95}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 10^{+117}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.80000000000000021e120 or 1.00000000000000005e117 < y

    1. Initial program 90.7%

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

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

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

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

    if -9.80000000000000021e120 < y < -5.5999999999999998e-95 or -8.60000000000000017e-163 < y < 1.00000000000000005e117

    1. Initial program 70.9%

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

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

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

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

    if -5.5999999999999998e-95 < y < -8.60000000000000017e-163

    1. Initial program 87.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.8 \cdot 10^{+120}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;y \leq -5.6 \cdot 10^{-95}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;y \leq -8.6 \cdot 10^{-163}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;y \leq 10^{+117}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \end{array} \]

Alternative 11: 29.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq -8.4 \cdot 10^{-94}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -2.7 \cdot 10^{-169}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-168}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 5 \cdot 10^{+217}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.49999999999999963e115 or 1.4499999999999999e-168 < y < 5.00000000000000041e217

    1. Initial program 83.3%

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

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

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

        \[\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) \]
      3. associate-*r/44.3%

        \[\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) \]
      4. div-sub44.3%

        \[\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}} \]
      5. distribute-lft-out--44.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    8. Simplified36.0%

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

    if -4.49999999999999963e115 < y < -8.4000000000000004e-94 or -2.7000000000000002e-169 < y < 1.4499999999999999e-168

    1. Initial program 69.2%

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

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

    if -8.4000000000000004e-94 < y < -2.7000000000000002e-169

    1. Initial program 87.1%

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

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

    if 5.00000000000000041e217 < y

    1. Initial program 91.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{+115}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;y \leq -8.4 \cdot 10^{-94}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-169}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-168}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 5 \cdot 10^{+217}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \end{array} \]

Alternative 12: 29.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{y}}\\
\mathbf{if}\;y \leq -4.3 \cdot 10^{+114}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -5.5 \cdot 10^{-94}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -9.6 \cdot 10^{-173}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-168}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 6.2 \cdot 10^{+216}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.3000000000000001e114 or 1.4499999999999999e-168 < y < 6.20000000000000007e216

    1. Initial program 83.3%

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

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

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

        \[\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) \]
      3. associate-*r/44.3%

        \[\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) \]
      4. div-sub44.3%

        \[\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}} \]
      5. distribute-lft-out--44.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    8. Simplified36.0%

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

    if -4.3000000000000001e114 < y < -5.49999999999999989e-94 or -9.60000000000000068e-173 < y < 1.4499999999999999e-168

    1. Initial program 69.2%

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

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

    if -5.49999999999999989e-94 < y < -9.60000000000000068e-173

    1. Initial program 87.1%

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

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

    if 6.20000000000000007e216 < y

    1. Initial program 91.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    6. Applied egg-rr58.0%

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. *-commutative37.7%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    9. Simplified49.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.3 \cdot 10^{+114}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{-94}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -9.6 \cdot 10^{-173}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-168}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+216}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \end{array} \]

Alternative 13: 29.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{\frac{z}{x}}\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+116}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -2.05 \cdot 10^{-94}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq -3.1 \cdot 10^{-165}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.45 \cdot 10^{-168}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+217}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.19999999999999992e116 or 1.4499999999999999e-168 < y < 4.7999999999999996e217

    1. Initial program 83.3%

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

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

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

        \[\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) \]
      3. associate-*r/44.3%

        \[\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) \]
      4. div-sub44.3%

        \[\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}} \]
      5. distribute-lft-out--44.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    7. Step-by-step derivation
      1. *-commutative28.8%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    8. Simplified36.0%

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

    if -6.19999999999999992e116 < y < -2.05e-94 or -3.09999999999999996e-165 < y < 1.4499999999999999e-168

    1. Initial program 69.2%

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

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

    if -2.05e-94 < y < -3.09999999999999996e-165

    1. Initial program 87.1%

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

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

    if 4.7999999999999996e217 < y

    1. Initial program 91.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    6. Applied egg-rr58.0%

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. *-commutative37.7%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} \]
    9. Simplified49.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+116}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;y \leq -2.05 \cdot 10^{-94}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq -3.1 \cdot 10^{-165}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-168}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+217}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \end{array} \]

Alternative 14: 36.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq -6.2 \cdot 10^{-173}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 3.7 \cdot 10^{-241}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-91}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+72}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1e152 or 8.5000000000000004e72 < z

    1. Initial program 60.3%

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

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

    if -1e152 < z < -6.20000000000000011e-173 or 3.6999999999999999e-241 < z < 2.49999999999999999e-91

    1. Initial program 87.6%

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

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

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

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

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

    if -6.20000000000000011e-173 < z < 3.6999999999999999e-241 or 2.49999999999999999e-91 < z < 8.5000000000000004e72

    1. Initial program 87.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+152}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -6.2 \cdot 10^{-173}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{-241}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-91}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+72}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 15: 33.3% accurate, 0.9× speedup?

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

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

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

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

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

\mathbf{elif}\;z \leq 3 \cdot 10^{+74}:\\
\;\;\;\;x\\

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


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

    1. Initial program 65.7%

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

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

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

        \[\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) \]
      3. associate-*r/62.0%

        \[\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) \]
      4. div-sub62.0%

        \[\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}} \]
      5. distribute-lft-out--62.0%

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

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

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

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

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

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

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

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

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

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

    if -2.4e49 < z < -1.14999999999999993e-170 or 2.0500000000000001e-240 < z < 8.8000000000000002e-88

    1. Initial program 89.4%

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

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

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

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

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

    if -1.14999999999999993e-170 < z < 2.0500000000000001e-240 or 8.8000000000000002e-88 < z < 3e74

    1. Initial program 87.6%

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

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

    if 3e74 < z

    1. Initial program 64.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+49}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{-170}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{-240}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{-88}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+74}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 16: 53.4% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq 5.3 \cdot 10^{-219}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.7 \cdot 10^{-48}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.65e11

    1. Initial program 84.1%

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

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

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

    if -2.65e11 < a < 5.3000000000000003e-219 or 5.19999999999999965e-201 < a < 2.70000000000000011e-48

    1. Initial program 68.9%

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

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

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

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

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

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

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

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

    if 5.3000000000000003e-219 < a < 5.19999999999999965e-201

    1. Initial program 44.5%

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

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

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

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

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

        \[\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}} \]
      5. distribute-lft-out--82.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    8. Simplified83.8%

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

    if 2.70000000000000011e-48 < a

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -265000000000:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{-219}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-201}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{-48}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \end{array} \]

Alternative 17: 63.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+152}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\

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

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

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


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

    1. Initial program 54.8%

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

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

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

        \[\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) \]
      3. associate-*r/68.1%

        \[\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) \]
      4. div-sub68.1%

        \[\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}} \]
      5. distribute-lft-out--68.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4000000000000001e152 < z < -3.60000000000000009e-115

    1. Initial program 83.1%

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

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

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

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

    if -3.60000000000000009e-115 < z < 6.00000000000000047e46

    1. Initial program 89.9%

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

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

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

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

    if 6.00000000000000047e46 < z

    1. Initial program 67.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+152}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -3.6 \cdot 10^{-115}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{+46}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 18: 63.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+152}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\

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

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

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


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

    1. Initial program 54.8%

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

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

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

        \[\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) \]
      3. associate-*r/68.1%

        \[\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) \]
      4. div-sub68.1%

        \[\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}} \]
      5. distribute-lft-out--68.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.5e152 < z < -5.4000000000000003e-101

    1. Initial program 83.1%

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

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

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

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

    if -5.4000000000000003e-101 < z < 9.2000000000000002e46

    1. Initial program 89.9%

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

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

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

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

    if 9.2000000000000002e46 < z

    1. Initial program 67.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    6. Applied egg-rr66.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+152}:\\ \;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-101}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+46}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \end{array} \]

Alternative 19: 63.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+152}:\\
\;\;\;\;t + \frac{x - t}{\frac{-z}{a}}\\

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

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

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


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

    1. Initial program 54.8%

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

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

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

        \[\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) \]
      3. associate-*r/68.1%

        \[\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) \]
      4. div-sub68.1%

        \[\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}} \]
      5. distribute-lft-out--68.1%

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{t - x}{\color{blue}{-\frac{z}{a}}} \]
    7. Simplified63.8%

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

    if -2.29999999999999985e152 < z < -9.4999999999999996e-115

    1. Initial program 83.1%

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

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

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

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

    if -9.4999999999999996e-115 < z < 2.45000000000000015e48

    1. Initial program 89.9%

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

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

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

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

    if 2.45000000000000015e48 < z

    1. Initial program 67.3%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
    6. Applied egg-rr66.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+152}:\\ \;\;\;\;t + \frac{x - t}{\frac{-z}{a}}\\ \mathbf{elif}\;z \leq -9.5 \cdot 10^{-115}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{+48}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \end{array} \]

Alternative 20: 71.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+95} \lor \neg \left(y \leq 1.32 \cdot 10^{+143}\right):\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.3999999999999998e95 or 1.3200000000000001e143 < y

    1. Initial program 86.6%

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

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

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

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

    if -4.3999999999999998e95 < y < 1.3200000000000001e143

    1. Initial program 74.6%

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

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

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

Alternative 21: 77.5% accurate, 0.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.7e33 or 6.6000000000000005e-42 < a

    1. Initial program 89.9%

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

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

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

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

    if -1.7e33 < a < 6.6000000000000005e-42

    1. Initial program 68.8%

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

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

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

        \[\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) \]
      3. associate-*r/74.0%

        \[\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) \]
      4. div-sub74.0%

        \[\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}} \]
      5. distribute-lft-out--74.0%

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

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

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

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

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

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

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

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

Alternative 22: 44.8% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;a \leq 3.8 \cdot 10^{-42}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.5000000000000002e-45 or 3.80000000000000017e-42 < a

    1. Initial program 90.0%

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

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

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

    if -9.5000000000000002e-45 < a < 1.79999999999999989e-146

    1. Initial program 63.7%

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

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

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

        \[\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) \]
      3. associate-*r/74.2%

        \[\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) \]
      4. div-sub74.2%

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

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

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

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

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

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

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

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

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

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

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

    if 1.79999999999999989e-146 < a < 3.80000000000000017e-42

    1. Initial program 78.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{-45}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-146}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-42}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]

Alternative 23: 44.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{-45}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{-48}:\\
\;\;\;\;t\\

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


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

    1. Initial program 84.8%

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

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

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

    if -4.39999999999999987e-45 < a < 1.89999999999999997e-146

    1. Initial program 63.7%

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

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

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

        \[\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) \]
      3. associate-*r/74.2%

        \[\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) \]
      4. div-sub74.2%

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

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

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

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

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

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

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

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

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

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

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

    if 1.89999999999999997e-146 < a < 2.59999999999999987e-48

    1. Initial program 76.8%

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

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

    if 2.59999999999999987e-48 < a

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.4 \cdot 10^{-45}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-146}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-48}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \]

Alternative 24: 44.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-44}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\

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

\mathbf{elif}\;a \leq 1.4 \cdot 10^{-48}:\\
\;\;\;\;t\\

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


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

    1. Initial program 84.8%

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

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

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

    if -1.10000000000000006e-44 < a < 1.79999999999999989e-146

    1. Initial program 63.7%

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

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

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

        \[\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) \]
      3. associate-*r/74.2%

        \[\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) \]
      4. div-sub74.2%

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

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

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

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

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

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

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

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

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

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

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

    if 1.79999999999999989e-146 < a < 1.40000000000000002e-48

    1. Initial program 76.8%

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

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

    if 1.40000000000000002e-48 < a

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{-44}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-146}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-48}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \end{array} \]

Alternative 25: 37.6% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+184}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -5.5 \cdot 10^{+96}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq -3.1 \cdot 10^{+29}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.2 \cdot 10^{-41}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.00000000000000002e184 or -5.5000000000000002e96 < a < -3.0999999999999999e29 or 1.20000000000000011e-41 < a

    1. Initial program 92.0%

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

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

    if -1.00000000000000002e184 < a < -5.5000000000000002e96 or -3.0999999999999999e29 < a < 1.20000000000000011e-41

    1. Initial program 69.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{+184}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -5.5 \cdot 10^{+96}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{+29}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-41}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 26: 37.4% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+184}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.8 \cdot 10^{+96}:\\
\;\;\;\;x + \left(t - x\right)\\

\mathbf{elif}\;a \leq -1.05 \cdot 10^{+38}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 9.2 \cdot 10^{-42}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.00000000000000002e184 or -1.80000000000000007e96 < a < -1.05e38 or 9.20000000000000015e-42 < a

    1. Initial program 92.0%

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

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

    if -1.00000000000000002e184 < a < -1.80000000000000007e96

    1. Initial program 76.0%

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

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

    if -1.05e38 < a < 9.20000000000000015e-42

    1. Initial program 68.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{+184}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{+96}:\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{+38}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-42}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 27: 25.4% accurate, 13.0× speedup?

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

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

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

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

    \[\leadsto t \]

Reproduce

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