Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2

Percentage Accurate: 94.9% → 95.5%
Time: 22.0s
Alternatives: 24
Speedup: 0.8×

Specification

?
\[\begin{array}{l} \\ \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b):
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\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 24 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: 94.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b):
	return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 95.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -9.2 \cdot 10^{+210}:\\ \;\;\;\;\mathsf{fma}\left(y + \left(t + -2\right), b, x - y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + \left(t \cdot \left(b - a\right) - b \cdot \left(2 - y\right)\right)\right) + \left(a - z \cdot \left(y + -1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -9.2e+210)
   (fma (+ y (+ t -2.0)) b (- x (* y z)))
   (+ (+ x (- (* t (- b a)) (* b (- 2.0 y)))) (- a (* z (+ y -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -9.2e+210) {
		tmp = fma((y + (t + -2.0)), b, (x - (y * z)));
	} else {
		tmp = (x + ((t * (b - a)) - (b * (2.0 - y)))) + (a - (z * (y + -1.0)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -9.2e+210)
		tmp = fma(Float64(y + Float64(t + -2.0)), b, Float64(x - Float64(y * z)));
	else
		tmp = Float64(Float64(x + Float64(Float64(t * Float64(b - a)) - Float64(b * Float64(2.0 - y)))) + Float64(a - Float64(z * Float64(y + -1.0))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9.2e+210], N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b + N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision] - N[(b * N[(2.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.2 \cdot 10^{+210}:\\
\;\;\;\;\mathsf{fma}\left(y + \left(t + -2\right), b, x - y \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -9.1999999999999995e210

    1. Initial program 88.9%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y + t\right) - 2, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} \]
      3. associate--l+94.4%

        \[\leadsto \mathsf{fma}\left(\color{blue}{y + \left(t - 2\right)}, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
      4. sub-neg94.4%

        \[\leadsto \mathsf{fma}\left(y + \color{blue}{\left(t + \left(-2\right)\right)}, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
      5. metadata-eval94.4%

        \[\leadsto \mathsf{fma}\left(y + \left(t + \color{blue}{-2}\right), b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
      6. sub-neg94.4%

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) + \left(-\left(t - 1\right) \cdot a\right)}\right) \]
      7. associate-+l-94.4%

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, \color{blue}{x - \left(\left(y - 1\right) \cdot z - \left(-\left(t - 1\right) \cdot a\right)\right)}\right) \]
      8. fma-neg94.4%

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \color{blue}{\mathsf{fma}\left(y - 1, z, -\left(-\left(t - 1\right) \cdot a\right)\right)}\right) \]
      9. sub-neg94.4%

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(\color{blue}{y + \left(-1\right)}, z, -\left(-\left(t - 1\right) \cdot a\right)\right)\right) \]
      10. metadata-eval94.4%

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + \color{blue}{-1}, z, -\left(-\left(t - 1\right) \cdot a\right)\right)\right) \]
      11. remove-double-neg94.4%

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, \color{blue}{\left(t - 1\right) \cdot a}\right)\right) \]
      12. sub-neg94.4%

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot a\right)\right) \]
      13. metadata-eval94.4%

        \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, \left(t + \color{blue}{-1}\right) \cdot a\right)\right) \]
    3. Simplified94.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, \left(t + -1\right) \cdot a\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 89.3%

      \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \color{blue}{y \cdot z}\right) \]

    if -9.1999999999999995e210 < b

    1. Initial program 97.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 99.6%

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

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

Alternative 2: 97.6% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right) \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (fma (+ y (+ t -2.0)) b (- x (fma (+ y -1.0) z (* a (+ t -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
	return fma((y + (t + -2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
}
function code(x, y, z, t, a, b)
	return fma(Float64(y + Float64(t + -2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0)))))
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b + N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Derivation
  1. Initial program 96.5%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y + t\right) - 2, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)} \]
    3. associate--l+98.4%

      \[\leadsto \mathsf{fma}\left(\color{blue}{y + \left(t - 2\right)}, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
    4. sub-neg98.4%

      \[\leadsto \mathsf{fma}\left(y + \color{blue}{\left(t + \left(-2\right)\right)}, b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
    5. metadata-eval98.4%

      \[\leadsto \mathsf{fma}\left(y + \left(t + \color{blue}{-2}\right), b, \left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) \]
    6. sub-neg98.4%

      \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, \color{blue}{\left(x - \left(y - 1\right) \cdot z\right) + \left(-\left(t - 1\right) \cdot a\right)}\right) \]
    7. associate-+l-98.4%

      \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, \color{blue}{x - \left(\left(y - 1\right) \cdot z - \left(-\left(t - 1\right) \cdot a\right)\right)}\right) \]
    8. fma-neg98.4%

      \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \color{blue}{\mathsf{fma}\left(y - 1, z, -\left(-\left(t - 1\right) \cdot a\right)\right)}\right) \]
    9. sub-neg98.4%

      \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(\color{blue}{y + \left(-1\right)}, z, -\left(-\left(t - 1\right) \cdot a\right)\right)\right) \]
    10. metadata-eval98.4%

      \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + \color{blue}{-1}, z, -\left(-\left(t - 1\right) \cdot a\right)\right)\right) \]
    11. remove-double-neg98.4%

      \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, \color{blue}{\left(t - 1\right) \cdot a}\right)\right) \]
    12. sub-neg98.4%

      \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot a\right)\right) \]
    13. metadata-eval98.4%

      \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, \left(t + \color{blue}{-1}\right) \cdot a\right)\right) \]
  3. Simplified98.4%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, \left(t + -1\right) \cdot a\right)\right)} \]
  4. Add Preprocessing
  5. Final simplification98.4%

    \[\leadsto \mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right) \]
  6. Add Preprocessing

