Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.2% → 90.3%
Time: 28.5s
Alternatives: 26
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 26 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.2% accurate, 1.0× speedup?

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

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

Alternative 1: 90.3% accurate, 0.1× speedup?

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

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

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

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


\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)))) < -1.99999999999999989e-201

    1. Initial program 93.9%

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

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

    1. Initial program 6.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 77.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+77.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--77.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-sub77.5%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 95.4%

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

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

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

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

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

Alternative 2: 90.3% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 94.7%

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

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

    1. Initial program 6.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 77.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+77.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--77.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-sub77.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 50.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;a \leq -8.4 \cdot 10^{-33}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-276}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-291}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-106}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{-76}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-33}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+80}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ y z)))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= a -8.4e-33)
     t_2
     (if (<= a -1.5e-276)
       t_1
       (if (<= a 2.8e-291)
         (/ x (/ z y))
         (if (<= a 5e-106)
           t_1
           (if (<= a 8.6e-76)
             t_2
             (if (<= a 3.5e-33)
               (* (- t x) (/ y a))
               (if (<= a 1.8e+80)
                 (* x (/ (- y a) z))
                 (+ x (* t (/ y a))))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -8.4e-33) {
		tmp = t_2;
	} else if (a <= -1.5e-276) {
		tmp = t_1;
	} else if (a <= 2.8e-291) {
		tmp = x / (z / y);
	} else if (a <= 5e-106) {
		tmp = t_1;
	} else if (a <= 8.6e-76) {
		tmp = t_2;
	} else if (a <= 3.5e-33) {
		tmp = (t - x) * (y / a);
	} else if (a <= 1.8e+80) {
		tmp = x * ((y - a) / z);
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * (1.0d0 - (y / z))
    t_2 = x * (1.0d0 - (y / a))
    if (a <= (-8.4d-33)) then
        tmp = t_2
    else if (a <= (-1.5d-276)) then
        tmp = t_1
    else if (a <= 2.8d-291) then
        tmp = x / (z / y)
    else if (a <= 5d-106) then
        tmp = t_1
    else if (a <= 8.6d-76) then
        tmp = t_2
    else if (a <= 3.5d-33) then
        tmp = (t - x) * (y / a)
    else if (a <= 1.8d+80) then
        tmp = x * ((y - a) / z)
    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 t_1 = t * (1.0 - (y / z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -8.4e-33) {
		tmp = t_2;
	} else if (a <= -1.5e-276) {
		tmp = t_1;
	} else if (a <= 2.8e-291) {
		tmp = x / (z / y);
	} else if (a <= 5e-106) {
		tmp = t_1;
	} else if (a <= 8.6e-76) {
		tmp = t_2;
	} else if (a <= 3.5e-33) {
		tmp = (t - x) * (y / a);
	} else if (a <= 1.8e+80) {
		tmp = x * ((y - a) / z);
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if a <= -8.4e-33:
		tmp = t_2
	elif a <= -1.5e-276:
		tmp = t_1
	elif a <= 2.8e-291:
		tmp = x / (z / y)
	elif a <= 5e-106:
		tmp = t_1
	elif a <= 8.6e-76:
		tmp = t_2
	elif a <= 3.5e-33:
		tmp = (t - x) * (y / a)
	elif a <= 1.8e+80:
		tmp = x * ((y - a) / z)
	else:
		tmp = x + (t * (y / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 - Float64(y / z)))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (a <= -8.4e-33)
		tmp = t_2;
	elseif (a <= -1.5e-276)
		tmp = t_1;
	elseif (a <= 2.8e-291)
		tmp = Float64(x / Float64(z / y));
	elseif (a <= 5e-106)
		tmp = t_1;
	elseif (a <= 8.6e-76)
		tmp = t_2;
	elseif (a <= 3.5e-33)
		tmp = Float64(Float64(t - x) * Float64(y / a));
	elseif (a <= 1.8e+80)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	else
		tmp = Float64(x + Float64(t * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 - (y / z));
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (a <= -8.4e-33)
		tmp = t_2;
	elseif (a <= -1.5e-276)
		tmp = t_1;
	elseif (a <= 2.8e-291)
		tmp = x / (z / y);
	elseif (a <= 5e-106)
		tmp = t_1;
	elseif (a <= 8.6e-76)
		tmp = t_2;
	elseif (a <= 3.5e-33)
		tmp = (t - x) * (y / a);
	elseif (a <= 1.8e+80)
		tmp = x * ((y - a) / z);
	else
		tmp = x + (t * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.4e-33], t$95$2, If[LessEqual[a, -1.5e-276], t$95$1, If[LessEqual[a, 2.8e-291], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5e-106], t$95$1, If[LessEqual[a, 8.6e-76], t$95$2, If[LessEqual[a, 3.5e-33], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.8e+80], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.5 \cdot 10^{-276}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 5 \cdot 10^{-106}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 8.6 \cdot 10^{-76}:\\
\;\;\;\;t_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -8.4e-33 or 4.99999999999999983e-106 < a < 8.5999999999999998e-76

    1. Initial program 87.8%

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    7. 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)} \]
    8. Simplified58.5%

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

    if -8.4e-33 < a < -1.49999999999999994e-276 or 2.8e-291 < a < 4.99999999999999983e-106

    1. Initial program 69.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 83.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+83.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--83.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-sub83.2%

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

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

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

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

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

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

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

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

    if -1.49999999999999994e-276 < a < 2.8e-291

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    11. Simplified80.8%

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

    if 8.5999999999999998e-76 < a < 3.4999999999999999e-33

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

    if 3.4999999999999999e-33 < a < 1.79999999999999997e80

    1. Initial program 62.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 69.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+69.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--69.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-sub69.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    11. Simplified52.9%

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

    if 1.79999999999999997e80 < 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.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.4 \cdot 10^{-33}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-276}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-291}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-106}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 8.6 \cdot 10^{-76}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-33}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+80}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 34.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\frac{a}{y}}\\ t_2 := x \cdot \frac{y}{z}\\ \mathbf{if}\;a \leq -1.46 \cdot 10^{-19}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-290}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-208}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+44}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+121}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+163}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ t (/ a y))) (t_2 (* x (/ y z))))
   (if (<= a -1.46e-19)
     x
     (if (<= a 1.65e-290)
       t_2
       (if (<= a 8.2e-208)
         t
         (if (<= a 2e-34)
           t_1
           (if (<= a 4.5e+44)
             t_2
             (if (<= a 1.45e+121) x (if (<= a 5.8e+163) t_1 x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t / (a / y);
	double t_2 = x * (y / z);
	double tmp;
	if (a <= -1.46e-19) {
		tmp = x;
	} else if (a <= 1.65e-290) {
		tmp = t_2;
	} else if (a <= 8.2e-208) {
		tmp = t;
	} else if (a <= 2e-34) {
		tmp = t_1;
	} else if (a <= 4.5e+44) {
		tmp = t_2;
	} else if (a <= 1.45e+121) {
		tmp = x;
	} else if (a <= 5.8e+163) {
		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) :: t_2
    real(8) :: tmp
    t_1 = t / (a / y)
    t_2 = x * (y / z)
    if (a <= (-1.46d-19)) then
        tmp = x
    else if (a <= 1.65d-290) then
        tmp = t_2
    else if (a <= 8.2d-208) then
        tmp = t
    else if (a <= 2d-34) then
        tmp = t_1
    else if (a <= 4.5d+44) then
        tmp = t_2
    else if (a <= 1.45d+121) then
        tmp = x
    else if (a <= 5.8d+163) 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 / (a / y);
	double t_2 = x * (y / z);
	double tmp;
	if (a <= -1.46e-19) {
		tmp = x;
	} else if (a <= 1.65e-290) {
		tmp = t_2;
	} else if (a <= 8.2e-208) {
		tmp = t;
	} else if (a <= 2e-34) {
		tmp = t_1;
	} else if (a <= 4.5e+44) {
		tmp = t_2;
	} else if (a <= 1.45e+121) {
		tmp = x;
	} else if (a <= 5.8e+163) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t / (a / y)
	t_2 = x * (y / z)
	tmp = 0
	if a <= -1.46e-19:
		tmp = x
	elif a <= 1.65e-290:
		tmp = t_2
	elif a <= 8.2e-208:
		tmp = t
	elif a <= 2e-34:
		tmp = t_1
	elif a <= 4.5e+44:
		tmp = t_2
	elif a <= 1.45e+121:
		tmp = x
	elif a <= 5.8e+163:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t / Float64(a / y))
	t_2 = Float64(x * Float64(y / z))
	tmp = 0.0
	if (a <= -1.46e-19)
		tmp = x;
	elseif (a <= 1.65e-290)
		tmp = t_2;
	elseif (a <= 8.2e-208)
		tmp = t;
	elseif (a <= 2e-34)
		tmp = t_1;
	elseif (a <= 4.5e+44)
		tmp = t_2;
	elseif (a <= 1.45e+121)
		tmp = x;
	elseif (a <= 5.8e+163)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t / (a / y);
	t_2 = x * (y / z);
	tmp = 0.0;
	if (a <= -1.46e-19)
		tmp = x;
	elseif (a <= 1.65e-290)
		tmp = t_2;
	elseif (a <= 8.2e-208)
		tmp = t;
	elseif (a <= 2e-34)
		tmp = t_1;
	elseif (a <= 4.5e+44)
		tmp = t_2;
	elseif (a <= 1.45e+121)
		tmp = x;
	elseif (a <= 5.8e+163)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.46e-19], x, If[LessEqual[a, 1.65e-290], t$95$2, If[LessEqual[a, 8.2e-208], t, If[LessEqual[a, 2e-34], t$95$1, If[LessEqual[a, 4.5e+44], t$95$2, If[LessEqual[a, 1.45e+121], x, If[LessEqual[a, 5.8e+163], t$95$1, x]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 1.65 \cdot 10^{-290}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 8.2 \cdot 10^{-208}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 2 \cdot 10^{-34}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{+44}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+121}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.46000000000000008e-19 or 4.5e44 < a < 1.45e121 or 5.79999999999999996e163 < a

    1. Initial program 90.4%

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

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

    if -1.46000000000000008e-19 < a < 1.64999999999999993e-290 or 1.99999999999999986e-34 < a < 4.5e44

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.64999999999999993e-290 < a < 8.1999999999999998e-208

    1. Initial program 75.4%

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

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

    if 8.1999999999999998e-208 < a < 1.99999999999999986e-34 or 1.45e121 < a < 5.79999999999999996e163

    1. Initial program 80.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    9. Simplified40.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.46 \cdot 10^{-19}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-290}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-208}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-34}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+44}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+121}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+163}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 34.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t}{\frac{a}{y}}\\ t_2 := \frac{x}{\frac{z}{y}}\\ \mathbf{if}\;a \leq -5.3 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-290}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 6.3 \cdot 10^{-208}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8.8 \cdot 10^{-35}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{+48}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 3.05 \cdot 10^{+119}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{+163}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ t (/ a y))) (t_2 (/ x (/ z y))))
   (if (<= a -5.3e-20)
     x
     (if (<= a 2.4e-290)
       t_2
       (if (<= a 6.3e-208)
         t
         (if (<= a 8.8e-35)
           t_1
           (if (<= a 6.8e+48)
             t_2
             (if (<= a 3.05e+119) x (if (<= a 7.5e+163) t_1 x)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t / (a / y);
	double t_2 = x / (z / y);
	double tmp;
	if (a <= -5.3e-20) {
		tmp = x;
	} else if (a <= 2.4e-290) {
		tmp = t_2;
	} else if (a <= 6.3e-208) {
		tmp = t;
	} else if (a <= 8.8e-35) {
		tmp = t_1;
	} else if (a <= 6.8e+48) {
		tmp = t_2;
	} else if (a <= 3.05e+119) {
		tmp = x;
	} else if (a <= 7.5e+163) {
		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) :: t_2
    real(8) :: tmp
    t_1 = t / (a / y)
    t_2 = x / (z / y)
    if (a <= (-5.3d-20)) then
        tmp = x
    else if (a <= 2.4d-290) then
        tmp = t_2
    else if (a <= 6.3d-208) then
        tmp = t
    else if (a <= 8.8d-35) then
        tmp = t_1
    else if (a <= 6.8d+48) then
        tmp = t_2
    else if (a <= 3.05d+119) then
        tmp = x
    else if (a <= 7.5d+163) 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 / (a / y);
	double t_2 = x / (z / y);
	double tmp;
	if (a <= -5.3e-20) {
		tmp = x;
	} else if (a <= 2.4e-290) {
		tmp = t_2;
	} else if (a <= 6.3e-208) {
		tmp = t;
	} else if (a <= 8.8e-35) {
		tmp = t_1;
	} else if (a <= 6.8e+48) {
		tmp = t_2;
	} else if (a <= 3.05e+119) {
		tmp = x;
	} else if (a <= 7.5e+163) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t / (a / y)
	t_2 = x / (z / y)
	tmp = 0
	if a <= -5.3e-20:
		tmp = x
	elif a <= 2.4e-290:
		tmp = t_2
	elif a <= 6.3e-208:
		tmp = t
	elif a <= 8.8e-35:
		tmp = t_1
	elif a <= 6.8e+48:
		tmp = t_2
	elif a <= 3.05e+119:
		tmp = x
	elif a <= 7.5e+163:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t / Float64(a / y))
	t_2 = Float64(x / Float64(z / y))
	tmp = 0.0
	if (a <= -5.3e-20)
		tmp = x;
	elseif (a <= 2.4e-290)
		tmp = t_2;
	elseif (a <= 6.3e-208)
		tmp = t;
	elseif (a <= 8.8e-35)
		tmp = t_1;
	elseif (a <= 6.8e+48)
		tmp = t_2;
	elseif (a <= 3.05e+119)
		tmp = x;
	elseif (a <= 7.5e+163)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t / (a / y);
	t_2 = x / (z / y);
	tmp = 0.0;
	if (a <= -5.3e-20)
		tmp = x;
	elseif (a <= 2.4e-290)
		tmp = t_2;
	elseif (a <= 6.3e-208)
		tmp = t;
	elseif (a <= 8.8e-35)
		tmp = t_1;
	elseif (a <= 6.8e+48)
		tmp = t_2;
	elseif (a <= 3.05e+119)
		tmp = x;
	elseif (a <= 7.5e+163)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.3e-20], x, If[LessEqual[a, 2.4e-290], t$95$2, If[LessEqual[a, 6.3e-208], t, If[LessEqual[a, 8.8e-35], t$95$1, If[LessEqual[a, 6.8e+48], t$95$2, If[LessEqual[a, 3.05e+119], x, If[LessEqual[a, 7.5e+163], t$95$1, x]]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq 6.3 \cdot 10^{-208}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 8.8 \cdot 10^{-35}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 6.8 \cdot 10^{+48}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 3.05 \cdot 10^{+119}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 7.5 \cdot 10^{+163}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.3000000000000002e-20 or 6.8000000000000006e48 < a < 3.05e119 or 7.50000000000000001e163 < a

    1. Initial program 90.4%

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

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

    if -5.3000000000000002e-20 < a < 2.4000000000000001e-290 or 8.79999999999999975e-35 < a < 6.8000000000000006e48

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4000000000000001e-290 < a < 6.29999999999999993e-208

    1. Initial program 75.4%

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

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

    if 6.29999999999999993e-208 < a < 8.79999999999999975e-35 or 3.05e119 < a < 7.50000000000000001e163

    1. Initial program 80.0%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    9. Simplified40.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.3 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-290}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 6.3 \cdot 10^{-208}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 8.8 \cdot 10^{-35}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{+48}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 3.05 \cdot 10^{+119}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{+163}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 57.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{if}\;a \leq -6.2 \cdot 10^{-19}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{-243}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{-160}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-26}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 540000000:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+74}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- t x) (/ y (- a z)))))
   (if (<= a -6.2e-19)
     (* x (- 1.0 (/ y a)))
     (if (<= a 7.6e-243)
       (+ t (* x (/ y z)))
       (if (<= a 1.22e-160)
         (* t (- 1.0 (/ y z)))
         (if (<= a 4.8e-26)
           t_1
           (if (<= a 540000000.0)
             (- t (/ (* x a) z))
             (if (<= a 3.5e+74) t_1 (+ x (* t (/ y a)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (t - x) * (y / (a - z));
	double tmp;
	if (a <= -6.2e-19) {
		tmp = x * (1.0 - (y / a));
	} else if (a <= 7.6e-243) {
		tmp = t + (x * (y / z));
	} else if (a <= 1.22e-160) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 4.8e-26) {
		tmp = t_1;
	} else if (a <= 540000000.0) {
		tmp = t - ((x * a) / z);
	} else if (a <= 3.5e+74) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = (t - x) * (y / (a - z))
    if (a <= (-6.2d-19)) then
        tmp = x * (1.0d0 - (y / a))
    else if (a <= 7.6d-243) then
        tmp = t + (x * (y / z))
    else if (a <= 1.22d-160) then
        tmp = t * (1.0d0 - (y / z))
    else if (a <= 4.8d-26) then
        tmp = t_1
    else if (a <= 540000000.0d0) then
        tmp = t - ((x * a) / z)
    else if (a <= 3.5d+74) then
        tmp = t_1
    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 t_1 = (t - x) * (y / (a - z));
	double tmp;
	if (a <= -6.2e-19) {
		tmp = x * (1.0 - (y / a));
	} else if (a <= 7.6e-243) {
		tmp = t + (x * (y / z));
	} else if (a <= 1.22e-160) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 4.8e-26) {
		tmp = t_1;
	} else if (a <= 540000000.0) {
		tmp = t - ((x * a) / z);
	} else if (a <= 3.5e+74) {
		tmp = t_1;
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (t - x) * (y / (a - z))
	tmp = 0
	if a <= -6.2e-19:
		tmp = x * (1.0 - (y / a))
	elif a <= 7.6e-243:
		tmp = t + (x * (y / z))
	elif a <= 1.22e-160:
		tmp = t * (1.0 - (y / z))
	elif a <= 4.8e-26:
		tmp = t_1
	elif a <= 540000000.0:
		tmp = t - ((x * a) / z)
	elif a <= 3.5e+74:
		tmp = t_1
	else:
		tmp = x + (t * (y / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(t - x) * Float64(y / Float64(a - z)))
	tmp = 0.0
	if (a <= -6.2e-19)
		tmp = Float64(x * Float64(1.0 - Float64(y / a)));
	elseif (a <= 7.6e-243)
		tmp = Float64(t + Float64(x * Float64(y / z)));
	elseif (a <= 1.22e-160)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif (a <= 4.8e-26)
		tmp = t_1;
	elseif (a <= 540000000.0)
		tmp = Float64(t - Float64(Float64(x * a) / z));
	elseif (a <= 3.5e+74)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(t * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (t - x) * (y / (a - z));
	tmp = 0.0;
	if (a <= -6.2e-19)
		tmp = x * (1.0 - (y / a));
	elseif (a <= 7.6e-243)
		tmp = t + (x * (y / z));
	elseif (a <= 1.22e-160)
		tmp = t * (1.0 - (y / z));
	elseif (a <= 4.8e-26)
		tmp = t_1;
	elseif (a <= 540000000.0)
		tmp = t - ((x * a) / z);
	elseif (a <= 3.5e+74)
		tmp = t_1;
	else
		tmp = x + (t * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.2e-19], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.6e-243], N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.22e-160], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.8e-26], t$95$1, If[LessEqual[a, 540000000.0], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.5e+74], t$95$1, N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;a \leq 4.8 \cdot 10^{-26}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 540000000:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\

\mathbf{elif}\;a \leq 3.5 \cdot 10^{+74}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -6.1999999999999998e-19

    1. Initial program 89.9%

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

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{y}{a}\right)} \]
    7. 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)} \]
    8. Simplified57.3%

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

    if -6.1999999999999998e-19 < a < 7.5999999999999996e-243

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.5999999999999996e-243 < a < 1.22000000000000003e-160

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.22000000000000003e-160 < a < 4.8000000000000002e-26 or 5.4e8 < a < 3.50000000000000014e74

    1. Initial program 78.8%

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

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

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

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

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

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

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

    if 4.8000000000000002e-26 < a < 5.4e8

    1. Initial program 55.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 83.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+83.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--83.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-sub83.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.50000000000000014e74 < a

    1. Initial program 88.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.2 \cdot 10^{-19}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{-243}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{-160}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-26}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 540000000:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+74}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 48.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;a \leq -1.5 \cdot 10^{-276}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 3.2 \cdot 10^{-107}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 9.8 \cdot 10^{+120} \lor \neg \left(a \leq 5.8 \cdot 10^{+163}\right):\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -8.5000000000000001e-34 or 3.20000000000000013e-107 < a < 9.80000000000000021e120 or 5.79999999999999996e163 < a

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

    if -8.5000000000000001e-34 < a < -1.49999999999999994e-276 or 2.8e-291 < a < 3.20000000000000013e-107

    1. Initial program 69.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 83.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+83.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--83.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-sub83.2%

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

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

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

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

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

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

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

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

    if -1.49999999999999994e-276 < a < 2.8e-291

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    11. Simplified80.8%

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

    if 9.80000000000000021e120 < a < 5.79999999999999996e163

    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 42.1%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    9. Simplified52.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.5 \cdot 10^{-34}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-276}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-291}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-107}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 9.8 \cdot 10^{+120} \lor \neg \left(a \leq 5.8 \cdot 10^{+163}\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 49.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;a \leq -2.05 \cdot 10^{-35}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-276}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-291}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-106}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-26} \lor \neg \left(a \leq 0.05\right):\\ \;\;\;\;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 (- 1.0 (/ y z)))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= a -2.05e-35)
     t_2
     (if (<= a -1.2e-276)
       t_1
       (if (<= a 2.8e-291)
         (/ x (/ z y))
         (if (<= a 2.6e-106)
           t_1
           (if (or (<= a 1.5e-26) (not (<= a 0.05)))
             t_2
             (* x (/ (- y a) z)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -2.05e-35) {
		tmp = t_2;
	} else if (a <= -1.2e-276) {
		tmp = t_1;
	} else if (a <= 2.8e-291) {
		tmp = x / (z / y);
	} else if (a <= 2.6e-106) {
		tmp = t_1;
	} else if ((a <= 1.5e-26) || !(a <= 0.05)) {
		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 * (1.0d0 - (y / z))
    t_2 = x * (1.0d0 - (y / a))
    if (a <= (-2.05d-35)) then
        tmp = t_2
    else if (a <= (-1.2d-276)) then
        tmp = t_1
    else if (a <= 2.8d-291) then
        tmp = x / (z / y)
    else if (a <= 2.6d-106) then
        tmp = t_1
    else if ((a <= 1.5d-26) .or. (.not. (a <= 0.05d0))) 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 * (1.0 - (y / z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -2.05e-35) {
		tmp = t_2;
	} else if (a <= -1.2e-276) {
		tmp = t_1;
	} else if (a <= 2.8e-291) {
		tmp = x / (z / y);
	} else if (a <= 2.6e-106) {
		tmp = t_1;
	} else if ((a <= 1.5e-26) || !(a <= 0.05)) {
		tmp = t_2;
	} else {
		tmp = x * ((y - a) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if a <= -2.05e-35:
		tmp = t_2
	elif a <= -1.2e-276:
		tmp = t_1
	elif a <= 2.8e-291:
		tmp = x / (z / y)
	elif a <= 2.6e-106:
		tmp = t_1
	elif (a <= 1.5e-26) or not (a <= 0.05):
		tmp = t_2
	else:
		tmp = x * ((y - a) / z)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 - Float64(y / z)))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (a <= -2.05e-35)
		tmp = t_2;
	elseif (a <= -1.2e-276)
		tmp = t_1;
	elseif (a <= 2.8e-291)
		tmp = Float64(x / Float64(z / y));
	elseif (a <= 2.6e-106)
		tmp = t_1;
	elseif ((a <= 1.5e-26) || !(a <= 0.05))
		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 * (1.0 - (y / z));
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (a <= -2.05e-35)
		tmp = t_2;
	elseif (a <= -1.2e-276)
		tmp = t_1;
	elseif (a <= 2.8e-291)
		tmp = x / (z / y);
	elseif (a <= 2.6e-106)
		tmp = t_1;
	elseif ((a <= 1.5e-26) || ~((a <= 0.05)))
		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[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.05e-35], t$95$2, If[LessEqual[a, -1.2e-276], t$95$1, If[LessEqual[a, 2.8e-291], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.6e-106], t$95$1, If[Or[LessEqual[a, 1.5e-26], N[Not[LessEqual[a, 0.05]], $MachinePrecision]], t$95$2, N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-276}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.6 \cdot 10^{-106}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.5 \cdot 10^{-26} \lor \neg \left(a \leq 0.05\right):\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.05000000000000013e-35 or 2.6000000000000001e-106 < a < 1.50000000000000006e-26 or 0.050000000000000003 < a

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

    if -2.05000000000000013e-35 < a < -1.19999999999999991e-276 or 2.8e-291 < a < 2.6000000000000001e-106

    1. Initial program 69.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 83.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+83.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--83.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-sub83.2%

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

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

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

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

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

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

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

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

    if -1.19999999999999991e-276 < a < 2.8e-291

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    11. Simplified80.8%

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

    if 1.50000000000000006e-26 < a < 0.050000000000000003

    1. Initial program 56.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 90.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+90.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--90.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-sub90.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.05 \cdot 10^{-35}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-276}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-291}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-106}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-26} \lor \neg \left(a \leq 0.05\right):\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 52.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;a \leq -1.3 \cdot 10^{-36}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-276}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-291}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-106}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-26}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 86000000000000:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ y z)))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= a -1.3e-36)
     t_2
     (if (<= a -1.35e-276)
       t_1
       (if (<= a 5.5e-291)
         (/ x (/ z y))
         (if (<= a 5e-106)
           t_1
           (if (<= a 3.5e-26)
             t_2
             (if (<= a 86000000000000.0)
               (- t (/ (* x a) z))
               (+ x (* t (/ y a)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -1.3e-36) {
		tmp = t_2;
	} else if (a <= -1.35e-276) {
		tmp = t_1;
	} else if (a <= 5.5e-291) {
		tmp = x / (z / y);
	} else if (a <= 5e-106) {
		tmp = t_1;
	} else if (a <= 3.5e-26) {
		tmp = t_2;
	} else if (a <= 86000000000000.0) {
		tmp = t - ((x * a) / z);
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * (1.0d0 - (y / z))
    t_2 = x * (1.0d0 - (y / a))
    if (a <= (-1.3d-36)) then
        tmp = t_2
    else if (a <= (-1.35d-276)) then
        tmp = t_1
    else if (a <= 5.5d-291) then
        tmp = x / (z / y)
    else if (a <= 5d-106) then
        tmp = t_1
    else if (a <= 3.5d-26) then
        tmp = t_2
    else if (a <= 86000000000000.0d0) then
        tmp = t - ((x * a) / z)
    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 t_1 = t * (1.0 - (y / z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -1.3e-36) {
		tmp = t_2;
	} else if (a <= -1.35e-276) {
		tmp = t_1;
	} else if (a <= 5.5e-291) {
		tmp = x / (z / y);
	} else if (a <= 5e-106) {
		tmp = t_1;
	} else if (a <= 3.5e-26) {
		tmp = t_2;
	} else if (a <= 86000000000000.0) {
		tmp = t - ((x * a) / z);
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if a <= -1.3e-36:
		tmp = t_2
	elif a <= -1.35e-276:
		tmp = t_1
	elif a <= 5.5e-291:
		tmp = x / (z / y)
	elif a <= 5e-106:
		tmp = t_1
	elif a <= 3.5e-26:
		tmp = t_2
	elif a <= 86000000000000.0:
		tmp = t - ((x * a) / z)
	else:
		tmp = x + (t * (y / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 - Float64(y / z)))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (a <= -1.3e-36)
		tmp = t_2;
	elseif (a <= -1.35e-276)
		tmp = t_1;
	elseif (a <= 5.5e-291)
		tmp = Float64(x / Float64(z / y));
	elseif (a <= 5e-106)
		tmp = t_1;
	elseif (a <= 3.5e-26)
		tmp = t_2;
	elseif (a <= 86000000000000.0)
		tmp = Float64(t - Float64(Float64(x * a) / z));
	else
		tmp = Float64(x + Float64(t * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 - (y / z));
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (a <= -1.3e-36)
		tmp = t_2;
	elseif (a <= -1.35e-276)
		tmp = t_1;
	elseif (a <= 5.5e-291)
		tmp = x / (z / y);
	elseif (a <= 5e-106)
		tmp = t_1;
	elseif (a <= 3.5e-26)
		tmp = t_2;
	elseif (a <= 86000000000000.0)
		tmp = t - ((x * a) / z);
	else
		tmp = x + (t * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.3e-36], t$95$2, If[LessEqual[a, -1.35e-276], t$95$1, If[LessEqual[a, 5.5e-291], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5e-106], t$95$1, If[LessEqual[a, 3.5e-26], t$95$2, If[LessEqual[a, 86000000000000.0], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.35 \cdot 10^{-276}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 5 \cdot 10^{-106}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 3.5 \cdot 10^{-26}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 86000000000000:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.3e-36 or 4.99999999999999983e-106 < a < 3.49999999999999985e-26

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

    if -1.3e-36 < a < -1.34999999999999993e-276 or 5.5000000000000002e-291 < a < 4.99999999999999983e-106

    1. Initial program 69.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 83.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+83.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--83.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-sub83.2%

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

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

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

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

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

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

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

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

    if -1.34999999999999993e-276 < a < 5.5000000000000002e-291

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    11. Simplified80.8%

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

    if 3.49999999999999985e-26 < a < 8.6e13

    1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.6e13 < a

    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 64.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{-36}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-276}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-291}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-106}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 86000000000000:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 53.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{if}\;a \leq -3.4 \cdot 10^{-33}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-276}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-289}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-106}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-26}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+14}:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ y z)))) (t_2 (* x (- 1.0 (/ y a)))))
   (if (<= a -3.4e-33)
     t_2
     (if (<= a -1.5e-276)
       t_1
       (if (<= a 1.5e-289)
         (* (/ y z) (- x t))
         (if (<= a 5e-106)
           t_1
           (if (<= a 2.6e-26)
             t_2
             (if (<= a 1.6e+14) (- t (/ (* x a) z)) (+ x (* t (/ y a)))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -3.4e-33) {
		tmp = t_2;
	} else if (a <= -1.5e-276) {
		tmp = t_1;
	} else if (a <= 1.5e-289) {
		tmp = (y / z) * (x - t);
	} else if (a <= 5e-106) {
		tmp = t_1;
	} else if (a <= 2.6e-26) {
		tmp = t_2;
	} else if (a <= 1.6e+14) {
		tmp = t - ((x * a) / z);
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t * (1.0d0 - (y / z))
    t_2 = x * (1.0d0 - (y / a))
    if (a <= (-3.4d-33)) then
        tmp = t_2
    else if (a <= (-1.5d-276)) then
        tmp = t_1
    else if (a <= 1.5d-289) then
        tmp = (y / z) * (x - t)
    else if (a <= 5d-106) then
        tmp = t_1
    else if (a <= 2.6d-26) then
        tmp = t_2
    else if (a <= 1.6d+14) then
        tmp = t - ((x * a) / z)
    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 t_1 = t * (1.0 - (y / z));
	double t_2 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -3.4e-33) {
		tmp = t_2;
	} else if (a <= -1.5e-276) {
		tmp = t_1;
	} else if (a <= 1.5e-289) {
		tmp = (y / z) * (x - t);
	} else if (a <= 5e-106) {
		tmp = t_1;
	} else if (a <= 2.6e-26) {
		tmp = t_2;
	} else if (a <= 1.6e+14) {
		tmp = t - ((x * a) / z);
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	t_2 = x * (1.0 - (y / a))
	tmp = 0
	if a <= -3.4e-33:
		tmp = t_2
	elif a <= -1.5e-276:
		tmp = t_1
	elif a <= 1.5e-289:
		tmp = (y / z) * (x - t)
	elif a <= 5e-106:
		tmp = t_1
	elif a <= 2.6e-26:
		tmp = t_2
	elif a <= 1.6e+14:
		tmp = t - ((x * a) / z)
	else:
		tmp = x + (t * (y / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 - Float64(y / z)))
	t_2 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (a <= -3.4e-33)
		tmp = t_2;
	elseif (a <= -1.5e-276)
		tmp = t_1;
	elseif (a <= 1.5e-289)
		tmp = Float64(Float64(y / z) * Float64(x - t));
	elseif (a <= 5e-106)
		tmp = t_1;
	elseif (a <= 2.6e-26)
		tmp = t_2;
	elseif (a <= 1.6e+14)
		tmp = Float64(t - Float64(Float64(x * a) / z));
	else
		tmp = Float64(x + Float64(t * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 - (y / z));
	t_2 = x * (1.0 - (y / a));
	tmp = 0.0;
	if (a <= -3.4e-33)
		tmp = t_2;
	elseif (a <= -1.5e-276)
		tmp = t_1;
	elseif (a <= 1.5e-289)
		tmp = (y / z) * (x - t);
	elseif (a <= 5e-106)
		tmp = t_1;
	elseif (a <= 2.6e-26)
		tmp = t_2;
	elseif (a <= 1.6e+14)
		tmp = t - ((x * a) / z);
	else
		tmp = x + (t * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.4e-33], t$95$2, If[LessEqual[a, -1.5e-276], t$95$1, If[LessEqual[a, 1.5e-289], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5e-106], t$95$1, If[LessEqual[a, 2.6e-26], t$95$2, If[LessEqual[a, 1.6e+14], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.5 \cdot 10^{-276}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 5 \cdot 10^{-106}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2.6 \cdot 10^{-26}:\\
\;\;\;\;t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -3.4000000000000001e-33 or 4.99999999999999983e-106 < a < 2.6000000000000001e-26

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

    if -3.4000000000000001e-33 < a < -1.49999999999999994e-276 or 1.4999999999999999e-289 < a < 4.99999999999999983e-106

    1. Initial program 69.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 83.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+83.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--83.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-sub83.2%

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

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

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

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

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

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

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

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

    if -1.49999999999999994e-276 < a < 1.4999999999999999e-289

    1. Initial program 68.1%

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

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

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

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

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

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

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

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

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

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

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

    if 2.6000000000000001e-26 < a < 1.6e14

    1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6e14 < a

    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 64.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.4 \cdot 10^{-33}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq -1.5 \cdot 10^{-276}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-289}:\\ \;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\ \mathbf{elif}\;a \leq 5 \cdot 10^{-106}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-26}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+14}:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 56.3% 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.6 \cdot 10^{-19}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-243}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-109}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-75}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-34}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq 4250000000:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= a -8.6e-19)
     t_1
     (if (<= a 6.2e-243)
       (+ t (* x (/ y z)))
       (if (<= a 7.5e-109)
         (* t (- 1.0 (/ y z)))
         (if (<= a 1.65e-75)
           t_1
           (if (<= a 5.4e-34)
             (* (- y z) (/ t (- a z)))
             (if (<= a 4250000000.0)
               (- t (/ (* x a) z))
               (+ x (* t (/ y a)))))))))))
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.6e-19) {
		tmp = t_1;
	} else if (a <= 6.2e-243) {
		tmp = t + (x * (y / z));
	} else if (a <= 7.5e-109) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 1.65e-75) {
		tmp = t_1;
	} else if (a <= 5.4e-34) {
		tmp = (y - z) * (t / (a - z));
	} else if (a <= 4250000000.0) {
		tmp = t - ((x * a) / z);
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    if (a <= (-8.6d-19)) then
        tmp = t_1
    else if (a <= 6.2d-243) then
        tmp = t + (x * (y / z))
    else if (a <= 7.5d-109) then
        tmp = t * (1.0d0 - (y / z))
    else if (a <= 1.65d-75) then
        tmp = t_1
    else if (a <= 5.4d-34) then
        tmp = (y - z) * (t / (a - z))
    else if (a <= 4250000000.0d0) then
        tmp = t - ((x * a) / z)
    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 t_1 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -8.6e-19) {
		tmp = t_1;
	} else if (a <= 6.2e-243) {
		tmp = t + (x * (y / z));
	} else if (a <= 7.5e-109) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 1.65e-75) {
		tmp = t_1;
	} else if (a <= 5.4e-34) {
		tmp = (y - z) * (t / (a - z));
	} else if (a <= 4250000000.0) {
		tmp = t - ((x * a) / z);
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if a <= -8.6e-19:
		tmp = t_1
	elif a <= 6.2e-243:
		tmp = t + (x * (y / z))
	elif a <= 7.5e-109:
		tmp = t * (1.0 - (y / z))
	elif a <= 1.65e-75:
		tmp = t_1
	elif a <= 5.4e-34:
		tmp = (y - z) * (t / (a - z))
	elif a <= 4250000000.0:
		tmp = t - ((x * a) / z)
	else:
		tmp = x + (t * (y / a))
	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.6e-19)
		tmp = t_1;
	elseif (a <= 6.2e-243)
		tmp = Float64(t + Float64(x * Float64(y / z)));
	elseif (a <= 7.5e-109)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif (a <= 1.65e-75)
		tmp = t_1;
	elseif (a <= 5.4e-34)
		tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z)));
	elseif (a <= 4250000000.0)
		tmp = Float64(t - Float64(Float64(x * a) / z));
	else
		tmp = Float64(x + Float64(t * Float64(y / a)));
	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.6e-19)
		tmp = t_1;
	elseif (a <= 6.2e-243)
		tmp = t + (x * (y / z));
	elseif (a <= 7.5e-109)
		tmp = t * (1.0 - (y / z));
	elseif (a <= 1.65e-75)
		tmp = t_1;
	elseif (a <= 5.4e-34)
		tmp = (y - z) * (t / (a - z));
	elseif (a <= 4250000000.0)
		tmp = t - ((x * a) / z);
	else
		tmp = x + (t * (y / a));
	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.6e-19], t$95$1, If[LessEqual[a, 6.2e-243], N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.5e-109], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.65e-75], t$95$1, If[LessEqual[a, 5.4e-34], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4250000000.0], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;a \leq 1.65 \cdot 10^{-75}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 4250000000:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -8.6e-19 or 7.49999999999999982e-109 < a < 1.65e-75

    1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

    if -8.6e-19 < a < 6.1999999999999999e-243

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.1999999999999999e-243 < a < 7.49999999999999982e-109

    1. Initial program 75.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 79.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+79.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--79.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-sub79.6%

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

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

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

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

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

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

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

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

    if 1.65e-75 < a < 5.40000000000000034e-34

    1. Initial program 99.2%

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

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

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

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

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

    if 5.40000000000000034e-34 < a < 4.25e9

    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 76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.25e9 < a

    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 64.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.6 \cdot 10^{-19}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-243}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 7.5 \cdot 10^{-109}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-75}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-34}:\\ \;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq 4250000000:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 55.6% 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.9 \cdot 10^{-19}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-243}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-106}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-27}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4300000000000:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* x (- 1.0 (/ y a)))))
   (if (<= a -1.9e-19)
     t_1
     (if (<= a 6.6e-243)
       (+ t (* x (/ y z)))
       (if (<= a 3.6e-106)
         (* t (- 1.0 (/ y z)))
         (if (<= a 5.8e-27)
           t_1
           (if (<= a 4300000000000.0)
             (- t (/ (* x a) z))
             (+ x (* t (/ y a))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -1.9e-19) {
		tmp = t_1;
	} else if (a <= 6.6e-243) {
		tmp = t + (x * (y / z));
	} else if (a <= 3.6e-106) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 5.8e-27) {
		tmp = t_1;
	} else if (a <= 4300000000000.0) {
		tmp = t - ((x * a) / z);
	} 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) :: t_1
    real(8) :: tmp
    t_1 = x * (1.0d0 - (y / a))
    if (a <= (-1.9d-19)) then
        tmp = t_1
    else if (a <= 6.6d-243) then
        tmp = t + (x * (y / z))
    else if (a <= 3.6d-106) then
        tmp = t * (1.0d0 - (y / z))
    else if (a <= 5.8d-27) then
        tmp = t_1
    else if (a <= 4300000000000.0d0) then
        tmp = t - ((x * a) / z)
    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 t_1 = x * (1.0 - (y / a));
	double tmp;
	if (a <= -1.9e-19) {
		tmp = t_1;
	} else if (a <= 6.6e-243) {
		tmp = t + (x * (y / z));
	} else if (a <= 3.6e-106) {
		tmp = t * (1.0 - (y / z));
	} else if (a <= 5.8e-27) {
		tmp = t_1;
	} else if (a <= 4300000000000.0) {
		tmp = t - ((x * a) / z);
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (1.0 - (y / a))
	tmp = 0
	if a <= -1.9e-19:
		tmp = t_1
	elif a <= 6.6e-243:
		tmp = t + (x * (y / z))
	elif a <= 3.6e-106:
		tmp = t * (1.0 - (y / z))
	elif a <= 5.8e-27:
		tmp = t_1
	elif a <= 4300000000000.0:
		tmp = t - ((x * a) / z)
	else:
		tmp = x + (t * (y / a))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(1.0 - Float64(y / a)))
	tmp = 0.0
	if (a <= -1.9e-19)
		tmp = t_1;
	elseif (a <= 6.6e-243)
		tmp = Float64(t + Float64(x * Float64(y / z)));
	elseif (a <= 3.6e-106)
		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
	elseif (a <= 5.8e-27)
		tmp = t_1;
	elseif (a <= 4300000000000.0)
		tmp = Float64(t - Float64(Float64(x * a) / z));
	else
		tmp = Float64(x + Float64(t * Float64(y / a)));
	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 <= -1.9e-19)
		tmp = t_1;
	elseif (a <= 6.6e-243)
		tmp = t + (x * (y / z));
	elseif (a <= 3.6e-106)
		tmp = t * (1.0 - (y / z));
	elseif (a <= 5.8e-27)
		tmp = t_1;
	elseif (a <= 4300000000000.0)
		tmp = t - ((x * a) / z);
	else
		tmp = x + (t * (y / a));
	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, -1.9e-19], t$95$1, If[LessEqual[a, 6.6e-243], N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e-106], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.8e-27], t$95$1, If[LessEqual[a, 4300000000000.0], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq 3.6 \cdot 10^{-106}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

\mathbf{elif}\;a \leq 5.8 \cdot 10^{-27}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 4300000000000:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -1.9e-19 or 3.60000000000000013e-106 < a < 5.80000000000000008e-27

    1. Initial program 90.5%

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

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

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

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

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

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

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

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

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

    if -1.9e-19 < a < 6.60000000000000026e-243

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.60000000000000026e-243 < a < 3.60000000000000013e-106

    1. Initial program 75.8%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 79.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+79.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--79.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-sub79.6%

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

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

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

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

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

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

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

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

    if 5.80000000000000008e-27 < a < 4.3e12

    1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.3e12 < a

    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 64.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.9 \cdot 10^{-19}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 6.6 \cdot 10^{-243}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 3.6 \cdot 10^{-106}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{-27}:\\ \;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\ \mathbf{elif}\;a \leq 4300000000000:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 74.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+42} \lor \neg \left(a \leq 5 \cdot 10^{-106} \lor \neg \left(a \leq 1.8 \cdot 10^{-26}\right) \land a \leq 1.9 \cdot 10^{+80}\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.00000000000000004e42 or 4.99999999999999983e-106 < a < 1.8000000000000001e-26 or 1.89999999999999999e80 < a

    1. Initial program 92.4%

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

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

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

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

    if -1.00000000000000004e42 < a < 4.99999999999999983e-106 or 1.8000000000000001e-26 < a < 1.89999999999999999e80

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 31.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq -7 \cdot 10^{-286}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 2.95 \cdot 10^{+28}:\\
\;\;\;\;x\\

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

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

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


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

    1. Initial program 97.0%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y}{z}} \]
    9. Simplified38.2%

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

    if -2.8499999999999999e132 < y < -6.99999999999999977e-286

    1. Initial program 65.0%

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

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

    if -6.99999999999999977e-286 < y < 2.9500000000000001e28

    1. Initial program 75.4%

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

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

    if 2.9500000000000001e28 < y < 1.8999999999999998e103

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    11. Simplified39.4%

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

    if 1.8999999999999998e103 < y < 8.09999999999999993e183

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    if 8.09999999999999993e183 < y

    1. Initial program 94.8%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{a - z} \cdot y} \]
      3. *-commutative80.4%

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{\color{blue}{-x}}{a} \]
    11. Simplified51.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.85 \cdot 10^{+132}:\\ \;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-286}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.95 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+103}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;y \leq 8.1 \cdot 10^{+183}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{-x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 31.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-284}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 5.2 \cdot 10^{+28}:\\
