Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3

Percentage Accurate: 66.8% → 90.8%
Time: 26.0s
Alternatives: 22
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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: 66.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 90.8% accurate, 0.1× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t_1, t - x, x\right)\\


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

    1. Initial program 66.1%

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

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

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 72.0%

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

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

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

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

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

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

Alternative 2: 90.8% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 69.1%

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

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

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 64.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -8.6 \cdot 10^{-167}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 5.3 \cdot 10^{+118}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.0000000000000002e121 or 5.2999999999999997e118 < a

    1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

    if -3.0000000000000002e121 < a < -8.5999999999999995e-167 or -4.40000000000000027e-200 < a < 5.2999999999999997e118

    1. Initial program 62.3%

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

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

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

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

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

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

    if -8.5999999999999995e-167 < a < -4.40000000000000027e-200

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3 \cdot 10^{+121}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;a \leq -8.6 \cdot 10^{-167}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-200}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 5.3 \cdot 10^{+118}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\ \end{array} \]

Alternative 4: 78.6% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7e16 or 1.7000000000000001e110 < z

    1. Initial program 31.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7e16 < z < 9.8e17

    1. Initial program 85.9%

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

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

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

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

    if 9.8e17 < z < 1.7000000000000001e110

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+16}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+17}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+110}:\\ \;\;\;\;x - t \cdot \frac{z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\ \end{array} \]

Alternative 5: 78.8% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.25e16 or 1.46e110 < z

    1. Initial program 31.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.25e16 < z < 9.8e17

    1. Initial program 85.9%

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

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

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

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

    if 9.8e17 < z < 1.46e110

    1. Initial program 83.6%

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

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

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

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

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

      \[\leadsto \color{blue}{x - \frac{z}{\frac{a}{t - x} - \frac{z}{t - x}}} \]
    7. Step-by-step derivation
      1. div-sub72.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.25 \cdot 10^{+16}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+17}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.46 \cdot 10^{+110}:\\ \;\;\;\;x + \frac{z}{a - z} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\ \end{array} \]

Alternative 6: 52.0% accurate, 0.8× speedup?

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

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

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

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

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

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


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

    1. Initial program 40.8%

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)}\right) \]
      3. sub-neg57.2%

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

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

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

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

    if -2.05e15 < z < -4.2e-252

    1. Initial program 88.0%

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{t \cdot y}}{a} \]
    6. Step-by-step derivation
      1. *-commutative62.2%

        \[\leadsto x + \frac{\color{blue}{y \cdot t}}{a} \]
    7. Simplified62.2%

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

    if -4.2e-252 < z < 2.4000000000000002e-214

    1. Initial program 89.9%

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

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

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

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

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

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

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

    if 2.4000000000000002e-214 < z < 2.80000000000000024e64

    1. Initial program 79.2%

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

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

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

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

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

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

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

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

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

    if 2.80000000000000024e64 < z

    1. Initial program 33.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.05 \cdot 10^{+15}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{-252}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-214}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{+64}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{a - z} \cdot \left(-t\right)\\ \end{array} \]