Alternative 3: 97.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(y + t\right) - 2\right) + \left(\left(x - z \cdot \left(y + -1\right)\right) + a \cdot \left(1 - t\right)\right)\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (+ (* b (- (+ y t) 2.0)) (+ (- x (* z (+ y -1.0))) (* a (- 1.0 t))))))
   (if (<= t_1 INFINITY) t_1 (* t (- b a)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (b * ((y + t) - 2.0)) + ((x - (z * (y + -1.0))) + (a * (1.0 - t)));
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = t * (b - a);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (b * ((y + t) - 2.0)) + ((x - (z * (y + -1.0))) + (a * (1.0 - t)));
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = t * (b - a);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (b * ((y + t) - 2.0)) + ((x - (z * (y + -1.0))) + (a * (1.0 - t)))
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = t * (b - a)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(b * Float64(Float64(y + t) - 2.0)) + Float64(Float64(x - Float64(z * Float64(y + -1.0))) + Float64(a * Float64(1.0 - t))))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(t * Float64(b - a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (b * ((y + t) - 2.0)) + ((x - (z * (y + -1.0))) + (a * (1.0 - t)));
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = t * (b - a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right) + \left(\left(x - z \cdot \left(y + -1\right)\right) + a \cdot \left(1 - t\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) < +inf.0

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing

    if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b))

    1. Initial program 0.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 67.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot \left(\left(y + t\right) - 2\right) + \left(\left(x - z \cdot \left(y + -1\right)\right) + a \cdot \left(1 - t\right)\right) \leq \infty:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) + \left(\left(x - z \cdot \left(y + -1\right)\right) + a \cdot \left(1 - t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 60.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - z \cdot \left(y + -1\right)\\ t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\ t_3 := \left(x + a\right) - t \cdot a\\ \mathbf{if}\;b \leq -1.75 \cdot 10^{+59}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq -4.6 \cdot 10^{-110}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-215}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;b \leq 0.0074:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 9.8 \cdot 10^{+56} \lor \neg \left(b \leq 7.5 \cdot 10^{+120}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* z (+ y -1.0))))
        (t_2 (* b (- (+ y t) 2.0)))
        (t_3 (- (+ x a) (* t a))))
   (if (<= b -1.75e+59)
     t_2
     (if (<= b -4.6e-110)
       t_1
       (if (<= b 2.6e-215)
         t_3
         (if (<= b 0.0074)
           t_1
           (if (or (<= b 9.8e+56) (not (<= b 7.5e+120))) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (z * (y + -1.0));
	double t_2 = b * ((y + t) - 2.0);
	double t_3 = (x + a) - (t * a);
	double tmp;
	if (b <= -1.75e+59) {
		tmp = t_2;
	} else if (b <= -4.6e-110) {
		tmp = t_1;
	} else if (b <= 2.6e-215) {
		tmp = t_3;
	} else if (b <= 0.0074) {
		tmp = t_1;
	} else if ((b <= 9.8e+56) || !(b <= 7.5e+120)) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x - (z * (y + (-1.0d0)))
    t_2 = b * ((y + t) - 2.0d0)
    t_3 = (x + a) - (t * a)
    if (b <= (-1.75d+59)) then
        tmp = t_2
    else if (b <= (-4.6d-110)) then
        tmp = t_1
    else if (b <= 2.6d-215) then
        tmp = t_3
    else if (b <= 0.0074d0) then
        tmp = t_1
    else if ((b <= 9.8d+56) .or. (.not. (b <= 7.5d+120))) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (z * (y + -1.0));
	double t_2 = b * ((y + t) - 2.0);
	double t_3 = (x + a) - (t * a);
	double tmp;
	if (b <= -1.75e+59) {
		tmp = t_2;
	} else if (b <= -4.6e-110) {
		tmp = t_1;
	} else if (b <= 2.6e-215) {
		tmp = t_3;
	} else if (b <= 0.0074) {
		tmp = t_1;
	} else if ((b <= 9.8e+56) || !(b <= 7.5e+120)) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (z * (y + -1.0))
	t_2 = b * ((y + t) - 2.0)
	t_3 = (x + a) - (t * a)
	tmp = 0
	if b <= -1.75e+59:
		tmp = t_2
	elif b <= -4.6e-110:
		tmp = t_1
	elif b <= 2.6e-215:
		tmp = t_3
	elif b <= 0.0074:
		tmp = t_1
	elif (b <= 9.8e+56) or not (b <= 7.5e+120):
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(z * Float64(y + -1.0)))
	t_2 = Float64(b * Float64(Float64(y + t) - 2.0))
	t_3 = Float64(Float64(x + a) - Float64(t * a))
	tmp = 0.0
	if (b <= -1.75e+59)
		tmp = t_2;
	elseif (b <= -4.6e-110)
		tmp = t_1;
	elseif (b <= 2.6e-215)
		tmp = t_3;
	elseif (b <= 0.0074)
		tmp = t_1;
	elseif ((b <= 9.8e+56) || !(b <= 7.5e+120))
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - (z * (y + -1.0));
	t_2 = b * ((y + t) - 2.0);
	t_3 = (x + a) - (t * a);
	tmp = 0.0;
	if (b <= -1.75e+59)
		tmp = t_2;
	elseif (b <= -4.6e-110)
		tmp = t_1;
	elseif (b <= 2.6e-215)
		tmp = t_3;
	elseif (b <= 0.0074)
		tmp = t_1;
	elseif ((b <= 9.8e+56) || ~((b <= 7.5e+120)))
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + a), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.75e+59], t$95$2, If[LessEqual[b, -4.6e-110], t$95$1, If[LessEqual[b, 2.6e-215], t$95$3, If[LessEqual[b, 0.0074], t$95$1, If[Or[LessEqual[b, 9.8e+56], N[Not[LessEqual[b, 7.5e+120]], $MachinePrecision]], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - z \cdot \left(y + -1\right)\\
t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\
t_3 := \left(x + a\right) - t \cdot a\\
\mathbf{if}\;b \leq -1.75 \cdot 10^{+59}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq -4.6 \cdot 10^{-110}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 2.6 \cdot 10^{-215}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 0.0074:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 9.8 \cdot 10^{+56} \lor \neg \left(b \leq 7.5 \cdot 10^{+120}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.75e59 or 0.0074000000000000003 < b < 9.8000000000000005e56 or 7.5000000000000006e120 < b

    1. Initial program 93.5%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 77.5%

      \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]

    if -1.75e59 < b < -4.6000000000000003e-110 or 2.6e-215 < b < 0.0074000000000000003

    1. Initial program 98.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 79.7%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in b around 0 61.9%

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

    if -4.6000000000000003e-110 < b < 2.6e-215 or 9.8000000000000005e56 < b < 7.5000000000000006e120

    1. Initial program 97.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 100.0%

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(-\left(-1 \cdot a + z \cdot \left(y + \color{blue}{-1}\right)\right)\right) \]
      6. distribute-neg-in92.0%

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

        \[\leadsto \left(x - a \cdot t\right) + \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(-z \cdot \left(y + -1\right)\right)\right) \]
      8. remove-double-neg92.0%

        \[\leadsto \left(x - a \cdot t\right) + \left(\color{blue}{a} + \left(-z \cdot \left(y + -1\right)\right)\right) \]
      9. distribute-rgt-neg-in92.0%

        \[\leadsto \left(x - a \cdot t\right) + \left(a + \color{blue}{z \cdot \left(-\left(y + -1\right)\right)}\right) \]
      10. neg-sub092.0%

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

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \left(0 - \color{blue}{\left(-1 + y\right)}\right)\right) \]
      12. associate--r+92.0%

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \color{blue}{\left(\left(0 - -1\right) - y\right)}\right) \]
      13. metadata-eval92.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.75 \cdot 10^{+59}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -4.6 \cdot 10^{-110}:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-215}:\\ \;\;\;\;\left(x + a\right) - t \cdot a\\ \mathbf{elif}\;b \leq 0.0074:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;b \leq 9.8 \cdot 10^{+56} \lor \neg \left(b \leq 7.5 \cdot 10^{+120}\right):\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + a\right) - t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 39.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(t - 2\right)\\ t_2 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;a \leq -2.2 \cdot 10^{+77}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-155}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq 10^{-308}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 1.16 \cdot 10^{-126}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+109}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- t 2.0))) (t_2 (* a (- 1.0 t))))
   (if (<= a -2.2e+77)
     t_2
     (if (<= a -2.2e-66)
       t_1
       (if (<= a -2.2e-155)
         (* y (- z))
         (if (<= a 1e-308)
           (+ x z)
           (if (<= a 1.16e-126) t_1 (if (<= a 6.5e+109) (+ x z) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (t - 2.0);
	double t_2 = a * (1.0 - t);
	double tmp;
	if (a <= -2.2e+77) {
		tmp = t_2;
	} else if (a <= -2.2e-66) {
		tmp = t_1;
	} else if (a <= -2.2e-155) {
		tmp = y * -z;
	} else if (a <= 1e-308) {
		tmp = x + z;
	} else if (a <= 1.16e-126) {
		tmp = t_1;
	} else if (a <= 6.5e+109) {
		tmp = x + z;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = b * (t - 2.0d0)
    t_2 = a * (1.0d0 - t)
    if (a <= (-2.2d+77)) then
        tmp = t_2
    else if (a <= (-2.2d-66)) then
        tmp = t_1
    else if (a <= (-2.2d-155)) then
        tmp = y * -z
    else if (a <= 1d-308) then
        tmp = x + z
    else if (a <= 1.16d-126) then
        tmp = t_1
    else if (a <= 6.5d+109) then
        tmp = x + z
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * (t - 2.0);
	double t_2 = a * (1.0 - t);
	double tmp;
	if (a <= -2.2e+77) {
		tmp = t_2;
	} else if (a <= -2.2e-66) {
		tmp = t_1;
	} else if (a <= -2.2e-155) {
		tmp = y * -z;
	} else if (a <= 1e-308) {
		tmp = x + z;
	} else if (a <= 1.16e-126) {
		tmp = t_1;
	} else if (a <= 6.5e+109) {
		tmp = x + z;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * (t - 2.0)
	t_2 = a * (1.0 - t)
	tmp = 0
	if a <= -2.2e+77:
		tmp = t_2
	elif a <= -2.2e-66:
		tmp = t_1
	elif a <= -2.2e-155:
		tmp = y * -z
	elif a <= 1e-308:
		tmp = x + z
	elif a <= 1.16e-126:
		tmp = t_1
	elif a <= 6.5e+109:
		tmp = x + z
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(t - 2.0))
	t_2 = Float64(a * Float64(1.0 - t))
	tmp = 0.0
	if (a <= -2.2e+77)
		tmp = t_2;
	elseif (a <= -2.2e-66)
		tmp = t_1;
	elseif (a <= -2.2e-155)
		tmp = Float64(y * Float64(-z));
	elseif (a <= 1e-308)
		tmp = Float64(x + z);
	elseif (a <= 1.16e-126)
		tmp = t_1;
	elseif (a <= 6.5e+109)
		tmp = Float64(x + z);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * (t - 2.0);
	t_2 = a * (1.0 - t);
	tmp = 0.0;
	if (a <= -2.2e+77)
		tmp = t_2;
	elseif (a <= -2.2e-66)
		tmp = t_1;
	elseif (a <= -2.2e-155)
		tmp = y * -z;
	elseif (a <= 1e-308)
		tmp = x + z;
	elseif (a <= 1.16e-126)
		tmp = t_1;
	elseif (a <= 6.5e+109)
		tmp = x + z;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.2e+77], t$95$2, If[LessEqual[a, -2.2e-66], t$95$1, If[LessEqual[a, -2.2e-155], N[(y * (-z)), $MachinePrecision], If[LessEqual[a, 1e-308], N[(x + z), $MachinePrecision], If[LessEqual[a, 1.16e-126], t$95$1, If[LessEqual[a, 6.5e+109], N[(x + z), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(t - 2\right)\\
t_2 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -2.2 \cdot 10^{+77}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq -2.2 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -2.2 \cdot 10^{-155}:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;a \leq 10^{-308}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;a \leq 1.16 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 6.5 \cdot 10^{+109}:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.2e77 or 6.5e109 < a

    1. Initial program 94.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 58.6%

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

    if -2.2e77 < a < -2.2000000000000001e-66 or 9.9999999999999991e-309 < a < 1.16e-126

    1. Initial program 98.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 75.7%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    4. Step-by-step derivation
      1. mul-1-neg75.7%

        \[\leadsto \color{blue}{\left(-y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in75.7%

        \[\leadsto \color{blue}{y \cdot \left(-z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Simplified75.7%

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

      \[\leadsto \color{blue}{b \cdot \left(t - 2\right)} \]

    if -2.2000000000000001e-66 < a < -2.1999999999999999e-155

    1. Initial program 99.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 58.4%

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-rgt-neg-out43.5%

        \[\leadsto \color{blue}{y \cdot \left(-z\right)} \]
    6. Simplified43.5%

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

    if -2.1999999999999999e-155 < a < 9.9999999999999991e-309 or 1.16e-126 < a < 6.5e109

    1. Initial program 96.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 94.7%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in y around 0 66.7%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    5. Step-by-step derivation
      1. neg-mul-166.7%

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - \color{blue}{\left(-z\right)} \]
      2. associate--l+66.7%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - \left(-z\right)\right)} \]
      3. sub-neg66.7%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - \left(-z\right)\right) \]
      4. metadata-eval66.7%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - \left(-z\right)\right) \]
    6. Simplified66.7%

      \[\leadsto \color{blue}{x + \left(b \cdot \left(t + -2\right) - \left(-z\right)\right)} \]
    7. Taylor expanded in b around 0 47.3%

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative47.3%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified47.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.2 \cdot 10^{+77}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-66}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-155}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq 10^{-308}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 1.16 \cdot 10^{-126}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+109}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 80.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -1.42 \cdot 10^{+69}:\\ \;\;\;\;x + t\_1\\ \mathbf{elif}\;b \leq 0.0074 \lor \neg \left(b \leq 3.1 \cdot 10^{+55}\right) \land b \leq 1.45 \cdot 10^{+173}:\\ \;\;\;\;\left(x - t \cdot a\right) + \left(a - z \cdot \left(y + -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 - y \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- (+ y t) 2.0))))
   (if (<= b -1.42e+69)
     (+ x t_1)
     (if (or (<= b 0.0074) (and (not (<= b 3.1e+55)) (<= b 1.45e+173)))
       (+ (- x (* t a)) (- a (* z (+ y -1.0))))
       (- t_1 (* y z))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.42e+69) {
		tmp = x + t_1;
	} else if ((b <= 0.0074) || (!(b <= 3.1e+55) && (b <= 1.45e+173))) {
		tmp = (x - (t * a)) + (a - (z * (y + -1.0)));
	} else {
		tmp = t_1 - (y * z);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * ((y + t) - 2.0d0)
    if (b <= (-1.42d+69)) then
        tmp = x + t_1
    else if ((b <= 0.0074d0) .or. (.not. (b <= 3.1d+55)) .and. (b <= 1.45d+173)) then
        tmp = (x - (t * a)) + (a - (z * (y + (-1.0d0))))
    else
        tmp = t_1 - (y * z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.42e+69) {
		tmp = x + t_1;
	} else if ((b <= 0.0074) || (!(b <= 3.1e+55) && (b <= 1.45e+173))) {
		tmp = (x - (t * a)) + (a - (z * (y + -1.0)));
	} else {
		tmp = t_1 - (y * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * ((y + t) - 2.0)
	tmp = 0
	if b <= -1.42e+69:
		tmp = x + t_1
	elif (b <= 0.0074) or (not (b <= 3.1e+55) and (b <= 1.45e+173)):
		tmp = (x - (t * a)) + (a - (z * (y + -1.0)))
	else:
		tmp = t_1 - (y * z)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(Float64(y + t) - 2.0))
	tmp = 0.0
	if (b <= -1.42e+69)
		tmp = Float64(x + t_1);
	elseif ((b <= 0.0074) || (!(b <= 3.1e+55) && (b <= 1.45e+173)))
		tmp = Float64(Float64(x - Float64(t * a)) + Float64(a - Float64(z * Float64(y + -1.0))));
	else
		tmp = Float64(t_1 - Float64(y * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * ((y + t) - 2.0);
	tmp = 0.0;
	if (b <= -1.42e+69)
		tmp = x + t_1;
	elseif ((b <= 0.0074) || (~((b <= 3.1e+55)) && (b <= 1.45e+173)))
		tmp = (x - (t * a)) + (a - (z * (y + -1.0)));
	else
		tmp = t_1 - (y * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.42e+69], N[(x + t$95$1), $MachinePrecision], If[Or[LessEqual[b, 0.0074], And[N[Not[LessEqual[b, 3.1e+55]], $MachinePrecision], LessEqual[b, 1.45e+173]]], N[(N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(a - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(y * z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.42 \cdot 10^{+69}:\\
\;\;\;\;x + t\_1\\

\mathbf{elif}\;b \leq 0.0074 \lor \neg \left(b \leq 3.1 \cdot 10^{+55}\right) \land b \leq 1.45 \cdot 10^{+173}:\\
\;\;\;\;\left(x - t \cdot a\right) + \left(a - z \cdot \left(y + -1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.42e69

    1. Initial program 93.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 84.4%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in z around 0 78.6%

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

    if -1.42e69 < b < 0.0074000000000000003 or 3.09999999999999994e55 < b < 1.45000000000000003e173

    1. Initial program 97.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 99.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(\color{blue}{a} + \left(-z \cdot \left(y + -1\right)\right)\right) \]
      9. distribute-rgt-neg-in86.4%

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \left(0 - \color{blue}{\left(-1 + y\right)}\right)\right) \]
      12. associate--r+86.4%

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

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

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

    if 0.0074000000000000003 < b < 3.09999999999999994e55 or 1.45000000000000003e173 < b

    1. Initial program 97.2%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 94.7%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    4. Step-by-step derivation
      1. mul-1-neg94.7%

        \[\leadsto \color{blue}{\left(-y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in94.7%

        \[\leadsto \color{blue}{y \cdot \left(-z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Simplified94.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.42 \cdot 10^{+69}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 0.0074 \lor \neg \left(b \leq 3.1 \cdot 10^{+55}\right) \land b \leq 1.45 \cdot 10^{+173}:\\ \;\;\;\;\left(x - t \cdot a\right) + \left(a - z \cdot \left(y + -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - y \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 57.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z + b \cdot \left(t - 2\right)\\ t_2 := \left(x + z\right) + -2 \cdot b\\ t_3 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -3000000000000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-151}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-272}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-266}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 0.059:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ z (* b (- t 2.0))))
        (t_2 (+ (+ x z) (* -2.0 b)))
        (t_3 (* y (- b z))))
   (if (<= y -3000000000000.0)
     t_3
     (if (<= y -2.1e-151)
       t_1
       (if (<= y -2.7e-272)
         t_2
         (if (<= y 6.5e-266) t_1 (if (<= y 0.059) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (b * (t - 2.0));
	double t_2 = (x + z) + (-2.0 * b);
	double t_3 = y * (b - z);
	double tmp;
	if (y <= -3000000000000.0) {
		tmp = t_3;
	} else if (y <= -2.1e-151) {
		tmp = t_1;
	} else if (y <= -2.7e-272) {
		tmp = t_2;
	} else if (y <= 6.5e-266) {
		tmp = t_1;
	} else if (y <= 0.059) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = z + (b * (t - 2.0d0))
    t_2 = (x + z) + ((-2.0d0) * b)
    t_3 = y * (b - z)
    if (y <= (-3000000000000.0d0)) then
        tmp = t_3
    else if (y <= (-2.1d-151)) then
        tmp = t_1
    else if (y <= (-2.7d-272)) then
        tmp = t_2
    else if (y <= 6.5d-266) then
        tmp = t_1
    else if (y <= 0.059d0) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z + (b * (t - 2.0));
	double t_2 = (x + z) + (-2.0 * b);
	double t_3 = y * (b - z);
	double tmp;
	if (y <= -3000000000000.0) {
		tmp = t_3;
	} else if (y <= -2.1e-151) {
		tmp = t_1;
	} else if (y <= -2.7e-272) {
		tmp = t_2;
	} else if (y <= 6.5e-266) {
		tmp = t_1;
	} else if (y <= 0.059) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z + (b * (t - 2.0))
	t_2 = (x + z) + (-2.0 * b)
	t_3 = y * (b - z)
	tmp = 0
	if y <= -3000000000000.0:
		tmp = t_3
	elif y <= -2.1e-151:
		tmp = t_1
	elif y <= -2.7e-272:
		tmp = t_2
	elif y <= 6.5e-266:
		tmp = t_1
	elif y <= 0.059:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z + Float64(b * Float64(t - 2.0)))
	t_2 = Float64(Float64(x + z) + Float64(-2.0 * b))
	t_3 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -3000000000000.0)
		tmp = t_3;
	elseif (y <= -2.1e-151)
		tmp = t_1;
	elseif (y <= -2.7e-272)
		tmp = t_2;
	elseif (y <= 6.5e-266)
		tmp = t_1;
	elseif (y <= 0.059)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z + (b * (t - 2.0));
	t_2 = (x + z) + (-2.0 * b);
	t_3 = y * (b - z);
	tmp = 0.0;
	if (y <= -3000000000000.0)
		tmp = t_3;
	elseif (y <= -2.1e-151)
		tmp = t_1;
	elseif (y <= -2.7e-272)
		tmp = t_2;
	elseif (y <= 6.5e-266)
		tmp = t_1;
	elseif (y <= 0.059)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + z), $MachinePrecision] + N[(-2.0 * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3000000000000.0], t$95$3, If[LessEqual[y, -2.1e-151], t$95$1, If[LessEqual[y, -2.7e-272], t$95$2, If[LessEqual[y, 6.5e-266], t$95$1, If[LessEqual[y, 0.059], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z + b \cdot \left(t - 2\right)\\
t_2 := \left(x + z\right) + -2 \cdot b\\
t_3 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -3000000000000:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y \leq -2.1 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.7 \cdot 10^{-272}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq 6.5 \cdot 10^{-266}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 0.059:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3e12 or 0.058999999999999997 < y

    1. Initial program 93.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 68.4%

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

    if -3e12 < y < -2.0999999999999999e-151 or -2.69999999999999993e-272 < y < 6.50000000000000024e-266

    1. Initial program 96.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 76.3%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in y around 0 71.1%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    5. Step-by-step derivation
      1. neg-mul-171.1%

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - \color{blue}{\left(-z\right)} \]
      2. associate--l+71.1%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - \left(-z\right)\right)} \]
      3. sub-neg71.1%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - \left(-z\right)\right) \]
      4. metadata-eval71.1%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - \left(-z\right)\right) \]
    6. Simplified71.1%

      \[\leadsto \color{blue}{x + \left(b \cdot \left(t + -2\right) - \left(-z\right)\right)} \]
    7. Taylor expanded in x around 0 58.9%

      \[\leadsto \color{blue}{z + b \cdot \left(t - 2\right)} \]

    if -2.0999999999999999e-151 < y < -2.69999999999999993e-272 or 6.50000000000000024e-266 < y < 0.058999999999999997

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 73.9%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in y around 0 73.9%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    5. Step-by-step derivation
      1. neg-mul-173.9%

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - \color{blue}{\left(-z\right)} \]
      2. associate--l+73.9%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - \left(-z\right)\right)} \]
      3. sub-neg73.9%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - \left(-z\right)\right) \]
      4. metadata-eval73.9%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - \left(-z\right)\right) \]
    6. Simplified73.9%

      \[\leadsto \color{blue}{x + \left(b \cdot \left(t + -2\right) - \left(-z\right)\right)} \]
    7. Taylor expanded in t around 0 59.6%

      \[\leadsto \color{blue}{x + \left(z + -2 \cdot b\right)} \]
    8. Step-by-step derivation
      1. associate-+r+59.6%

        \[\leadsto \color{blue}{\left(x + z\right) + -2 \cdot b} \]
      2. +-commutative59.6%

        \[\leadsto \color{blue}{\left(z + x\right)} + -2 \cdot b \]
      3. *-commutative59.6%

        \[\leadsto \left(z + x\right) + \color{blue}{b \cdot -2} \]
    9. Simplified59.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3000000000000:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -2.1 \cdot 10^{-151}:\\ \;\;\;\;z + b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-272}:\\ \;\;\;\;\left(x + z\right) + -2 \cdot b\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-266}:\\ \;\;\;\;z + b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 0.059:\\ \;\;\;\;\left(x + z\right) + -2 \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 39.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -3800:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -4 \cdot 10^{-159}:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;a \leq -8 \cdot 10^{-309}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;a \leq 1.4 \cdot 10^{-275}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;a \leq 7 \cdot 10^{+109}:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3800 or 6.99999999999999966e109 < a

    1. Initial program 95.5%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 54.2%

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

    if -3800 < a < -3.99999999999999995e-159

    1. Initial program 97.5%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 49.1%

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
    5. Step-by-step derivation
      1. mul-1-neg33.9%

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-rgt-neg-out33.9%

        \[\leadsto \color{blue}{y \cdot \left(-z\right)} \]
    6. Simplified33.9%

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

    if -3.99999999999999995e-159 < a < -8.0000000000000003e-309 or 1.39999999999999997e-275 < a < 6.99999999999999966e109

    1. Initial program 96.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 95.6%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in y around 0 66.8%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    5. Step-by-step derivation
      1. neg-mul-166.8%

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - \color{blue}{\left(-z\right)} \]
      2. associate--l+66.8%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - \left(-z\right)\right)} \]
      3. sub-neg66.8%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - \left(-z\right)\right) \]
      4. metadata-eval66.8%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - \left(-z\right)\right) \]
    6. Simplified66.8%

      \[\leadsto \color{blue}{x + \left(b \cdot \left(t + -2\right) - \left(-z\right)\right)} \]
    7. Taylor expanded in b around 0 45.0%

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative45.0%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified45.0%

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

    if -8.0000000000000003e-309 < a < 1.39999999999999997e-275

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 47.5%

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

      \[\leadsto \color{blue}{b \cdot t} \]
    5. Step-by-step derivation
      1. *-commutative47.5%

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified47.5%

      \[\leadsto \color{blue}{t \cdot b} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification47.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3800:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-159}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-309}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-275}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+109}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 51.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ \mathbf{if}\;y \leq -5500000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-210}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-275}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-276}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 0.059:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))))
   (if (<= y -5500000000000.0)
     t_1
     (if (<= y -2e-210)
       (* t (- b a))
       (if (<= y -3.5e-275)
         (+ x z)
         (if (<= y 1.15e-276)
           (* b (- t 2.0))
           (if (<= y 0.059) (+ x z) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double tmp;
	if (y <= -5500000000000.0) {
		tmp = t_1;
	} else if (y <= -2e-210) {
		tmp = t * (b - a);
	} else if (y <= -3.5e-275) {
		tmp = x + z;
	} else if (y <= 1.15e-276) {
		tmp = b * (t - 2.0);
	} else if (y <= 0.059) {
		tmp = x + z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (b - z)
    if (y <= (-5500000000000.0d0)) then
        tmp = t_1
    else if (y <= (-2d-210)) then
        tmp = t * (b - a)
    else if (y <= (-3.5d-275)) then
        tmp = x + z
    else if (y <= 1.15d-276) then
        tmp = b * (t - 2.0d0)
    else if (y <= 0.059d0) then
        tmp = x + 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 b) {
	double t_1 = y * (b - z);
	double tmp;
	if (y <= -5500000000000.0) {
		tmp = t_1;
	} else if (y <= -2e-210) {
		tmp = t * (b - a);
	} else if (y <= -3.5e-275) {
		tmp = x + z;
	} else if (y <= 1.15e-276) {
		tmp = b * (t - 2.0);
	} else if (y <= 0.059) {
		tmp = x + z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	tmp = 0
	if y <= -5500000000000.0:
		tmp = t_1
	elif y <= -2e-210:
		tmp = t * (b - a)
	elif y <= -3.5e-275:
		tmp = x + z
	elif y <= 1.15e-276:
		tmp = b * (t - 2.0)
	elif y <= 0.059:
		tmp = x + z
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	tmp = 0.0
	if (y <= -5500000000000.0)
		tmp = t_1;
	elseif (y <= -2e-210)
		tmp = Float64(t * Float64(b - a));
	elseif (y <= -3.5e-275)
		tmp = Float64(x + z);
	elseif (y <= 1.15e-276)
		tmp = Float64(b * Float64(t - 2.0));
	elseif (y <= 0.059)
		tmp = Float64(x + z);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	tmp = 0.0;
	if (y <= -5500000000000.0)
		tmp = t_1;
	elseif (y <= -2e-210)
		tmp = t * (b - a);
	elseif (y <= -3.5e-275)
		tmp = x + z;
	elseif (y <= 1.15e-276)
		tmp = b * (t - 2.0);
	elseif (y <= 0.059)
		tmp = x + z;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5500000000000.0], t$95$1, If[LessEqual[y, -2e-210], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.5e-275], N[(x + z), $MachinePrecision], If[LessEqual[y, 1.15e-276], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.059], N[(x + z), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -5500000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2 \cdot 10^{-210}:\\
\;\;\;\;t \cdot \left(b - a\right)\\

\mathbf{elif}\;y \leq -3.5 \cdot 10^{-275}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{-276}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\

\mathbf{elif}\;y \leq 0.059:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.5e12 or 0.058999999999999997 < y

    1. Initial program 93.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 68.4%

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

    if -5.5e12 < y < -2.0000000000000001e-210

    1. Initial program 95.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 46.9%

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

    if -2.0000000000000001e-210 < y < -3.49999999999999969e-275 or 1.14999999999999991e-276 < y < 0.058999999999999997

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 75.7%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in y around 0 75.7%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    5. Step-by-step derivation
      1. neg-mul-175.7%

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - \color{blue}{\left(-z\right)} \]
      2. associate--l+75.7%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - \left(-z\right)\right)} \]
      3. sub-neg75.7%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - \left(-z\right)\right) \]
      4. metadata-eval75.7%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - \left(-z\right)\right) \]
    6. Simplified75.7%

      \[\leadsto \color{blue}{x + \left(b \cdot \left(t + -2\right) - \left(-z\right)\right)} \]
    7. Taylor expanded in b around 0 55.9%

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative55.9%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified55.9%

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

    if -3.49999999999999969e-275 < y < 1.14999999999999991e-276

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 68.5%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    4. Step-by-step derivation
      1. mul-1-neg68.5%

        \[\leadsto \color{blue}{\left(-y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in68.5%

        \[\leadsto \color{blue}{y \cdot \left(-z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Simplified68.5%

      \[\leadsto \color{blue}{y \cdot \left(-z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    6. Taylor expanded in y around 0 68.5%

      \[\leadsto \color{blue}{b \cdot \left(t - 2\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification60.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5500000000000:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-210}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-275}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-276}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 0.059:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 67.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -1.06 \cdot 10^{+69}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 0.0014:\\ \;\;\;\;a + \left(x - z \cdot \left(y + -1\right)\right)\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+55} \lor \neg \left(b \leq 7.5 \cdot 10^{+120}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(x + a\right) - t \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- (+ y t) 2.0))))
   (if (<= b -1.06e+69)
     t_1
     (if (<= b 0.0014)
       (+ a (- x (* z (+ y -1.0))))
       (if (or (<= b 2.5e+55) (not (<= b 7.5e+120)))
         t_1
         (- (+ x a) (* t a)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.06e+69) {
		tmp = t_1;
	} else if (b <= 0.0014) {
		tmp = a + (x - (z * (y + -1.0)));
	} else if ((b <= 2.5e+55) || !(b <= 7.5e+120)) {
		tmp = t_1;
	} else {
		tmp = (x + a) - (t * a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * ((y + t) - 2.0d0)
    if (b <= (-1.06d+69)) then
        tmp = t_1
    else if (b <= 0.0014d0) then
        tmp = a + (x - (z * (y + (-1.0d0))))
    else if ((b <= 2.5d+55) .or. (.not. (b <= 7.5d+120))) then
        tmp = t_1
    else
        tmp = (x + a) - (t * a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.06e+69) {
		tmp = t_1;
	} else if (b <= 0.0014) {
		tmp = a + (x - (z * (y + -1.0)));
	} else if ((b <= 2.5e+55) || !(b <= 7.5e+120)) {
		tmp = t_1;
	} else {
		tmp = (x + a) - (t * a);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * ((y + t) - 2.0)
	tmp = 0
	if b <= -1.06e+69:
		tmp = t_1
	elif b <= 0.0014:
		tmp = a + (x - (z * (y + -1.0)))
	elif (b <= 2.5e+55) or not (b <= 7.5e+120):
		tmp = t_1
	else:
		tmp = (x + a) - (t * a)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(Float64(y + t) - 2.0))
	tmp = 0.0
	if (b <= -1.06e+69)
		tmp = t_1;
	elseif (b <= 0.0014)
		tmp = Float64(a + Float64(x - Float64(z * Float64(y + -1.0))));
	elseif ((b <= 2.5e+55) || !(b <= 7.5e+120))
		tmp = t_1;
	else
		tmp = Float64(Float64(x + a) - Float64(t * a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * ((y + t) - 2.0);
	tmp = 0.0;
	if (b <= -1.06e+69)
		tmp = t_1;
	elseif (b <= 0.0014)
		tmp = a + (x - (z * (y + -1.0)));
	elseif ((b <= 2.5e+55) || ~((b <= 7.5e+120)))
		tmp = t_1;
	else
		tmp = (x + a) - (t * a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.06e+69], t$95$1, If[LessEqual[b, 0.0014], N[(a + N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 2.5e+55], N[Not[LessEqual[b, 7.5e+120]], $MachinePrecision]], t$95$1, N[(N[(x + a), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.06 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 0.0014:\\
\;\;\;\;a + \left(x - z \cdot \left(y + -1\right)\right)\\

\mathbf{elif}\;b \leq 2.5 \cdot 10^{+55} \lor \neg \left(b \leq 7.5 \cdot 10^{+120}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.06000000000000004e69 or 0.00139999999999999999 < b < 2.50000000000000023e55 or 7.5000000000000006e120 < b

    1. Initial program 93.2%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 78.7%

      \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]

    if -1.06000000000000004e69 < b < 0.00139999999999999999

    1. Initial program 99.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 99.3%

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(-z \cdot \left(y + -1\right)\right)\right) \]
      8. remove-double-neg88.6%

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \color{blue}{\left(0 - \left(y + -1\right)\right)}\right) \]
      11. +-commutative88.6%

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \left(0 - \color{blue}{\left(-1 + y\right)}\right)\right) \]
      12. associate--r+88.6%

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \color{blue}{\left(\left(0 - -1\right) - y\right)}\right) \]
      13. metadata-eval88.6%

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

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

      \[\leadsto \color{blue}{a + \left(x + z \cdot \left(1 - y\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative69.2%

        \[\leadsto a + \color{blue}{\left(z \cdot \left(1 - y\right) + x\right)} \]
    9. Simplified69.2%

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

    if 2.50000000000000023e55 < b < 7.5000000000000006e120

    1. Initial program 90.5%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 100.0%

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(-\left(-1 \cdot a + z \cdot \left(y + \color{blue}{-1}\right)\right)\right) \]
      6. distribute-neg-in71.5%

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(\color{blue}{a} + \left(-z \cdot \left(y + -1\right)\right)\right) \]
      9. distribute-rgt-neg-in71.5%

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \left(0 - \color{blue}{\left(-1 + y\right)}\right)\right) \]
      12. associate--r+71.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.06 \cdot 10^{+69}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 0.0014:\\ \;\;\;\;a + \left(x - z \cdot \left(y + -1\right)\right)\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+55} \lor \neg \left(b \leq 7.5 \cdot 10^{+120}\right):\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + a\right) - t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 51.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -3.6 \cdot 10^{-28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -5.7 \cdot 10^{-270}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{-216}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 0.00042:\\ \;\;\;\;x - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* b (- (+ y t) 2.0))))
   (if (<= b -3.6e-28)
     t_1
     (if (<= b -5.7e-270)
       (+ x z)
       (if (<= b 2.3e-216)
         (* a (- 1.0 t))
         (if (<= b 0.00042) (- x (* y z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -3.6e-28) {
		tmp = t_1;
	} else if (b <= -5.7e-270) {
		tmp = x + z;
	} else if (b <= 2.3e-216) {
		tmp = a * (1.0 - t);
	} else if (b <= 0.00042) {
		tmp = x - (y * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = b * ((y + t) - 2.0d0)
    if (b <= (-3.6d-28)) then
        tmp = t_1
    else if (b <= (-5.7d-270)) then
        tmp = x + z
    else if (b <= 2.3d-216) then
        tmp = a * (1.0d0 - t)
    else if (b <= 0.00042d0) then
        tmp = x - (y * 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 b) {
	double t_1 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -3.6e-28) {
		tmp = t_1;
	} else if (b <= -5.7e-270) {
		tmp = x + z;
	} else if (b <= 2.3e-216) {
		tmp = a * (1.0 - t);
	} else if (b <= 0.00042) {
		tmp = x - (y * z);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * ((y + t) - 2.0)
	tmp = 0
	if b <= -3.6e-28:
		tmp = t_1
	elif b <= -5.7e-270:
		tmp = x + z
	elif b <= 2.3e-216:
		tmp = a * (1.0 - t)
	elif b <= 0.00042:
		tmp = x - (y * z)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(Float64(y + t) - 2.0))
	tmp = 0.0
	if (b <= -3.6e-28)
		tmp = t_1;
	elseif (b <= -5.7e-270)
		tmp = Float64(x + z);
	elseif (b <= 2.3e-216)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (b <= 0.00042)
		tmp = Float64(x - Float64(y * z));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = b * ((y + t) - 2.0);
	tmp = 0.0;
	if (b <= -3.6e-28)
		tmp = t_1;
	elseif (b <= -5.7e-270)
		tmp = x + z;
	elseif (b <= 2.3e-216)
		tmp = a * (1.0 - t);
	elseif (b <= 0.00042)
		tmp = x - (y * z);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.6e-28], t$95$1, If[LessEqual[b, -5.7e-270], N[(x + z), $MachinePrecision], If[LessEqual[b, 2.3e-216], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 0.00042], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -3.6 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -5.7 \cdot 10^{-270}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;b \leq 2.3 \cdot 10^{-216}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

\mathbf{elif}\;b \leq 0.00042:\\
\;\;\;\;x - y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.5999999999999999e-28 or 4.2000000000000002e-4 < b

    1. Initial program 93.8%

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

      \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]

    if -3.5999999999999999e-28 < b < -5.7000000000000002e-270

    1. Initial program 99.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 71.1%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in y around 0 56.1%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    5. Step-by-step derivation
      1. neg-mul-156.1%

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - \color{blue}{\left(-z\right)} \]
      2. associate--l+56.1%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - \left(-z\right)\right)} \]
      3. sub-neg56.1%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - \left(-z\right)\right) \]
      4. metadata-eval56.1%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - \left(-z\right)\right) \]
    6. Simplified56.1%

      \[\leadsto \color{blue}{x + \left(b \cdot \left(t + -2\right) - \left(-z\right)\right)} \]
    7. Taylor expanded in b around 0 52.9%

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative52.9%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified52.9%

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

    if -5.7000000000000002e-270 < b < 2.29999999999999997e-216

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 55.9%

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

    if 2.29999999999999997e-216 < b < 4.2000000000000002e-4

    1. Initial program 97.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 79.1%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in b around 0 65.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.6 \cdot 10^{-28}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -5.7 \cdot 10^{-270}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{-216}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 0.00042:\\ \;\;\;\;x - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 60.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - z \cdot \left(y + -1\right)\\ t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -1.15 \cdot 10^{+59}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 7 \cdot 10^{-280}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 6.8 \cdot 10^{-217}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 0.007:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* z (+ y -1.0)))) (t_2 (* b (- (+ y t) 2.0))))
   (if (<= b -1.15e+59)
     t_2
     (if (<= b 7e-280)
       t_1
       (if (<= b 6.8e-217) (* a (- 1.0 t)) (if (<= b 0.007) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (z * (y + -1.0));
	double t_2 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.15e+59) {
		tmp = t_2;
	} else if (b <= 7e-280) {
		tmp = t_1;
	} else if (b <= 6.8e-217) {
		tmp = a * (1.0 - t);
	} else if (b <= 0.007) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x - (z * (y + (-1.0d0)))
    t_2 = b * ((y + t) - 2.0d0)
    if (b <= (-1.15d+59)) then
        tmp = t_2
    else if (b <= 7d-280) then
        tmp = t_1
    else if (b <= 6.8d-217) then
        tmp = a * (1.0d0 - t)
    else if (b <= 0.007d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - (z * (y + -1.0));
	double t_2 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -1.15e+59) {
		tmp = t_2;
	} else if (b <= 7e-280) {
		tmp = t_1;
	} else if (b <= 6.8e-217) {
		tmp = a * (1.0 - t);
	} else if (b <= 0.007) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - (z * (y + -1.0))
	t_2 = b * ((y + t) - 2.0)
	tmp = 0
	if b <= -1.15e+59:
		tmp = t_2
	elif b <= 7e-280:
		tmp = t_1
	elif b <= 6.8e-217:
		tmp = a * (1.0 - t)
	elif b <= 0.007:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(z * Float64(y + -1.0)))
	t_2 = Float64(b * Float64(Float64(y + t) - 2.0))
	tmp = 0.0
	if (b <= -1.15e+59)
		tmp = t_2;
	elseif (b <= 7e-280)
		tmp = t_1;
	elseif (b <= 6.8e-217)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (b <= 0.007)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - (z * (y + -1.0));
	t_2 = b * ((y + t) - 2.0);
	tmp = 0.0;
	if (b <= -1.15e+59)
		tmp = t_2;
	elseif (b <= 7e-280)
		tmp = t_1;
	elseif (b <= 6.8e-217)
		tmp = a * (1.0 - t);
	elseif (b <= 0.007)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.15e+59], t$95$2, If[LessEqual[b, 7e-280], t$95$1, If[LessEqual[b, 6.8e-217], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 0.007], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - z \cdot \left(y + -1\right)\\
t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.15 \cdot 10^{+59}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 7 \cdot 10^{-280}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 6.8 \cdot 10^{-217}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

\mathbf{elif}\;b \leq 0.007:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.15000000000000004e59 or 0.00700000000000000015 < b

    1. Initial program 92.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 69.7%

      \[\leadsto \color{blue}{b \cdot \left(\left(t + y\right) - 2\right)} \]

    if -1.15000000000000004e59 < b < 7.0000000000000002e-280 or 6.80000000000000032e-217 < b < 0.00700000000000000015

    1. Initial program 99.2%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 73.6%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in b around 0 62.6%

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

    if 7.0000000000000002e-280 < b < 6.80000000000000032e-217

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 62.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.15 \cdot 10^{+59}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 7 \cdot 10^{-280}:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{elif}\;b \leq 6.8 \cdot 10^{-217}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 0.007:\\ \;\;\;\;x - z \cdot \left(y + -1\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 95.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -6.6 \cdot 10^{+236}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + \left(t \cdot \left(b - a\right) - b \cdot \left(2 - y\right)\right)\right) + \left(a - z \cdot \left(y + -1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -6.6e+236)
   (+ x (* b (- (+ y t) 2.0)))
   (+ (+ x (- (* t (- b a)) (* b (- 2.0 y)))) (- a (* z (+ y -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -6.6e+236) {
		tmp = x + (b * ((y + t) - 2.0));
	} else {
		tmp = (x + ((t * (b - a)) - (b * (2.0 - y)))) + (a - (z * (y + -1.0)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (b <= (-6.6d+236)) then
        tmp = x + (b * ((y + t) - 2.0d0))
    else
        tmp = (x + ((t * (b - a)) - (b * (2.0d0 - y)))) + (a - (z * (y + (-1.0d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -6.6e+236) {
		tmp = x + (b * ((y + t) - 2.0));
	} else {
		tmp = (x + ((t * (b - a)) - (b * (2.0 - y)))) + (a - (z * (y + -1.0)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -6.6e+236:
		tmp = x + (b * ((y + t) - 2.0))
	else:
		tmp = (x + ((t * (b - a)) - (b * (2.0 - y)))) + (a - (z * (y + -1.0)))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -6.6e+236)
		tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0)));
	else
		tmp = Float64(Float64(x + Float64(Float64(t * Float64(b - a)) - Float64(b * Float64(2.0 - y)))) + Float64(a - Float64(z * Float64(y + -1.0))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (b <= -6.6e+236)
		tmp = x + (b * ((y + t) - 2.0));
	else
		tmp = (x + ((t * (b - a)) - (b * (2.0 - y)))) + (a - (z * (y + -1.0)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.6e+236], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision] - N[(b * N[(2.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.6 \cdot 10^{+236}:\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.5999999999999998e236

    1. Initial program 91.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 84.0%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in z around 0 92.3%

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

    if -6.5999999999999998e236 < b

    1. Initial program 96.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 99.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.6 \cdot 10^{+236}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + \left(t \cdot \left(b - a\right) - b \cdot \left(2 - y\right)\right)\right) + \left(a - z \cdot \left(y + -1\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 45.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -2.5 \cdot 10^{+82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-239}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-277}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+18}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (- b a))))
   (if (<= t -2.5e+82)
     t_1
     (if (<= t -7.5e-239)
       (+ x z)
       (if (<= t 9.5e-277)
         (* a (- 1.0 t))
         (if (<= t 2.25e+18) (+ x z) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double tmp;
	if (t <= -2.5e+82) {
		tmp = t_1;
	} else if (t <= -7.5e-239) {
		tmp = x + z;
	} else if (t <= 9.5e-277) {
		tmp = a * (1.0 - t);
	} else if (t <= 2.25e+18) {
		tmp = x + z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = t * (b - a)
    if (t <= (-2.5d+82)) then
        tmp = t_1
    else if (t <= (-7.5d-239)) then
        tmp = x + z
    else if (t <= 9.5d-277) then
        tmp = a * (1.0d0 - t)
    else if (t <= 2.25d+18) then
        tmp = x + 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 b) {
	double t_1 = t * (b - a);
	double tmp;
	if (t <= -2.5e+82) {
		tmp = t_1;
	} else if (t <= -7.5e-239) {
		tmp = x + z;
	} else if (t <= 9.5e-277) {
		tmp = a * (1.0 - t);
	} else if (t <= 2.25e+18) {
		tmp = x + z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * (b - a)
	tmp = 0
	if t <= -2.5e+82:
		tmp = t_1
	elif t <= -7.5e-239:
		tmp = x + z
	elif t <= 9.5e-277:
		tmp = a * (1.0 - t)
	elif t <= 2.25e+18:
		tmp = x + z
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -2.5e+82)
		tmp = t_1;
	elseif (t <= -7.5e-239)
		tmp = Float64(x + z);
	elseif (t <= 9.5e-277)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (t <= 2.25e+18)
		tmp = Float64(x + z);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * (b - a);
	tmp = 0.0;
	if (t <= -2.5e+82)
		tmp = t_1;
	elseif (t <= -7.5e-239)
		tmp = x + z;
	elseif (t <= 9.5e-277)
		tmp = a * (1.0 - t);
	elseif (t <= 2.25e+18)
		tmp = x + z;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.5e+82], t$95$1, If[LessEqual[t, -7.5e-239], N[(x + z), $MachinePrecision], If[LessEqual[t, 9.5e-277], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e+18], N[(x + z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 9.5 \cdot 10^{-277}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

\mathbf{elif}\;t \leq 2.25 \cdot 10^{+18}:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.50000000000000008e82 or 2.25e18 < t

    1. Initial program 93.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 70.2%

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

    if -2.50000000000000008e82 < t < -7.4999999999999999e-239 or 9.5e-277 < t < 2.25e18

    1. Initial program 98.5%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 85.9%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in y around 0 43.9%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    5. Step-by-step derivation
      1. neg-mul-143.9%

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - \color{blue}{\left(-z\right)} \]
      2. associate--l+43.9%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - \left(-z\right)\right)} \]
      3. sub-neg43.9%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - \left(-z\right)\right) \]
      4. metadata-eval43.9%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - \left(-z\right)\right) \]
    6. Simplified43.9%

      \[\leadsto \color{blue}{x + \left(b \cdot \left(t + -2\right) - \left(-z\right)\right)} \]
    7. Taylor expanded in b around 0 34.5%

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative34.5%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified34.5%

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

    if -7.4999999999999999e-239 < t < 9.5e-277

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 58.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+82}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-239}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-277}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+18}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 85.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+81} \lor \neg \left(a \leq 2.5 \cdot 10^{+111}\right):\\ \;\;\;\;\left(x - t \cdot a\right) + \left(a - z \cdot \left(y + -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + z \cdot \left(1 - y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= a -2.3e+81) (not (<= a 2.5e+111)))
   (+ (- x (* t a)) (- a (* z (+ y -1.0))))
   (+ (+ x (* b (- (+ y t) 2.0))) (* z (- 1.0 y)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -2.3e+81) || !(a <= 2.5e+111)) {
		tmp = (x - (t * a)) + (a - (z * (y + -1.0)));
	} else {
		tmp = (x + (b * ((y + t) - 2.0))) + (z * (1.0 - y));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if ((a <= (-2.3d+81)) .or. (.not. (a <= 2.5d+111))) then
        tmp = (x - (t * a)) + (a - (z * (y + (-1.0d0))))
    else
        tmp = (x + (b * ((y + t) - 2.0d0))) + (z * (1.0d0 - y))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a <= -2.3e+81) || !(a <= 2.5e+111)) {
		tmp = (x - (t * a)) + (a - (z * (y + -1.0)));
	} else {
		tmp = (x + (b * ((y + t) - 2.0))) + (z * (1.0 - y));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (a <= -2.3e+81) or not (a <= 2.5e+111):
		tmp = (x - (t * a)) + (a - (z * (y + -1.0)))
	else:
		tmp = (x + (b * ((y + t) - 2.0))) + (z * (1.0 - y))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((a <= -2.3e+81) || !(a <= 2.5e+111))
		tmp = Float64(Float64(x - Float64(t * a)) + Float64(a - Float64(z * Float64(y + -1.0))));
	else
		tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + Float64(z * Float64(1.0 - y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((a <= -2.3e+81) || ~((a <= 2.5e+111)))
		tmp = (x - (t * a)) + (a - (z * (y + -1.0)));
	else
		tmp = (x + (b * ((y + t) - 2.0))) + (z * (1.0 - y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.3e+81], N[Not[LessEqual[a, 2.5e+111]], $MachinePrecision]], N[(N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(a - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{+81} \lor \neg \left(a \leq 2.5 \cdot 10^{+111}\right):\\
\;\;\;\;\left(x - t \cdot a\right) + \left(a - z \cdot \left(y + -1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + z \cdot \left(1 - y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.2999999999999999e81 or 2.4999999999999998e111 < a

    1. Initial program 94.9%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 97.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(\color{blue}{a} + \left(-z \cdot \left(y + -1\right)\right)\right) \]
      9. distribute-rgt-neg-in87.4%

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \left(0 - \color{blue}{\left(-1 + y\right)}\right)\right) \]
      12. associate--r+87.4%

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

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

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

    if -2.2999999999999999e81 < a < 2.4999999999999998e111

    1. Initial program 97.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 94.3%

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

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

Alternative 16: 36.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \left(-z\right)\\
\mathbf{if}\;y \leq -30500000:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 4.6 \cdot 10^{-277}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 4.4 \cdot 10^{+55}:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.05e7 or 4.40000000000000021e55 < y

    1. Initial program 92.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 71.3%

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

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

        \[\leadsto \color{blue}{-y \cdot z} \]
      2. distribute-rgt-neg-out42.3%

        \[\leadsto \color{blue}{y \cdot \left(-z\right)} \]
    6. Simplified42.3%

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

    if -3.05e7 < y < -4.59999999999999963e-276 or 4.6e-277 < y < 4.40000000000000021e55

    1. Initial program 99.2%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 72.9%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in y around 0 67.5%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    5. Step-by-step derivation
      1. neg-mul-167.5%

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - \color{blue}{\left(-z\right)} \]
      2. associate--l+67.5%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - \left(-z\right)\right)} \]
      3. sub-neg67.5%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - \left(-z\right)\right) \]
      4. metadata-eval67.5%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - \left(-z\right)\right) \]
    6. Simplified67.5%

      \[\leadsto \color{blue}{x + \left(b \cdot \left(t + -2\right) - \left(-z\right)\right)} \]
    7. Taylor expanded in b around 0 43.2%

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative43.2%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified43.2%

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

    if -4.59999999999999963e-276 < y < 4.6e-277

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 65.9%

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

      \[\leadsto \color{blue}{b \cdot t} \]
    5. Step-by-step derivation
      1. *-commutative48.4%

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified48.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -30500000:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-276}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{-277}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+55}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 71.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -0.82:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 1.3 \cdot 10^{-239}:\\
\;\;\;\;\left(a + \left(x + z\right)\right) - t \cdot a\\

\mathbf{elif}\;b \leq 0.0072:\\
\;\;\;\;a + \left(x - z \cdot \left(y + -1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -0.819999999999999951 or 0.0071999999999999998 < b

    1. Initial program 93.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 85.2%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in z around 0 74.5%

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

    if -0.819999999999999951 < b < 1.30000000000000001e-239

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 100.0%

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(-\left(-1 \cdot a + z \cdot \left(y + \color{blue}{-1}\right)\right)\right) \]
      6. distribute-neg-in94.5%

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(\color{blue}{a} + \left(-z \cdot \left(y + -1\right)\right)\right) \]
      9. distribute-rgt-neg-in94.5%

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \left(0 - \color{blue}{\left(-1 + y\right)}\right)\right) \]
      12. associate--r+94.5%

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

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

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

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

    if 1.30000000000000001e-239 < b < 0.0071999999999999998

    1. Initial program 97.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \left(0 - \color{blue}{\left(-1 + y\right)}\right)\right) \]
      12. associate--r+84.3%

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

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

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

      \[\leadsto \color{blue}{a + \left(x + z \cdot \left(1 - y\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative75.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -0.82:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{-239}:\\ \;\;\;\;\left(a + \left(x + z\right)\right) - t \cdot a\\ \mathbf{elif}\;b \leq 0.0072:\\ \;\;\;\;a + \left(x - z \cdot \left(y + -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 69.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -3.15 \cdot 10^{-46}:\\
\;\;\;\;t\_1 - y \cdot z\\

\mathbf{elif}\;b \leq 5.5 \cdot 10^{-239}:\\
\;\;\;\;\left(a + \left(x + z\right)\right) - t \cdot a\\

\mathbf{elif}\;b \leq 0.0039:\\
\;\;\;\;a + \left(x - z \cdot \left(y + -1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.15e-46

    1. Initial program 95.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 72.0%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    4. Step-by-step derivation
      1. mul-1-neg72.0%

        \[\leadsto \color{blue}{\left(-y \cdot z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
      2. distribute-rgt-neg-in72.0%

        \[\leadsto \color{blue}{y \cdot \left(-z\right)} + \left(\left(y + t\right) - 2\right) \cdot b \]
    5. Simplified72.0%

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

    if -3.15e-46 < b < 5.49999999999999978e-239

    1. Initial program 100.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \left(0 - \color{blue}{\left(-1 + y\right)}\right)\right) \]
      12. associate--r+95.3%

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

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

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

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

    if 5.49999999999999978e-239 < b < 0.0038999999999999998

    1. Initial program 97.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \left(0 - \color{blue}{\left(-1 + y\right)}\right)\right) \]
      12. associate--r+84.3%

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

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

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

      \[\leadsto \color{blue}{a + \left(x + z \cdot \left(1 - y\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative75.0%

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

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

    if 0.0038999999999999998 < b

    1. Initial program 92.2%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 87.9%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in z around 0 75.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.15 \cdot 10^{-46}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - y \cdot z\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{-239}:\\ \;\;\;\;\left(a + \left(x + z\right)\right) - t \cdot a\\ \mathbf{elif}\;b \leq 0.0039:\\ \;\;\;\;a + \left(x - z \cdot \left(y + -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 71.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -0.36 \lor \neg \left(b \leq 0.0074\right):\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(x - z \cdot \left(y + -1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= b -0.36) (not (<= b 0.0074)))
   (+ x (* b (- (+ y t) 2.0)))
   (+ a (- x (* z (+ y -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -0.36) || !(b <= 0.0074)) {
		tmp = x + (b * ((y + t) - 2.0));
	} else {
		tmp = a + (x - (z * (y + -1.0)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if ((b <= (-0.36d0)) .or. (.not. (b <= 0.0074d0))) then
        tmp = x + (b * ((y + t) - 2.0d0))
    else
        tmp = a + (x - (z * (y + (-1.0d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -0.36) || !(b <= 0.0074)) {
		tmp = x + (b * ((y + t) - 2.0));
	} else {
		tmp = a + (x - (z * (y + -1.0)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (b <= -0.36) or not (b <= 0.0074):
		tmp = x + (b * ((y + t) - 2.0))
	else:
		tmp = a + (x - (z * (y + -1.0)))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((b <= -0.36) || !(b <= 0.0074))
		tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0)));
	else
		tmp = Float64(a + Float64(x - Float64(z * Float64(y + -1.0))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((b <= -0.36) || ~((b <= 0.0074)))
		tmp = x + (b * ((y + t) - 2.0));
	else
		tmp = a + (x - (z * (y + -1.0)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -0.36], N[Not[LessEqual[b, 0.0074]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -0.36 \lor \neg \left(b \leq 0.0074\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -0.35999999999999999 or 0.0074000000000000003 < b

    1. Initial program 93.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 85.2%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in z around 0 74.5%

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

    if -0.35999999999999999 < b < 0.0074000000000000003

    1. Initial program 99.2%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 99.2%

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(-\left(-1 \cdot a + z \cdot \left(y + \color{blue}{-1}\right)\right)\right) \]
      6. distribute-neg-in90.9%

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

        \[\leadsto \left(x - a \cdot t\right) + \left(\left(-\color{blue}{\left(-a\right)}\right) + \left(-z \cdot \left(y + -1\right)\right)\right) \]
      8. remove-double-neg90.9%

        \[\leadsto \left(x - a \cdot t\right) + \left(\color{blue}{a} + \left(-z \cdot \left(y + -1\right)\right)\right) \]
      9. distribute-rgt-neg-in90.9%

        \[\leadsto \left(x - a \cdot t\right) + \left(a + \color{blue}{z \cdot \left(-\left(y + -1\right)\right)}\right) \]
      10. neg-sub090.9%

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \color{blue}{\left(0 - \left(y + -1\right)\right)}\right) \]
      11. +-commutative90.9%

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \left(0 - \color{blue}{\left(-1 + y\right)}\right)\right) \]
      12. associate--r+90.9%

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \color{blue}{\left(\left(0 - -1\right) - y\right)}\right) \]
      13. metadata-eval90.9%

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

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

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

        \[\leadsto a + \color{blue}{\left(z \cdot \left(1 - y\right) + x\right)} \]
    9. Simplified71.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -0.36 \lor \neg \left(b \leq 0.0074\right):\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(x - z \cdot \left(y + -1\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 24.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.1 \cdot 10^{+127}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-210}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-16}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -6.1e+127)
   (* t b)
   (if (<= t -3.1e-210) z (if (<= t 3.3e-16) x (* t b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -6.1e+127) {
		tmp = t * b;
	} else if (t <= -3.1e-210) {
		tmp = z;
	} else if (t <= 3.3e-16) {
		tmp = x;
	} else {
		tmp = t * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (t <= (-6.1d+127)) then
        tmp = t * b
    else if (t <= (-3.1d-210)) then
        tmp = z
    else if (t <= 3.3d-16) then
        tmp = x
    else
        tmp = t * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -6.1e+127) {
		tmp = t * b;
	} else if (t <= -3.1e-210) {
		tmp = z;
	} else if (t <= 3.3e-16) {
		tmp = x;
	} else {
		tmp = t * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -6.1e+127:
		tmp = t * b
	elif t <= -3.1e-210:
		tmp = z
	elif t <= 3.3e-16:
		tmp = x
	else:
		tmp = t * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -6.1e+127)
		tmp = Float64(t * b);
	elseif (t <= -3.1e-210)
		tmp = z;
	elseif (t <= 3.3e-16)
		tmp = x;
	else
		tmp = Float64(t * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -6.1e+127)
		tmp = t * b;
	elseif (t <= -3.1e-210)
		tmp = z;
	elseif (t <= 3.3e-16)
		tmp = x;
	else
		tmp = t * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6.1e+127], N[(t * b), $MachinePrecision], If[LessEqual[t, -3.1e-210], z, If[LessEqual[t, 3.3e-16], x, N[(t * b), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.1 \cdot 10^{+127}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;t \leq -3.1 \cdot 10^{-210}:\\
\;\;\;\;z\\

\mathbf{elif}\;t \leq 3.3 \cdot 10^{-16}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.10000000000000046e127 or 3.29999999999999988e-16 < t

    1. Initial program 93.1%

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

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

      \[\leadsto \color{blue}{b \cdot t} \]
    5. Step-by-step derivation
      1. *-commutative37.5%

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified37.5%

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

    if -6.10000000000000046e127 < t < -3.09999999999999987e-210

    1. Initial program 98.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 82.3%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in y around 0 41.6%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    5. Step-by-step derivation
      1. neg-mul-141.6%

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - \color{blue}{\left(-z\right)} \]
      2. associate--l+41.6%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - \left(-z\right)\right)} \]
      3. sub-neg41.6%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - \left(-z\right)\right) \]
      4. metadata-eval41.6%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - \left(-z\right)\right) \]
    6. Simplified41.6%

      \[\leadsto \color{blue}{x + \left(b \cdot \left(t + -2\right) - \left(-z\right)\right)} \]
    7. Taylor expanded in z around inf 20.6%

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

    if -3.09999999999999987e-210 < t < 3.29999999999999988e-16

    1. Initial program 98.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 25.2%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification28.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.1 \cdot 10^{+127}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-210}:\\ \;\;\;\;z\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-16}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 32.0% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{+127} \lor \neg \left(t \leq 3.5 \cdot 10^{+211}\right):\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.00000000000000068e127 or 3.49999999999999996e211 < t

    1. Initial program 90.6%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 80.8%

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

      \[\leadsto \color{blue}{b \cdot t} \]
    5. Step-by-step derivation
      1. *-commutative47.0%

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified47.0%

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

    if -9.00000000000000068e127 < t < 3.49999999999999996e211

    1. Initial program 98.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 79.6%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in y around 0 42.9%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    5. Step-by-step derivation
      1. neg-mul-142.9%

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - \color{blue}{\left(-z\right)} \]
      2. associate--l+42.9%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - \left(-z\right)\right)} \]
      3. sub-neg42.9%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - \left(-z\right)\right) \]
      4. metadata-eval42.9%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - \left(-z\right)\right) \]
    6. Simplified42.9%

      \[\leadsto \color{blue}{x + \left(b \cdot \left(t + -2\right) - \left(-z\right)\right)} \]
    7. Taylor expanded in b around 0 31.5%

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative31.5%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified31.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{+127} \lor \neg \left(t \leq 3.5 \cdot 10^{+211}\right):\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 32.2% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.22 \cdot 10^{+86}:\\
\;\;\;\;a \cdot \left(-t\right)\\

\mathbf{elif}\;t \leq 3.5 \cdot 10^{+211}:\\
\;\;\;\;x + z\\

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


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

    1. Initial program 93.8%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 97.9%

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

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

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

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

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(-\left(-1 \cdot a + z \cdot \left(y + \color{blue}{-1}\right)\right)\right) \]
      6. distribute-neg-in64.8%

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

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

        \[\leadsto \left(x - a \cdot t\right) + \left(\color{blue}{a} + \left(-z \cdot \left(y + -1\right)\right)\right) \]
      9. distribute-rgt-neg-in64.8%

        \[\leadsto \left(x - a \cdot t\right) + \left(a + \color{blue}{z \cdot \left(-\left(y + -1\right)\right)}\right) \]
      10. neg-sub064.8%

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \color{blue}{\left(0 - \left(y + -1\right)\right)}\right) \]
      11. +-commutative64.8%

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \left(0 - \color{blue}{\left(-1 + y\right)}\right)\right) \]
      12. associate--r+64.8%

        \[\leadsto \left(x - a \cdot t\right) + \left(a + z \cdot \color{blue}{\left(\left(0 - -1\right) - y\right)}\right) \]
      13. metadata-eval64.8%

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

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

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

        \[\leadsto \color{blue}{-a \cdot t} \]
      2. distribute-rgt-neg-out45.4%

        \[\leadsto \color{blue}{a \cdot \left(-t\right)} \]
    9. Simplified45.4%

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

    if -1.21999999999999996e86 < t < 3.49999999999999996e211

    1. Initial program 98.4%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 80.6%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in y around 0 43.4%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    5. Step-by-step derivation
      1. neg-mul-143.4%

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - \color{blue}{\left(-z\right)} \]
      2. associate--l+43.4%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - \left(-z\right)\right)} \]
      3. sub-neg43.4%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - \left(-z\right)\right) \]
      4. metadata-eval43.4%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - \left(-z\right)\right) \]
    6. Simplified43.4%

      \[\leadsto \color{blue}{x + \left(b \cdot \left(t + -2\right) - \left(-z\right)\right)} \]
    7. Taylor expanded in b around 0 31.7%

      \[\leadsto \color{blue}{x + z} \]
    8. Step-by-step derivation
      1. +-commutative31.7%

        \[\leadsto \color{blue}{z + x} \]
    9. Simplified31.7%

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

    if 3.49999999999999996e211 < t

    1. Initial program 85.0%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 80.1%

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

      \[\leadsto \color{blue}{b \cdot t} \]
    5. Step-by-step derivation
      1. *-commutative60.3%

        \[\leadsto \color{blue}{t \cdot b} \]
    6. Simplified60.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.22 \cdot 10^{+86}:\\ \;\;\;\;a \cdot \left(-t\right)\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+211}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 20.9% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -8.6 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 13000000000:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -8.6e+83) x (if (<= x 13000000000.0) z x)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -8.6e+83) {
		tmp = x;
	} else if (x <= 13000000000.0) {
		tmp = z;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (x <= (-8.6d+83)) then
        tmp = x
    else if (x <= 13000000000.0d0) then
        tmp = z
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -8.6e+83) {
		tmp = x;
	} else if (x <= 13000000000.0) {
		tmp = z;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -8.6e+83:
		tmp = x
	elif x <= 13000000000.0:
		tmp = z
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -8.6e+83)
		tmp = x;
	elseif (x <= 13000000000.0)
		tmp = z;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -8.6e+83)
		tmp = x;
	elseif (x <= 13000000000.0)
		tmp = z;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8.6e+83], x, If[LessEqual[x, 13000000000.0], z, x]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq 13000000000:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.6e83 or 1.3e10 < x

    1. Initial program 98.1%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 38.8%

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

    if -8.6e83 < x < 1.3e10

    1. Initial program 95.3%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 70.8%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) - z \cdot \left(y - 1\right)} \]
    4. Taylor expanded in y around 0 37.3%

      \[\leadsto \color{blue}{\left(x + b \cdot \left(t - 2\right)\right) - -1 \cdot z} \]
    5. Step-by-step derivation
      1. neg-mul-137.3%

        \[\leadsto \left(x + b \cdot \left(t - 2\right)\right) - \color{blue}{\left(-z\right)} \]
      2. associate--l+37.3%

        \[\leadsto \color{blue}{x + \left(b \cdot \left(t - 2\right) - \left(-z\right)\right)} \]
      3. sub-neg37.3%

        \[\leadsto x + \left(b \cdot \color{blue}{\left(t + \left(-2\right)\right)} - \left(-z\right)\right) \]
      4. metadata-eval37.3%

        \[\leadsto x + \left(b \cdot \left(t + \color{blue}{-2}\right) - \left(-z\right)\right) \]
    6. Simplified37.3%

      \[\leadsto \color{blue}{x + \left(b \cdot \left(t + -2\right) - \left(-z\right)\right)} \]
    7. Taylor expanded in z around inf 15.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.6 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 13000000000:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 15.6% accurate, 21.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 96.5%

    \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf 17.5%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification17.5%

    \[\leadsto x \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024027 
(FPCore (x y z t a b)
  :name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
  :precision binary64
  (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))