Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.9% → 90.8%
Time: 20.2s
Alternatives: 22
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 79.9% 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: 90.8% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 91.9%

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

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

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

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

    if -1.0000000000000001e-239 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4e-237

    1. Initial program 7.0%

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

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

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

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

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

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

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

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

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

Alternative 2: 90.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 91.9%

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

    if -1.0000000000000001e-239 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4e-237

    1. Initial program 7.0%

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

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

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

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

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

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

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

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

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

Alternative 3: 48.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 1.1 \cdot 10^{-167}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3.9 \cdot 10^{+64}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+106}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 6.6 \cdot 10^{+129}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.25999999999999996e99 or 3.8999999999999998e64 < z < 1.65000000000000004e106 or 2.8999999999999999e199 < z

    1. Initial program 59.2%

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

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

    if -1.25999999999999996e99 < z < 1.1e-167 or 1.2000000000000001e-125 < z < 3.8999999999999998e64 or 1.65000000000000004e106 < z < 6.5999999999999998e129

    1. Initial program 91.5%

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

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

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

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

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

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

    if 1.1e-167 < z < 1.2000000000000001e-125

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/100.0%

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

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

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

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

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

    if 6.5999999999999998e129 < z < 2.8999999999999999e199

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.26 \cdot 10^{+99}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-167}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-125}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{+64}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{+129}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+199}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 4: 48.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 1.02 \cdot 10^{-181}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3.3 \cdot 10^{+64}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{+106}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 3.4 \cdot 10^{+133}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.94999999999999995e94 or 3.29999999999999988e64 < z < 2.70000000000000006e106 or 3.70000000000000021e199 < z

    1. Initial program 59.2%

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

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

    if -2.94999999999999995e94 < z < 1.02000000000000003e-181 or 1.4e-127 < z < 3.29999999999999988e64 or 2.70000000000000006e106 < z < 3.39999999999999987e133

    1. Initial program 91.4%

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

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

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

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

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

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

    if 1.02000000000000003e-181 < z < 1.4e-127

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/99.8%

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

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

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

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

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

    if 3.39999999999999987e133 < z < 3.70000000000000021e199

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.95 \cdot 10^{+94}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-181}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-127}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{+64}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+106}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+133}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{+199}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 5: 49.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 1.35 \cdot 10^{-179}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 4.9 \cdot 10^{+64}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 5 \cdot 10^{+105}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+129}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.49999999999999976e97 or 4.9000000000000003e64 < z < 5.00000000000000046e105 or 4.8000000000000003e199 < z

    1. Initial program 59.2%

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

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

    if -4.49999999999999976e97 < z < 1.34999999999999994e-179 or 5.5e-42 < z < 4.9000000000000003e64 or 5.00000000000000046e105 < z < 2.2999999999999999e129

    1. Initial program 92.4%

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

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

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

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

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

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

    if 1.34999999999999994e-179 < z < 5.5e-42

    1. Initial program 88.1%

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    5. Simplified50.1%

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

    if 2.2999999999999999e129 < z < 4.8000000000000003e199

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+97}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-179}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-42}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{+64}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+105}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+129}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+199}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 6: 49.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -2.4 \cdot 10^{-74}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -7.2 \cdot 10^{-86}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq -8 \cdot 10^{-100}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq -1.55 \cdot 10^{-167}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.7 \cdot 10^{-218}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 7 \cdot 10^{+29}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -5.2000000000000001e74

    1. Initial program 93.4%

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

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

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

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

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

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

    if -5.2000000000000001e74 < a < -2.3999999999999999e-74 or -8.0000000000000002e-100 < a < -1.55e-167

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t + \color{blue}{-1 \cdot \frac{a \cdot x}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg57.1%

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

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

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

    if -2.3999999999999999e-74 < a < -7.19999999999999932e-86 or -1.55e-167 < a < 1.69999999999999993e-218

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. *-commutative68.5%

        \[\leadsto -\color{blue}{\frac{t - x}{z} \cdot y} \]
      4. distribute-rgt-neg-in68.5%

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

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

    if -7.19999999999999932e-86 < a < -8.0000000000000002e-100 or 1.69999999999999993e-218 < a < 6.99999999999999958e29

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \frac{\color{blue}{t \cdot y}}{z} \]
    7. Step-by-step derivation
      1. *-commutative65.5%

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

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

    if 6.99999999999999958e29 < a

    1. Initial program 85.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.2 \cdot 10^{+74}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -2.4 \cdot 10^{-74}:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-86}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-100}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-167}:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-218}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+29}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \end{array} \]

