Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.0% → 95.1%
Time: 17.7s
Alternatives: 20
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 20 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.0% accurate, 1.0× speedup?

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

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

Alternative 1: 95.1% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 91.0%

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

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

    1. Initial program 6.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 91.0%

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

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

    1. Initial program 6.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 66.4% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;z \leq -1.95 \cdot 10^{-40}:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;z \leq 4.3 \cdot 10^{+73}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.89999999999999991e200 or 4.30000000000000013e73 < z

    1. Initial program 51.9%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)} \]
    4. Taylor expanded in z around inf 57.1%

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

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

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

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

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

        \[\leadsto \frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \color{blue}{\frac{y}{\frac{z}{t - x}}}, t + \left(\frac{a \cdot \left(t - x\right)}{z} + -1 \cdot \frac{y \cdot \left(a \cdot \left(t - x\right)\right)}{{z}^{2}}\right)\right) \]
      6. associate-/l*69.5%

        \[\leadsto \frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \frac{y}{\frac{z}{t - x}}, t + \left(\color{blue}{\frac{a}{\frac{z}{t - x}}} + -1 \cdot \frac{y \cdot \left(a \cdot \left(t - x\right)\right)}{{z}^{2}}\right)\right) \]
      7. mul-1-neg69.5%

        \[\leadsto \frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \frac{y}{\frac{z}{t - x}}, t + \left(\frac{a}{\frac{z}{t - x}} + \color{blue}{\left(-\frac{y \cdot \left(a \cdot \left(t - x\right)\right)}{{z}^{2}}\right)}\right)\right) \]
      8. associate-*r*69.4%

        \[\leadsto \frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \frac{y}{\frac{z}{t - x}}, t + \left(\frac{a}{\frac{z}{t - x}} + \left(-\frac{\color{blue}{\left(y \cdot a\right) \cdot \left(t - x\right)}}{{z}^{2}}\right)\right)\right) \]
      9. unpow269.4%

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

      \[\leadsto \color{blue}{\frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \frac{y}{\frac{z}{t - x}}, t + \left(\frac{a}{\frac{z}{t - x}} + \left(-\frac{\left(y \cdot a\right) \cdot \left(t - x\right)}{z \cdot z}\right)\right)\right)} \]
    7. Taylor expanded in a around 0 64.6%

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

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

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

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

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

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

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

    if -1.89999999999999991e200 < z < -1.09999999999999995e41

    1. Initial program 65.5%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + t\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    3. Step-by-step derivation
      1. +-commutative65.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} \]
      2. associate--l+65.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)} \]
      3. associate-*r/65.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) \]
      4. associate-*r/65.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) \]
      5. div-sub65.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}} \]
      6. distribute-lft-out--65.1%

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

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

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

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

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

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

    if -1.09999999999999995e41 < z < -1.9499999999999999e-40 or 4.4999999999999998e-54 < z < 4.30000000000000013e73

    1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

    if -1.9499999999999999e-40 < z < -7.5e-158

    1. Initial program 95.7%

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

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

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

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

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

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

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

    if -7.5e-158 < z < 4.4999999999999998e-54

    1. Initial program 93.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+200}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -1.1 \cdot 10^{+41}:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-40}:\\ \;\;\;\;x + \frac{x - t}{\frac{a}{z} + -1}\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{-158}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-54}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+73}:\\ \;\;\;\;x + \frac{x - t}{\frac{a}{z} + -1}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 5: 37.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -0.00172:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\

\mathbf{elif}\;y \leq -6.5 \cdot 10^{-289}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 8.5 \cdot 10^{-86}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 2 \cdot 10^{+94}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -8.2000000000000004e247

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.2000000000000004e247 < y < -0.00171999999999999996

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.00171999999999999996 < y < -6.49999999999999974e-289 or 8.499999999999999e-86 < y < 2e94

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

    if -6.49999999999999974e-289 < y < 8.499999999999999e-86

    1. Initial program 64.1%

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

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

    if 2e94 < y < 6.9999999999999996e205

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.9999999999999996e205 < y

    1. Initial program 92.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{+247}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;y \leq -0.00172:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{-289}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-86}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+94}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+205}:\\ \;\;\;\;\frac{-y}{\frac{a - z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \end{array} \]

Alternative 6: 33.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -6.3 \cdot 10^{-7}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -3.3 \cdot 10^{-289}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 9.8 \cdot 10^{-43}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 2.6 \cdot 10^{+164}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{+205}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -2.70000000000000018e249

    1. Initial program 85.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    7. Simplified67.3%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-/r/83.3%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    9. Applied egg-rr83.3%

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

    if -2.70000000000000018e249 < y < -6.30000000000000003e-7 or 9.79999999999999976e-43 < y < 2.5999999999999999e164

    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.30000000000000003e-7 < y < -3.29999999999999997e-289

    1. Initial program 74.1%

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

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

    if -3.29999999999999997e-289 < y < 9.79999999999999976e-43

    1. Initial program 64.8%

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

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

    if 2.5999999999999999e164 < y < 2.5000000000000001e205

    1. Initial program 73.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    7. Simplified52.9%

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

    if 2.5000000000000001e205 < y

    1. Initial program 92.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+249}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -6.3 \cdot 10^{-7}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{-289}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{-43}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2.6 \cdot 10^{+164}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+205}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \end{array} \]