Alternative 7: 38.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -6.5 \cdot 10^{-45}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 3 \cdot 10^{-83}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 6.6 \cdot 10^{-29}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 6.3 \cdot 10^{+118}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.9000000000000001e117 or 6.30000000000000002e118 < a

    1. Initial program 68.1%

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

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

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

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

    if -1.9000000000000001e117 < a < -6.4999999999999995e-45 or 3.0000000000000001e-83 < a < 6.60000000000000055e-29

    1. Initial program 71.9%

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

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

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

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

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

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

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

    if -6.4999999999999995e-45 < a < 3.0000000000000001e-83 or 6.60000000000000055e-29 < a < 6.30000000000000002e118

    1. Initial program 59.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{+117}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-45}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 3 \cdot 10^{-83}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-29}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 6.3 \cdot 10^{+118}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 47.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -9.2 \cdot 10^{+16}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-280}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-214}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+57}:\\ \;\;\;\;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 -9.2e+16)
     t
     (if (<= z 3.3e-280)
       t_1
       (if (<= z 5.2e-214) (* t (/ (- y z) a)) (if (<= z 2.6e+57) 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 <= -9.2e+16) {
		tmp = t;
	} else if (z <= 3.3e-280) {
		tmp = t_1;
	} else if (z <= 5.2e-214) {
		tmp = t * ((y - z) / a);
	} else if (z <= 2.6e+57) {
		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 <= (-9.2d+16)) then
        tmp = t
    else if (z <= 3.3d-280) then
        tmp = t_1
    else if (z <= 5.2d-214) then
        tmp = t * ((y - z) / a)
    else if (z <= 2.6d+57) 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 <= -9.2e+16) {
		tmp = t;
	} else if (z <= 3.3e-280) {
		tmp = t_1;
	} else if (z <= 5.2e-214) {
		tmp = t * ((y - z) / a);
	} else if (z <= 2.6e+57) {
		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 <= -9.2e+16:
		tmp = t
	elif z <= 3.3e-280:
		tmp = t_1
	elif z <= 5.2e-214:
		tmp = t * ((y - z) / a)
	elif z <= 2.6e+57:
		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 <= -9.2e+16)
		tmp = t;
	elseif (z <= 3.3e-280)
		tmp = t_1;
	elseif (z <= 5.2e-214)
		tmp = Float64(t * Float64(Float64(y - z) / a));
	elseif (z <= 2.6e+57)
		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 <= -9.2e+16)
		tmp = t;
	elseif (z <= 3.3e-280)
		tmp = t_1;
	elseif (z <= 5.2e-214)
		tmp = t * ((y - z) / a);
	elseif (z <= 2.6e+57)
		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, -9.2e+16], t, If[LessEqual[z, 3.3e-280], t$95$1, If[LessEqual[z, 5.2e-214], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+57], t$95$1, t]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 3.3 \cdot 10^{-280}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+57}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.2e16 or 2.6e57 < z

    1. Initial program 38.1%

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

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

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

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

    if -9.2e16 < z < 3.29999999999999991e-280 or 5.2e-214 < z < 2.6e57

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

    if 3.29999999999999991e-280 < z < 5.2e-214

    1. Initial program 80.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+16}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-280}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-214}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+57}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 9: 48.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;z \leq -9.2 \cdot 10^{+16}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-250}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-214}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+58}:\\ \;\;\;\;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 -9.2e+16)
     t
     (if (<= z -1.25e-250)
       t_1
       (if (<= z 2.6e-214) (* y (/ (- t x) a)) (if (<= z 7.5e+58) 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 <= -9.2e+16) {
		tmp = t;
	} else if (z <= -1.25e-250) {
		tmp = t_1;
	} else if (z <= 2.6e-214) {
		tmp = y * ((t - x) / a);
	} else if (z <= 7.5e+58) {
		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 <= (-9.2d+16)) then
        tmp = t
    else if (z <= (-1.25d-250)) then
        tmp = t_1
    else if (z <= 2.6d-214) then
        tmp = y * ((t - x) / a)
    else if (z <= 7.5d+58) 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 <= -9.2e+16) {
		tmp = t;
	} else if (z <= -1.25e-250) {
		tmp = t_1;
	} else if (z <= 2.6e-214) {
		tmp = y * ((t - x) / a);
	} else if (z <= 7.5e+58) {
		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 <= -9.2e+16:
		tmp = t
	elif z <= -1.25e-250:
		tmp = t_1
	elif z <= 2.6e-214:
		tmp = y * ((t - x) / a)
	elif z <= 7.5e+58:
		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 <= -9.2e+16)
		tmp = t;
	elseif (z <= -1.25e-250)
		tmp = t_1;
	elseif (z <= 2.6e-214)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (z <= 7.5e+58)
		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 <= -9.2e+16)
		tmp = t;
	elseif (z <= -1.25e-250)
		tmp = t_1;
	elseif (z <= 2.6e-214)
		tmp = y * ((t - x) / a);
	elseif (z <= 7.5e+58)
		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, -9.2e+16], t, If[LessEqual[z, -1.25e-250], t$95$1, If[LessEqual[z, 2.6e-214], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+58], t$95$1, t]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+58}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.2e16 or 7.5000000000000001e58 < z

    1. Initial program 38.1%

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

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

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

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

    if -9.2e16 < z < -1.25000000000000007e-250 or 2.6e-214 < z < 7.5000000000000001e58

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

    if -1.25000000000000007e-250 < z < 2.6e-214

    1. Initial program 89.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+16}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-250}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-214}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+58}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 10: 49.3% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.89999999999999992e79 or 7.5000000000000001e58 < z

    1. Initial program 33.9%

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

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

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

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

    if -2.89999999999999992e79 < z < -1.4999999999999999e-251

    1. Initial program 85.2%

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{t \cdot y}}{a} \]
    6. Step-by-step derivation
      1. *-commutative55.3%

        \[\leadsto x + \frac{\color{blue}{y \cdot t}}{a} \]
    7. Simplified55.3%

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

    if -1.4999999999999999e-251 < z < 2.6e-214

    1. Initial program 89.9%

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

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

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

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

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

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

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

    if 2.6e-214 < z < 7.5000000000000001e58

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+79}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -1.5 \cdot 10^{-251}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-214}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+58}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 11: 52.3% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.5e12 or 1.9e55 < z

    1. Initial program 38.6%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(-\frac{y - z}{z}\right)} \]
      2. div-sub56.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot 1 + t \cdot \frac{-y}{z}} \]
      4. *-rgt-identity56.3%

        \[\leadsto \color{blue}{t} + t \cdot \frac{-y}{z} \]
      5. associate-*r/48.6%

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

        \[\leadsto t + \frac{\color{blue}{-t \cdot y}}{z} \]
      7. neg-mul-148.6%

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

        \[\leadsto t + \color{blue}{-1 \cdot \frac{t \cdot y}{z}} \]
      9. mul-1-neg48.6%

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

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

        \[\leadsto t - \color{blue}{\frac{t}{\frac{z}{y}}} \]
      12. associate-/r/56.3%

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

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

    if -6.5e12 < z < -4.8000000000000003e-252

    1. Initial program 88.0%

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{t \cdot y}}{a} \]
    6. Step-by-step derivation
      1. *-commutative62.2%

        \[\leadsto x + \frac{\color{blue}{y \cdot t}}{a} \]
    7. Simplified62.2%

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

    if -4.8000000000000003e-252 < z < 1.8500000000000001e-214

    1. Initial program 89.9%

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

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

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

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

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

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

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

    if 1.8500000000000001e-214 < z < 1.9e55

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6500000000000:\\ \;\;\;\;t - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-252}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-214}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+55}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t - y \cdot \frac{t}{z}\\ \end{array} \]

