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

Percentage Accurate: 95.4% → 98.0%
Time: 11.4s
Alternatives: 24
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 24 alternatives:

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

Initial Program: 95.4% 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: 98.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \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{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(b - z\right)\\


\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 y around inf 62.0%

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

    \[\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}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 97.9% 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 94.9%

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

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

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

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

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

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

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

      \[\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. fmm-def97.7%

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;b \leq 1.26 \cdot 10^{-169}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.70000000000000023e102 or 3.8000000000000003e32 < b

    1. Initial program 87.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 76.2%

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

    if -3.70000000000000023e102 < b < 2.2999999999999999e-228

    1. Initial program 99.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 89.4%

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

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

    if 2.2999999999999999e-228 < b < 1.26e-169

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

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

    if 1.26e-169 < b < 3.8000000000000003e32

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x + z\right) - \color{blue}{\left(-a\right)} \]
      2. sub-neg53.9%

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

        \[\leadsto \left(x + z\right) + \color{blue}{a} \]
      4. +-commutative53.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.7 \cdot 10^{+102}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 2.3 \cdot 10^{-228}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.26 \cdot 10^{-169}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 3.8 \cdot 10^{+32}:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 55.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-182}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 135000000000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.99999999999999972e92 or 1.35e11 < y

    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 y around inf 72.8%

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

    if -6.99999999999999972e92 < y < 1.05e-182 or 5.00000000000000019e-90 < y < 1.35e11

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05e-182 < y < 5.00000000000000019e-90

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+92}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-182}:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-90}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 135000000000:\\ \;\;\;\;a + \left(x + z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 50.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 3.3 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.2999999999999999e92 or 3.30000000000000013e44 < y

    1. Initial program 91.7%

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

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

    if -6.2999999999999999e92 < y < -5.20000000000000002e-290 or 6.19999999999999999e-183 < y < 3.30000000000000013e44

    1. Initial program 96.0%

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

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

    if -5.20000000000000002e-290 < y < 6.19999999999999999e-183

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.3 \cdot 10^{+92}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-290}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-183}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+44}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 42.6% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 2.05 \cdot 10^{+92}:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.7999999999999994e45 or 2.05000000000000012e92 < a

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

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

    if -5.7999999999999994e45 < a < -6.5000000000000003e-102 or -2.09999999999999996e-288 < a < 2.05000000000000012e92

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.5000000000000003e-102 < a < -2.09999999999999996e-288

    1. Initial program 97.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.8 \cdot 10^{+45}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-102}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq -2.1 \cdot 10^{-288}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{+92}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 86.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{+47} \lor \neg \left(a \leq 1.96 \cdot 10^{+74}\right):\\