\;\;\;\;x\\

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

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

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


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

    1. Initial program 97.0%

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

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

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

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

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

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

        \[\leadsto \frac{t}{\color{blue}{-\frac{z}{y}}} \]
      2. distribute-frac-neg38.2%

        \[\leadsto \frac{t}{\color{blue}{\frac{-z}{y}}} \]
    9. Simplified38.2%

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

    if -2.7999999999999999e132 < y < -1.1e-284

    1. Initial program 65.0%

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

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

    if -1.1e-284 < y < 5.2000000000000004e28

    1. Initial program 75.4%

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

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

    if 5.2000000000000004e28 < y < 3.89999999999999978e105

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    11. Simplified39.4%

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

    if 3.89999999999999978e105 < y < 5.8e181

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

    if 5.8e181 < y

    1. Initial program 94.8%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{x}{a - z} \cdot y} \]
      3. *-commutative80.4%

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{\color{blue}{-x}}{a} \]
    11. Simplified51.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{+132}:\\ \;\;\;\;\frac{t}{\frac{-z}{y}}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-284}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+105}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+181}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{-x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 72.8% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq 3.05 \cdot 10^{-27} \lor \neg \left(a \leq 1.9 \cdot 10^{+80}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.4000000000000002e-19 or 4.99999999999999983e-106 < a < 3.05e-27 or 1.89999999999999999e80 < a

    1. Initial program 90.5%

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

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

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

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

    if -5.4000000000000002e-19 < a < 4.99999999999999983e-106

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

    if 3.05e-27 < a < 1.89999999999999999e80

    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 72.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+72.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--72.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-sub72.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 31.9% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq -1.42 \cdot 10^{-287}:\\
\;\;\;\;t\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{+28}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;y \leq 10^{+251}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\

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


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

    1. Initial program 97.0%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y}{z}} \]
    9. Simplified38.2%

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

    if -1.14e133 < y < -1.42000000000000009e-287

    1. Initial program 65.0%

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

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

    if -1.42000000000000009e-287 < y < 2.49999999999999979e28

    1. Initial program 75.4%

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

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

    if 2.49999999999999979e28 < y < 6.5000000000000005e104

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    11. Simplified39.4%

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

    if 6.5000000000000005e104 < y < 1e251

    1. Initial program 97.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    9. Simplified54.3%

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

    if 1e251 < y

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.14 \cdot 10^{+133}:\\ \;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\ \mathbf{elif}\;y \leq -1.42 \cdot 10^{-287}:\\ \;\;\;\;t\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+28}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+104}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;y \leq 10^{+251}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 68.8% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 270000000:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.50000000000000015e-19 or 2.7e8 < a

    1. Initial program 89.2%

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

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

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

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

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

    if -3.50000000000000015e-19 < a < 1.60000000000000014e-110

    1. Initial program 68.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 79.4%

      \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-/l*83.0%

        \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{t - x}}} \]
    8. Simplified83.0%

      \[\leadsto t - \color{blue}{\frac{y}{\frac{z}{t - x}}} \]

    if 1.60000000000000014e-110 < a < 4.8999999999999999e-26

    1. Initial program 82.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 69.3%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub69.3%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-*r/63.6%

        \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
      3. associate-/l*69.3%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/69.5%

        \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    5. Simplified69.5%

      \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]

    if 4.8999999999999999e-26 < a < 2.7e8

    1. Initial program 55.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 83.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+83.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--83.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-sub83.5%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg83.5%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg83.5%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--83.5%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*83.4%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified83.4%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 77.1%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-/l*77.1%

        \[\leadsto t - -1 \cdot \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
      2. neg-mul-177.1%

        \[\leadsto t - \color{blue}{\left(-\frac{x}{\frac{z}{y - a}}\right)} \]
      3. distribute-neg-frac77.1%

        \[\leadsto t - \color{blue}{\frac{-x}{\frac{z}{y - a}}} \]
    8. Simplified77.1%

      \[\leadsto t - \color{blue}{\frac{-x}{\frac{z}{y - a}}} \]
    9. Taylor expanded in y around 0 75.3%

      \[\leadsto t - \color{blue}{\frac{a \cdot x}{z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification77.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{-19}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-110}:\\ \;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\ \mathbf{elif}\;a \leq 4.9 \cdot 10^{-26}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 270000000:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 69.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -4.05 \cdot 10^{-19}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-106}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-26}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 2080000000:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- t x) (/ y a)))))
   (if (<= a -4.05e-19)
     t_1
     (if (<= a 4.6e-106)
       (+ t (/ (- x t) (/ z y)))
       (if (<= a 5.2e-26)
         (* (- t x) (/ y (- a z)))
         (if (<= a 2080000000.0) (- t (/ (* x a) z)) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t - x) * (y / a));
	double tmp;
	if (a <= -4.05e-19) {
		tmp = t_1;
	} else if (a <= 4.6e-106) {
		tmp = t + ((x - t) / (z / y));
	} else if (a <= 5.2e-26) {
		tmp = (t - x) * (y / (a - z));
	} else if (a <= 2080000000.0) {
		tmp = t - ((x * 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 + ((t - x) * (y / a))
    if (a <= (-4.05d-19)) then
        tmp = t_1
    else if (a <= 4.6d-106) then
        tmp = t + ((x - t) / (z / y))
    else if (a <= 5.2d-26) then
        tmp = (t - x) * (y / (a - z))
    else if (a <= 2080000000.0d0) then
        tmp = t - ((x * 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 + ((t - x) * (y / a));
	double tmp;
	if (a <= -4.05e-19) {
		tmp = t_1;
	} else if (a <= 4.6e-106) {
		tmp = t + ((x - t) / (z / y));
	} else if (a <= 5.2e-26) {
		tmp = (t - x) * (y / (a - z));
	} else if (a <= 2080000000.0) {
		tmp = t - ((x * a) / z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((t - x) * (y / a))
	tmp = 0
	if a <= -4.05e-19:
		tmp = t_1
	elif a <= 4.6e-106:
		tmp = t + ((x - t) / (z / y))
	elif a <= 5.2e-26:
		tmp = (t - x) * (y / (a - z))
	elif a <= 2080000000.0:
		tmp = t - ((x * a) / z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a)))
	tmp = 0.0
	if (a <= -4.05e-19)
		tmp = t_1;
	elseif (a <= 4.6e-106)
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / y)));
	elseif (a <= 5.2e-26)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	elseif (a <= 2080000000.0)
		tmp = Float64(t - Float64(Float64(x * a) / z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((t - x) * (y / a));
	tmp = 0.0;
	if (a <= -4.05e-19)
		tmp = t_1;
	elseif (a <= 4.6e-106)
		tmp = t + ((x - t) / (z / y));
	elseif (a <= 5.2e-26)
		tmp = (t - x) * (y / (a - z));
	elseif (a <= 2080000000.0)
		tmp = t - ((x * a) / z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.05e-19], t$95$1, If[LessEqual[a, 4.6e-106], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.2e-26], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2080000000.0], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -4.05 \cdot 10^{-19}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 4.6 \cdot 10^{-106}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{-26}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\

\mathbf{elif}\;a \leq 2080000000:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -4.05000000000000012e-19 or 2.08e9 < a

    1. Initial program 89.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 61.2%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*73.0%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/73.0%

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]
    5. Simplified73.0%

      \[\leadsto \color{blue}{x + \frac{y}{a} \cdot \left(t - x\right)} \]

    if -4.05000000000000012e-19 < a < 4.6000000000000002e-106

    1. Initial program 68.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 82.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+82.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--82.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-sub82.0%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg82.0%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg82.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--82.0%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*88.2%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified88.2%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 84.7%

      \[\leadsto t - \frac{t - x}{\color{blue}{\frac{z}{y}}} \]

    if 4.6000000000000002e-106 < a < 5.2000000000000002e-26

    1. Initial program 87.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 73.8%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub73.8%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-*r/67.7%

        \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
      3. associate-/l*73.8%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/74.0%

        \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    5. Simplified74.0%

      \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]

    if 5.2000000000000002e-26 < a < 2.08e9

    1. Initial program 55.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 83.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+83.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--83.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-sub83.5%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg83.5%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg83.5%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--83.5%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*83.4%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified83.4%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 77.1%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-/l*77.1%

        \[\leadsto t - -1 \cdot \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
      2. neg-mul-177.1%

        \[\leadsto t - \color{blue}{\left(-\frac{x}{\frac{z}{y - a}}\right)} \]
      3. distribute-neg-frac77.1%

        \[\leadsto t - \color{blue}{\frac{-x}{\frac{z}{y - a}}} \]
    8. Simplified77.1%

      \[\leadsto t - \color{blue}{\frac{-x}{\frac{z}{y - a}}} \]
    9. Taylor expanded in y around 0 75.3%

      \[\leadsto t - \color{blue}{\frac{a \cdot x}{z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification78.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.05 \cdot 10^{-19}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{-106}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-26}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{elif}\;a \leq 2080000000:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 46.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{if}\;a \leq -9.5 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-276}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-290}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+19}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (- 1.0 (/ y z)))))
   (if (<= a -9.5e-28)
     x
     (if (<= a -1.2e-276)
       t_1
       (if (<= a 1.85e-290) (/ x (/ z y)) (if (<= a 6.5e+19) t_1 x))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * (1.0 - (y / z));
	double tmp;
	if (a <= -9.5e-28) {
		tmp = x;
	} else if (a <= -1.2e-276) {
		tmp = t_1;
	} else if (a <= 1.85e-290) {
		tmp = x / (z / y);
	} else if (a <= 6.5e+19) {
		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 * (1.0d0 - (y / z))
    if (a <= (-9.5d-28)) then
        tmp = x
    else if (a <= (-1.2d-276)) then
        tmp = t_1
    else if (a <= 1.85d-290) then
        tmp = x / (z / y)
    else if (a <= 6.5d+19) 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 * (1.0 - (y / z));
	double tmp;
	if (a <= -9.5e-28) {
		tmp = x;
	} else if (a <= -1.2e-276) {
		tmp = t_1;
	} else if (a <= 1.85e-290) {
		tmp = x / (z / y);
	} else if (a <= 6.5e+19) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * (1.0 - (y / z))
	tmp = 0
	if a <= -9.5e-28:
		tmp = x
	elif a <= -1.2e-276:
		tmp = t_1
	elif a <= 1.85e-290:
		tmp = x / (z / y)
	elif a <= 6.5e+19:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if (a <= -9.5e-28)
		tmp = x;
	elseif (a <= -1.2e-276)
		tmp = t_1;
	elseif (a <= 1.85e-290)
		tmp = Float64(x / Float64(z / y));
	elseif (a <= 6.5e+19)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * (1.0 - (y / z));
	tmp = 0.0;
	if (a <= -9.5e-28)
		tmp = x;
	elseif (a <= -1.2e-276)
		tmp = t_1;
	elseif (a <= 1.85e-290)
		tmp = x / (z / y);
	elseif (a <= 6.5e+19)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.5e-28], x, If[LessEqual[a, -1.2e-276], t$95$1, If[LessEqual[a, 1.85e-290], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e+19], t$95$1, x]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;a \leq -9.5 \cdot 10^{-28}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -1.2 \cdot 10^{-276}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 1.85 \cdot 10^{-290}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\

\mathbf{elif}\;a \leq 6.5 \cdot 10^{+19}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.50000000000000001e-28 or 6.5e19 < a

    1. Initial program 87.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 42.5%

      \[\leadsto \color{blue}{x} \]

    if -9.50000000000000001e-28 < a < -1.19999999999999991e-276 or 1.84999999999999989e-290 < a < 6.5e19

    1. Initial program 70.7%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 76.1%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+76.1%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--76.1%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub76.1%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg76.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg76.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--76.1%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*80.2%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified80.2%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 73.7%

      \[\leadsto t - \frac{t - x}{\color{blue}{\frac{z}{y}}} \]
    7. Taylor expanded in t around inf 55.0%

      \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y}{z}\right)} \]

    if -1.19999999999999991e-276 < a < 1.84999999999999989e-290

    1. Initial program 68.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 93.4%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+93.4%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--93.4%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub93.4%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg93.4%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg93.4%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--93.4%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*100.0%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 87.1%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-/l*93.8%

        \[\leadsto t - -1 \cdot \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
      2. neg-mul-193.8%

        \[\leadsto t - \color{blue}{\left(-\frac{x}{\frac{z}{y - a}}\right)} \]
      3. distribute-neg-frac93.8%

        \[\leadsto t - \color{blue}{\frac{-x}{\frac{z}{y - a}}} \]
    8. Simplified93.8%

      \[\leadsto t - \color{blue}{\frac{-x}{\frac{z}{y - a}}} \]
    9. Taylor expanded in y around inf 74.2%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. associate-/l*80.8%

        \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
    11. Simplified80.8%

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.2 \cdot 10^{-276}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-290}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+19}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 64.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.78 \cdot 10^{-19}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-203}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+92}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.78e-19)
   (+ t (* x (/ y z)))
   (if (<= z 4e-203)
     (+ x (* (- t x) (/ y a)))
     (if (<= z 6.2e+92) (* (- t x) (/ y (- a z))) (+ t (* y (/ x z)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.78e-19) {
		tmp = t + (x * (y / z));
	} else if (z <= 4e-203) {
		tmp = x + ((t - x) * (y / a));
	} else if (z <= 6.2e+92) {
		tmp = (t - x) * (y / (a - z));
	} else {
		tmp = t + (y * (x / 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.78d-19)) then
        tmp = t + (x * (y / z))
    else if (z <= 4d-203) then
        tmp = x + ((t - x) * (y / a))
    else if (z <= 6.2d+92) then
        tmp = (t - x) * (y / (a - z))
    else
        tmp = t + (y * (x / 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.78e-19) {
		tmp = t + (x * (y / z));
	} else if (z <= 4e-203) {
		tmp = x + ((t - x) * (y / a));
	} else if (z <= 6.2e+92) {
		tmp = (t - x) * (y / (a - z));
	} else {
		tmp = t + (y * (x / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.78e-19:
		tmp = t + (x * (y / z))
	elif z <= 4e-203:
		tmp = x + ((t - x) * (y / a))
	elif z <= 6.2e+92:
		tmp = (t - x) * (y / (a - z))
	else:
		tmp = t + (y * (x / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.78e-19)
		tmp = Float64(t + Float64(x * Float64(y / z)));
	elseif (z <= 4e-203)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	elseif (z <= 6.2e+92)
		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
	else
		tmp = Float64(t + Float64(y * Float64(x / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.78e-19)
		tmp = t + (x * (y / z));
	elseif (z <= 4e-203)
		tmp = x + ((t - x) * (y / a));
	elseif (z <= 6.2e+92)
		tmp = (t - x) * (y / (a - z));
	else
		tmp = t + (y * (x / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.78e-19], N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-203], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+92], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.78 \cdot 10^{-19}:\\
\;\;\;\;t + x \cdot \frac{y}{z}\\

\mathbf{elif}\;z \leq 4 \cdot 10^{-203}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 6.2 \cdot 10^{+92}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\

\mathbf{else}:\\
\;\;\;\;t + y \cdot \frac{x}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.78000000000000011e-19

    1. Initial program 54.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 67.1%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+67.1%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--67.1%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub67.1%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg67.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg67.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--67.1%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*75.9%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified75.9%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 58.9%

      \[\leadsto t - \frac{t - x}{\color{blue}{\frac{z}{y}}} \]
    7. Taylor expanded in t around 0 52.8%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    8. Step-by-step derivation
      1. associate-*r/54.3%

        \[\leadsto t - -1 \cdot \color{blue}{\left(x \cdot \frac{y}{z}\right)} \]
      2. neg-mul-154.3%

        \[\leadsto t - \color{blue}{\left(-x \cdot \frac{y}{z}\right)} \]
      3. distribute-rgt-neg-in54.3%

        \[\leadsto t - \color{blue}{x \cdot \left(-\frac{y}{z}\right)} \]
      4. distribute-neg-frac54.3%

        \[\leadsto t - x \cdot \color{blue}{\frac{-y}{z}} \]
    9. Simplified54.3%

      \[\leadsto t - \color{blue}{x \cdot \frac{-y}{z}} \]

    if -1.78000000000000011e-19 < z < 4.0000000000000001e-203

    1. Initial program 96.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 83.6%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*88.7%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/86.8%

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]
    5. Simplified86.8%

      \[\leadsto \color{blue}{x + \frac{y}{a} \cdot \left(t - x\right)} \]

    if 4.0000000000000001e-203 < z < 6.2000000000000004e92

    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 58.9%

      \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
    4. Step-by-step derivation
      1. div-sub59.1%

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
      2. associate-*r/51.6%

        \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
      3. associate-/l*59.0%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
      4. associate-/r/62.6%

        \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]
    5. Simplified62.6%

      \[\leadsto \color{blue}{\frac{y}{a - z} \cdot \left(t - x\right)} \]

    if 6.2000000000000004e92 < z

    1. Initial program 64.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 67.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+67.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--67.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-sub67.3%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg67.3%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg67.3%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--67.3%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*84.8%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified84.8%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 70.1%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-/l*80.4%

        \[\leadsto t - -1 \cdot \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
      2. neg-mul-180.4%

        \[\leadsto t - \color{blue}{\left(-\frac{x}{\frac{z}{y - a}}\right)} \]
      3. distribute-neg-frac80.4%

        \[\leadsto t - \color{blue}{\frac{-x}{\frac{z}{y - a}}} \]
    8. Simplified80.4%

      \[\leadsto t - \color{blue}{\frac{-x}{\frac{z}{y - a}}} \]
    9. Taylor expanded in y around inf 66.2%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot y}{z}} \]
    10. Step-by-step derivation
      1. mul-1-neg66.2%

        \[\leadsto t - \color{blue}{\left(-\frac{x \cdot y}{z}\right)} \]
      2. associate-*l/72.5%

        \[\leadsto t - \left(-\color{blue}{\frac{x}{z} \cdot y}\right) \]
      3. *-commutative72.5%

        \[\leadsto t - \left(-\color{blue}{y \cdot \frac{x}{z}}\right) \]
      4. distribute-rgt-neg-in72.5%

        \[\leadsto t - \color{blue}{y \cdot \left(-\frac{x}{z}\right)} \]
      5. distribute-neg-frac72.5%

        \[\leadsto t - y \cdot \color{blue}{\frac{-x}{z}} \]
    11. Simplified72.5%

      \[\leadsto t - \color{blue}{y \cdot \frac{-x}{z}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification71.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.78 \cdot 10^{-19}:\\ \;\;\;\;t + x \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-203}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+92}:\\ \;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + y \cdot \frac{x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 69.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.15 \cdot 10^{-19}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-76}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.15e-19)
   (+ t (/ x (/ z (- y a))))
   (if (<= z 3.2e-76) (+ x (* (- t x) (/ y a))) (+ t (/ (- x t) (/ z y))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.15e-19) {
		tmp = t + (x / (z / (y - a)));
	} else if (z <= 3.2e-76) {
		tmp = x + ((t - x) * (y / a));
	} else {
		tmp = t + ((x - t) / (z / y));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-4.15d-19)) then
        tmp = t + (x / (z / (y - a)))
    else if (z <= 3.2d-76) then
        tmp = x + ((t - x) * (y / a))
    else
        tmp = t + ((x - t) / (z / y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.15e-19) {
		tmp = t + (x / (z / (y - a)));
	} else if (z <= 3.2e-76) {
		tmp = x + ((t - x) * (y / a));
	} else {
		tmp = t + ((x - t) / (z / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.15e-19:
		tmp = t + (x / (z / (y - a)))
	elif z <= 3.2e-76:
		tmp = x + ((t - x) * (y / a))
	else:
		tmp = t + ((x - t) / (z / y))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.15e-19)
		tmp = Float64(t + Float64(x / Float64(z / Float64(y - a))));
	elseif (z <= 3.2e-76)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	else
		tmp = Float64(t + Float64(Float64(x - t) / Float64(z / y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4.15e-19)
		tmp = t + (x / (z / (y - a)));
	elseif (z <= 3.2e-76)
		tmp = x + ((t - x) * (y / a));
	else
		tmp = t + ((x - t) / (z / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.15e-19], N[(t + N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e-76], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.15 \cdot 10^{-19}:\\
\;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{-76}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.1500000000000001e-19

    1. Initial program 54.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 67.1%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+67.1%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--67.1%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub67.1%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg67.1%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg67.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--67.1%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*75.9%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified75.9%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in t around 0 65.8%

      \[\leadsto t - \color{blue}{-1 \cdot \frac{x \cdot \left(y - a\right)}{z}} \]
    7. Step-by-step derivation
      1. associate-/l*71.6%

        \[\leadsto t - -1 \cdot \color{blue}{\frac{x}{\frac{z}{y - a}}} \]
      2. neg-mul-171.6%

        \[\leadsto t - \color{blue}{\left(-\frac{x}{\frac{z}{y - a}}\right)} \]
      3. distribute-neg-frac71.6%

        \[\leadsto t - \color{blue}{\frac{-x}{\frac{z}{y - a}}} \]
    8. Simplified71.6%

      \[\leadsto t - \color{blue}{\frac{-x}{\frac{z}{y - a}}} \]

    if -4.1500000000000001e-19 < z < 3.1999999999999998e-76

    1. Initial program 96.5%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 79.0%

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
    4. Step-by-step derivation
      1. associate-/l*85.0%

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{t - x}}} \]
      2. associate-/r/83.4%

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]
    5. Simplified83.4%

      \[\leadsto \color{blue}{x + \frac{y}{a} \cdot \left(t - x\right)} \]

    if 3.1999999999999998e-76 < z

    1. Initial program 73.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 66.7%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+66.7%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--66.7%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub66.7%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg66.7%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg66.7%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--68.0%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*80.4%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified80.4%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 73.3%

      \[\leadsto t - \frac{t - x}{\color{blue}{\frac{z}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification77.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.15 \cdot 10^{-19}:\\ \;\;\;\;t + \frac{x}{\frac{z}{y - a}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-76}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 37.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -8.6 \cdot 10^{-19}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-290}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+19}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -8.6e-19)
   x
   (if (<= a 6.2e-290) (* x (/ y z)) (if (<= a 6.5e+19) t x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -8.6e-19) {
		tmp = x;
	} else if (a <= 6.2e-290) {
		tmp = x * (y / z);
	} else if (a <= 6.5e+19) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-8.6d-19)) then
        tmp = x
    else if (a <= 6.2d-290) then
        tmp = x * (y / z)
    else if (a <= 6.5d+19) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -8.6e-19) {
		tmp = x;
	} else if (a <= 6.2e-290) {
		tmp = x * (y / z);
	} else if (a <= 6.5e+19) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -8.6e-19:
		tmp = x
	elif a <= 6.2e-290:
		tmp = x * (y / z)
	elif a <= 6.5e+19:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -8.6e-19)
		tmp = x;
	elseif (a <= 6.2e-290)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 6.5e+19)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -8.6e-19)
		tmp = x;
	elseif (a <= 6.2e-290)
		tmp = x * (y / z);
	elseif (a <= 6.5e+19)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.6e-19], x, If[LessEqual[a, 6.2e-290], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e+19], t, x]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{-19}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{-290}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

\mathbf{elif}\;a \leq 6.5 \cdot 10^{+19}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.6e-19 or 6.5e19 < a

    1. Initial program 89.1%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 42.9%

      \[\leadsto \color{blue}{x} \]

    if -8.6e-19 < a < 6.1999999999999998e-290

    1. Initial program 65.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 80.7%

      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+80.7%

        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      2. distribute-lft-out--80.7%

        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
      3. div-sub80.7%

        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      4. mul-1-neg80.7%

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      5. unsub-neg80.7%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      6. distribute-rgt-out--80.7%

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot \left(y - a\right)}}{z} \]
      7. associate-/l*85.2%

        \[\leadsto t - \color{blue}{\frac{t - x}{\frac{z}{y - a}}} \]
    5. Simplified85.2%

      \[\leadsto \color{blue}{t - \frac{t - x}{\frac{z}{y - a}}} \]
    6. Taylor expanded in y around inf 82.1%

      \[\leadsto t - \frac{t - x}{\color{blue}{\frac{z}{y}}} \]
    7. Taylor expanded in t around 0 42.8%

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    8. Step-by-step derivation
      1. associate-*r/46.9%

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    9. Simplified46.9%

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]

    if 6.1999999999999998e-290 < a < 6.5e19

    1. Initial program 72.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 33.6%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.6 \cdot 10^{-19}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-290}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+19}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 38.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -9.2 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+19}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -9.2e-28) x (if (<= a 4.2e+19) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -9.2e-28) {
		tmp = x;
	} else if (a <= 4.2e+19) {
		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 <= (-9.2d-28)) then
        tmp = x
    else if (a <= 4.2d+19) 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 <= -9.2e-28) {
		tmp = x;
	} else if (a <= 4.2e+19) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -9.2e-28:
		tmp = x
	elif a <= 4.2e+19:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -9.2e-28)
		tmp = x;
	elseif (a <= 4.2e+19)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -9.2e-28)
		tmp = x;
	elseif (a <= 4.2e+19)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.2e-28], x, If[LessEqual[a, 4.2e+19], t, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{-28}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 4.2 \cdot 10^{+19}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.19999999999999942e-28 or 4.2e19 < a

    1. Initial program 87.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 42.5%

      \[\leadsto \color{blue}{x} \]

    if -9.19999999999999942e-28 < a < 4.2e19

    1. Initial program 70.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 34.1%

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.2 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+19}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 2.8% accurate, 13.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
def code(x, y, z, t, a):
	return 0.0