Alternative 7: 56.8% accurate, 0.6× speedup?

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

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

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

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

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

\mathbf{elif}\;z \leq 2 \cdot 10^{+42}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.40000000000000006e59 or 9.00000000000000014e135 < z

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.40000000000000006e59 < z < -3.7999999999999998e-181

    1. Initial program 90.9%

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

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

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

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

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

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

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

    if -3.7999999999999998e-181 < z < -1.95000000000000014e-228 or 6.6e-187 < z < 2.00000000000000009e42

    1. Initial program 90.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/67.5%

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

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

    if -1.95000000000000014e-228 < z < 6.6e-187

    1. Initial program 95.8%

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

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

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

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

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

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

    if 2.00000000000000009e42 < z < 9.00000000000000014e135

    1. Initial program 89.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+59}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq -3.8 \cdot 10^{-181}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq -1.95 \cdot 10^{-228}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-187}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+42}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+135}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 8: 55.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t + y \cdot \frac{x}{z}\\ t_2 := \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-167}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-35}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+56}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{+133}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ t (* y (/ x z)))) (t_2 (* (- y z) (/ t (- a z)))))
   (if (<= z -1.4e+58)
     t_1
     (if (<= z 1.1e-167)
       (- x (/ x (/ a y)))
       (if (<= z 3.6e-35)
         t_2
         (if (<= z 1.35e+56)
           (* x (- 1.0 (/ y a)))
           (if (<= z 8.4e+133) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t + (y * (x / z));
	double t_2 = (y - z) * (t / (a - z));
	double tmp;
	if (z <= -1.4e+58) {
		tmp = t_1;
	} else if (z <= 1.1e-167) {
		tmp = x - (x / (a / y));
	} else if (z <= 3.6e-35) {
		tmp = t_2;
	} else if (z <= 1.35e+56) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 8.4e+133) {
		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 * (x / z))
    t_2 = (y - z) * (t / (a - z))
    if (z <= (-1.4d+58)) then
        tmp = t_1
    else if (z <= 1.1d-167) then
        tmp = x - (x / (a / y))
    else if (z <= 3.6d-35) then
        tmp = t_2
    else if (z <= 1.35d+56) then
        tmp = x * (1.0d0 - (y / a))
    else if (z <= 8.4d+133) 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 * (x / z));
	double t_2 = (y - z) * (t / (a - z));
	double tmp;
	if (z <= -1.4e+58) {
		tmp = t_1;
	} else if (z <= 1.1e-167) {
		tmp = x - (x / (a / y));
	} else if (z <= 3.6e-35) {
		tmp = t_2;
	} else if (z <= 1.35e+56) {
		tmp = x * (1.0 - (y / a));
	} else if (z <= 8.4e+133) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t + (y * (x / z))
	t_2 = (y - z) * (t / (a - z))
	tmp = 0
	if z <= -1.4e+58:
		tmp = t_1
	elif z <= 1.1e-167:
		tmp = x - (x / (a / y))
	elif z <= 3.6e-35:
		tmp = t_2
	elif z <= 1.35e+56:
		tmp = x * (1.0 - (y / a))
	elif z <= 8.4e+133:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t + Float64(y * Float64(x / z)))
	t_2 = Float64(Float64(y - z) * Float64(t / Float64(a - z)))
	tmp = 0.0
	if (z <= -1.4e+58)
		tmp = t_1;
	elseif (z <= 1.1e-167)
		tmp = Float64(x - Float64(x / Float64(a / y)));
	elseif (z <= 3.6e-35)
		tmp = t_2;
	elseif (z <= 1.35e+56)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (z <= 8.4e+133)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t + (y * (x / z));
	t_2 = (y - z) * (t / (a - z));
	tmp = 0.0;
	if (z <= -1.4e+58)
		tmp = t_1;
	elseif (z <= 1.1e-167)
		tmp = x - (x / (a / y));
	elseif (z <= 3.6e-35)
		tmp = t_2;
	elseif (z <= 1.35e+56)
		tmp = x * (1.0 - (y / a));
	elseif (z <= 8.4e+133)
		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[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+58], t$95$1, If[LessEqual[z, 1.1e-167], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e-35], t$95$2, If[LessEqual[z, 1.35e+56], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.4e+133], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 3.6 \cdot 10^{-35}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;z \leq 8.4 \cdot 10^{+133}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.3999999999999999e58 or 8.4e133 < z

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3999999999999999e58 < z < 1.1e-167

    1. Initial program 93.5%

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

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

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

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

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

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

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

    if 1.1e-167 < z < 3.60000000000000019e-35 or 1.35000000000000005e56 < z < 8.4e133

    1. Initial program 88.6%

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

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

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

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

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

    if 3.60000000000000019e-35 < z < 1.35000000000000005e56

    1. Initial program 90.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+58}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-167}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-35}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+56}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{+133}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 9: 55.8% accurate, 0.8× speedup?

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

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

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

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

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

