Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.6% → 92.6%
Time: 19.8s
Alternatives: 17
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 79.6% accurate, 1.0× speedup?

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

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

Alternative 1: 92.6% accurate, 0.1× speedup?

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

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

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

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

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


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

    1. Initial program 88.1%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 63.5%

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

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

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

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

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

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

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

    1. Initial program 98.6%

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

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

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

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

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

Alternative 2: 92.6% accurate, 0.2× speedup?

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

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

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

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

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


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

    1. Initial program 92.6%

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

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

    1. Initial program 4.1%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 63.5%

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

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

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

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

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

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

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

Alternative 3: 89.3% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 91.4%

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

    if -4.00000000000000019e-222 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.0000000000000001e-114

    1. Initial program 14.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 38.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -5.4 \cdot 10^{-166}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+28}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.2e66 or 8.5000000000000008e84 < z

    1. Initial program 64.1%

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

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

    if -3.2e66 < z < -5.40000000000000013e-166 or 6.19999999999999983e-278 < z < 2.39999999999999981e28

    1. Initial program 86.8%

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

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

    if -5.40000000000000013e-166 < z < 6.19999999999999983e-278 or 2.39999999999999981e28 < z < 8.5000000000000008e84

    1. Initial program 92.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+66}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-166}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{-278}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+84}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 5: 55.1% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-203}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.0000000000000002e-26 or 5.70000000000000009e-8 < t

    1. Initial program 90.9%

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

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

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

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

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

    if -4.0000000000000002e-26 < t < 7.4999999999999999e-280

    1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
    9. Step-by-step derivation
      1. sub-neg48.9%

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

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

        \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
      4. associate-/l*55.0%

        \[\leadsto t + \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Simplified55.0%

      \[\leadsto \color{blue}{t + \frac{x}{\frac{z}{y}}} \]
    11. Taylor expanded in x around 0 48.9%

      \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/55.0%

        \[\leadsto t + \color{blue}{x \cdot \frac{y}{z}} \]
    13. Simplified55.0%

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

    if 7.4999999999999999e-280 < t < 8.50000000000000031e-203

    1. Initial program 76.5%

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

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

    if 8.50000000000000031e-203 < t < 5.70000000000000009e-8

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
    9. Step-by-step derivation
      1. sub-neg42.2%

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

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

        \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
      4. associate-/l*50.0%

        \[\leadsto t + \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Simplified50.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{-26}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-280}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-203}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 5.7 \cdot 10^{-8}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \end{array} \]

Alternative 6: 51.9% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;x \leq -4.6 \cdot 10^{+58}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.1200000000000001e293 or -1.3999999999999999e260 < x < -4.60000000000000005e58

    1. Initial program 80.8%

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

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

    if -1.1200000000000001e293 < x < -1.3999999999999999e260

    1. Initial program 49.1%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
    9. Step-by-step derivation
      1. sub-neg62.1%

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

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

        \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
      4. associate-/l*89.8%

        \[\leadsto t + \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Simplified89.8%

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

    if -4.60000000000000005e58 < x < 6.6000000000000003e-28

    1. Initial program 81.4%

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

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

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

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

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

    if 6.6000000000000003e-28 < x

    1. Initial program 79.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.12 \cdot 10^{+293}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{+260}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;x \leq -4.6 \cdot 10^{+58}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 6.6 \cdot 10^{-28}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \end{array} \]

Alternative 7: 52.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -8.5 \cdot 10^{+167}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y}}\\

\mathbf{elif}\;a \leq -2 \cdot 10^{+63}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.4999999999999998e191 or -8.50000000000000007e167 < a < -2.00000000000000012e63 or 6.4999999999999996e89 < a

    1. Initial program 89.8%

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

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

    if -9.4999999999999998e191 < a < -8.50000000000000007e167

    1. Initial program 99.6%

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

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

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

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

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

    if -2.00000000000000012e63 < a < 6.4999999999999996e89

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
    9. Step-by-step derivation
      1. sub-neg52.0%

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

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

        \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
      4. associate-/l*56.7%

        \[\leadsto t + \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Simplified56.7%

      \[\leadsto \color{blue}{t + \frac{x}{\frac{z}{y}}} \]
    11. Taylor expanded in x around 0 52.0%

      \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/56.7%

        \[\leadsto t + \color{blue}{x \cdot \frac{y}{z}} \]
    13. Simplified56.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{+191}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{+167}:\\ \;\;\;\;\frac{t}{\frac{a - z}{y}}\\ \mathbf{elif}\;a \leq -2 \cdot 10^{+63}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+89}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 8: 52.4% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -8.4 \cdot 10^{+167}:\\
\;\;\;\;\frac{t - x}{\frac{a}{y}}\\