Alternative 7: 35.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+248}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

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

\mathbf{elif}\;y \leq -1.9 \cdot 10^{-289}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 1.8 \cdot 10^{-90}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 4.3 \cdot 10^{+91}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{+205}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -8.00000000000000036e248

    1. Initial program 85.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    7. Simplified67.3%

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-/r/83.3%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    9. Applied egg-rr83.3%

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

    if -8.00000000000000036e248 < y < -1.29999999999999992e-5

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.29999999999999992e-5 < y < -1.90000000000000005e-289 or 1.7999999999999999e-90 < y < 4.3000000000000001e91

    1. Initial program 70.7%

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

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

    if -1.90000000000000005e-289 < y < 1.7999999999999999e-90

    1. Initial program 64.1%

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

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

    if 4.3000000000000001e91 < y < 3.19999999999999996e205

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

    if 3.19999999999999996e205 < y

    1. Initial program 92.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+248}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-5}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-289}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-90}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{+91}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+205}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \end{array} \]

Alternative 8: 36.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -0.00172:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\

\mathbf{elif}\;y \leq -3.9 \cdot 10^{-289}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 3 \cdot 10^{-90}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{+88}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 7.8 \cdot 10^{+205}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -1.05e242

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05e242 < y < -0.00171999999999999996

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.00171999999999999996 < y < -3.8999999999999998e-289 or 3.0000000000000002e-90 < y < 3.1999999999999999e88

    1. Initial program 70.7%

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

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

    if -3.8999999999999998e-289 < y < 3.0000000000000002e-90

    1. Initial program 64.1%

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

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

    if 3.1999999999999999e88 < y < 7.7999999999999997e205

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

    if 7.7999999999999997e205 < y

    1. Initial program 92.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{+242}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;y \leq -0.00172:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq -3.9 \cdot 10^{-289}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-90}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+88}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{+205}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \end{array} \]

Alternative 9: 38.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -0.0067:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\

\mathbf{elif}\;y \leq -1.95 \cdot 10^{-289}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 9.5 \cdot 10^{-93}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 6.8 \cdot 10^{+89}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -1.2499999999999999e249

    1. Initial program 85.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2499999999999999e249 < y < -0.00670000000000000023

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.00670000000000000023 < y < -1.9499999999999999e-289 or 9.5000000000000001e-93 < y < 6.8000000000000004e89

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

    if -1.9499999999999999e-289 < y < 9.5000000000000001e-93

    1. Initial program 64.1%

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

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

    if 6.8000000000000004e89 < y < 1.02e206

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

    if 1.02e206 < y

    1. Initial program 92.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.25 \cdot 10^{+249}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;y \leq -0.0067:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq -1.95 \cdot 10^{-289}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-93}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+89}:\\ \;\;\;\;\frac{-t}{\frac{a - z}{z}}\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{+206}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \end{array} \]

