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

Percentage Accurate: 95.2% → 98.4%
Time: 15.1s
Alternatives: 23
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 23 alternatives:

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

Initial Program: 95.2% accurate, 1.0× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(b - a\right) + \frac{b \cdot \left(y + -2\right)}{t}\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 t around inf 63.6%

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(b + \left(-1 \cdot a + \frac{b \cdot \left(y - 2\right)}{t}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-+r+90.9%

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

        \[\leadsto t \cdot \left(\left(b + \color{blue}{\left(-a\right)}\right) + \frac{b \cdot \left(y - 2\right)}{t}\right) \]
      3. sub-neg90.9%

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

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

        \[\leadsto t \cdot \left(\left(b - a\right) + \frac{b \cdot \left(y + \color{blue}{-2}\right)}{t}\right) \]
    8. Simplified90.9%

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

    \[\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(2 - \left(y + t\right)\right) \leq \infty:\\ \;\;\;\;\left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) - b \cdot \left(2 - \left(y + t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\left(b - a\right) + \frac{b \cdot \left(y + -2\right)}{t}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 37.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := b \cdot \left(t - 2\right)\\ \mathbf{if}\;b \leq -2.5 \cdot 10^{+193}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -3.9 \cdot 10^{+39}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{-260}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-210}:\\ \;\;\;\;x\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{-158}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 2.45 \cdot 10^{-67}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{+113}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t))) (t_2 (* b (- t 2.0))))
   (if (<= b -2.5e+193)
     (* y b)
     (if (<= b -3.9e+39)
       t_2
       (if (<= b 1.35e-260)
         t_1
         (if (<= b 6.5e-210)
           x
           (if (<= b 2.1e-158)
             t_1
             (if (<= b 2.45e-67)
               (* z (- y))
               (if (<= b 6.5e+113) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = b * (t - 2.0);
	double tmp;
	if (b <= -2.5e+193) {
		tmp = y * b;
	} else if (b <= -3.9e+39) {
		tmp = t_2;
	} else if (b <= 1.35e-260) {
		tmp = t_1;
	} else if (b <= 6.5e-210) {
		tmp = x;
	} else if (b <= 2.1e-158) {
		tmp = t_1;
	} else if (b <= 2.45e-67) {
		tmp = z * -y;
	} else if (b <= 6.5e+113) {
		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 * (1.0d0 - t)
    t_2 = b * (t - 2.0d0)
    if (b <= (-2.5d+193)) then
        tmp = y * b
    else if (b <= (-3.9d+39)) then
        tmp = t_2
    else if (b <= 1.35d-260) then
        tmp = t_1
    else if (b <= 6.5d-210) then
        tmp = x
    else if (b <= 2.1d-158) then
        tmp = t_1
    else if (b <= 2.45d-67) then
        tmp = z * -y
    else if (b <= 6.5d+113) 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 * (1.0 - t);
	double t_2 = b * (t - 2.0);
	double tmp;
	if (b <= -2.5e+193) {
		tmp = y * b;
	} else if (b <= -3.9e+39) {
		tmp = t_2;
	} else if (b <= 1.35e-260) {
		tmp = t_1;
	} else if (b <= 6.5e-210) {
		tmp = x;
	} else if (b <= 2.1e-158) {
		tmp = t_1;
	} else if (b <= 2.45e-67) {
		tmp = z * -y;
	} else if (b <= 6.5e+113) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = b * (t - 2.0)
	tmp = 0
	if b <= -2.5e+193:
		tmp = y * b
	elif b <= -3.9e+39:
		tmp = t_2
	elif b <= 1.35e-260:
		tmp = t_1
	elif b <= 6.5e-210:
		tmp = x
	elif b <= 2.1e-158:
		tmp = t_1
	elif b <= 2.45e-67:
		tmp = z * -y
	elif b <= 6.5e+113:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	t_2 = Float64(b * Float64(t - 2.0))
	tmp = 0.0
	if (b <= -2.5e+193)
		tmp = Float64(y * b);
	elseif (b <= -3.9e+39)
		tmp = t_2;
	elseif (b <= 1.35e-260)
		tmp = t_1;
	elseif (b <= 6.5e-210)
		tmp = x;
	elseif (b <= 2.1e-158)
		tmp = t_1;
	elseif (b <= 2.45e-67)
		tmp = Float64(z * Float64(-y));
	elseif (b <= 6.5e+113)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a * (1.0 - t);
	t_2 = b * (t - 2.0);
	tmp = 0.0;
	if (b <= -2.5e+193)
		tmp = y * b;
	elseif (b <= -3.9e+39)
		tmp = t_2;
	elseif (b <= 1.35e-260)
		tmp = t_1;
	elseif (b <= 6.5e-210)
		tmp = x;
	elseif (b <= 2.1e-158)
		tmp = t_1;
	elseif (b <= 2.45e-67)
		tmp = z * -y;
	elseif (b <= 6.5e+113)
		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[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.5e+193], N[(y * b), $MachinePrecision], If[LessEqual[b, -3.9e+39], t$95$2, If[LessEqual[b, 1.35e-260], t$95$1, If[LessEqual[b, 6.5e-210], x, If[LessEqual[b, 2.1e-158], t$95$1, If[LessEqual[b, 2.45e-67], N[(z * (-y)), $MachinePrecision], If[LessEqual[b, 6.5e+113], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -3.9 \cdot 10^{+39}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \leq 1.35 \cdot 10^{-260}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 6.5 \cdot 10^{-210}:\\
\;\;\;\;x\\

\mathbf{elif}\;b \leq 2.1 \cdot 10^{-158}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 2.45 \cdot 10^{-67}:\\
\;\;\;\;z \cdot \left(-y\right)\\

\mathbf{elif}\;b \leq 6.5 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -2.49999999999999986e193

    1. Initial program 85.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 68.3%

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

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

    if -2.49999999999999986e193 < b < -3.9000000000000001e39 or 6.5000000000000001e113 < b

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

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

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

    if -3.9000000000000001e39 < b < 1.35000000000000003e-260 or 6.49999999999999961e-210 < b < 2.09999999999999991e-158 or 2.44999999999999997e-67 < b < 6.5000000000000001e113

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

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

    if 1.35000000000000003e-260 < b < 6.49999999999999961e-210

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

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

    if 2.09999999999999991e-158 < b < 2.44999999999999997e-67

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.5 \cdot 10^{+193}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -3.9 \cdot 10^{+39}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{-260}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{-210}:\\ \;\;\;\;x\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{-158}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.45 \cdot 10^{-67}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;b \leq 6.5 \cdot 10^{+113}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 85.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+64} \lor \neg \left(b \leq 1.85 \cdot 10^{-42} \lor \neg \left(b \leq 2.5 \cdot 10^{-18}\right) \land b \leq 7.8 \cdot 10^{+95}\right):\\
\;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.00000000000000002e64 or 1.8500000000000001e-42 < b < 2.50000000000000018e-18 or 7.7999999999999994e95 < b

    1. Initial program 90.9%

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

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

    if -1.00000000000000002e64 < b < 1.8500000000000001e-42 or 2.50000000000000018e-18 < b < 7.7999999999999994e95

    1. Initial program 98.7%

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

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

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

Alternative 4: 39.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;b \leq -2.7 \cdot 10^{+70}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\

\mathbf{elif}\;b \leq -2.1 \cdot 10^{+37}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;b \leq 1.05 \cdot 10^{-158}:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -2.7500000000000001e193 or 1.2e64 < b

    1. Initial program 92.9%

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

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

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

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

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

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

    if -2.7500000000000001e193 < b < -2.7e70

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

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

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

    if -2.7e70 < b < -2.1000000000000001e37

    1. Initial program 100.0%

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

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

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

    if -2.1000000000000001e37 < b < 1.04999999999999996e-158 or 9.99999999999999943e-68 < b < 1.2e64

    1. Initial program 97.8%

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

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

    if 1.04999999999999996e-158 < b < 9.99999999999999943e-68

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.75 \cdot 10^{+193}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;b \leq -2.7 \cdot 10^{+70}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;b \leq -2.1 \cdot 10^{+37}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{-158}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 10^{-67}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+64}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 27.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(-y\right)\\ \mathbf{if}\;y \leq -6.8 \cdot 10^{+209}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{+83}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-117}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+125} \lor \neg \left(y \leq 2.35 \cdot 10^{+222}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- y))))
   (if (<= y -6.8e+209)
     t_1
     (if (<= y -5.8e+83)
       (* y b)
       (if (<= y 1.8e-117)
         (* t (- a))
         (if (<= y 4.3e+18)
           x
           (if (or (<= y 1.7e+125) (not (<= y 2.35e+222))) t_1 (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * -y;
	double tmp;
	if (y <= -6.8e+209) {
		tmp = t_1;
	} else if (y <= -5.8e+83) {
		tmp = y * b;
	} else if (y <= 1.8e-117) {
		tmp = t * -a;
	} else if (y <= 4.3e+18) {
		tmp = x;
	} else if ((y <= 1.7e+125) || !(y <= 2.35e+222)) {
		tmp = t_1;
	} else {
		tmp = y * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z * -y
    if (y <= (-6.8d+209)) then
        tmp = t_1
    else if (y <= (-5.8d+83)) then
        tmp = y * b
    else if (y <= 1.8d-117) then
        tmp = t * -a
    else if (y <= 4.3d+18) then
        tmp = x
    else if ((y <= 1.7d+125) .or. (.not. (y <= 2.35d+222))) then
        tmp = t_1
    else
        tmp = y * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * -y;
	double tmp;
	if (y <= -6.8e+209) {
		tmp = t_1;
	} else if (y <= -5.8e+83) {
		tmp = y * b;
	} else if (y <= 1.8e-117) {
		tmp = t * -a;
	} else if (y <= 4.3e+18) {
		tmp = x;
	} else if ((y <= 1.7e+125) || !(y <= 2.35e+222)) {
		tmp = t_1;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * -y
	tmp = 0
	if y <= -6.8e+209:
		tmp = t_1
	elif y <= -5.8e+83:
		tmp = y * b
	elif y <= 1.8e-117:
		tmp = t * -a
	elif y <= 4.3e+18:
		tmp = x
	elif (y <= 1.7e+125) or not (y <= 2.35e+222):
		tmp = t_1
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(-y))
	tmp = 0.0
	if (y <= -6.8e+209)
		tmp = t_1;
	elseif (y <= -5.8e+83)
		tmp = Float64(y * b);
	elseif (y <= 1.8e-117)
		tmp = Float64(t * Float64(-a));
	elseif (y <= 4.3e+18)
		tmp = x;
	elseif ((y <= 1.7e+125) || !(y <= 2.35e+222))
		tmp = t_1;
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * -y;
	tmp = 0.0;
	if (y <= -6.8e+209)
		tmp = t_1;
	elseif (y <= -5.8e+83)
		tmp = y * b;
	elseif (y <= 1.8e-117)
		tmp = t * -a;
	elseif (y <= 4.3e+18)
		tmp = x;
	elseif ((y <= 1.7e+125) || ~((y <= 2.35e+222)))
		tmp = t_1;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * (-y)), $MachinePrecision]}, If[LessEqual[y, -6.8e+209], t$95$1, If[LessEqual[y, -5.8e+83], N[(y * b), $MachinePrecision], If[LessEqual[y, 1.8e-117], N[(t * (-a)), $MachinePrecision], If[LessEqual[y, 4.3e+18], x, If[Or[LessEqual[y, 1.7e+125], N[Not[LessEqual[y, 2.35e+222]], $MachinePrecision]], t$95$1, N[(y * b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -5.8 \cdot 10^{+83}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq 1.8 \cdot 10^{-117}:\\
\;\;\;\;t \cdot \left(-a\right)\\

\mathbf{elif}\;y \leq 4.3 \cdot 10^{+18}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.7 \cdot 10^{+125} \lor \neg \left(y \leq 2.35 \cdot 10^{+222}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.7999999999999993e209 or 4.3e18 < y < 1.6999999999999999e125 or 2.3499999999999999e222 < y

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

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

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

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

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

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

    if -6.7999999999999993e209 < y < -5.79999999999999999e83 or 1.6999999999999999e125 < y < 2.3499999999999999e222

    1. Initial program 91.3%

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

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

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

    if -5.79999999999999999e83 < y < 1.8e-117

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

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

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

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

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

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

    if 1.8e-117 < y < 4.3e18

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{+209}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{+83}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-117}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{+18}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+125} \lor \neg \left(y \leq 2.35 \cdot 10^{+222}\right):\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 68.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;b \leq 1.15 \cdot 10^{-260}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 1.7 \cdot 10^{-67}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 2 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 1.12 \cdot 10^{+133}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -7.20000000000000021e61 or 1.12e133 < b

    1. Initial program 90.8%

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

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

    if -7.20000000000000021e61 < b < 1.15e-260 or 1.70000000000000005e-67 < b < 1.9999999999999999e61

    1. Initial program 98.2%

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

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

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

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

        \[\leadsto \left(x - -1 \cdot z\right) - \color{blue}{\left(t - 1\right) \cdot a} \]
      3. cancel-sign-sub-inv73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e-260 < b < 1.70000000000000005e-67 or 1.9999999999999999e61 < b < 1.12e133

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.2 \cdot 10^{+61}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-260}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-67}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 2 \cdot 10^{+61}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.12 \cdot 10^{+133}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 67.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq 4 \cdot 10^{-158}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 10^{-67}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 3.7 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 3.15 \cdot 10^{+133}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.4000000000000004e61 or 3.15000000000000025e133 < b

    1. Initial program 90.8%

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

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

    if -5.4000000000000004e61 < b < 4.00000000000000026e-158 or 9.99999999999999943e-68 < b < 3.70000000000000003e61

    1. Initial program 98.6%

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

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

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

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

        \[\leadsto \left(x - -1 \cdot z\right) - \color{blue}{\left(t - 1\right) \cdot a} \]
      3. cancel-sign-sub-inv73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000026e-158 < b < 9.99999999999999943e-68 or 3.70000000000000003e61 < b < 3.15000000000000025e133

    1. Initial program 96.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.4 \cdot 10^{+61}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-158}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 10^{-67}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{+61}:\\ \;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 3.15 \cdot 10^{+133}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 63.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -1.75 \cdot 10^{+92}:\\
\;\;\;\;x - t \cdot a\\

\mathbf{elif}\;t \leq -7.2 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.8 \cdot 10^{+117}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.9999999999999998e216 or 2.79999999999999997e117 < t

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

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

    if -2.9999999999999998e216 < t < -1.74999999999999993e92

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

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

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

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

    if -1.74999999999999993e92 < t < -7.1999999999999996e-22 or 5.1999999999999997e-71 < t < 2.79999999999999997e117

    1. Initial program 95.3%

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

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

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

    if -7.1999999999999996e-22 < t < 5.1999999999999997e-71

    1. Initial program 98.2%

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

      \[\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 t around 0 73.6%

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(y + -2\right)\right) + \left(-\color{blue}{\left(-a\right)}\right) \]
      5. remove-double-neg73.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+216}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{+92}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{-22}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-71}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+117}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 60.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq -6.8 \cdot 10^{-164}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -1.65 \cdot 10^{-255}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \leq 1.35 \cdot 10^{-260}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 1.12 \cdot 10^{+133}:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -8.59999999999999942e60 or 1.12e133 < b

    1. Initial program 90.8%

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

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

    if -8.59999999999999942e60 < b < -6.8e-164 or -1.64999999999999994e-255 < b < 1.35000000000000003e-260

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

      \[\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 b around 0 67.3%

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

    if -6.8e-164 < b < -1.64999999999999994e-255 or 1.35000000000000003e-260 < b < 1.12e133

    1. Initial program 97.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8.6 \cdot 10^{+60}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -6.8 \cdot 10^{-164}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -1.65 \cdot 10^{-255}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{-260}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.12 \cdot 10^{+133}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 53.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq 1.15 \cdot 10^{-260}:\\
\;\;\;\;x - t \cdot a\\

\mathbf{elif}\;b \leq 1.4 \cdot 10^{-27}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;b \leq 1.05 \cdot 10^{+133}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.1e61 or 1.05e133 < b

    1. Initial program 90.8%

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

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

    if -1.1e61 < b < 1.15e-260

    1. Initial program 100.0%

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

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

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

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

    if 1.15e-260 < b < 1.4e-27 or 1.95e62 < b < 1.05e133

    1. Initial program 98.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 92.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 inf 60.5%

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

    if 1.4e-27 < b < 1.95e62

    1. Initial program 91.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.1 \cdot 10^{+61}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-260}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{-27}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 1.95 \cdot 10^{+62}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{+133}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 72.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq 2.6 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 4.2 \cdot 10^{-19}:\\
\;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\

\mathbf{elif}\;b \leq 5.3 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2 - t \cdot a\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.49999999999999988e70

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

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

    if -1.49999999999999988e70 < b < 2.5999999999999997e-32 or 4.1999999999999998e-19 < b < 5.29999999999999997e133

    1. Initial program 98.7%

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

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

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

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

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

    if 2.5999999999999997e-32 < b < 4.1999999999999998e-19

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

      \[\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 t around 0 77.6%

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(y + -2\right)\right) + \left(-\color{blue}{\left(-a\right)}\right) \]
      5. remove-double-neg77.6%

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

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

    if 5.29999999999999997e133 < b

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.5 \cdot 10^{+70}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-32}:\\ \;\;\;\;x - \left(t \cdot a - z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{-19}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{elif}\;b \leq 5.3 \cdot 10^{+133}:\\ \;\;\;\;x - \left(t \cdot a - z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b - t \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 73.3% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq 2.6 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 4.2 \cdot 10^{-19}:\\
\;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\

\mathbf{elif}\;b \leq 7.5 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.6e68 or 7.5000000000000001e134 < b

    1. Initial program 90.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 inf 81.6%

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

    if -5.6e68 < b < 2.5999999999999997e-32 or 4.1999999999999998e-19 < b < 7.5000000000000001e134

    1. Initial program 98.7%

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

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

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

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

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

    if 2.5999999999999997e-32 < b < 4.1999999999999998e-19

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

      \[\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 t around 0 77.6%

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

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

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

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

        \[\leadsto \left(x + b \cdot \left(y + -2\right)\right) + \left(-\color{blue}{\left(-a\right)}\right) \]
      5. remove-double-neg77.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.6 \cdot 10^{+68}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{-32}:\\ \;\;\;\;x - \left(t \cdot a - z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{-19}:\\ \;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{+134}:\\ \;\;\;\;x - \left(t \cdot a - z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 33.9% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;y \leq -3.2 \cdot 10^{-204}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -8 \cdot 10^{-294}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 9.2 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -9.20000000000000038e209 or 9.2e14 < y

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

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

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

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

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

    if -9.20000000000000038e209 < y < -4.00000000000000017e93

    1. Initial program 100.0%

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

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

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

    if -4.00000000000000017e93 < y < -3.2e-204 or -8.00000000000000013e-294 < y < 9.2e14

    1. Initial program 97.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 41.1%

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

    if -3.2e-204 < y < -8.00000000000000013e-294

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{+209}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;y \leq -4 \cdot 10^{+93}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{-204}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -8 \cdot 10^{-294}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{+14}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 60.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;b \leq 4.8 \cdot 10^{-158}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 2.25 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.9999999999999999e61 or 2.2499999999999999e76 < b

    1. Initial program 91.6%

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

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

    if -1.9999999999999999e61 < b < 4.80000000000000015e-158 or 7.79999999999999955e-100 < b < 2.2499999999999999e76

    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 z around 0 66.6%

      \[\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 b around 0 58.9%

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

    if 4.80000000000000015e-158 < b < 7.79999999999999955e-100

    1. Initial program 100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{+61}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{-158}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-100}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 2.25 \cdot 10^{+76}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 88.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -7 \cdot 10^{+70} \lor \neg \left(b \leq 2.35 \cdot 10^{+98}\right):\\
\;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7.00000000000000005e70 or 2.34999999999999985e98 < b

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

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

    if -7.00000000000000005e70 < b < 2.34999999999999985e98

    1. Initial program 98.2%

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

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

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

Alternative 16: 81.0% accurate, 0.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1 - t \cdot a\\


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

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

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

    if -5.7999999999999997e69 < b < 4.5999999999999996e134

    1. Initial program 98.2%

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

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

    if 4.5999999999999996e134 < b

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

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

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

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

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

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

Alternative 17: 27.5% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq 7.8 \cdot 10^{-118}:\\
\;\;\;\;t \cdot \left(-a\right)\\

\mathbf{elif}\;y \leq 2 \cdot 10^{+50}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.05000000000000001e80 or 2.0000000000000002e50 < y

    1. Initial program 92.6%

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

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

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

    if -2.05000000000000001e80 < y < 7.80000000000000002e-118

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

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

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

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

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

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

    if 7.80000000000000002e-118 < y < 2.0000000000000002e50

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

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

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

Alternative 18: 26.9% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq 4.2 \cdot 10^{-119}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 7.5 \cdot 10^{+50}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.6000000000000002e-18 or 7.4999999999999999e50 < y

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

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

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

    if -4.6000000000000002e-18 < y < 4.2e-119

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

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

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

    if 4.2e-119 < y < 7.4999999999999999e50

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{-18}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{-119}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+50}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 51.9% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.32 \cdot 10^{+27} \lor \neg \left(y \leq 1.75 \cdot 10^{+15}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.32e27 or 1.75e15 < y

    1. Initial program 93.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 69.6%

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

    if -2.32e27 < y < 1.75e15

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

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

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

      \[\leadsto x - \color{blue}{a \cdot t} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification57.2%

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

Alternative 20: 47.9% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+96} \lor \neg \left(y \leq 3 \cdot 10^{+17}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


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

    1. Initial program 93.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 72.8%

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

    if -1.15000000000000008e96 < y < 3e17

    1. Initial program 97.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 37.1%

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

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

Alternative 21: 19.8% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;z \leq 3.8 \cdot 10^{+47}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.50000000000000043e100 or 3.8000000000000003e47 < z

    1. Initial program 93.4%

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

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

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

    if -8.50000000000000043e100 < z < 3.8000000000000003e47

    1. Initial program 97.3%

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

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

Alternative 22: 19.9% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;a \leq 2.1 \cdot 10^{+147}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.05e162 or 2.10000000000000006e147 < 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 69.4%

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

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

    if -1.05e162 < a < 2.10000000000000006e147

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

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

Alternative 23: 11.1% accurate, 21.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 95.7%

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

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

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

Reproduce

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