Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.4% → 94.9%
Time: 23.5s
Alternatives: 22
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 80.4% accurate, 1.0× speedup?

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

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

Alternative 1: 94.9% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 85.5%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.0%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 92.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\ t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ t_3 := x \cdot \left(z - a\right)\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-249}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\ \mathbf{elif}\;t\_2 \leq 10^{-69}:\\ \;\;\;\;x \cdot \left(t \cdot \left(\left(\frac{1}{t} + \left(\frac{z}{t \cdot \left(a - z\right)} - \frac{y}{t\_3}\right)\right) + \left(\frac{y}{t \cdot \left(z - a\right)} + \frac{z}{t\_3}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
        (t_2 (+ x (* (- y z) (/ (- t x) (- a z)))))
        (t_3 (* x (- z a))))
   (if (<= t_2 -5e-249)
     t_1
     (if (<= t_2 0.0)
       (+ t (* (/ (- t x) z) (- a y)))
       (if (<= t_2 1e-69)
         (*
          x
          (*
           t
           (+
            (+ (/ 1.0 t) (- (/ z (* t (- a z))) (/ y t_3)))
            (+ (/ y (* t (- z a))) (/ z t_3)))))
         t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) / ((a - z) / (t - x)));
	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
	double t_3 = x * (z - a);
	double tmp;
	if (t_2 <= -5e-249) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t + (((t - x) / z) * (a - y));
	} else if (t_2 <= 1e-69) {
		tmp = x * (t * (((1.0 / t) + ((z / (t * (a - z))) - (y / t_3))) + ((y / (t * (z - a))) + (z / t_3))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + ((y - z) / ((a - z) / (t - x)))
    t_2 = x + ((y - z) * ((t - x) / (a - z)))
    t_3 = x * (z - a)
    if (t_2 <= (-5d-249)) then
        tmp = t_1
    else if (t_2 <= 0.0d0) then
        tmp = t + (((t - x) / z) * (a - y))
    else if (t_2 <= 1d-69) then
        tmp = x * (t * (((1.0d0 / t) + ((z / (t * (a - z))) - (y / t_3))) + ((y / (t * (z - a))) + (z / t_3))))
    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) / ((a - z) / (t - x)));
	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
	double t_3 = x * (z - a);
	double tmp;
	if (t_2 <= -5e-249) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t + (((t - x) / z) * (a - y));
	} else if (t_2 <= 1e-69) {
		tmp = x * (t * (((1.0 / t) + ((z / (t * (a - z))) - (y / t_3))) + ((y / (t * (z - a))) + (z / t_3))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) / ((a - z) / (t - x)))
	t_2 = x + ((y - z) * ((t - x) / (a - z)))
	t_3 = x * (z - a)
	tmp = 0
	if t_2 <= -5e-249:
		tmp = t_1
	elif t_2 <= 0.0:
		tmp = t + (((t - x) / z) * (a - y))
	elif t_2 <= 1e-69:
		tmp = x * (t * (((1.0 / t) + ((z / (t * (a - z))) - (y / t_3))) + ((y / (t * (z - a))) + (z / t_3))))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))))
	t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	t_3 = Float64(x * Float64(z - a))
	tmp = 0.0
	if (t_2 <= -5e-249)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y)));
	elseif (t_2 <= 1e-69)
		tmp = Float64(x * Float64(t * Float64(Float64(Float64(1.0 / t) + Float64(Float64(z / Float64(t * Float64(a - z))) - Float64(y / t_3))) + Float64(Float64(y / Float64(t * Float64(z - a))) + Float64(z / t_3)))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) / ((a - z) / (t - x)));
	t_2 = x + ((y - z) * ((t - x) / (a - z)));
	t_3 = x * (z - a);
	tmp = 0.0;
	if (t_2 <= -5e-249)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = t + (((t - x) / z) * (a - y));
	elseif (t_2 <= 1e-69)
		tmp = x * (t * (((1.0 / t) + ((z / (t * (a - z))) - (y / t_3))) + ((y / (t * (z - a))) + (z / t_3))));
	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[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-249], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-69], N[(x * N[(t * N[(N[(N[(1.0 / t), $MachinePrecision] + N[(N[(z / N[(t * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / N[(t * N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t\_2 \leq 10^{-69}:\\
\;\;\;\;x \cdot \left(t \cdot \left(\left(\frac{1}{t} + \left(\frac{z}{t \cdot \left(a - z\right)} - \frac{y}{t\_3}\right)\right) + \left(\frac{y}{t \cdot \left(z - a\right)} + \frac{z}{t\_3}\right)\right)\right)\\

\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.9999999999999999e-249 or 9.9999999999999996e-70 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 89.9%

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

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

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

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

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

    1. Initial program 8.4%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 55.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt55.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 91.0% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 87.2%

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

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

    1. Initial program 8.4%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 91.1% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 87.2%

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

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

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

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

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

    1. Initial program 8.4%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 37.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;a \leq -9.4 \cdot 10^{-184}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.55 \cdot 10^{-134}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-43}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 600000:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 8.5 \cdot 10^{+175}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.85e29 or 8.50000000000000034e175 < a

    1. Initial program 89.7%

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

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

    if -2.85e29 < a < -9.40000000000000039e-184 or 1.7999999999999999e-210 < a < 1.55000000000000003e-134 or 4.50000000000000025e-43 < a < 6e5

    1. Initial program 57.5%

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

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

    if -9.40000000000000039e-184 < a < 1.7999999999999999e-210

    1. Initial program 65.3%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified61.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified54.5%

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

    if 1.55000000000000003e-134 < a < 4.50000000000000025e-43 or 6e5 < a < 8.50000000000000034e175

    1. Initial program 81.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.85 \cdot 10^{+29}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -9.4 \cdot 10^{-184}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-210}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{-134}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-43}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 600000:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8.5 \cdot 10^{+175}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 36.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \frac{y}{z}\\ \mathbf{if}\;a \leq -4.9 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-191}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-209}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-133}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 15000000000000:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (/ y z))))
   (if (<= a -4.9e+27)
     x
     (if (<= a -1.75e-191)
       t
       (if (<= a 3.6e-209)
         t_1
         (if (<= a 4e-133)
           t
           (if (<= a 2.1e-42)
             t_1
             (if (<= a 15000000000000.0)
               t
               (if (<= a 8e+175) (* t (/ y a)) x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double tmp;
	if (a <= -4.9e+27) {
		tmp = x;
	} else if (a <= -1.75e-191) {
		tmp = t;
	} else if (a <= 3.6e-209) {
		tmp = t_1;
	} else if (a <= 4e-133) {
		tmp = t;
	} else if (a <= 2.1e-42) {
		tmp = t_1;
	} else if (a <= 15000000000000.0) {
		tmp = t;
	} else if (a <= 8e+175) {
		tmp = t * (y / a);
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (y / z)
    if (a <= (-4.9d+27)) then
        tmp = x
    else if (a <= (-1.75d-191)) then
        tmp = t
    else if (a <= 3.6d-209) then
        tmp = t_1
    else if (a <= 4d-133) then
        tmp = t
    else if (a <= 2.1d-42) then
        tmp = t_1
    else if (a <= 15000000000000.0d0) then
        tmp = t
    else if (a <= 8d+175) then
        tmp = t * (y / a)
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (y / z);
	double tmp;
	if (a <= -4.9e+27) {
		tmp = x;
	} else if (a <= -1.75e-191) {
		tmp = t;
	} else if (a <= 3.6e-209) {
		tmp = t_1;
	} else if (a <= 4e-133) {
		tmp = t;
	} else if (a <= 2.1e-42) {
		tmp = t_1;
	} else if (a <= 15000000000000.0) {
		tmp = t;
	} else if (a <= 8e+175) {
		tmp = t * (y / a);
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (y / z)
	tmp = 0
	if a <= -4.9e+27:
		tmp = x
	elif a <= -1.75e-191:
		tmp = t
	elif a <= 3.6e-209:
		tmp = t_1
	elif a <= 4e-133:
		tmp = t
	elif a <= 2.1e-42:
		tmp = t_1
	elif a <= 15000000000000.0:
		tmp = t
	elif a <= 8e+175:
		tmp = t * (y / a)
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(y / z))
	tmp = 0.0
	if (a <= -4.9e+27)
		tmp = x;
	elseif (a <= -1.75e-191)
		tmp = t;
	elseif (a <= 3.6e-209)
		tmp = t_1;
	elseif (a <= 4e-133)
		tmp = t;
	elseif (a <= 2.1e-42)
		tmp = t_1;
	elseif (a <= 15000000000000.0)
		tmp = t;
	elseif (a <= 8e+175)
		tmp = Float64(t * Float64(y / a));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (y / z);
	tmp = 0.0;
	if (a <= -4.9e+27)
		tmp = x;
	elseif (a <= -1.75e-191)
		tmp = t;
	elseif (a <= 3.6e-209)
		tmp = t_1;
	elseif (a <= 4e-133)
		tmp = t;
	elseif (a <= 2.1e-42)
		tmp = t_1;
	elseif (a <= 15000000000000.0)
		tmp = t;
	elseif (a <= 8e+175)
		tmp = t * (y / a);
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.9e+27], x, If[LessEqual[a, -1.75e-191], t, If[LessEqual[a, 3.6e-209], t$95$1, If[LessEqual[a, 4e-133], t, If[LessEqual[a, 2.1e-42], t$95$1, If[LessEqual[a, 15000000000000.0], t, If[LessEqual[a, 8e+175], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.75 \cdot 10^{-191}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 3.6 \cdot 10^{-209}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 4 \cdot 10^{-133}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 15000000000000:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.90000000000000015e27 or 7.9999999999999995e175 < a

    1. Initial program 89.7%

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

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

    if -4.90000000000000015e27 < a < -1.75000000000000003e-191 or 3.60000000000000016e-209 < a < 4.0000000000000003e-133 or 2.10000000000000006e-42 < a < 1.5e13

    1. Initial program 56.6%

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

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

    if -1.75000000000000003e-191 < a < 3.60000000000000016e-209 or 4.0000000000000003e-133 < a < 2.10000000000000006e-42

    1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified49.1%

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

    if 1.5e13 < a < 7.9999999999999995e175

    1. Initial program 91.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.9 \cdot 10^{+27}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-191}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-209}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-133}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-42}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 15000000000000:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+175}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 42.4% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;a \leq -1 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-76}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-190}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{-213}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-135}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= a -1e+41)
     t_1
     (if (<= a -6.4e-76)
       (* y (/ (- t x) a))
       (if (<= a -1.65e-190)
         t
         (if (<= a 1.22e-213)
           (* x (/ y z))
           (if (<= a 1.05e-135)
             t
             (if (<= a 6.5e+18) (* x (/ (- y a) z)) t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -1e+41) {
		tmp = t_1;
	} else if (a <= -6.4e-76) {
		tmp = y * ((t - x) / a);
	} else if (a <= -1.65e-190) {
		tmp = t;
	} else if (a <= 1.22e-213) {
		tmp = x * (y / z);
	} else if (a <= 1.05e-135) {
		tmp = t;
	} else if (a <= 6.5e+18) {
		tmp = x * ((y - 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 * (1.0d0 - (y / a))
    if (a <= (-1d+41)) then
        tmp = t_1
    else if (a <= (-6.4d-76)) then
        tmp = y * ((t - x) / a)
    else if (a <= (-1.65d-190)) then
        tmp = t
    else if (a <= 1.22d-213) then
        tmp = x * (y / z)
    else if (a <= 1.05d-135) then
        tmp = t
    else if (a <= 6.5d+18) then
        tmp = x * ((y - 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 * (1.0 - (y / a));
	double tmp;
	if (a <= -1e+41) {
		tmp = t_1;
	} else if (a <= -6.4e-76) {
		tmp = y * ((t - x) / a);
	} else if (a <= -1.65e-190) {
		tmp = t;
	} else if (a <= 1.22e-213) {
		tmp = x * (y / z);
	} else if (a <= 1.05e-135) {
		tmp = t;
	} else if (a <= 6.5e+18) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if a <= -1e+41:
		tmp = t_1
	elif a <= -6.4e-76:
		tmp = y * ((t - x) / a)
	elif a <= -1.65e-190:
		tmp = t
	elif a <= 1.22e-213:
		tmp = x * (y / z)
	elif a <= 1.05e-135:
		tmp = t
	elif a <= 6.5e+18:
		tmp = x * ((y - a) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (a <= -1e+41)
		tmp = t_1;
	elseif (a <= -6.4e-76)
		tmp = Float64(y * Float64(Float64(t - x) / a));
	elseif (a <= -1.65e-190)
		tmp = t;
	elseif (a <= 1.22e-213)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 1.05e-135)
		tmp = t;
	elseif (a <= 6.5e+18)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (a <= -1e+41)
		tmp = t_1;
	elseif (a <= -6.4e-76)
		tmp = y * ((t - x) / a);
	elseif (a <= -1.65e-190)
		tmp = t;
	elseif (a <= 1.22e-213)
		tmp = x * (y / z);
	elseif (a <= 1.05e-135)
		tmp = t;
	elseif (a <= 6.5e+18)
		tmp = x * ((y - a) / z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1e+41], t$95$1, If[LessEqual[a, -6.4e-76], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.65e-190], t, If[LessEqual[a, 1.22e-213], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.05e-135], t, If[LessEqual[a, 6.5e+18], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -6.4 \cdot 10^{-76}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\

\mathbf{elif}\;a \leq -1.65 \cdot 10^{-190}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-135}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.00000000000000001e41 or 6.5e18 < a

    1. Initial program 90.6%

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

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

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

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

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

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

    if -1.00000000000000001e41 < a < -6.3999999999999995e-76

    1. Initial program 80.3%

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

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

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

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

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

    if -6.3999999999999995e-76 < a < -1.65000000000000009e-190 or 1.22e-213 < a < 1.05e-135

    1. Initial program 46.2%

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

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

    if -1.65000000000000009e-190 < a < 1.22e-213

    1. Initial program 65.3%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified61.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified54.5%

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

    if 1.05e-135 < a < 6.5e18

    1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{+41}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -6.4 \cdot 10^{-76}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq -1.65 \cdot 10^{-190}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{-213}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-135}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 47.5% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -4 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -6.80000000000000042e173

    1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.80000000000000042e173 < z < -3.4000000000000001e91

    1. Initial program 67.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-cube-cbrt66.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot t}{x}} \]
    10. Applied egg-rr52.0%

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

    if -3.4000000000000001e91 < z < -4e14 or -1.08000000000000003e-150 < z < 6.20000000000000043e74

    1. Initial program 88.4%

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    6. Simplified59.6%

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

    if -4e14 < z < -4.99999999999999997e-91

    1. Initial program 80.5%

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

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

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

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

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

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

    if -4.99999999999999997e-91 < z < -1.08000000000000003e-150

    1. Initial program 90.9%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified74.0%

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

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

    if 6.20000000000000043e74 < z

    1. Initial program 51.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+173}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{+91}:\\ \;\;\;\;\frac{x \cdot t}{x}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+14}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-91}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq -1.08 \cdot 10^{-150}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+74}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 57.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a - z}\\ t_2 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;x \leq -1.65 \cdot 10^{+98}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -1.76 \cdot 10^{-50}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 4.1 \cdot 10^{-43}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 1.78 \cdot 10^{+56}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{+69}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 10^{+200}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) (- a z)))) (t_2 (* t (/ (- y z) (- a z)))))
   (if (<= x -1.65e+98)
     (- x (* x (/ y a)))
     (if (<= x -1.76e-50)
       t_1
       (if (<= x 4.1e-43)
         t_2
         (if (<= x 1.78e+56)
           t_1
           (if (<= x 6.2e+69)
             t_2
             (if (<= x 1e+200)
               (* x (- 1.0 (/ y a)))
               (* x (/ (- y a) z))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / (a - z));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -1.65e+98) {
		tmp = x - (x * (y / a));
	} else if (x <= -1.76e-50) {
		tmp = t_1;
	} else if (x <= 4.1e-43) {
		tmp = t_2;
	} else if (x <= 1.78e+56) {
		tmp = t_1;
	} else if (x <= 6.2e+69) {
		tmp = t_2;
	} else if (x <= 1e+200) {
		tmp = x * (1.0 - (y / a));
	} else {
		tmp = 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * ((t - x) / (a - z))
    t_2 = t * ((y - z) / (a - z))
    if (x <= (-1.65d+98)) then
        tmp = x - (x * (y / a))
    else if (x <= (-1.76d-50)) then
        tmp = t_1
    else if (x <= 4.1d-43) then
        tmp = t_2
    else if (x <= 1.78d+56) then
        tmp = t_1
    else if (x <= 6.2d+69) then
        tmp = t_2
    else if (x <= 1d+200) then
        tmp = x * (1.0d0 - (y / a))
    else
        tmp = 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 t_1 = y * ((t - x) / (a - z));
	double t_2 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -1.65e+98) {
		tmp = x - (x * (y / a));
	} else if (x <= -1.76e-50) {
		tmp = t_1;
	} else if (x <= 4.1e-43) {
		tmp = t_2;
	} else if (x <= 1.78e+56) {
		tmp = t_1;
	} else if (x <= 6.2e+69) {
		tmp = t_2;
	} else if (x <= 1e+200) {
		tmp = x * (1.0 - (y / a));
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / (a - z))
	t_2 = t * ((y - z) / (a - z))
	tmp = 0
	if x <= -1.65e+98:
		tmp = x - (x * (y / a))
	elif x <= -1.76e-50:
		tmp = t_1
	elif x <= 4.1e-43:
		tmp = t_2
	elif x <= 1.78e+56:
		tmp = t_1
	elif x <= 6.2e+69:
		tmp = t_2
	elif x <= 1e+200:
		tmp = x * (1.0 - (y / a))
	else:
		tmp = x * ((y - a) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z)))
	t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (x <= -1.65e+98)
		tmp = Float64(x - Float64(x * Float64(y / a)));
	elseif (x <= -1.76e-50)
		tmp = t_1;
	elseif (x <= 4.1e-43)
		tmp = t_2;
	elseif (x <= 1.78e+56)
		tmp = t_1;
	elseif (x <= 6.2e+69)
		tmp = t_2;
	elseif (x <= 1e+200)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	else
		tmp = Float64(x * Float64(Float64(y - a) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / (a - z));
	t_2 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (x <= -1.65e+98)
		tmp = x - (x * (y / a));
	elseif (x <= -1.76e-50)
		tmp = t_1;
	elseif (x <= 4.1e-43)
		tmp = t_2;
	elseif (x <= 1.78e+56)
		tmp = t_1;
	elseif (x <= 6.2e+69)
		tmp = t_2;
	elseif (x <= 1e+200)
		tmp = x * (1.0 - (y / a));
	else
		tmp = x * ((y - a) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.65e+98], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.76e-50], t$95$1, If[LessEqual[x, 4.1e-43], t$95$2, If[LessEqual[x, 1.78e+56], t$95$1, If[LessEqual[x, 6.2e+69], t$95$2, If[LessEqual[x, 1e+200], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -1.76 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 4.1 \cdot 10^{-43}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 1.78 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 6.2 \cdot 10^{+69}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.65000000000000014e98

    1. Initial program 68.0%

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

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg57.3%

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

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

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

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

        \[\leadsto x + x \cdot \color{blue}{\frac{-1 \cdot y}{a}} \]
      6. mul-1-neg65.0%

        \[\leadsto x + x \cdot \frac{\color{blue}{-y}}{a} \]
    6. Simplified65.0%

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

    if -1.65000000000000014e98 < x < -1.76e-50 or 4.0999999999999998e-43 < x < 1.78e56

    1. Initial program 83.7%

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

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

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

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

    if -1.76e-50 < x < 4.0999999999999998e-43 or 1.78e56 < x < 6.1999999999999997e69

    1. Initial program 80.2%

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

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

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

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

    if 6.1999999999999997e69 < x < 9.9999999999999997e199

    1. Initial program 76.8%

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

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

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

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

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

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

    if 9.9999999999999997e199 < x

    1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{+98}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -1.76 \cdot 10^{-50}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 4.1 \cdot 10^{-43}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 1.78 \cdot 10^{+56}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{+69}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 10^{+200}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 57.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;x \leq -2.25 \cdot 10^{+105}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -3.25 \cdot 10^{-52}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{-44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.15 \cdot 10^{+56}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{+70}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+199}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))))
   (if (<= x -2.25e+105)
     (- x (* x (/ y a)))
     (if (<= x -3.25e-52)
       (* (- t x) (/ y (- a z)))
       (if (<= x 8.2e-44)
         t_1
         (if (<= x 2.15e+56)
           (* y (/ (- t x) (- a z)))
           (if (<= x 9.2e+70)
             t_1
             (if (<= x 5.6e+199)
               (* x (- 1.0 (/ y a)))
               (* x (/ (- y a) z))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -2.25e+105) {
		tmp = x - (x * (y / a));
	} else if (x <= -3.25e-52) {
		tmp = (t - x) * (y / (a - z));
	} else if (x <= 8.2e-44) {
		tmp = t_1;
	} else if (x <= 2.15e+56) {
		tmp = y * ((t - x) / (a - z));
	} else if (x <= 9.2e+70) {
		tmp = t_1;
	} else if (x <= 5.6e+199) {
		tmp = x * (1.0 - (y / a));
	} else {
		tmp = 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) :: t_1
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    if (x <= (-2.25d+105)) then
        tmp = x - (x * (y / a))
    else if (x <= (-3.25d-52)) then
        tmp = (t - x) * (y / (a - z))
    else if (x <= 8.2d-44) then
        tmp = t_1
    else if (x <= 2.15d+56) then
        tmp = y * ((t - x) / (a - z))
    else if (x <= 9.2d+70) then
        tmp = t_1
    else if (x <= 5.6d+199) then
        tmp = x * (1.0d0 - (y / a))
    else
        tmp = 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 t_1 = t * ((y - z) / (a - z));
	double tmp;
	if (x <= -2.25e+105) {
		tmp = x - (x * (y / a));
	} else if (x <= -3.25e-52) {
		tmp = (t - x) * (y / (a - z));
	} else if (x <= 8.2e-44) {
		tmp = t_1;
	} else if (x <= 2.15e+56) {
		tmp = y * ((t - x) / (a - z));
	} else if (x <= 9.2e+70) {
		tmp = t_1;
	} else if (x <= 5.6e+199) {
		tmp = x * (1.0 - (y / a));
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	tmp = 0
	if x <= -2.25e+105:
		tmp = x - (x * (y / a))
	elif x <= -3.25e-52:
		tmp = (t - x) * (y / (a - z))
	elif x <= 8.2e-44:
		tmp = t_1
	elif x <= 2.15e+56:
		tmp = y * ((t - x) / (a - z))
	elif x <= 9.2e+70:
		tmp = t_1
	elif x <= 5.6e+199:
		tmp = x * (1.0 - (y / a))
	else:
		tmp = x * ((y - a) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	tmp = 0.0
	if (x <= -2.25e+105)
		tmp = Float64(x - Float64(x * Float64(y / a)));
	elseif (x <= -3.25e-52)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	elseif (x <= 8.2e-44)
		tmp = t_1;
	elseif (x <= 2.15e+56)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (x <= 9.2e+70)
		tmp = t_1;
	elseif (x <= 5.6e+199)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	else
		tmp = Float64(x * Float64(Float64(y - a) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	tmp = 0.0;
	if (x <= -2.25e+105)
		tmp = x - (x * (y / a));
	elseif (x <= -3.25e-52)
		tmp = (t - x) * (y / (a - z));
	elseif (x <= 8.2e-44)
		tmp = t_1;
	elseif (x <= 2.15e+56)
		tmp = y * ((t - x) / (a - z));
	elseif (x <= 9.2e+70)
		tmp = t_1;
	elseif (x <= 5.6e+199)
		tmp = x * (1.0 - (y / a));
	else
		tmp = x * ((y - a) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.25e+105], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.25e-52], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.2e-44], t$95$1, If[LessEqual[x, 2.15e+56], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.2e+70], t$95$1, If[LessEqual[x, 5.6e+199], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x \leq 8.2 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 9.2 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -2.2500000000000001e105

    1. Initial program 68.0%

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

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg57.3%

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

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

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

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

        \[\leadsto x + x \cdot \color{blue}{\frac{-1 \cdot y}{a}} \]
      6. mul-1-neg65.0%

        \[\leadsto x + x \cdot \frac{\color{blue}{-y}}{a} \]
    6. Simplified65.0%

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

    if -2.2500000000000001e105 < x < -3.25e-52

    1. Initial program 82.5%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a - z}{t - x}}} \]
      3. div-inv61.1%

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

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

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

    if -3.25e-52 < x < 8.19999999999999984e-44 or 2.1500000000000002e56 < x < 9.19999999999999975e70

    1. Initial program 80.2%

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

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

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

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

    if 8.19999999999999984e-44 < x < 2.1500000000000002e56

    1. Initial program 86.9%

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

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

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

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

    if 9.19999999999999975e70 < x < 5.6000000000000002e199

    1. Initial program 76.8%

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

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

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

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

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

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

    if 5.6000000000000002e199 < x

    1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.25 \cdot 10^{+105}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -3.25 \cdot 10^{-52}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{-44}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 2.15 \cdot 10^{+56}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{+70}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+199}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 42.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;a \leq -8.4 \cdot 10^{+15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -5.9 \cdot 10^{-182}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-214}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-136}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= a -8.4e+15)
     t_1
     (if (<= a -5.9e-182)
       t
       (if (<= a 2.1e-214)
         (* x (/ y z))
         (if (<= a 1.9e-136)
           t
           (if (<= a 6.4e+18) (* x (/ (- y a) z)) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -8.4e+15) {
		tmp = t_1;
	} else if (a <= -5.9e-182) {
		tmp = t;
	} else if (a <= 2.1e-214) {
		tmp = x * (y / z);
	} else if (a <= 1.9e-136) {
		tmp = t;
	} else if (a <= 6.4e+18) {
		tmp = x * ((y - 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 * (1.0d0 - (y / a))
    if (a <= (-8.4d+15)) then
        tmp = t_1
    else if (a <= (-5.9d-182)) then
        tmp = t
    else if (a <= 2.1d-214) then
        tmp = x * (y / z)
    else if (a <= 1.9d-136) then
        tmp = t
    else if (a <= 6.4d+18) then
        tmp = x * ((y - 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 * (1.0 - (y / a));
	double tmp;
	if (a <= -8.4e+15) {
		tmp = t_1;
	} else if (a <= -5.9e-182) {
		tmp = t;
	} else if (a <= 2.1e-214) {
		tmp = x * (y / z);
	} else if (a <= 1.9e-136) {
		tmp = t;
	} else if (a <= 6.4e+18) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if a <= -8.4e+15:
		tmp = t_1
	elif a <= -5.9e-182:
		tmp = t
	elif a <= 2.1e-214:
		tmp = x * (y / z)
	elif a <= 1.9e-136:
		tmp = t
	elif a <= 6.4e+18:
		tmp = x * ((y - a) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (a <= -8.4e+15)
		tmp = t_1;
	elseif (a <= -5.9e-182)
		tmp = t;
	elseif (a <= 2.1e-214)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 1.9e-136)
		tmp = t;
	elseif (a <= 6.4e+18)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (a <= -8.4e+15)
		tmp = t_1;
	elseif (a <= -5.9e-182)
		tmp = t;
	elseif (a <= 2.1e-214)
		tmp = x * (y / z);
	elseif (a <= 1.9e-136)
		tmp = t;
	elseif (a <= 6.4e+18)
		tmp = x * ((y - a) / z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.4e+15], t$95$1, If[LessEqual[a, -5.9e-182], t, If[LessEqual[a, 2.1e-214], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.9e-136], t, If[LessEqual[a, 6.4e+18], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -5.9 \cdot 10^{-182}:\\
\;\;\;\;t\\

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

\mathbf{elif}\;a \leq 1.9 \cdot 10^{-136}:\\
\;\;\;\;t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.4e15 or 6.4e18 < a

    1. Initial program 90.2%

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

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

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

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

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

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

    if -8.4e15 < a < -5.89999999999999968e-182 or 2.09999999999999992e-214 < a < 1.9000000000000001e-136

    1. Initial program 57.9%

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

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

    if -5.89999999999999968e-182 < a < 2.09999999999999992e-214

    1. Initial program 65.3%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified61.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    11. Simplified54.5%

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

    if 1.9000000000000001e-136 < a < 6.4e18

    1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.4 \cdot 10^{+15}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -5.9 \cdot 10^{-182}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-214}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-136}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+18}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 58.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;x \leq -1.65 \cdot 10^{+67}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -6 \cdot 10^{-34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -1.32 \cdot 10^{-55}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+199}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= x -1.65e+67)
     (- x (* x (/ y a)))
     (if (<= x -6e-34)
       t_1
       (if (<= x -1.32e-55)
         t_2
         (if (<= x 2.5e+19)
           t_1
           (if (<= x 9.5e+199) t_2 (* x (/ (- y a) z)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (x <= -1.65e+67) {
		tmp = x - (x * (y / a));
	} else if (x <= -6e-34) {
		tmp = t_1;
	} else if (x <= -1.32e-55) {
		tmp = t_2;
	} else if (x <= 2.5e+19) {
		tmp = t_1;
	} else if (x <= 9.5e+199) {
		tmp = t_2;
	} else {
		tmp = 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = x * (1.0d0 - (y / a))
    if (x <= (-1.65d+67)) then
        tmp = x - (x * (y / a))
    else if (x <= (-6d-34)) then
        tmp = t_1
    else if (x <= (-1.32d-55)) then
        tmp = t_2
    else if (x <= 2.5d+19) then
        tmp = t_1
    else if (x <= 9.5d+199) then
        tmp = t_2
    else
        tmp = 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 t_1 = t * ((y - z) / (a - z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (x <= -1.65e+67) {
		tmp = x - (x * (y / a));
	} else if (x <= -6e-34) {
		tmp = t_1;
	} else if (x <= -1.32e-55) {
		tmp = t_2;
	} else if (x <= 2.5e+19) {
		tmp = t_1;
	} else if (x <= 9.5e+199) {
		tmp = t_2;
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if x <= -1.65e+67:
		tmp = x - (x * (y / a))
	elif x <= -6e-34:
		tmp = t_1
	elif x <= -1.32e-55:
		tmp = t_2
	elif x <= 2.5e+19:
		tmp = t_1
	elif x <= 9.5e+199:
		tmp = t_2
	else:
		tmp = x * ((y - a) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (x <= -1.65e+67)
		tmp = Float64(x - Float64(x * Float64(y / a)));
	elseif (x <= -6e-34)
		tmp = t_1;
	elseif (x <= -1.32e-55)
		tmp = t_2;
	elseif (x <= 2.5e+19)
		tmp = t_1;
	elseif (x <= 9.5e+199)
		tmp = t_2;
	else
		tmp = Float64(x * Float64(Float64(y - a) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (x <= -1.65e+67)
		tmp = x - (x * (y / a));
	elseif (x <= -6e-34)
		tmp = t_1;
	elseif (x <= -1.32e-55)
		tmp = t_2;
	elseif (x <= 2.5e+19)
		tmp = t_1;
	elseif (x <= 9.5e+199)
		tmp = t_2;
	else
		tmp = x * ((y - a) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.65e+67], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6e-34], t$95$1, If[LessEqual[x, -1.32e-55], t$95$2, If[LessEqual[x, 2.5e+19], t$95$1, If[LessEqual[x, 9.5e+199], t$95$2, N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -6 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -1.32 \cdot 10^{-55}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq 2.5 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 9.5 \cdot 10^{+199}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 67.5%

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

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

      \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
    5. Step-by-step derivation
      1. mul-1-neg54.8%

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

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

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

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

        \[\leadsto x + x \cdot \color{blue}{\frac{-1 \cdot y}{a}} \]
      6. mul-1-neg63.2%

        \[\leadsto x + x \cdot \frac{\color{blue}{-y}}{a} \]
    6. Simplified63.2%

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

    if -1.6500000000000001e67 < x < -6e-34 or -1.31999999999999993e-55 < x < 2.5e19

    1. Initial program 80.8%

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

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

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

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

    if -6e-34 < x < -1.31999999999999993e-55 or 2.5e19 < x < 9.49999999999999954e199

    1. Initial program 83.1%

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

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

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

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

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

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

    if 9.49999999999999954e199 < x

    1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{+67}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq -6 \cdot 10^{-34}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq -1.32 \cdot 10^{-55}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{+19}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+199}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 69.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq 4 \cdot 10^{-135}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 24:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.10000000000000008e-22 or 24 < a

    1. Initial program 89.5%

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    5. Simplified73.2%

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

    if -2.10000000000000008e-22 < a < 4.0000000000000002e-135 or 1.20000000000000001e-42 < a < 24

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.0000000000000002e-135 < a < 1.20000000000000001e-42

    1. Initial program 62.1%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a - z}{t - x}}} \]
      3. div-inv64.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{-22}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-135}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{elif}\;a \leq 1.2 \cdot 10^{-42}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 24:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 47.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 3.05 \cdot 10^{-254}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 2.46 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.50000000000000014e90 or 2.4599999999999999e45 < z

    1. Initial program 55.0%

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

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

    if -7.50000000000000014e90 < z < 3.05e-254 or 3.00000000000000025e-215 < z < 2.4599999999999999e45

    1. Initial program 88.1%

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

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

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

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

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

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

    if 3.05e-254 < z < 3.00000000000000025e-215

    1. Initial program 88.0%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    5. Simplified88.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+90}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 3.05 \cdot 10^{-254}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-215}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;z \leq 2.46 \cdot 10^{+45}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 64.4% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.12e139 < z < -2.5999999999999998e25

    1. Initial program 85.8%

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

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

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

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

    if -2.5999999999999998e25 < z < 6.2e21

    1. Initial program 87.7%

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

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

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

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

    if 6.2e21 < z

    1. Initial program 61.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{+139}:\\ \;\;\;\;t + a \cdot \frac{t - x}{z}\\ \mathbf{elif}\;z \leq -2.6 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+21}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 62.1% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2999999999999998e138 < z < -2e20

    1. Initial program 85.8%

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

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

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

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

    if -2e20 < z < 4.3e21

    1. Initial program 87.7%

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

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

    if 4.3e21 < z

    1. Initial program 61.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{+138}:\\ \;\;\;\;t + a \cdot \frac{t - x}{z}\\ \mathbf{elif}\;z \leq -2 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 4.3 \cdot 10^{+21}:\\ \;\;\;\;x - \frac{y \cdot \left(x - t\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 51.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -4.1 \cdot 10^{+89} \lor \neg \left(z \leq 9.5 \cdot 10^{+43}\right):\\
\;\;\;\;t \cdot \frac{z}{z - a}\\

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


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

    1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.30000000000000012e175 < z < -4.09999999999999985e89 or 9.5000000000000004e43 < z

    1. Initial program 58.8%

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{z}{a - z}} \]
      3. distribute-lft-neg-in54.8%

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

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

    if -4.09999999999999985e89 < z < 9.5000000000000004e43

    1. Initial program 88.1%

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    6. Simplified59.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.3 \cdot 10^{+175}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{+89} \lor \neg \left(z \leq 9.5 \cdot 10^{+43}\right):\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 70.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{-22} \lor \neg \left(a \leq 50\right):\\
\;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.4500000000000001e-22 or 50 < a

    1. Initial program 89.5%

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

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

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

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

    if -1.4500000000000001e-22 < a < 50

    1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 75.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{-22} \lor \neg \left(a \leq 23000\right):\\
\;\;\;\;x - \left(t - x\right) \cdot \frac{z - y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.39999999999999997e-22 or 23000 < a

    1. Initial program 89.5%

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

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

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

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

    if -1.39999999999999997e-22 < a < 23000

    1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

Alternative 20: 66.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{-22} \lor \neg \left(a \leq 540000000000\right):\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.90000000000000012e-22 or 5.4e11 < a

    1. Initial program 89.5%

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    5. Simplified73.2%

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

    if -1.90000000000000012e-22 < a < 5.4e11

    1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 21: 39.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 55000000:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.10000000000000001e24 or 5.5e7 < a

    1. Initial program 90.2%

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

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

    if -1.10000000000000001e24 < a < 5.5e7

    1. Initial program 60.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 55000000:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 24.7% 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 75.5%

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

    \[\leadsto \color{blue}{t} \]
  4. Final simplification23.7%

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

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