Alternative 10: 64.1% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq -31000000 \lor \neg \left(z \leq 5.1 \cdot 10^{-24}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.90000000000000006e182 or -8.7999999999999996e95 < z < -3.1e7 or 5.10000000000000025e-24 < z

    1. Initial program 63.2%

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

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

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

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

    if -1.90000000000000006e182 < z < -8.7999999999999996e95

    1. Initial program 56.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1e7 < z < 5.10000000000000025e-24

    1. Initial program 94.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+182}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{+95}:\\ \;\;\;\;t - \frac{a \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;z \leq -31000000 \lor \neg \left(z \leq 5.1 \cdot 10^{-24}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \end{array} \]

Alternative 11: 66.0% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq -1350000:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.19999999999999987e210 or 8.5000000000000001e-29 < z

    1. Initial program 58.0%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)} \]
    4. Taylor expanded in z around inf 52.9%

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

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

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

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

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

        \[\leadsto \frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \color{blue}{\frac{y}{\frac{z}{t - x}}}, t + \left(\frac{a \cdot \left(t - x\right)}{z} + -1 \cdot \frac{y \cdot \left(a \cdot \left(t - x\right)\right)}{{z}^{2}}\right)\right) \]
      6. associate-/l*61.4%

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

        \[\leadsto \frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \frac{y}{\frac{z}{t - x}}, t + \left(\frac{a}{\frac{z}{t - x}} + \color{blue}{\left(-\frac{y \cdot \left(a \cdot \left(t - x\right)\right)}{{z}^{2}}\right)}\right)\right) \]
      8. associate-*r*62.4%

        \[\leadsto \frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \frac{y}{\frac{z}{t - x}}, t + \left(\frac{a}{\frac{z}{t - x}} + \left(-\frac{\color{blue}{\left(y \cdot a\right) \cdot \left(t - x\right)}}{{z}^{2}}\right)\right)\right) \]
      9. unpow262.4%

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

      \[\leadsto \color{blue}{\frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \frac{y}{\frac{z}{t - x}}, t + \left(\frac{a}{\frac{z}{t - x}} + \left(-\frac{\left(y \cdot a\right) \cdot \left(t - x\right)}{z \cdot z}\right)\right)\right)} \]
    7. Taylor expanded in a around 0 59.1%

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

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

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

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

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

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

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

    if -2.19999999999999987e210 < z < -1.0500000000000001e96

    1. Initial program 53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0500000000000001e96 < z < -1.35e6

    1. Initial program 90.7%

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

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

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

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

    if -1.35e6 < z < 8.5000000000000001e-29

    1. Initial program 94.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+210}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{+96}:\\ \;\;\;\;t - \frac{a \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;z \leq -1350000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-29}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 12: 66.0% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;z \leq -5800:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.0000000000000007e209 or 9.7999999999999996e-32 < z

    1. Initial program 58.0%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)} \]
    4. Taylor expanded in z around inf 52.9%

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

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

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

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

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

        \[\leadsto \frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \color{blue}{\frac{y}{\frac{z}{t - x}}}, t + \left(\frac{a \cdot \left(t - x\right)}{z} + -1 \cdot \frac{y \cdot \left(a \cdot \left(t - x\right)\right)}{{z}^{2}}\right)\right) \]
      6. associate-/l*61.4%

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

        \[\leadsto \frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \frac{y}{\frac{z}{t - x}}, t + \left(\frac{a}{\frac{z}{t - x}} + \color{blue}{\left(-\frac{y \cdot \left(a \cdot \left(t - x\right)\right)}{{z}^{2}}\right)}\right)\right) \]
      8. associate-*r*62.4%

        \[\leadsto \frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \frac{y}{\frac{z}{t - x}}, t + \left(\frac{a}{\frac{z}{t - x}} + \left(-\frac{\color{blue}{\left(y \cdot a\right) \cdot \left(t - x\right)}}{{z}^{2}}\right)\right)\right) \]
      9. unpow262.4%

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

      \[\leadsto \color{blue}{\frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \frac{y}{\frac{z}{t - x}}, t + \left(\frac{a}{\frac{z}{t - x}} + \left(-\frac{\left(y \cdot a\right) \cdot \left(t - x\right)}{z \cdot z}\right)\right)\right)} \]
    7. Taylor expanded in a around 0 59.1%

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

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

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

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

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

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

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

    if -9.0000000000000007e209 < z < -1.15000000000000008e96

    1. Initial program 53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15000000000000008e96 < z < -5800

    1. Initial program 90.7%

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

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

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

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

    if -5800 < z < 9.7999999999999996e-32

    1. Initial program 94.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+209}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;z \leq -1.15 \cdot 10^{+96}:\\ \;\;\;\;t - \frac{a \cdot \left(x - t\right)}{z}\\ \mathbf{elif}\;z \leq -5800:\\ \;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{-32}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\ \end{array} \]

Alternative 13: 37.2% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-158}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1500 or 2.99999999999999989e31 < z

    1. Initial program 60.4%

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

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

    if -1500 < z < 1.7e-169 or 1.1000000000000001e-158 < z < 2.99999999999999989e31

    1. Initial program 92.4%

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

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

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

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

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

    if 1.7e-169 < z < 1.1000000000000001e-158

    1. Initial program 97.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1500:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-169}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-158}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+31}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 14: 55.1% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.16 \cdot 10^{-119}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.2e-167 or 1.16e-119 < t

    1. Initial program 82.7%

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

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

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

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

    if -2.2e-167 < t < -7.1000000000000003e-205

    1. Initial program 78.4%

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}, \frac{t - x}{\sqrt[3]{a - z}}, x\right)} \]
      6. pow291.5%

        \[\leadsto \mathsf{fma}\left(\frac{y - z}{\color{blue}{{\left(\sqrt[3]{a - z}\right)}^{2}}}, \frac{t - x}{\sqrt[3]{a - z}}, x\right) \]
    3. Applied egg-rr91.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{{\left(\sqrt[3]{a - z}\right)}^{2}}, \frac{t - x}{\sqrt[3]{a - z}}, x\right)} \]
    4. Taylor expanded in y around inf 77.8%

      \[\leadsto \color{blue}{{1}^{0.3333333333333333} \cdot \frac{y \cdot \left(t - x\right)}{a - z}} \]
    5. Step-by-step derivation
      1. pow-base-177.8%

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

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

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

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

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

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

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

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

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

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

    if -7.1000000000000003e-205 < t < 1.16e-119

    1. Initial program 63.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{-167}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t \leq -7.1 \cdot 10^{-205}:\\ \;\;\;\;\frac{x \cdot \left(-y\right)}{a - z}\\ \mathbf{elif}\;t \leq 1.16 \cdot 10^{-119}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]