Alternative 12: 52.2% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.3e14 or 4.5999999999999998e57 < z

    1. Initial program 38.6%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(-\frac{y - z}{z}\right)} \]
      2. div-sub56.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot 1 + t \cdot \frac{-y}{z}} \]
      4. *-rgt-identity56.3%

        \[\leadsto \color{blue}{t} + t \cdot \frac{-y}{z} \]
      5. associate-*r/48.6%

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

        \[\leadsto t + \frac{\color{blue}{-t \cdot y}}{z} \]
      7. neg-mul-148.6%

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

        \[\leadsto t + \color{blue}{-1 \cdot \frac{t \cdot y}{z}} \]
      9. mul-1-neg48.6%

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

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

        \[\leadsto t - \color{blue}{\frac{t}{\frac{z}{y}}} \]
      12. associate-/r/56.3%

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

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

    if -2.3e14 < z < -5.1999999999999998e-251

    1. Initial program 88.0%

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{t \cdot y}}{a} \]
    6. Step-by-step derivation
      1. *-commutative62.2%

        \[\leadsto x + \frac{\color{blue}{y \cdot t}}{a} \]
    7. Simplified62.2%

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

    if -5.1999999999999998e-251 < z < 1.8500000000000001e-214

    1. Initial program 89.9%

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

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

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

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

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

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

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

    if 1.8500000000000001e-214 < z < 4.5999999999999998e57

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+14}:\\ \;\;\;\;t - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{-251}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-214}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+57}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t - y \cdot \frac{t}{z}\\ \end{array} \]