\;\;\;\;x - \left(a \cdot \left(t + -1\right) + z \cdot \left(y + -1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.4499999999999999e47 or 1.96e74 < a

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

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

    if -1.4499999999999999e47 < a < 1.96e74

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

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

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

Alternative 8: 84.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 1.2 \cdot 10^{+80}:\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\

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


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

    1. Initial program 89.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 78.6%

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

    if -6.20000000000000029e59 < z < 1.1999999999999999e80

    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 0 91.9%

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

    if 1.1999999999999999e80 < z

    1. Initial program 89.3%

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

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

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

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

Alternative 9: 67.1% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;y \leq 4 \cdot 10^{+17}:\\
\;\;\;\;x + \left(z + \left(t + -2\right) \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.2e92 or 4e17 < y

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

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

    if -7.2e92 < y < -2.4e-137

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

    if -2.4e-137 < y < 4e17

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

Alternative 10: 64.6% 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 -3.9 \cdot 10^{-25}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -8 \cdot 10^{-167}:\\ \;\;\;\;x - \left(t \cdot a - z\right)\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{+54}:\\ \;\;\;\;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 (+ x (* b (- (+ y t) 2.0)))))
   (if (<= b -3.9e-25)
     t_1
     (if (<= b -8e-167)
       (- x (- (* t a) z))
       (if (<= b 1.4e+54) (+ x (* z (- 1.0 y))) 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 <= -3.9e-25) {
		tmp = t_1;
	} else if (b <= -8e-167) {
		tmp = x - ((t * a) - z);
	} else if (b <= 1.4e+54) {
		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 = x + (b * ((y + t) - 2.0d0))
    if (b <= (-3.9d-25)) then
        tmp = t_1
    else if (b <= (-8d-167)) then
        tmp = x - ((t * a) - z)
    else if (b <= 1.4d+54) 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 = x + (b * ((y + t) - 2.0));
	double tmp;
	if (b <= -3.9e-25) {
		tmp = t_1;
	} else if (b <= -8e-167) {
		tmp = x - ((t * a) - z);
	} else if (b <= 1.4e+54) {
		tmp = x + (z * (1.0 - y));
	} 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 <= -3.9e-25:
		tmp = t_1
	elif b <= -8e-167:
		tmp = x - ((t * a) - z)
	elif b <= 1.4e+54:
		tmp = x + (z * (1.0 - y))
	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 <= -3.9e-25)
		tmp = t_1;
	elseif (b <= -8e-167)
		tmp = Float64(x - Float64(Float64(t * a) - z));
	elseif (b <= 1.4e+54)
		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 = x + (b * ((y + t) - 2.0));
	tmp = 0.0;
	if (b <= -3.9e-25)
		tmp = t_1;
	elseif (b <= -8e-167)
		tmp = x - ((t * a) - z);
	elseif (b <= 1.4e+54)
		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[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.9e-25], t$95$1, If[LessEqual[b, -8e-167], N[(x - N[(N[(t * a), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e+54], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \leq 1.4 \cdot 10^{+54}:\\
\;\;\;\;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 < -3.9e-25 or 1.40000000000000008e54 < b

    1. Initial program 89.2%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 80.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 69.8%

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

    if -3.9e-25 < b < -8.00000000000000002e-167

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{t \cdot a} - z\right) \]
    9. Simplified76.2%

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

    if -8.00000000000000002e-167 < b < 1.40000000000000008e54

    1. Initial program 100.0%

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

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

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

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

Alternative 11: 25.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq -8 \cdot 10^{-219}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;t \leq 7.8 \cdot 10^{-100}:\\
\;\;\;\;a\\

\mathbf{elif}\;t \leq 2.1 \cdot 10^{+70}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.2000000000000001e43 or 2.10000000000000008e70 < t

    1. Initial program 92.9%

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

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

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

    if -8.2000000000000001e43 < t < -8.0000000000000003e-219

    1. Initial program 98.0%

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

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

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

      \[\leadsto \color{blue}{b \cdot y} \]
    6. Step-by-step derivation
      1. *-commutative34.4%

        \[\leadsto \color{blue}{y \cdot b} - a \cdot \left(t - 1\right) \]
    7. Simplified21.2%

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

    if -8.0000000000000003e-219 < t < 7.79999999999999955e-100

    1. Initial program 96.6%

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

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

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

    if 7.79999999999999955e-100 < t < 2.10000000000000008e70

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

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

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

Alternative 12: 83.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{+121} \lor \neg \left(b \leq 5.5 \cdot 10^{+114}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.4999999999999998e121 or 5.5000000000000001e114 < b

    1. Initial program 88.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 0 84.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 82.9%

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

    if -5.4999999999999998e121 < b < 5.5000000000000001e114

    1. Initial program 97.7%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 86.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 simplification85.3%

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

Alternative 13: 69.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq 1.27 \cdot 10^{+73}:\\
\;\;\;\;\left(x + t \cdot b\right) + z \cdot \left(1 - y\right)\\

\mathbf{else}:\\
\;\;\;\;x + \left(z + t\_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.8999999999999999e106

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

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

      \[\leadsto \color{blue}{b \cdot y} - a \cdot \left(t - 1\right) \]
    5. Step-by-step derivation
      1. *-commutative73.0%

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

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

    if -1.8999999999999999e106 < a < 1.2700000000000001e73

    1. Initial program 96.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 0 90.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 t around inf 73.9%

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

    if 1.2700000000000001e73 < a

    1. Initial program 94.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 87.1%

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

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

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

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

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

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

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

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

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

Alternative 14: 47.8% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;t \leq 2.05 \cdot 10^{+17}:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.7e13 or 2.05e17 < t

    1. Initial program 93.9%

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

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

    if -1.7e13 < t < 5.49999999999999971e-88

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

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

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

    if 5.49999999999999971e-88 < t < 2.05e17

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 71.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4 \cdot 10^{+105} \lor \neg \left(b \leq 6.4 \cdot 10^{+28}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.9999999999999998e105 or 6.4000000000000001e28 < b

    1. Initial program 87.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 82.8%

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

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

    if -3.9999999999999998e105 < b < 6.4000000000000001e28

    1. Initial program 99.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 0 88.1%

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

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

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

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

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

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

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

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

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

Alternative 16: 25.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;t \leq 9 \cdot 10^{-100}:\\
\;\;\;\;a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.1999999999999999e-10 or 2.25e70 < t

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

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

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

    if -2.1999999999999999e-10 < t < 9.0000000000000002e-100

    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 a around inf 24.1%

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

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

    if 9.0000000000000002e-100 < t < 2.25e70

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

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

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

Alternative 17: 61.7% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.6 \cdot 10^{+120} \lor \neg \left(b \leq 6.5 \cdot 10^{+58}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.59999999999999991e120 or 6.49999999999999998e58 < b

    1. Initial program 87.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 78.3%

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

    if -1.59999999999999991e120 < b < 6.49999999999999998e58

    1. Initial program 98.8%

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

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

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

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

Alternative 18: 42.7% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{+45} \lor \neg \left(a \leq 4.1 \cdot 10^{+95}\right):\\
\;\;\;\;a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.19999999999999995e45 or 4.09999999999999986e95 < a

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

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

    if -1.19999999999999995e45 < a < 4.09999999999999986e95

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.2 \cdot 10^{+45} \lor \neg \left(a \leq 4.1 \cdot 10^{+95}\right):\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 37.2% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+92} \lor \neg \left(y \leq 1050\right):\\
\;\;\;\;y \cdot \left(-z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.49999999999999999e92 or 1050 < y

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

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

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

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

        \[\leadsto \color{blue}{\left(-y\right) \cdot z} \]
      3. *-commutative45.5%

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

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

    if -6.49999999999999999e92 < y < 1050

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 34.4% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.4 \cdot 10^{+39} \lor \neg \left(a \leq 4 \cdot 10^{+108}\right):\\
\;\;\;\;a \cdot \left(-t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.3999999999999994e39 or 4.0000000000000001e108 < a

    1. Initial program 92.5%

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

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

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

        \[\leadsto \color{blue}{-a \cdot t} \]
      2. distribute-lft-neg-out44.7%

        \[\leadsto \color{blue}{\left(-a\right) \cdot t} \]
      3. *-commutative44.7%

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

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

    if -8.3999999999999994e39 < a < 4.0000000000000001e108

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 21: 33.4% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.15 \cdot 10^{+103} \lor \neg \left(b \leq 2.15 \cdot 10^{+42}\right):\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.15000000000000004e103 or 2.1499999999999999e42 < b

    1. Initial program 86.8%

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

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

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

    if -1.15000000000000004e103 < b < 2.1499999999999999e42

    1. Initial program 99.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 0 87.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 22: 21.9% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+91}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.19999999999999956e64 or 2.29999999999999991e91 < z

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

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

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

    if -8.19999999999999956e64 < z < 2.29999999999999991e91

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

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

Alternative 23: 20.9% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;x \leq 1.16 \cdot 10^{+138}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.94999999999999991e127 or 1.15999999999999994e138 < x

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

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

    if -1.94999999999999991e127 < x < 1.15999999999999994e138

    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 a around inf 31.6%

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

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

Alternative 24: 11.4% 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 94.9%

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

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

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

Reproduce

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