function code(x, y, z, t, a)
	return 0.0
end
function tmp = code(x, y, z, t, a)
	tmp = 0.0;
end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 78.4%

    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
  2. Add Preprocessing
  3. Taylor expanded in t around 0 44.1%

    \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\left(-1 \cdot \frac{x}{a - z}\right)} \]
  4. Step-by-step derivation
    1. neg-mul-144.1%

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\left(-\frac{x}{a - z}\right)} \]
    2. distribute-neg-frac44.1%

      \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{-x}{a - z}} \]
  5. Simplified44.1%

    \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\frac{-x}{a - z}} \]
  6. Taylor expanded in z around inf 2.8%

    \[\leadsto \color{blue}{x + -1 \cdot x} \]
  7. Step-by-step derivation
    1. mul-1-neg2.8%

      \[\leadsto x + \color{blue}{\left(-x\right)} \]
    2. sub-neg2.8%

      \[\leadsto \color{blue}{x - x} \]
    3. +-inverses2.8%

      \[\leadsto \color{blue}{0} \]
  8. Simplified2.8%

    \[\leadsto \color{blue}{0} \]
  9. Final simplification2.8%

    \[\leadsto 0 \]
  10. Add Preprocessing

Alternative 26: 24.8% 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 78.4%

    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
  2. Add Preprocessing
  3. Taylor expanded in z around inf 22.8%

    \[\leadsto \color{blue}{t} \]
  4. Final simplification22.8%

    \[\leadsto t \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024020 
(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)))))