Alternative 13: 52.2% accurate, 0.9× speedup?

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

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

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

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

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

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


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

    1. Initial program 40.8%

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(-\color{blue}{\left(\frac{y}{z} - \frac{z}{z}\right)}\right) \]
      3. sub-neg57.2%

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

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

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

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

    if -1.15e15 < z < -1.3e-251

    1. Initial program 88.0%

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

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

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

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

      \[\leadsto x + \frac{\color{blue}{t \cdot y}}{a} \]
    6. Step-by-step derivation
      1. *-commutative62.2%

        \[\leadsto x + \frac{\color{blue}{y \cdot t}}{a} \]
    7. Simplified62.2%

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

    if -1.3e-251 < z < 2.8000000000000002e-214

    1. Initial program 89.9%

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

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

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

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

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

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

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

    if 2.8000000000000002e-214 < z < 4.00000000000000037e56

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

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

    if 4.00000000000000037e56 < z

    1. Initial program 36.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y}{z}\right)} \]
    11. Step-by-step derivation
      1. sub-neg55.2%

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

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

        \[\leadsto \color{blue}{t \cdot 1 + t \cdot \frac{-y}{z}} \]
      4. *-rgt-identity55.2%

        \[\leadsto \color{blue}{t} + t \cdot \frac{-y}{z} \]
      5. associate-*r/46.1%

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

        \[\leadsto t + \frac{\color{blue}{-t \cdot y}}{z} \]
      7. neg-mul-146.1%

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{t}{\frac{z}{y}}} \]
      12. associate-/r/55.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+15}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-251}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-214}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+56}:\\ \;\;\;\;x - \frac{x}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t - y \cdot \frac{t}{z}\\ \end{array} \]

Alternative 14: 60.5% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.20000000000000016e56

    1. Initial program 47.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.20000000000000016e56 < x < 7.99999999999999952e-11

    1. Initial program 74.4%

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

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

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

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

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

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

    if 7.99999999999999952e-11 < x < 1.08000000000000003e160

    1. Initial program 57.5%

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

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

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

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

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

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

    if 1.08000000000000003e160 < x

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.2 \cdot 10^{+56}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq 8 \cdot 10^{-11}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.08 \cdot 10^{+160}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 15: 60.6% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -6.00000000000000012e56

    1. Initial program 47.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.00000000000000012e56 < x < 4.30000000000000001e-11

    1. Initial program 74.4%

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

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

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

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

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

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

    if 4.30000000000000001e-11 < x < 1.08000000000000003e160

    1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

    if 1.08000000000000003e160 < x

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6 \cdot 10^{+56}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{-11}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.08 \cdot 10^{+160}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]