\mathbf{elif}\;a \leq -9.5 \cdot 10^{+63}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 9 \cdot 10^{+89}:\\
\;\;\;\;t + x \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.4999999999999998e191 or -8.3999999999999997e167 < a < -9.5000000000000003e63 or 9e89 < a

    1. Initial program 89.8%

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

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

    if -9.4999999999999998e191 < a < -8.3999999999999997e167

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

    if -9.5000000000000003e63 < a < 9e89

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
    9. Step-by-step derivation
      1. sub-neg52.0%

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

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

        \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
      4. associate-/l*56.7%

        \[\leadsto t + \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Simplified56.7%

      \[\leadsto \color{blue}{t + \frac{x}{\frac{z}{y}}} \]
    11. Taylor expanded in x around 0 52.0%

      \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/56.7%

        \[\leadsto t + \color{blue}{x \cdot \frac{y}{z}} \]
    13. Simplified56.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{+191}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.4 \cdot 10^{+167}:\\ \;\;\;\;\frac{t - x}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{+63}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+89}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 9: 70.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+21} \lor \neg \left(z \leq 3 \cdot 10^{+67}\right):\\
\;\;\;\;t - \frac{t - x}{\frac{z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.8e21 or 3.0000000000000001e67 < z

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

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

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

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

    if -5.8e21 < z < 3.0000000000000001e67

    1. Initial program 88.4%

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

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

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

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

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

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

Alternative 10: 73.9% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.3e19 or 1.6500000000000001e66 < z

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

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

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

    if -2.3e19 < z < 1.6500000000000001e66

    1. Initial program 88.4%

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

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

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

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

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

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

Alternative 11: 68.8% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5e21 or 3.7e-22 < z

    1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

    if -5e21 < z < 3.7e-22

    1. Initial program 89.2%

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

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

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

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

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

Alternative 12: 65.8% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.5999999999999998e86

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
    9. Step-by-step derivation
      1. sub-neg62.0%

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

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

        \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
      4. associate-/l*75.1%

        \[\leadsto t + \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Simplified75.1%

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

    if -2.5999999999999998e86 < z < 2.6499999999999998e66

    1. Initial program 88.6%

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

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

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

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

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

    if 2.6499999999999998e66 < z

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
    9. Step-by-step derivation
      1. sub-neg59.5%

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

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

        \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
      4. associate-/l*66.4%

        \[\leadsto t + \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Simplified66.4%

      \[\leadsto \color{blue}{t + \frac{x}{\frac{z}{y}}} \]
    11. Taylor expanded in x around 0 59.5%

      \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/66.4%

        \[\leadsto t + \color{blue}{x \cdot \frac{y}{z}} \]
    13. Simplified66.4%

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

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

Alternative 13: 64.8% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.40000000000000004e88

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
    9. Step-by-step derivation
      1. sub-neg62.0%

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

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

        \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
      4. associate-/l*75.1%

        \[\leadsto t + \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Simplified75.1%

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

    if -3.40000000000000004e88 < z < 1.34999999999999995e68

    1. Initial program 88.6%

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

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

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

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

    if 1.34999999999999995e68 < z

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
    9. Step-by-step derivation
      1. sub-neg59.5%

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

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

        \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
      4. associate-/l*66.4%

        \[\leadsto t + \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Simplified66.4%

      \[\leadsto \color{blue}{t + \frac{x}{\frac{z}{y}}} \]
    11. Taylor expanded in x around 0 59.5%

      \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/66.4%

        \[\leadsto t + \color{blue}{x \cdot \frac{y}{z}} \]
    13. Simplified66.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+88}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+68}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \end{array} \]

Alternative 14: 38.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;z \leq -3.2 \cdot 10^{-166}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;z \leq 1.66 \cdot 10^{+67}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.8000000000000002e77 or 1.66e67 < z

    1. Initial program 64.8%

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

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

    if -8.8000000000000002e77 < z < -3.20000000000000001e-166 or 1.12000000000000003e-277 < z < 1.66e67

    1. Initial program 85.9%

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

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

    if -3.20000000000000001e-166 < z < 1.12000000000000003e-277

    1. Initial program 97.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    7. Simplified45.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{+77}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -3.2 \cdot 10^{-166}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-277}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.66 \cdot 10^{+67}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 15: 52.8% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.9e63 or 1.35e91 < a

    1. Initial program 90.4%

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

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

    if -3.9e63 < a < 1.35e91

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{x \cdot y}{z}} \]
    9. Step-by-step derivation
      1. sub-neg52.0%

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

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

        \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
      4. associate-/l*56.7%

        \[\leadsto t + \color{blue}{\frac{x}{\frac{z}{y}}} \]
    10. Simplified56.7%

      \[\leadsto \color{blue}{t + \frac{x}{\frac{z}{y}}} \]
    11. Taylor expanded in x around 0 52.0%

      \[\leadsto t + \color{blue}{\frac{x \cdot y}{z}} \]
    12. Step-by-step derivation
      1. associate-*r/56.7%

        \[\leadsto t + \color{blue}{x \cdot \frac{y}{z}} \]
    13. Simplified56.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{+63}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+91}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 16: 38.7% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.28 \cdot 10^{+70}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4499999999999999e75 or 1.27999999999999994e70 < z

    1. Initial program 64.8%

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

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

    if -1.4499999999999999e75 < z < 1.27999999999999994e70

    1. Initial program 88.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+75}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.28 \cdot 10^{+70}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]

Alternative 17: 25.0% accurate, 13.0× speedup?

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

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

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

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

    \[\leadsto t \]

Reproduce

?
herbie shell --seed 2023310 
(FPCore (x y z t a)
  :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
  :precision binary64
  (+ x (* (- y z) (/ (- t x) (- a z)))))