\mathbf{elif}\;z \leq 3.7 \cdot 10^{+117}:\\
\;\;\;\;t - \frac{y \cdot t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.59999999999999999e59 or 3.6999999999999999e117 < z

    1. Initial program 58.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    7. Step-by-step derivation
      1. mul-1-neg61.3%

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

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

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

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

    if -2.59999999999999999e59 < z < 1.75e-180

    1. Initial program 93.5%

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

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

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

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

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

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

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

    if 1.75e-180 < z < 4.20000000000000025e-41

    1. Initial program 88.1%

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a}{y}}} \]
    5. Simplified50.1%

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

    if 4.20000000000000025e-41 < z < 4.6e64

    1. Initial program 91.7%

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

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

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

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

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

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

    if 4.6e64 < z < 3.6999999999999999e117

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \frac{\color{blue}{t \cdot y}}{z} \]
    7. Step-by-step derivation
      1. *-commutative71.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+59}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-180}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-41}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+64}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{+117}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 10: 49.1% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{-168}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+64}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.25000000000000006e95 or 2.39999999999999999e64 < z

    1. Initial program 61.8%

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

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

    if -1.25000000000000006e95 < z < 1.6500000000000001e-168 or 1.02e-128 < z < 2.39999999999999999e64

    1. Initial program 91.1%

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

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

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

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

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

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

    if 1.6500000000000001e-168 < z < 1.02e-128

    1. Initial program 100.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/100.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+95}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-168}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-128}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+64}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 11: 48.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -1.8 \cdot 10^{-171}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.25 \cdot 10^{+29}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 87.1%

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

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

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

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

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

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

    if -4.8e-9 < a < -1.80000000000000002e-171 or 4.5999999999999999e-304 < a < 2.2500000000000001e29

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \frac{\color{blue}{t \cdot y}}{z} \]
    7. Step-by-step derivation
      1. *-commutative56.0%

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
    8. Simplified56.0%

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

    if -1.80000000000000002e-171 < a < 4.5999999999999999e-304

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{-9}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -1.8 \cdot 10^{-171}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-304}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 2.25 \cdot 10^{+29}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 12: 48.7% accurate, 0.9× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 9.2 \cdot 10^{+28}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 89.3%

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

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

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

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

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

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

    if -2.80000000000000015e-10 < a < -2.5499999999999999e-173 or 4.5999999999999999e-304 < a < 9.19999999999999935e28

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \frac{\color{blue}{t \cdot y}}{z} \]
    7. Step-by-step derivation
      1. *-commutative56.0%

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
    8. Simplified56.0%

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

    if -2.5499999999999999e-173 < a < 4.5999999999999999e-304

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

    if 9.19999999999999935e28 < a

    1. Initial program 85.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{-10}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{-173}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-304}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{+28}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \end{array} \]

Alternative 13: 48.3% accurate, 0.9× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 5.8 \cdot 10^{+28}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 89.3%

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

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

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

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

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

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

    if -3.1e-7 < a < -2.5499999999999999e-173 or 2.8e-302 < a < 5.8000000000000002e28

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \frac{\color{blue}{t \cdot y}}{z} \]
    7. Step-by-step derivation
      1. *-commutative56.0%

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
    8. Simplified56.0%

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

    if -2.5499999999999999e-173 < a < 2.8e-302

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

    if 5.8000000000000002e28 < a

    1. Initial program 85.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.1 \cdot 10^{-7}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -2.55 \cdot 10^{-173}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-302}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+28}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \end{array} \]