Alternative 16: 68.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{if}\;z \leq -5.9 \cdot 10^{-46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-52}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+110}:\\ \;\;\;\;x - t \cdot \frac{z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (/ y (/ z (- t x))))))
   (if (<= z -5.9e-46)
     t_1
     (if (<= z 3e-52)
       (+ x (/ y (/ a (- t x))))
       (if (<= z 2.1e+110) (- x (* t (/ z (- a z)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - (y / (z / (t - x)));
	double tmp;
	if (z <= -5.9e-46) {
		tmp = t_1;
	} else if (z <= 3e-52) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 2.1e+110) {
		tmp = x - (t * (z / (a - z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t - (y / (z / (t - x)))
    if (z <= (-5.9d-46)) then
        tmp = t_1
    else if (z <= 3d-52) then
        tmp = x + (y / (a / (t - x)))
    else if (z <= 2.1d+110) then
        tmp = x - (t * (z / (a - z)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t - (y / (z / (t - x)));
	double tmp;
	if (z <= -5.9e-46) {
		tmp = t_1;
	} else if (z <= 3e-52) {
		tmp = x + (y / (a / (t - x)));
	} else if (z <= 2.1e+110) {
		tmp = x - (t * (z / (a - z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - (y / (z / (t - x)))
	tmp = 0
	if z <= -5.9e-46:
		tmp = t_1
	elif z <= 3e-52:
		tmp = x + (y / (a / (t - x)))
	elif z <= 2.1e+110:
		tmp = x - (t * (z / (a - z)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(y / Float64(z / Float64(t - x))))
	tmp = 0.0
	if (z <= -5.9e-46)
		tmp = t_1;
	elseif (z <= 3e-52)
		tmp = Float64(x + Float64(y / Float64(a / Float64(t - x))));
	elseif (z <= 2.1e+110)
		tmp = Float64(x - Float64(t * Float64(z / Float64(a - z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - (y / (z / (t - x)));
	tmp = 0.0;
	if (z <= -5.9e-46)
		tmp = t_1;
	elseif (z <= 3e-52)
		tmp = x + (y / (a / (t - x)));
	elseif (z <= 2.1e+110)
		tmp = x - (t * (z / (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[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.9e-46], t$95$1, If[LessEqual[z, 3e-52], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+110], N[(x - N[(t * N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+110}:\\
\;\;\;\;x - t \cdot \frac{z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.8999999999999999e-46 or 2.10000000000000015e110 < z

    1. Initial program 39.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{t - x}}} \]
    7. Simplified71.2%

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

    if -5.8999999999999999e-46 < z < 3e-52

    1. Initial program 84.5%

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

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

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

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

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

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

    if 3e-52 < z < 2.10000000000000015e110

    1. Initial program 86.6%

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z}{a - z} \cdot t} \]
    9. Simplified72.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.9 \cdot 10^{-46}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-52}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+110}:\\ \;\;\;\;x - t \cdot \frac{z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \end{array} \]

Alternative 17: 75.7% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.9999999999999999e87 or 1.50000000000000004e110 < z

    1. Initial program 25.1%

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e87 < z < 9.8e17

    1. Initial program 84.6%

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

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

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

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

    if 9.8e17 < z < 1.50000000000000004e110

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2 \cdot 10^{+87}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+17}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+110}:\\ \;\;\;\;x - t \cdot \frac{z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \end{array} \]

Alternative 18: 66.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-33} \lor \neg \left(z \leq 7.2 \cdot 10^{+63}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.54999999999999998e-33 or 7.19999999999999998e63 < z

    1. Initial program 41.9%

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

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

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

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

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

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

    if -1.54999999999999998e-33 < z < 7.19999999999999998e63

    1. Initial program 84.9%

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

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

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

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

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

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

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

Alternative 19: 69.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-45} \lor \neg \left(z \leq 1.22 \cdot 10^{+55}\right):\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8000000000000001e-45 or 1.22e55 < z

    1. Initial program 44.2%

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

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

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

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

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

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

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

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

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

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

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

    if -2.8000000000000001e-45 < z < 1.22e55

    1. Initial program 84.3%

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

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

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

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

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

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

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

Alternative 20: 60.9% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.60000000000000002e56

    1. Initial program 47.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.60000000000000002e56 < x < 1.0500000000000001e23

    1. Initial program 74.7%

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

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

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

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

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

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

    if 1.0500000000000001e23 < x

    1. Initial program 53.6%

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

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

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

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

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

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

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

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

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

Alternative 21: 38.5% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;a \leq 4 \cdot 10^{+116}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.0499999999999999e121 or 4.00000000000000006e116 < a

    1. Initial program 67.7%

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

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

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

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

    if -3.0499999999999999e121 < a < 4.00000000000000006e116

    1. Initial program 63.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.05 \cdot 10^{+121}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+116}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 22: 25.9% 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 64.5%

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

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

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

    \[\leadsto \color{blue}{t} \]
  5. Final simplification26.2%

    \[\leadsto t \]

Developer target: 83.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023275 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))

  (+ x (/ (* (- y z) (- t x)) (- a z))))