Alternative 15: 67.8% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.2e200 or 5.80000000000000048e-29 < z

    1. Initial program 58.4%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)} \]
    4. Taylor expanded in z around inf 53.4%

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

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

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

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

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

        \[\leadsto \frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \color{blue}{\frac{y}{\frac{z}{t - x}}}, t + \left(\frac{a \cdot \left(t - x\right)}{z} + -1 \cdot \frac{y \cdot \left(a \cdot \left(t - x\right)\right)}{{z}^{2}}\right)\right) \]
      6. associate-/l*62.7%

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

        \[\leadsto \frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \frac{y}{\frac{z}{t - x}}, t + \left(\frac{a}{\frac{z}{t - x}} + \color{blue}{\left(-\frac{y \cdot \left(a \cdot \left(t - x\right)\right)}{{z}^{2}}\right)}\right)\right) \]
      8. associate-*r*63.7%

        \[\leadsto \frac{a \cdot a}{\frac{z \cdot z}{t - x}} + \mathsf{fma}\left(-1, \frac{y}{\frac{z}{t - x}}, t + \left(\frac{a}{\frac{z}{t - x}} + \left(-\frac{\color{blue}{\left(y \cdot a\right) \cdot \left(t - x\right)}}{{z}^{2}}\right)\right)\right) \]
      9. unpow263.7%

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

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

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

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

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

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

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

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

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

    if -2.2e200 < z < -4.5e5

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5e5 < z < 5.80000000000000048e-29

    1. Initial program 94.7%

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

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

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

Alternative 16: 55.7% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.2600000000000001e172 or 7.5e6 < x

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \frac{t - x}{z} - \color{blue}{y \cdot \frac{t - x}{z}} \]
      4. distribute-rgt-out--50.8%

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

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

    if -1.2600000000000001e172 < x < 7.5e6

    1. Initial program 83.6%

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

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

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

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

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

Alternative 17: 38.2% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -13200000000:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.3 \cdot 10^{-153}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.15 \cdot 10^{+98}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.32e10 or 1.15000000000000007e98 < a

    1. Initial program 84.6%

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

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

    if -1.32e10 < a < 2.29999999999999997e-153 or 3.45e-133 < a < 1.15000000000000007e98

    1. Initial program 73.5%

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

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

    if 2.29999999999999997e-153 < a < 3.45e-133

    1. Initial program 58.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    8. Step-by-step derivation
      1. associate-/r/69.2%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
    9. Applied egg-rr69.2%

      \[\leadsto \color{blue}{\frac{y}{z} \cdot x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -13200000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-153}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.45 \cdot 10^{-133}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+98}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 18: 38.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -12000000000:\\
\;\;\;\;x\\

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

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

\mathbf{elif}\;a \leq 5.3 \cdot 10^{+98}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.2e10 or 5.29999999999999997e98 < a

    1. Initial program 84.6%

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

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

    if -1.2e10 < a < 2.20000000000000001e-153 or 3.1499999999999999e-127 < a < 5.29999999999999997e98

    1. Initial program 73.5%

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

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

    if 2.20000000000000001e-153 < a < 3.1499999999999999e-127

    1. Initial program 58.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -12000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-153}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.15 \cdot 10^{-127}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{+98}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 19: 38.2% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -12000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+98}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -12000000000.0) x (if (<= a 1.9e+98) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -12000000000.0) {
		tmp = x;
	} else if (a <= 1.9e+98) {
		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 <= (-12000000000.0d0)) then
        tmp = x
    else if (a <= 1.9d+98) 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 <= -12000000000.0) {
		tmp = x;
	} else if (a <= 1.9e+98) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -12000000000.0:
		tmp = x
	elif a <= 1.9e+98:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -12000000000.0)
		tmp = x;
	elseif (a <= 1.9e+98)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -12000000000.0)
		tmp = x;
	elseif (a <= 1.9e+98)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -12000000000.0], x, If[LessEqual[a, 1.9e+98], t, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -12000000000:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.2e10 or 1.89999999999999995e98 < a

    1. Initial program 84.6%

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

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

    if -1.2e10 < a < 1.89999999999999995e98

    1. Initial program 72.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -12000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+98}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 20: 25.0% 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 77.8%

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

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

    \[\leadsto t \]

Reproduce

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