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

Percentage Accurate: 95.2% → 97.5%
Time: 12.1s
Alternatives: 25
Speedup: 0.5×

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 25 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: 95.2% 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: 97.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\ t_2 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + t\_1\\ \mathbf{if}\;t\_2 \leq \infty:\\ \;\;\;\;t\_2\\ \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)))
        (t_2 (+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) t_1)))
   (if (<= t_2 INFINITY) t_2 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 t_2 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + t_1;
	double tmp;
	if (t_2 <= ((double) INFINITY)) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	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);
	double t_2 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + t_1;
	double tmp;
	if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = b * ((y + t) - 2.0)
	t_2 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + t_1
	tmp = 0
	if t_2 <= math.inf:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(b * Float64(Float64(y + t) - 2.0))
	t_2 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + t_1)
	tmp = 0.0
	if (t_2 <= Inf)
		tmp = t_2;
	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);
	t_2 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + t_1;
	tmp = 0.0;
	if (t_2 <= Inf)
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, Infinity], t$95$2, t$95$1]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) 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 #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) 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 b around inf 63.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(y + t\right) - 2\right) \leq \infty:\\ \;\;\;\;\left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\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 95.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. Step-by-step derivation
    1. +-commutative95.7%

      \[\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-define97.2%

      \[\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+97.2%

      \[\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-neg97.2%

      \[\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-eval97.2%

      \[\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-neg97.2%

      \[\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-97.2%

      \[\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-neg97.3%

      \[\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-neg97.3%

      \[\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-eval97.3%

      \[\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-neg97.3%

      \[\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-neg97.3%

      \[\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-eval97.3%

      \[\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. Simplified97.3%

    \[\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 simplification97.3%

    \[\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: 53.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := x + \left(z + a\right)\\ t_3 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{+78}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -5 \cdot 10^{+25}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-209}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+45}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))) (t_2 (+ x (+ z a))) (t_3 (* t (- b a))))
   (if (<= t -2.8e+78)
     t_3
     (if (<= t -5e+25)
       t_1
       (if (<= t -1.35e-209)
         t_2
         (if (<= t 2.2e-82) t_1 (if (<= t 1.2e+45) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = x + (z + a);
	double t_3 = t * (b - a);
	double tmp;
	if (t <= -2.8e+78) {
		tmp = t_3;
	} else if (t <= -5e+25) {
		tmp = t_1;
	} else if (t <= -1.35e-209) {
		tmp = t_2;
	} else if (t <= 2.2e-82) {
		tmp = t_1;
	} else if (t <= 1.2e+45) {
		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 = y * (b - z)
    t_2 = x + (z + a)
    t_3 = t * (b - a)
    if (t <= (-2.8d+78)) then
        tmp = t_3
    else if (t <= (-5d+25)) then
        tmp = t_1
    else if (t <= (-1.35d-209)) then
        tmp = t_2
    else if (t <= 2.2d-82) then
        tmp = t_1
    else if (t <= 1.2d+45) 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 = y * (b - z);
	double t_2 = x + (z + a);
	double t_3 = t * (b - a);
	double tmp;
	if (t <= -2.8e+78) {
		tmp = t_3;
	} else if (t <= -5e+25) {
		tmp = t_1;
	} else if (t <= -1.35e-209) {
		tmp = t_2;
	} else if (t <= 2.2e-82) {
		tmp = t_1;
	} else if (t <= 1.2e+45) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = x + (z + a)
	t_3 = t * (b - a)
	tmp = 0
	if t <= -2.8e+78:
		tmp = t_3
	elif t <= -5e+25:
		tmp = t_1
	elif t <= -1.35e-209:
		tmp = t_2
	elif t <= 2.2e-82:
		tmp = t_1
	elif t <= 1.2e+45:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(x + Float64(z + a))
	t_3 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -2.8e+78)
		tmp = t_3;
	elseif (t <= -5e+25)
		tmp = t_1;
	elseif (t <= -1.35e-209)
		tmp = t_2;
	elseif (t <= 2.2e-82)
		tmp = t_1;
	elseif (t <= 1.2e+45)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	t_2 = x + (z + a);
	t_3 = t * (b - a);
	tmp = 0.0;
	if (t <= -2.8e+78)
		tmp = t_3;
	elseif (t <= -5e+25)
		tmp = t_1;
	elseif (t <= -1.35e-209)
		tmp = t_2;
	elseif (t <= 2.2e-82)
		tmp = t_1;
	elseif (t <= 1.2e+45)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+78], t$95$3, If[LessEqual[t, -5e+25], t$95$1, If[LessEqual[t, -1.35e-209], t$95$2, If[LessEqual[t, 2.2e-82], t$95$1, If[LessEqual[t, 1.2e+45], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -5 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.35 \cdot 10^{-209}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+45}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.8000000000000001e78 or 1.19999999999999995e45 < t

    1. Initial program 93.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 t around inf 76.6%

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

    if -2.8000000000000001e78 < t < -5.00000000000000024e25 or -1.34999999999999999e-209 < t < 2.19999999999999986e-82

    1. Initial program 95.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 y around inf 55.9%

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

    if -5.00000000000000024e25 < t < -1.34999999999999999e-209 or 2.19999999999999986e-82 < t < 1.19999999999999995e45

    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 b around 0 73.9%

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

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

        \[\leadsto \color{blue}{\left(x - -1 \cdot a\right) - z \cdot \left(y - 1\right)} \]
      2. sub-neg70.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-156.3%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg56.3%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+56.3%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    9. Simplified56.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+78}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -5 \cdot 10^{+25}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-209}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-82}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+45}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 35.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -9.4 \cdot 10^{+182}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;t \leq -4 \cdot 10^{+78}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -1 \cdot 10^{+59}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-301}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+43}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -9.4e+182)
   (* t (- a))
   (if (<= t -4e+78)
     (* t b)
     (if (<= t -1e+59)
       (* y b)
       (if (<= t 1.25e-301) (+ x z) (if (<= t 6.5e+43) (+ x a) (* t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -9.4e+182) {
		tmp = t * -a;
	} else if (t <= -4e+78) {
		tmp = t * b;
	} else if (t <= -1e+59) {
		tmp = y * b;
	} else if (t <= 1.25e-301) {
		tmp = x + z;
	} else if (t <= 6.5e+43) {
		tmp = x + a;
	} 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 <= (-9.4d+182)) then
        tmp = t * -a
    else if (t <= (-4d+78)) then
        tmp = t * b
    else if (t <= (-1d+59)) then
        tmp = y * b
    else if (t <= 1.25d-301) then
        tmp = x + z
    else if (t <= 6.5d+43) then
        tmp = x + a
    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 <= -9.4e+182) {
		tmp = t * -a;
	} else if (t <= -4e+78) {
		tmp = t * b;
	} else if (t <= -1e+59) {
		tmp = y * b;
	} else if (t <= 1.25e-301) {
		tmp = x + z;
	} else if (t <= 6.5e+43) {
		tmp = x + a;
	} else {
		tmp = t * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -9.4e+182:
		tmp = t * -a
	elif t <= -4e+78:
		tmp = t * b
	elif t <= -1e+59:
		tmp = y * b
	elif t <= 1.25e-301:
		tmp = x + z
	elif t <= 6.5e+43:
		tmp = x + a
	else:
		tmp = t * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -9.4e+182)
		tmp = Float64(t * Float64(-a));
	elseif (t <= -4e+78)
		tmp = Float64(t * b);
	elseif (t <= -1e+59)
		tmp = Float64(y * b);
	elseif (t <= 1.25e-301)
		tmp = Float64(x + z);
	elseif (t <= 6.5e+43)
		tmp = Float64(x + a);
	else
		tmp = Float64(t * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -9.4e+182)
		tmp = t * -a;
	elseif (t <= -4e+78)
		tmp = t * b;
	elseif (t <= -1e+59)
		tmp = y * b;
	elseif (t <= 1.25e-301)
		tmp = x + z;
	elseif (t <= 6.5e+43)
		tmp = x + a;
	else
		tmp = t * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -9.4e+182], N[(t * (-a)), $MachinePrecision], If[LessEqual[t, -4e+78], N[(t * b), $MachinePrecision], If[LessEqual[t, -1e+59], N[(y * b), $MachinePrecision], If[LessEqual[t, 1.25e-301], N[(x + z), $MachinePrecision], If[LessEqual[t, 6.5e+43], N[(x + a), $MachinePrecision], N[(t * b), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4 \cdot 10^{+78}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;t \leq -1 \cdot 10^{+59}:\\
\;\;\;\;y \cdot b\\

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

\mathbf{elif}\;t \leq 6.5 \cdot 10^{+43}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -9.39999999999999966e182

    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 inf 80.3%

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

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

        \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot t} \]
      2. neg-mul-161.1%

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

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

    if -9.39999999999999966e182 < t < -4.00000000000000003e78 or 6.4999999999999998e43 < t

    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 t around inf 75.1%

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

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

    if -4.00000000000000003e78 < t < -9.99999999999999972e58

    1. Initial program 71.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 b around inf 71.6%

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

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

    if -9.99999999999999972e58 < t < 1.25000000000000003e-301

    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 b around 0 69.6%

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

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

        \[\leadsto \color{blue}{\left(x - -1 \cdot a\right) - z \cdot \left(y - 1\right)} \]
      2. sub-neg65.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-141.7%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg41.7%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+41.7%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    9. Simplified41.7%

      \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    10. Taylor expanded in a around 0 35.0%

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

        \[\leadsto \color{blue}{z + x} \]
    12. Simplified35.0%

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

    if 1.25000000000000003e-301 < t < 6.4999999999999998e43

    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 b around 0 72.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-148.1%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg48.1%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+48.1%

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

      \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    10. Taylor expanded in z around 0 40.0%

      \[\leadsto \color{blue}{a + x} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification45.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.4 \cdot 10^{+182}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;t \leq -4 \cdot 10^{+78}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -1 \cdot 10^{+59}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-301}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+43}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 49.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(b - z\right)\\ t_2 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -4 \cdot 10^{+78}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-208}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+43}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
   (if (<= t -4e+78)
     t_2
     (if (<= t -4.5e+24)
       t_1
       (if (<= t -1.65e-208) (+ x z) (if (<= t 8.5e+43) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -4e+78) {
		tmp = t_2;
	} else if (t <= -4.5e+24) {
		tmp = t_1;
	} else if (t <= -1.65e-208) {
		tmp = x + z;
	} else if (t <= 8.5e+43) {
		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 = y * (b - z)
    t_2 = t * (b - a)
    if (t <= (-4d+78)) then
        tmp = t_2
    else if (t <= (-4.5d+24)) then
        tmp = t_1
    else if (t <= (-1.65d-208)) then
        tmp = x + z
    else if (t <= 8.5d+43) 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 = y * (b - z);
	double t_2 = t * (b - a);
	double tmp;
	if (t <= -4e+78) {
		tmp = t_2;
	} else if (t <= -4.5e+24) {
		tmp = t_1;
	} else if (t <= -1.65e-208) {
		tmp = x + z;
	} else if (t <= 8.5e+43) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b - z)
	t_2 = t * (b - a)
	tmp = 0
	if t <= -4e+78:
		tmp = t_2
	elif t <= -4.5e+24:
		tmp = t_1
	elif t <= -1.65e-208:
		tmp = x + z
	elif t <= 8.5e+43:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b - z))
	t_2 = Float64(t * Float64(b - a))
	tmp = 0.0
	if (t <= -4e+78)
		tmp = t_2;
	elseif (t <= -4.5e+24)
		tmp = t_1;
	elseif (t <= -1.65e-208)
		tmp = Float64(x + z);
	elseif (t <= 8.5e+43)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = y * (b - z);
	t_2 = t * (b - a);
	tmp = 0.0;
	if (t <= -4e+78)
		tmp = t_2;
	elseif (t <= -4.5e+24)
		tmp = t_1;
	elseif (t <= -1.65e-208)
		tmp = x + z;
	elseif (t <= 8.5e+43)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e+78], t$95$2, If[LessEqual[t, -4.5e+24], t$95$1, If[LessEqual[t, -1.65e-208], N[(x + z), $MachinePrecision], If[LessEqual[t, 8.5e+43], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -4.5 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.00000000000000003e78 or 8.5e43 < t

    1. Initial program 93.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 t around inf 76.6%

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

    if -4.00000000000000003e78 < t < -4.50000000000000019e24 or -1.65000000000000003e-208 < t < 8.5e43

    1. Initial program 96.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 y around inf 51.1%

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

    if -4.50000000000000019e24 < t < -1.65000000000000003e-208

    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 b around 0 71.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-154.7%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg54.7%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+54.7%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    9. Simplified54.7%

      \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    10. Taylor expanded in a around 0 43.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+78}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{+24}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq -1.65 \cdot 10^{-208}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{+43}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 48.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(b - a\right)\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{+60}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-209}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 1.46 \cdot 10^{-301}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 3.65 \cdot 10^{+43}:\\ \;\;\;\;x + a\\ \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 -1.15e+60)
     t_1
     (if (<= t -1.35e-209)
       (+ x z)
       (if (<= t 1.46e-301) (* y (- z)) (if (<= t 3.65e+43) (+ x a) 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 <= -1.15e+60) {
		tmp = t_1;
	} else if (t <= -1.35e-209) {
		tmp = x + z;
	} else if (t <= 1.46e-301) {
		tmp = y * -z;
	} else if (t <= 3.65e+43) {
		tmp = x + a;
	} 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 <= (-1.15d+60)) then
        tmp = t_1
    else if (t <= (-1.35d-209)) then
        tmp = x + z
    else if (t <= 1.46d-301) then
        tmp = y * -z
    else if (t <= 3.65d+43) then
        tmp = x + a
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * (b - a);
	double tmp;
	if (t <= -1.15e+60) {
		tmp = t_1;
	} else if (t <= -1.35e-209) {
		tmp = x + z;
	} else if (t <= 1.46e-301) {
		tmp = y * -z;
	} else if (t <= 3.65e+43) {
		tmp = x + a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * (b - a)
	tmp = 0
	if t <= -1.15e+60:
		tmp = t_1
	elif t <= -1.35e-209:
		tmp = x + z
	elif t <= 1.46e-301:
		tmp = y * -z
	elif t <= 3.65e+43:
		tmp = x + a
	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 <= -1.15e+60)
		tmp = t_1;
	elseif (t <= -1.35e-209)
		tmp = Float64(x + z);
	elseif (t <= 1.46e-301)
		tmp = Float64(y * Float64(-z));
	elseif (t <= 3.65e+43)
		tmp = Float64(x + a);
	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 <= -1.15e+60)
		tmp = t_1;
	elseif (t <= -1.35e-209)
		tmp = x + z;
	elseif (t <= 1.46e-301)
		tmp = y * -z;
	elseif (t <= 3.65e+43)
		tmp = x + a;
	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, -1.15e+60], t$95$1, If[LessEqual[t, -1.35e-209], N[(x + z), $MachinePrecision], If[LessEqual[t, 1.46e-301], N[(y * (-z)), $MachinePrecision], If[LessEqual[t, 3.65e+43], N[(x + a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 1.46 \cdot 10^{-301}:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;t \leq 3.65 \cdot 10^{+43}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.15000000000000008e60 or 3.6499999999999998e43 < t

    1. Initial program 92.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 73.6%

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

    if -1.15000000000000008e60 < t < -1.34999999999999999e-209

    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 b around 0 73.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-151.5%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg51.5%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+51.5%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    9. Simplified51.5%

      \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    10. Taylor expanded in a around 0 41.6%

      \[\leadsto \color{blue}{x + z} \]
    11. Step-by-step derivation
      1. +-commutative41.6%

        \[\leadsto \color{blue}{z + x} \]
    12. Simplified41.6%

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

    if -1.34999999999999999e-209 < t < 1.46000000000000002e-301

    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 z around inf 48.9%

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

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

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

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

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

    if 1.46000000000000002e-301 < t < 3.6499999999999998e43

    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 b around 0 72.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-148.1%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg48.1%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+48.1%

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

      \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    10. Taylor expanded in z around 0 40.0%

      \[\leadsto \color{blue}{a + x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification54.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{+60}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-209}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 1.46 \cdot 10^{-301}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 3.65 \cdot 10^{+43}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 36.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+38}:\\
\;\;\;\;y \cdot \left(-z\right)\\

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

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

\mathbf{elif}\;y \leq 4.5 \cdot 10^{+83}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.90000000000000007e38

    1. Initial program 95.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 z around inf 45.8%

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

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

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

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

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

    if -2.90000000000000007e38 < y < -5.20000000000000015e-165

    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 b around inf 56.8%

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

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

    if -5.20000000000000015e-165 < y < 5.60000000000000007e-195

    1. Initial program 98.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 0 71.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-155.0%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg55.0%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+55.0%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    9. Simplified55.0%

      \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    10. Taylor expanded in a around 0 49.9%

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

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

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

    if 5.60000000000000007e-195 < y < 4.4999999999999999e83

    1. Initial program 96.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 inf 47.2%

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

    if 4.4999999999999999e83 < y

    1. Initial program 92.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 57.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{+38}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-165}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-195}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{+83}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 35.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1700000000:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-100}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-195}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 5.9 \cdot 10^{+88}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -1700000000.0)
   (* y (- z))
   (if (<= y -1.6e-100)
     (* t b)
     (if (<= y 3.2e-195)
       (+ x z)
       (if (<= y 5.9e+88) (* a (- 1.0 t)) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1700000000.0) {
		tmp = y * -z;
	} else if (y <= -1.6e-100) {
		tmp = t * b;
	} else if (y <= 3.2e-195) {
		tmp = x + z;
	} else if (y <= 5.9e+88) {
		tmp = a * (1.0 - t);
	} else {
		tmp = y * 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 (y <= (-1700000000.0d0)) then
        tmp = y * -z
    else if (y <= (-1.6d-100)) then
        tmp = t * b
    else if (y <= 3.2d-195) then
        tmp = x + z
    else if (y <= 5.9d+88) then
        tmp = a * (1.0d0 - t)
    else
        tmp = y * 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 (y <= -1700000000.0) {
		tmp = y * -z;
	} else if (y <= -1.6e-100) {
		tmp = t * b;
	} else if (y <= 3.2e-195) {
		tmp = x + z;
	} else if (y <= 5.9e+88) {
		tmp = a * (1.0 - t);
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -1700000000.0:
		tmp = y * -z
	elif y <= -1.6e-100:
		tmp = t * b
	elif y <= 3.2e-195:
		tmp = x + z
	elif y <= 5.9e+88:
		tmp = a * (1.0 - t)
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -1700000000.0)
		tmp = Float64(y * Float64(-z));
	elseif (y <= -1.6e-100)
		tmp = Float64(t * b);
	elseif (y <= 3.2e-195)
		tmp = Float64(x + z);
	elseif (y <= 5.9e+88)
		tmp = Float64(a * Float64(1.0 - t));
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -1700000000.0)
		tmp = y * -z;
	elseif (y <= -1.6e-100)
		tmp = t * b;
	elseif (y <= 3.2e-195)
		tmp = x + z;
	elseif (y <= 5.9e+88)
		tmp = a * (1.0 - t);
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1700000000.0], N[(y * (-z)), $MachinePrecision], If[LessEqual[y, -1.6e-100], N[(t * b), $MachinePrecision], If[LessEqual[y, 3.2e-195], N[(x + z), $MachinePrecision], If[LessEqual[y, 5.9e+88], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1700000000:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;y \leq -1.6 \cdot 10^{-100}:\\
\;\;\;\;t \cdot b\\

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

\mathbf{elif}\;y \leq 5.9 \cdot 10^{+88}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.7e9

    1. Initial program 94.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 z around inf 44.1%

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

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

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

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

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

    if -1.7e9 < y < -1.60000000000000008e-100

    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.6%

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

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

    if -1.60000000000000008e-100 < y < 3.2000000000000001e-195

    1. Initial program 97.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 b around 0 67.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-152.8%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg52.8%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+52.8%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    9. Simplified52.8%

      \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    10. Taylor expanded in a around 0 44.9%

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

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

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

    if 3.2000000000000001e-195 < y < 5.89999999999999967e88

    1. Initial program 96.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 inf 47.2%

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

    if 5.89999999999999967e88 < y

    1. Initial program 92.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 57.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1700000000:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -1.6 \cdot 10^{-100}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{-195}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 5.9 \cdot 10^{+88}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 86.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -6.3 \cdot 10^{-44} \lor \neg \left(b \leq 6.8 \cdot 10^{+26}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.2999999999999998e-44 or 6.8000000000000005e26 < b

    1. Initial program 91.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 88.9%

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

    if -6.2999999999999998e-44 < b < 6.8000000000000005e26

    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 b around 0 95.4%

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

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

Alternative 10: 85.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;b \leq 2.4 \cdot 10^{+25}:\\
\;\;\;\;x + \left(t\_1 + z \cdot \left(1 - y\right)\right)\\

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


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

    1. Initial program 87.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 89.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 z around 0 86.4%

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

    if -2.30000000000000011e33 < b < 2.39999999999999996e25

    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 b around 0 93.6%

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

    if 2.39999999999999996e25 < b

    1. Initial program 94.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 z around 0 85.5%

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

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

Alternative 11: 65.1% 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 -8.8 \cdot 10^{-44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -5.8 \cdot 10^{-295}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.75 \cdot 10^{+26}:\\ \;\;\;\;\left(x + a\right) - y \cdot z\\ \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 -8.8e-44)
     t_1
     (if (<= b -5.8e-295)
       (+ x (* a (- 1.0 t)))
       (if (<= b 2.75e+26) (- (+ x a) (* y z)) 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 <= -8.8e-44) {
		tmp = t_1;
	} else if (b <= -5.8e-295) {
		tmp = x + (a * (1.0 - t));
	} else if (b <= 2.75e+26) {
		tmp = (x + a) - (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 = x + (b * ((y + t) - 2.0d0))
    if (b <= (-8.8d-44)) then
        tmp = t_1
    else if (b <= (-5.8d-295)) then
        tmp = x + (a * (1.0d0 - t))
    else if (b <= 2.75d+26) then
        tmp = (x + a) - (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 = x + (b * ((y + t) - 2.0));
	double tmp;
	if (b <= -8.8e-44) {
		tmp = t_1;
	} else if (b <= -5.8e-295) {
		tmp = x + (a * (1.0 - t));
	} else if (b <= 2.75e+26) {
		tmp = (x + a) - (y * z);
	} 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 <= -8.8e-44:
		tmp = t_1
	elif b <= -5.8e-295:
		tmp = x + (a * (1.0 - t))
	elif b <= 2.75e+26:
		tmp = (x + a) - (y * z)
	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 <= -8.8e-44)
		tmp = t_1;
	elseif (b <= -5.8e-295)
		tmp = Float64(x + Float64(a * Float64(1.0 - t)));
	elseif (b <= 2.75e+26)
		tmp = Float64(Float64(x + a) - Float64(y * z));
	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 <= -8.8e-44)
		tmp = t_1;
	elseif (b <= -5.8e-295)
		tmp = x + (a * (1.0 - t));
	elseif (b <= 2.75e+26)
		tmp = (x + a) - (y * z);
	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, -8.8e-44], t$95$1, If[LessEqual[b, -5.8e-295], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.75e+26], N[(N[(x + a), $MachinePrecision] - N[(y * z), $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 -8.8 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -5.8 \cdot 10^{-295}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\

\mathbf{elif}\;b \leq 2.75 \cdot 10^{+26}:\\
\;\;\;\;\left(x + a\right) - y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -8.80000000000000048e-44 or 2.7499999999999998e26 < b

    1. Initial program 91.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 88.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 80.5%

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

    if -8.80000000000000048e-44 < b < -5.8000000000000003e-295

    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 b around 0 95.8%

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

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

    if -5.8000000000000003e-295 < b < 2.7499999999999998e26

    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 b around 0 95.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 35.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+18}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-100}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-219}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+64}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -3.2e+18)
   (* y (- z))
   (if (<= y -4.2e-100)
     (* t b)
     (if (<= y 2.5e-219) (+ x z) (if (<= y 2.3e+64) (+ x a) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -3.2e+18) {
		tmp = y * -z;
	} else if (y <= -4.2e-100) {
		tmp = t * b;
	} else if (y <= 2.5e-219) {
		tmp = x + z;
	} else if (y <= 2.3e+64) {
		tmp = x + a;
	} else {
		tmp = y * 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 (y <= (-3.2d+18)) then
        tmp = y * -z
    else if (y <= (-4.2d-100)) then
        tmp = t * b
    else if (y <= 2.5d-219) then
        tmp = x + z
    else if (y <= 2.3d+64) then
        tmp = x + a
    else
        tmp = y * 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 (y <= -3.2e+18) {
		tmp = y * -z;
	} else if (y <= -4.2e-100) {
		tmp = t * b;
	} else if (y <= 2.5e-219) {
		tmp = x + z;
	} else if (y <= 2.3e+64) {
		tmp = x + a;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -3.2e+18:
		tmp = y * -z
	elif y <= -4.2e-100:
		tmp = t * b
	elif y <= 2.5e-219:
		tmp = x + z
	elif y <= 2.3e+64:
		tmp = x + a
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -3.2e+18)
		tmp = Float64(y * Float64(-z));
	elseif (y <= -4.2e-100)
		tmp = Float64(t * b);
	elseif (y <= 2.5e-219)
		tmp = Float64(x + z);
	elseif (y <= 2.3e+64)
		tmp = Float64(x + a);
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -3.2e+18)
		tmp = y * -z;
	elseif (y <= -4.2e-100)
		tmp = t * b;
	elseif (y <= 2.5e-219)
		tmp = x + z;
	elseif (y <= 2.3e+64)
		tmp = x + a;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.2e+18], N[(y * (-z)), $MachinePrecision], If[LessEqual[y, -4.2e-100], N[(t * b), $MachinePrecision], If[LessEqual[y, 2.5e-219], N[(x + z), $MachinePrecision], If[LessEqual[y, 2.3e+64], N[(x + a), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+18}:\\
\;\;\;\;y \cdot \left(-z\right)\\

\mathbf{elif}\;y \leq -4.2 \cdot 10^{-100}:\\
\;\;\;\;t \cdot b\\

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

\mathbf{elif}\;y \leq 2.3 \cdot 10^{+64}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.2e18

    1. Initial program 94.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 z around inf 44.1%

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

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

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

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

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

    if -3.2e18 < y < -4.20000000000000019e-100

    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.6%

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

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

    if -4.20000000000000019e-100 < y < 2.5000000000000001e-219

    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 b around 0 68.6%

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

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

        \[\leadsto \color{blue}{\left(x - -1 \cdot a\right) - z \cdot \left(y - 1\right)} \]
      2. sub-neg53.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-153.5%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg53.5%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+53.5%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    9. Simplified53.5%

      \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    10. Taylor expanded in a around 0 45.2%

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

        \[\leadsto \color{blue}{z + x} \]
    12. Simplified45.2%

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

    if 2.5000000000000001e-219 < y < 2.3e64

    1. Initial program 96.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 0 70.5%

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

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

        \[\leadsto \color{blue}{\left(x - -1 \cdot a\right) - z \cdot \left(y - 1\right)} \]
      2. sub-neg48.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-140.6%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg40.6%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+40.6%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    9. Simplified40.6%

      \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    10. Taylor expanded in z around 0 37.1%

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

    if 2.3e64 < y

    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 b around inf 55.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+18}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -4.2 \cdot 10^{-100}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-219}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+64}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 33.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7600000000:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-100}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-218}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+64}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -7600000000.0)
   (* y b)
   (if (<= y -1.1e-100)
     (* t b)
     (if (<= y 3.4e-218) (+ x z) (if (<= y 2.3e+64) (+ x a) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -7600000000.0) {
		tmp = y * b;
	} else if (y <= -1.1e-100) {
		tmp = t * b;
	} else if (y <= 3.4e-218) {
		tmp = x + z;
	} else if (y <= 2.3e+64) {
		tmp = x + a;
	} else {
		tmp = y * 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 (y <= (-7600000000.0d0)) then
        tmp = y * b
    else if (y <= (-1.1d-100)) then
        tmp = t * b
    else if (y <= 3.4d-218) then
        tmp = x + z
    else if (y <= 2.3d+64) then
        tmp = x + a
    else
        tmp = y * 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 (y <= -7600000000.0) {
		tmp = y * b;
	} else if (y <= -1.1e-100) {
		tmp = t * b;
	} else if (y <= 3.4e-218) {
		tmp = x + z;
	} else if (y <= 2.3e+64) {
		tmp = x + a;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -7600000000.0:
		tmp = y * b
	elif y <= -1.1e-100:
		tmp = t * b
	elif y <= 3.4e-218:
		tmp = x + z
	elif y <= 2.3e+64:
		tmp = x + a
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -7600000000.0)
		tmp = Float64(y * b);
	elseif (y <= -1.1e-100)
		tmp = Float64(t * b);
	elseif (y <= 3.4e-218)
		tmp = Float64(x + z);
	elseif (y <= 2.3e+64)
		tmp = Float64(x + a);
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -7600000000.0)
		tmp = y * b;
	elseif (y <= -1.1e-100)
		tmp = t * b;
	elseif (y <= 3.4e-218)
		tmp = x + z;
	elseif (y <= 2.3e+64)
		tmp = x + a;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7600000000.0], N[(y * b), $MachinePrecision], If[LessEqual[y, -1.1e-100], N[(t * b), $MachinePrecision], If[LessEqual[y, 3.4e-218], N[(x + z), $MachinePrecision], If[LessEqual[y, 2.3e+64], N[(x + a), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7600000000:\\
\;\;\;\;y \cdot b\\

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

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

\mathbf{elif}\;y \leq 2.3 \cdot 10^{+64}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.6e9 or 2.3e64 < y

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

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

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

    if -7.6e9 < y < -1.09999999999999995e-100

    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.6%

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

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

    if -1.09999999999999995e-100 < y < 3.39999999999999986e-218

    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 b around 0 68.6%

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

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

        \[\leadsto \color{blue}{\left(x - -1 \cdot a\right) - z \cdot \left(y - 1\right)} \]
      2. sub-neg53.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-153.5%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg53.5%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+53.5%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    9. Simplified53.5%

      \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    10. Taylor expanded in a around 0 45.2%

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

        \[\leadsto \color{blue}{z + x} \]
    12. Simplified45.2%

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

    if 3.39999999999999986e-218 < y < 2.3e64

    1. Initial program 96.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 0 70.5%

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

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

        \[\leadsto \color{blue}{\left(x - -1 \cdot a\right) - z \cdot \left(y - 1\right)} \]
      2. sub-neg48.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-140.6%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg40.6%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+40.6%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    9. Simplified40.6%

      \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    10. Taylor expanded in z around 0 37.1%

      \[\leadsto \color{blue}{a + x} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification41.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7600000000:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{-100}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-218}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+64}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 27.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+18}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-161}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-279}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.45 \cdot 10^{+75}:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -1.2e+18)
   (* y b)
   (if (<= y -2.7e-161)
     (* t b)
     (if (<= y 1.25e-279) x (if (<= y 3.45e+75) (* t b) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.2e+18) {
		tmp = y * b;
	} else if (y <= -2.7e-161) {
		tmp = t * b;
	} else if (y <= 1.25e-279) {
		tmp = x;
	} else if (y <= 3.45e+75) {
		tmp = t * b;
	} else {
		tmp = y * 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 (y <= (-1.2d+18)) then
        tmp = y * b
    else if (y <= (-2.7d-161)) then
        tmp = t * b
    else if (y <= 1.25d-279) then
        tmp = x
    else if (y <= 3.45d+75) then
        tmp = t * b
    else
        tmp = y * 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 (y <= -1.2e+18) {
		tmp = y * b;
	} else if (y <= -2.7e-161) {
		tmp = t * b;
	} else if (y <= 1.25e-279) {
		tmp = x;
	} else if (y <= 3.45e+75) {
		tmp = t * b;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -1.2e+18:
		tmp = y * b
	elif y <= -2.7e-161:
		tmp = t * b
	elif y <= 1.25e-279:
		tmp = x
	elif y <= 3.45e+75:
		tmp = t * b
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -1.2e+18)
		tmp = Float64(y * b);
	elseif (y <= -2.7e-161)
		tmp = Float64(t * b);
	elseif (y <= 1.25e-279)
		tmp = x;
	elseif (y <= 3.45e+75)
		tmp = Float64(t * b);
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -1.2e+18)
		tmp = y * b;
	elseif (y <= -2.7e-161)
		tmp = t * b;
	elseif (y <= 1.25e-279)
		tmp = x;
	elseif (y <= 3.45e+75)
		tmp = t * b;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.2e+18], N[(y * b), $MachinePrecision], If[LessEqual[y, -2.7e-161], N[(t * b), $MachinePrecision], If[LessEqual[y, 1.25e-279], x, If[LessEqual[y, 3.45e+75], N[(t * b), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+18}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq -2.7 \cdot 10^{-161}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 1.25 \cdot 10^{-279}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 3.45 \cdot 10^{+75}:\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.2e18 or 3.4500000000000002e75 < y

    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 b around inf 44.0%

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

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

    if -1.2e18 < y < -2.6999999999999999e-161 or 1.24999999999999992e-279 < y < 3.4500000000000002e75

    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 t around inf 47.7%

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

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

    if -2.6999999999999999e-161 < y < 1.24999999999999992e-279

    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 x around inf 30.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+18}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -2.7 \cdot 10^{-161}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{-279}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 3.45 \cdot 10^{+75}:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 83.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.3 \cdot 10^{+32} \lor \neg \left(b \leq 2.45 \cdot 10^{+27}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.3000000000000001e32 or 2.45000000000000007e27 < b

    1. Initial program 91.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 a around 0 90.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 84.9%

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

    if -1.3000000000000001e32 < b < 2.45000000000000007e27

    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 b around 0 93.6%

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

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

Alternative 16: 62.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -9 \cdot 10^{+32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -1.15 \cdot 10^{-293}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{+59}:\\ \;\;\;\;\left(x + a\right) - 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 -9e+32)
     t_1
     (if (<= b -1.15e-293)
       (+ x (* a (- 1.0 t)))
       (if (<= b 3.4e+59) (- (+ x a) (* 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 <= -9e+32) {
		tmp = t_1;
	} else if (b <= -1.15e-293) {
		tmp = x + (a * (1.0 - t));
	} else if (b <= 3.4e+59) {
		tmp = (x + a) - (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 <= (-9d+32)) then
        tmp = t_1
    else if (b <= (-1.15d-293)) then
        tmp = x + (a * (1.0d0 - t))
    else if (b <= 3.4d+59) then
        tmp = (x + a) - (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 <= -9e+32) {
		tmp = t_1;
	} else if (b <= -1.15e-293) {
		tmp = x + (a * (1.0 - t));
	} else if (b <= 3.4e+59) {
		tmp = (x + a) - (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 <= -9e+32:
		tmp = t_1
	elif b <= -1.15e-293:
		tmp = x + (a * (1.0 - t))
	elif b <= 3.4e+59:
		tmp = (x + a) - (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 <= -9e+32)
		tmp = t_1;
	elseif (b <= -1.15e-293)
		tmp = Float64(x + Float64(a * Float64(1.0 - t)));
	elseif (b <= 3.4e+59)
		tmp = Float64(Float64(x + a) - 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 <= -9e+32)
		tmp = t_1;
	elseif (b <= -1.15e-293)
		tmp = x + (a * (1.0 - t));
	elseif (b <= 3.4e+59)
		tmp = (x + a) - (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, -9e+32], t$95$1, If[LessEqual[b, -1.15e-293], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.4e+59], N[(N[(x + a), $MachinePrecision] - 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 -9 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -1.15 \cdot 10^{-293}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\

\mathbf{elif}\;b \leq 3.4 \cdot 10^{+59}:\\
\;\;\;\;\left(x + a\right) - y \cdot z\\

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


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

    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 b around inf 80.9%

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

    if -9.0000000000000007e32 < b < -1.14999999999999998e-293

    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 b around 0 91.1%

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

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

    if -1.14999999999999998e-293 < b < 3.40000000000000006e59

    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 b around 0 92.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 62.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -7 \cdot 10^{+32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.45 \cdot 10^{-298}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.35 \cdot 10^{+61}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \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 -7e+32)
     t_1
     (if (<= b 1.45e-298)
       (+ x (* a (- 1.0 t)))
       (if (<= b 2.35e+61) (+ x (* z (- 1.0 y))) 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 <= -7e+32) {
		tmp = t_1;
	} else if (b <= 1.45e-298) {
		tmp = x + (a * (1.0 - t));
	} else if (b <= 2.35e+61) {
		tmp = x + (z * (1.0 - y));
	} 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 <= (-7d+32)) then
        tmp = t_1
    else if (b <= 1.45d-298) then
        tmp = x + (a * (1.0d0 - t))
    else if (b <= 2.35d+61) then
        tmp = x + (z * (1.0d0 - y))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -7e+32) {
		tmp = t_1;
	} else if (b <= 1.45e-298) {
		tmp = x + (a * (1.0 - t));
	} else if (b <= 2.35e+61) {
		tmp = x + (z * (1.0 - y));
	} 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 <= -7e+32:
		tmp = t_1
	elif b <= 1.45e-298:
		tmp = x + (a * (1.0 - t))
	elif b <= 2.35e+61:
		tmp = x + (z * (1.0 - y))
	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 <= -7e+32)
		tmp = t_1;
	elseif (b <= 1.45e-298)
		tmp = Float64(x + Float64(a * Float64(1.0 - t)));
	elseif (b <= 2.35e+61)
		tmp = Float64(x + Float64(z * Float64(1.0 - y)));
	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 <= -7e+32)
		tmp = t_1;
	elseif (b <= 1.45e-298)
		tmp = x + (a * (1.0 - t));
	elseif (b <= 2.35e+61)
		tmp = x + (z * (1.0 - y));
	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, -7e+32], t$95$1, If[LessEqual[b, 1.45e-298], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.35e+61], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $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 -7 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 1.45 \cdot 10^{-298}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\

\mathbf{elif}\;b \leq 2.35 \cdot 10^{+61}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -7.0000000000000002e32 or 2.3499999999999999e61 < b

    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 b around inf 80.9%

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

    if -7.0000000000000002e32 < b < 1.45000000000000007e-298

    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 b around 0 92.3%

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

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

    if 1.45000000000000007e-298 < b < 2.3499999999999999e61

    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 b around 0 91.5%

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

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

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

Alternative 18: 55.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{if}\;b \leq -7 \cdot 10^{+30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -9.8 \cdot 10^{-120}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{+59}:\\ \;\;\;\;x + \left(z + a\right)\\ \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 -7e+30)
     t_1
     (if (<= b -9.8e-120)
       (- a (* t a))
       (if (<= b 4.5e+59) (+ x (+ z a)) 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 <= -7e+30) {
		tmp = t_1;
	} else if (b <= -9.8e-120) {
		tmp = a - (t * a);
	} else if (b <= 4.5e+59) {
		tmp = x + (z + a);
	} 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 <= (-7d+30)) then
        tmp = t_1
    else if (b <= (-9.8d-120)) then
        tmp = a - (t * a)
    else if (b <= 4.5d+59) then
        tmp = x + (z + a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = b * ((y + t) - 2.0);
	double tmp;
	if (b <= -7e+30) {
		tmp = t_1;
	} else if (b <= -9.8e-120) {
		tmp = a - (t * a);
	} else if (b <= 4.5e+59) {
		tmp = x + (z + a);
	} 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 <= -7e+30:
		tmp = t_1
	elif b <= -9.8e-120:
		tmp = a - (t * a)
	elif b <= 4.5e+59:
		tmp = x + (z + a)
	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 <= -7e+30)
		tmp = t_1;
	elseif (b <= -9.8e-120)
		tmp = Float64(a - Float64(t * a));
	elseif (b <= 4.5e+59)
		tmp = Float64(x + Float64(z + a));
	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 <= -7e+30)
		tmp = t_1;
	elseif (b <= -9.8e-120)
		tmp = a - (t * a);
	elseif (b <= 4.5e+59)
		tmp = x + (z + a);
	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, -7e+30], t$95$1, If[LessEqual[b, -9.8e-120], N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.5e+59], N[(x + N[(z + a), $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 -7 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -9.8 \cdot 10^{-120}:\\
\;\;\;\;a - t \cdot a\\

\mathbf{elif}\;b \leq 4.5 \cdot 10^{+59}:\\
\;\;\;\;x + \left(z + a\right)\\

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


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

    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 b around inf 80.9%

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

    if -7.00000000000000042e30 < b < -9.8000000000000007e-120

    1. Initial program 99.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 a around inf 45.9%

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

        \[\leadsto a \cdot \color{blue}{\left(1 + \left(-t\right)\right)} \]
      2. distribute-rgt-in46.0%

        \[\leadsto \color{blue}{1 \cdot a + \left(-t\right) \cdot a} \]
      3. *-un-lft-identity46.0%

        \[\leadsto \color{blue}{a} + \left(-t\right) \cdot a \]
    5. Applied egg-rr46.0%

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

    if -9.8000000000000007e-120 < b < 4.49999999999999959e59

    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 b around 0 93.4%

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

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

        \[\leadsto \color{blue}{\left(x - -1 \cdot a\right) - z \cdot \left(y - 1\right)} \]
      2. sub-neg73.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-149.5%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg49.5%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+49.5%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    9. Simplified49.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7 \cdot 10^{+30}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -9.8 \cdot 10^{-120}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;b \leq 4.5 \cdot 10^{+59}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 72.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.7 \cdot 10^{+31} \lor \neg \left(b \leq 1.08 \cdot 10^{+27}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.6999999999999998e31 or 1.08e27 < b

    1. Initial program 91.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 a around 0 90.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 84.9%

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

    if -3.6999999999999998e31 < b < 1.08e27

    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 b around 0 93.6%

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

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

        \[\leadsto \color{blue}{\left(x - -1 \cdot a\right) - z \cdot \left(y - 1\right)} \]
      2. sub-neg69.3%

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

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

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

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

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

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

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

Alternative 20: 36.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq -4 \cdot 10^{+54}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 5.1 \cdot 10^{+46}:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.4999999999999999e78 or 5.0999999999999997e46 < t

    1. Initial program 93.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 t around inf 76.6%

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

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

    if -4.4999999999999999e78 < t < -4.0000000000000003e54

    1. Initial program 71.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 b around inf 71.6%

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

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

    if -4.0000000000000003e54 < t < 5.0999999999999997e46

    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 b around 0 70.8%

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

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

        \[\leadsto \color{blue}{\left(x - -1 \cdot a\right) - z \cdot \left(y - 1\right)} \]
      2. sub-neg68.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(x + a\right)} + \left(--1 \cdot z\right) \]
      3. neg-mul-144.8%

        \[\leadsto \left(x + a\right) + \left(-\color{blue}{\left(-z\right)}\right) \]
      4. remove-double-neg44.8%

        \[\leadsto \left(x + a\right) + \color{blue}{z} \]
      5. associate-+l+44.8%

        \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    9. Simplified44.8%

      \[\leadsto \color{blue}{x + \left(a + z\right)} \]
    10. Taylor expanded in z around 0 33.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+78}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -4 \cdot 10^{+54}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{+46}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 62.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4 \cdot 10^{+33} \lor \neg \left(b \leq 5.8 \cdot 10^{+27}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.9999999999999998e33 or 5.8000000000000002e27 < b

    1. Initial program 91.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 b around inf 78.8%

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

    if -3.9999999999999998e33 < b < 5.8000000000000002e27

    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 b around 0 93.6%

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

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

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

Alternative 22: 25.2% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.14 \cdot 10^{-79} \lor \neg \left(b \leq 4.4 \cdot 10^{+97}\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.14e-79 or 4.4000000000000002e97 < b

    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 b around inf 73.1%

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

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

    if -1.14e-79 < b < 4.4000000000000002e97

    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 x around inf 23.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.14 \cdot 10^{-79} \lor \neg \left(b \leq 4.4 \cdot 10^{+97}\right):\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 21.7% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+198}:\\
\;\;\;\;z\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+103}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.05000000000000006e198 or 1.59999999999999996e103 < z

    1. Initial program 96.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 z around inf 64.0%

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

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

    if -1.05000000000000006e198 < z < 1.59999999999999996e103

    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 x around inf 18.2%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 24: 22.1% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;x \leq 1.75 \cdot 10^{+59}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.20000000000000003e80 or 1.75e59 < x

    1. Initial program 96.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 x around inf 30.0%

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

    if -2.20000000000000003e80 < x < 1.75e59

    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 inf 32.2%

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

      \[\leadsto \color{blue}{a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 25: 11.0% accurate, 21.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 95.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 inf 27.1%

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

    \[\leadsto \color{blue}{a} \]
  5. Add Preprocessing

Reproduce

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