Alternative 14: 50.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -7.3 \cdot 10^{-168}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.3 \cdot 10^{+29}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 89.3%

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

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

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

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

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

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

    if -5.2999999999999998e-8 < a < -7.3e-168 or 3.6999999999999996e-217 < a < 2.3000000000000001e29

    1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t - \frac{\color{blue}{t \cdot y}}{z} \]
    7. Step-by-step derivation
      1. *-commutative56.3%

        \[\leadsto t - \frac{\color{blue}{y \cdot t}}{z} \]
    8. Simplified56.3%

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

    if -7.3e-168 < a < 3.6999999999999996e-217

    1. Initial program 81.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. *-commutative67.9%

        \[\leadsto -\color{blue}{\frac{t - x}{z} \cdot y} \]
      4. distribute-rgt-neg-in67.9%

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

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

    if 2.3000000000000001e29 < a

    1. Initial program 85.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.3 \cdot 10^{-8}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -7.3 \cdot 10^{-168}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-217}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+29}:\\ \;\;\;\;t - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \end{array} \]

Alternative 15: 66.8% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.50000000000000035e61 or 3.4000000000000001e135 < z

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.50000000000000035e61 < z < 3.0000000000000002e64

    1. Initial program 92.4%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/73.6%

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

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

    if 3.0000000000000002e64 < z < 3.4000000000000001e135

    1. Initial program 86.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+61}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+64}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{+135}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \]

Alternative 16: 72.8% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.9999999999999996e76 or 3.5999999999999999e28 < a

    1. Initial program 88.4%

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

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

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

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

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

    if -5.9999999999999996e76 < a < 3.5999999999999999e28

    1. Initial program 74.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 75.0% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.5000000000000001e75 or 1.1500000000000001e29 < a

    1. Initial program 88.4%

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

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

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

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

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

    if -5.5000000000000001e75 < a < 1.1500000000000001e29

    1. Initial program 74.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 70.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{-42} \lor \neg \left(a \leq 2.35 \cdot 10^{+29}\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.3000000000000002e-42 or 2.3500000000000001e29 < a

    1. Initial program 85.5%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/72.6%

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

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

    if -3.3000000000000002e-42 < a < 2.3500000000000001e29

    1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 38.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -7.2 \cdot 10^{-172}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{+38}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.64999999999999992e96 or 2.5999999999999999e38 < a

    1. Initial program 88.0%

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

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

    if -1.64999999999999992e96 < a < -7.20000000000000029e-172 or 3.24999999999999986e-158 < a < 2.5999999999999999e38

    1. Initial program 70.7%

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

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

    if -7.20000000000000029e-172 < a < 3.24999999999999986e-158

    1. Initial program 80.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{t - x}{z} \cdot y} \]
      4. distribute-rgt-neg-in63.6%

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Simplified43.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.65 \cdot 10^{+96}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7.2 \cdot 10^{-172}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.25 \cdot 10^{-158}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+38}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 20: 37.9% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq -7.8 \cdot 10^{-172}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 10^{+37}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.7999999999999996e95 or 9.99999999999999954e36 < a

    1. Initial program 88.0%

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

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

    if -8.7999999999999996e95 < a < -7.79999999999999946e-172 or 3.2000000000000001e-217 < a < 9.99999999999999954e36

    1. Initial program 72.2%

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

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

    if -7.79999999999999946e-172 < a < 3.2000000000000001e-217

    1. Initial program 81.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{y \cdot \frac{t - x}{z}} \]
      3. *-commutative67.9%

        \[\leadsto -\color{blue}{\frac{t - x}{z} \cdot y} \]
      4. distribute-rgt-neg-in67.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.8 \cdot 10^{+95}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{-172}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-217}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;a \leq 10^{+37}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 21: 38.3% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 7 \cdot 10^{+32}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.11999999999999997e107 or 7.0000000000000002e32 < a

    1. Initial program 88.0%

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

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

    if -1.11999999999999997e107 < a < 7.0000000000000002e32

    1. Initial program 74.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{+107}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+32}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 22: 24.4% accurate, 13.0× speedup?

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

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

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

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

    \[\leadsto t \]

Reproduce

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