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

Percentage Accurate: 95.3% → 98.0%
Time: 14.4s
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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 98.0% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

    1. Initial program 0.0%

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

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

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

Alternative 2: 97.6% accurate, 0.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 65.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \left(1 - y\right)\\ t_2 := x + b \cdot \left(y + \left(t + -2\right)\right)\\ t_3 := x + a \cdot \left(1 - t\right)\\ \mathbf{if}\;b \leq -1.3 \cdot 10^{+26}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -7.7 \cdot 10^{-87}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -2.4 \cdot 10^{-181}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -1.1 \cdot 10^{-260}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.08 \cdot 10^{-215}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 1.12 \cdot 10^{-8}:\\ \;\;\;\;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 (+ x (* b (+ y (+ t -2.0)))))
        (t_3 (+ x (* a (- 1.0 t)))))
   (if (<= b -1.3e+26)
     t_2
     (if (<= b -7.7e-87)
       t_1
       (if (<= b -2.4e-181)
         t_3
         (if (<= b -1.1e-260)
           t_1
           (if (<= b 1.08e-215) t_3 (if (<= b 1.12e-8) 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 = x + (b * (y + (t + -2.0)));
	double t_3 = x + (a * (1.0 - t));
	double tmp;
	if (b <= -1.3e+26) {
		tmp = t_2;
	} else if (b <= -7.7e-87) {
		tmp = t_1;
	} else if (b <= -2.4e-181) {
		tmp = t_3;
	} else if (b <= -1.1e-260) {
		tmp = t_1;
	} else if (b <= 1.08e-215) {
		tmp = t_3;
	} else if (b <= 1.12e-8) {
		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) :: t_3
    real(8) :: tmp
    t_1 = x + (z * (1.0d0 - y))
    t_2 = x + (b * (y + (t + (-2.0d0))))
    t_3 = x + (a * (1.0d0 - t))
    if (b <= (-1.3d+26)) then
        tmp = t_2
    else if (b <= (-7.7d-87)) then
        tmp = t_1
    else if (b <= (-2.4d-181)) then
        tmp = t_3
    else if (b <= (-1.1d-260)) then
        tmp = t_1
    else if (b <= 1.08d-215) then
        tmp = t_3
    else if (b <= 1.12d-8) 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 = x + (b * (y + (t + -2.0)));
	double t_3 = x + (a * (1.0 - t));
	double tmp;
	if (b <= -1.3e+26) {
		tmp = t_2;
	} else if (b <= -7.7e-87) {
		tmp = t_1;
	} else if (b <= -2.4e-181) {
		tmp = t_3;
	} else if (b <= -1.1e-260) {
		tmp = t_1;
	} else if (b <= 1.08e-215) {
		tmp = t_3;
	} else if (b <= 1.12e-8) {
		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 = x + (b * (y + (t + -2.0)))
	t_3 = x + (a * (1.0 - t))
	tmp = 0
	if b <= -1.3e+26:
		tmp = t_2
	elif b <= -7.7e-87:
		tmp = t_1
	elif b <= -2.4e-181:
		tmp = t_3
	elif b <= -1.1e-260:
		tmp = t_1
	elif b <= 1.08e-215:
		tmp = t_3
	elif b <= 1.12e-8:
		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(x + Float64(b * Float64(y + Float64(t + -2.0))))
	t_3 = Float64(x + Float64(a * Float64(1.0 - t)))
	tmp = 0.0
	if (b <= -1.3e+26)
		tmp = t_2;
	elseif (b <= -7.7e-87)
		tmp = t_1;
	elseif (b <= -2.4e-181)
		tmp = t_3;
	elseif (b <= -1.1e-260)
		tmp = t_1;
	elseif (b <= 1.08e-215)
		tmp = t_3;
	elseif (b <= 1.12e-8)
		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 = x + (b * (y + (t + -2.0)));
	t_3 = x + (a * (1.0 - t));
	tmp = 0.0;
	if (b <= -1.3e+26)
		tmp = t_2;
	elseif (b <= -7.7e-87)
		tmp = t_1;
	elseif (b <= -2.4e-181)
		tmp = t_3;
	elseif (b <= -1.1e-260)
		tmp = t_1;
	elseif (b <= 1.08e-215)
		tmp = t_3;
	elseif (b <= 1.12e-8)
		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[(x + N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.3e+26], t$95$2, If[LessEqual[b, -7.7e-87], t$95$1, If[LessEqual[b, -2.4e-181], t$95$3, If[LessEqual[b, -1.1e-260], t$95$1, If[LessEqual[b, 1.08e-215], t$95$3, If[LessEqual[b, 1.12e-8], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -7.7 \cdot 10^{-87}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -2.4 \cdot 10^{-181}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq -1.1 \cdot 10^{-260}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 1.08 \cdot 10^{-215}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 1.12 \cdot 10^{-8}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.30000000000000001e26 or 1.11999999999999994e-8 < b

    1. Initial program 94.3%

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

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

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

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

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

        \[\leadsto x + \left(b \cdot y + b \cdot \left(t + \color{blue}{-2}\right)\right) \]
      3. distribute-lft-out79.4%

        \[\leadsto x + \color{blue}{b \cdot \left(y + \left(t + -2\right)\right)} \]
      4. cancel-sign-sub79.4%

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

        \[\leadsto x - \color{blue}{\left(-1 \cdot b\right)} \cdot \left(y + \left(t + -2\right)\right) \]
      6. *-commutative79.4%

        \[\leadsto x - \color{blue}{\left(b \cdot -1\right)} \cdot \left(y + \left(t + -2\right)\right) \]
      7. associate-*r*79.4%

        \[\leadsto x - \color{blue}{b \cdot \left(-1 \cdot \left(y + \left(t + -2\right)\right)\right)} \]
      8. distribute-lft-out79.4%

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

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

        \[\leadsto x - b \cdot \left(-1 \cdot y + -1 \cdot \color{blue}{\left(t - 2\right)}\right) \]
      11. unsub-neg79.4%

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

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

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

        \[\leadsto x + b \cdot \left(-\left(-1 \cdot y + -1 \cdot \left(t + \color{blue}{-2}\right)\right)\right) \]
      15. distribute-lft-out79.4%

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

        \[\leadsto x + b \cdot \left(-\color{blue}{\left(-\left(y + \left(t + -2\right)\right)\right)}\right) \]
      17. remove-double-neg79.4%

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

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

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

    if -1.30000000000000001e26 < b < -7.6999999999999998e-87 or -2.4000000000000001e-181 < b < -1.10000000000000008e-260 or 1.08e-215 < b < 1.11999999999999994e-8

    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 86.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 66.1%

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

    if -7.6999999999999998e-87 < b < -2.4000000000000001e-181 or -1.10000000000000008e-260 < b < 1.08e-215

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.3 \cdot 10^{+26}:\\ \;\;\;\;x + b \cdot \left(y + \left(t + -2\right)\right)\\ \mathbf{elif}\;b \leq -7.7 \cdot 10^{-87}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq -2.4 \cdot 10^{-181}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -1.1 \cdot 10^{-260}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.08 \cdot 10^{-215}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.12 \cdot 10^{-8}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(y + \left(t + -2\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 85.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq -5.8 \cdot 10^{-68} \lor \neg \left(b \leq 1.7 \cdot 10^{-84}\right):\\
\;\;\;\;t_1 + z \cdot \left(1 - y\right)\\

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


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

    1. Initial program 91.1%

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

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

    if -2.2999999999999999e57 < b < -5.8000000000000001e-68 or 1.7000000000000001e-84 < b

    1. Initial program 98.0%

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

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

    if -5.8000000000000001e-68 < b < 1.7000000000000001e-84

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

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

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

Alternative 5: 85.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq -1.85 \cdot 10^{-69} \lor \neg \left(b \leq 1.2 \cdot 10^{-87}\right):\\
\;\;\;\;z + \left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right)\\

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


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

    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 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)} \]

    if -1.39999999999999994e156 < b < -1.8500000000000001e-69 or 1.2e-87 < b

    1. Initial program 96.1%

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

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

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

    if -1.8500000000000001e-69 < b < 1.2e-87

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.4 \cdot 10^{+156}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -1.85 \cdot 10^{-69} \lor \neg \left(b \leq 1.2 \cdot 10^{-87}\right):\\ \;\;\;\;z + \left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x - \left(a \cdot \left(t + -1\right) + z \cdot \left(y + -1\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 36.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ \mathbf{if}\;y \leq -4.2 \cdot 10^{+122}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{+66}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{+40}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-141}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-86}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-21}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 5.1 \cdot 10^{+107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+223}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* a (- 1.0 t))))
   (if (<= y -4.2e+122)
     (* y b)
     (if (<= y -7.5e+66)
       t_1
       (if (<= y -1.65e+40)
         (* y b)
         (if (<= y 3e-141)
           (+ x z)
           (if (<= y 7.8e-86)
             t_1
             (if (<= y 8.5e-21)
               (+ x z)
               (if (<= y 5.1e+107)
                 t_1
                 (if (<= y 6e+223) (* y (- z)) (* 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 (y <= -4.2e+122) {
		tmp = y * b;
	} else if (y <= -7.5e+66) {
		tmp = t_1;
	} else if (y <= -1.65e+40) {
		tmp = y * b;
	} else if (y <= 3e-141) {
		tmp = x + z;
	} else if (y <= 7.8e-86) {
		tmp = t_1;
	} else if (y <= 8.5e-21) {
		tmp = x + z;
	} else if (y <= 5.1e+107) {
		tmp = t_1;
	} else if (y <= 6e+223) {
		tmp = y * -z;
	} 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 = a * (1.0d0 - t)
    if (y <= (-4.2d+122)) then
        tmp = y * b
    else if (y <= (-7.5d+66)) then
        tmp = t_1
    else if (y <= (-1.65d+40)) then
        tmp = y * b
    else if (y <= 3d-141) then
        tmp = x + z
    else if (y <= 7.8d-86) then
        tmp = t_1
    else if (y <= 8.5d-21) then
        tmp = x + z
    else if (y <= 5.1d+107) then
        tmp = t_1
    else if (y <= 6d+223) then
        tmp = y * -z
    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 = a * (1.0 - t);
	double tmp;
	if (y <= -4.2e+122) {
		tmp = y * b;
	} else if (y <= -7.5e+66) {
		tmp = t_1;
	} else if (y <= -1.65e+40) {
		tmp = y * b;
	} else if (y <= 3e-141) {
		tmp = x + z;
	} else if (y <= 7.8e-86) {
		tmp = t_1;
	} else if (y <= 8.5e-21) {
		tmp = x + z;
	} else if (y <= 5.1e+107) {
		tmp = t_1;
	} else if (y <= 6e+223) {
		tmp = y * -z;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	tmp = 0
	if y <= -4.2e+122:
		tmp = y * b
	elif y <= -7.5e+66:
		tmp = t_1
	elif y <= -1.65e+40:
		tmp = y * b
	elif y <= 3e-141:
		tmp = x + z
	elif y <= 7.8e-86:
		tmp = t_1
	elif y <= 8.5e-21:
		tmp = x + z
	elif y <= 5.1e+107:
		tmp = t_1
	elif y <= 6e+223:
		tmp = y * -z
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(a * Float64(1.0 - t))
	tmp = 0.0
	if (y <= -4.2e+122)
		tmp = Float64(y * b);
	elseif (y <= -7.5e+66)
		tmp = t_1;
	elseif (y <= -1.65e+40)
		tmp = Float64(y * b);
	elseif (y <= 3e-141)
		tmp = Float64(x + z);
	elseif (y <= 7.8e-86)
		tmp = t_1;
	elseif (y <= 8.5e-21)
		tmp = Float64(x + z);
	elseif (y <= 5.1e+107)
		tmp = t_1;
	elseif (y <= 6e+223)
		tmp = Float64(y * Float64(-z));
	else
		tmp = 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 (y <= -4.2e+122)
		tmp = y * b;
	elseif (y <= -7.5e+66)
		tmp = t_1;
	elseif (y <= -1.65e+40)
		tmp = y * b;
	elseif (y <= 3e-141)
		tmp = x + z;
	elseif (y <= 7.8e-86)
		tmp = t_1;
	elseif (y <= 8.5e-21)
		tmp = x + z;
	elseif (y <= 5.1e+107)
		tmp = t_1;
	elseif (y <= 6e+223)
		tmp = y * -z;
	else
		tmp = 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[LessEqual[y, -4.2e+122], N[(y * b), $MachinePrecision], If[LessEqual[y, -7.5e+66], t$95$1, If[LessEqual[y, -1.65e+40], N[(y * b), $MachinePrecision], If[LessEqual[y, 3e-141], N[(x + z), $MachinePrecision], If[LessEqual[y, 7.8e-86], t$95$1, If[LessEqual[y, 8.5e-21], N[(x + z), $MachinePrecision], If[LessEqual[y, 5.1e+107], t$95$1, If[LessEqual[y, 6e+223], N[(y * (-z)), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -7.5 \cdot 10^{+66}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.65 \cdot 10^{+40}:\\
\;\;\;\;y \cdot b\\

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

\mathbf{elif}\;y \leq 7.8 \cdot 10^{-86}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 5.1 \cdot 10^{+107}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 6 \cdot 10^{+223}:\\
\;\;\;\;y \cdot \left(-z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.20000000000000032e122 or -7.50000000000000024e66 < y < -1.6499999999999999e40 or 6.00000000000000002e223 < y

    1. Initial program 91.5%

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    6. Simplified58.3%

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

    if -4.20000000000000032e122 < y < -7.50000000000000024e66 or 2.99999999999999983e-141 < y < 7.8000000000000003e-86 or 8.4999999999999993e-21 < y < 5.1000000000000002e107

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

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

    if -1.6499999999999999e40 < y < 2.99999999999999983e-141 or 7.8000000000000003e-86 < y < 8.4999999999999993e-21

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. sub-neg48.4%

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

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

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative48.4%

        \[\leadsto \color{blue}{z + x} \]
    7. Simplified48.4%

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

    if 5.1000000000000002e107 < y < 6.00000000000000002e223

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+122}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -7.5 \cdot 10^{+66}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -1.65 \cdot 10^{+40}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-141}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 7.8 \cdot 10^{-86}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-21}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 5.1 \cdot 10^{+107}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+223}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 56.6% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq -1.1 \cdot 10^{-204}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -4.5 \cdot 10^{-261}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 3 \cdot 10^{-185}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 3 \cdot 10^{-152}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;t \leq 5.2 \cdot 10^{+41}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.35e62 or 5.2000000000000001e41 < t

    1. Initial program 93.5%

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

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

    if -1.35e62 < t < -1.0999999999999999e-204 or -4.5000000000000001e-261 < t < 3.0000000000000003e-185 or 3e-152 < t < 5.2000000000000001e41

    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 y around 0 100.0%

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

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

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

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

        \[\leadsto x + \left(b \cdot y + b \cdot \left(t + \color{blue}{-2}\right)\right) \]
      3. distribute-lft-out61.1%

        \[\leadsto x + \color{blue}{b \cdot \left(y + \left(t + -2\right)\right)} \]
      4. cancel-sign-sub61.1%

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

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

        \[\leadsto x - \color{blue}{\left(b \cdot -1\right)} \cdot \left(y + \left(t + -2\right)\right) \]
      7. associate-*r*61.1%

        \[\leadsto x - \color{blue}{b \cdot \left(-1 \cdot \left(y + \left(t + -2\right)\right)\right)} \]
      8. distribute-lft-out61.1%

        \[\leadsto x - b \cdot \color{blue}{\left(-1 \cdot y + -1 \cdot \left(t + -2\right)\right)} \]
      9. metadata-eval61.1%

        \[\leadsto x - b \cdot \left(-1 \cdot y + -1 \cdot \left(t + \color{blue}{\left(-2\right)}\right)\right) \]
      10. sub-neg61.1%

        \[\leadsto x - b \cdot \left(-1 \cdot y + -1 \cdot \color{blue}{\left(t - 2\right)}\right) \]
      11. unsub-neg61.1%

        \[\leadsto \color{blue}{x + \left(-b \cdot \left(-1 \cdot y + -1 \cdot \left(t - 2\right)\right)\right)} \]
      12. distribute-rgt-neg-in61.1%

        \[\leadsto x + \color{blue}{b \cdot \left(-\left(-1 \cdot y + -1 \cdot \left(t - 2\right)\right)\right)} \]
      13. sub-neg61.1%

        \[\leadsto x + b \cdot \left(-\left(-1 \cdot y + -1 \cdot \color{blue}{\left(t + \left(-2\right)\right)}\right)\right) \]
      14. metadata-eval61.1%

        \[\leadsto x + b \cdot \left(-\left(-1 \cdot y + -1 \cdot \left(t + \color{blue}{-2}\right)\right)\right) \]
      15. distribute-lft-out61.1%

        \[\leadsto x + b \cdot \left(-\color{blue}{-1 \cdot \left(y + \left(t + -2\right)\right)}\right) \]
      16. mul-1-neg61.1%

        \[\leadsto x + b \cdot \left(-\color{blue}{\left(-\left(y + \left(t + -2\right)\right)\right)}\right) \]
      17. remove-double-neg61.1%

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

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

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

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

    if -1.0999999999999999e-204 < t < -4.5000000000000001e-261 or 3.0000000000000003e-185 < t < 3e-152

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.35 \cdot 10^{+62}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-204}:\\ \;\;\;\;x + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-261}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-185}:\\ \;\;\;\;x + b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-152}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+41}:\\ \;\;\;\;x + b \cdot \left(y - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 62.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \left(1 - y\right)\\ t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\ t_3 := x + a \cdot \left(1 - t\right)\\ \mathbf{if}\;b \leq -2.35 \cdot 10^{+27}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -4.8 \cdot 10^{-89}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -1 \cdot 10^{-182}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -1.16 \cdot 10^{-259}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 4.7 \cdot 10^{-223}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{+98}:\\ \;\;\;\;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 (* b (- (+ y t) 2.0)))
        (t_3 (+ x (* a (- 1.0 t)))))
   (if (<= b -2.35e+27)
     t_2
     (if (<= b -4.8e-89)
       t_1
       (if (<= b -1e-182)
         t_3
         (if (<= b -1.16e-259)
           t_1
           (if (<= b 4.7e-223) t_3 (if (<= b 4.2e+98) 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 = b * ((y + t) - 2.0);
	double t_3 = x + (a * (1.0 - t));
	double tmp;
	if (b <= -2.35e+27) {
		tmp = t_2;
	} else if (b <= -4.8e-89) {
		tmp = t_1;
	} else if (b <= -1e-182) {
		tmp = t_3;
	} else if (b <= -1.16e-259) {
		tmp = t_1;
	} else if (b <= 4.7e-223) {
		tmp = t_3;
	} else if (b <= 4.2e+98) {
		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) :: t_3
    real(8) :: tmp
    t_1 = x + (z * (1.0d0 - y))
    t_2 = b * ((y + t) - 2.0d0)
    t_3 = x + (a * (1.0d0 - t))
    if (b <= (-2.35d+27)) then
        tmp = t_2
    else if (b <= (-4.8d-89)) then
        tmp = t_1
    else if (b <= (-1d-182)) then
        tmp = t_3
    else if (b <= (-1.16d-259)) then
        tmp = t_1
    else if (b <= 4.7d-223) then
        tmp = t_3
    else if (b <= 4.2d+98) 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 = b * ((y + t) - 2.0);
	double t_3 = x + (a * (1.0 - t));
	double tmp;
	if (b <= -2.35e+27) {
		tmp = t_2;
	} else if (b <= -4.8e-89) {
		tmp = t_1;
	} else if (b <= -1e-182) {
		tmp = t_3;
	} else if (b <= -1.16e-259) {
		tmp = t_1;
	} else if (b <= 4.7e-223) {
		tmp = t_3;
	} else if (b <= 4.2e+98) {
		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 = b * ((y + t) - 2.0)
	t_3 = x + (a * (1.0 - t))
	tmp = 0
	if b <= -2.35e+27:
		tmp = t_2
	elif b <= -4.8e-89:
		tmp = t_1
	elif b <= -1e-182:
		tmp = t_3
	elif b <= -1.16e-259:
		tmp = t_1
	elif b <= 4.7e-223:
		tmp = t_3
	elif b <= 4.2e+98:
		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(b * Float64(Float64(y + t) - 2.0))
	t_3 = Float64(x + Float64(a * Float64(1.0 - t)))
	tmp = 0.0
	if (b <= -2.35e+27)
		tmp = t_2;
	elseif (b <= -4.8e-89)
		tmp = t_1;
	elseif (b <= -1e-182)
		tmp = t_3;
	elseif (b <= -1.16e-259)
		tmp = t_1;
	elseif (b <= 4.7e-223)
		tmp = t_3;
	elseif (b <= 4.2e+98)
		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 = b * ((y + t) - 2.0);
	t_3 = x + (a * (1.0 - t));
	tmp = 0.0;
	if (b <= -2.35e+27)
		tmp = t_2;
	elseif (b <= -4.8e-89)
		tmp = t_1;
	elseif (b <= -1e-182)
		tmp = t_3;
	elseif (b <= -1.16e-259)
		tmp = t_1;
	elseif (b <= 4.7e-223)
		tmp = t_3;
	elseif (b <= 4.2e+98)
		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[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.35e+27], t$95$2, If[LessEqual[b, -4.8e-89], t$95$1, If[LessEqual[b, -1e-182], t$95$3, If[LessEqual[b, -1.16e-259], t$95$1, If[LessEqual[b, 4.7e-223], t$95$3, If[LessEqual[b, 4.2e+98], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -4.8 \cdot 10^{-89}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -1 \cdot 10^{-182}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq -1.16 \cdot 10^{-259}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 4.7 \cdot 10^{-223}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 4.2 \cdot 10^{+98}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.34999999999999988e27 or 4.20000000000000008e98 < b

    1. Initial program 93.5%

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

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

    if -2.34999999999999988e27 < b < -4.80000000000000032e-89 or -1e-182 < b < -1.16e-259 or 4.70000000000000021e-223 < b < 4.20000000000000008e98

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

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

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

    if -4.80000000000000032e-89 < b < -1e-182 or -1.16e-259 < b < 4.70000000000000021e-223

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.35 \cdot 10^{+27}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -4.8 \cdot 10^{-89}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq -1 \cdot 10^{-182}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -1.16 \cdot 10^{-259}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 4.7 \cdot 10^{-223}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{+98}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 86.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+26} \lor \neg \left(b \leq 1.8 \cdot 10^{-5}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.0000000000000001e26 or 1.80000000000000005e-5 < b

    1. Initial program 94.3%

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

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

    if -5.0000000000000001e26 < b < 1.80000000000000005e-5

    1. Initial program 98.5%

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

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

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

Alternative 10: 39.6% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := b \cdot \left(y - 2\right)\\ \mathbf{if}\;b \leq -5.2 \cdot 10^{+33}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -3.3 \cdot 10^{-43}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{-167}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -6.6 \cdot 10^{-239}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 7.4 \cdot 10^{-132}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+100}:\\ \;\;\;\;x + z\\ \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 (- y 2.0))))
   (if (<= b -5.2e+33)
     t_2
     (if (<= b -3.3e-43)
       (+ x z)
       (if (<= b -4.5e-167)
         t_1
         (if (<= b -6.6e-239)
           (+ x z)
           (if (<= b 7.4e-132) t_1 (if (<= b 2.4e+100) (+ x z) 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 * (y - 2.0);
	double tmp;
	if (b <= -5.2e+33) {
		tmp = t_2;
	} else if (b <= -3.3e-43) {
		tmp = x + z;
	} else if (b <= -4.5e-167) {
		tmp = t_1;
	} else if (b <= -6.6e-239) {
		tmp = x + z;
	} else if (b <= 7.4e-132) {
		tmp = t_1;
	} else if (b <= 2.4e+100) {
		tmp = x + z;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = a * (1.0d0 - t)
    t_2 = b * (y - 2.0d0)
    if (b <= (-5.2d+33)) then
        tmp = t_2
    else if (b <= (-3.3d-43)) then
        tmp = x + z
    else if (b <= (-4.5d-167)) then
        tmp = t_1
    else if (b <= (-6.6d-239)) then
        tmp = x + z
    else if (b <= 7.4d-132) then
        tmp = t_1
    else if (b <= 2.4d+100) then
        tmp = x + z
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = a * (1.0 - t);
	double t_2 = b * (y - 2.0);
	double tmp;
	if (b <= -5.2e+33) {
		tmp = t_2;
	} else if (b <= -3.3e-43) {
		tmp = x + z;
	} else if (b <= -4.5e-167) {
		tmp = t_1;
	} else if (b <= -6.6e-239) {
		tmp = x + z;
	} else if (b <= 7.4e-132) {
		tmp = t_1;
	} else if (b <= 2.4e+100) {
		tmp = x + z;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = b * (y - 2.0)
	tmp = 0
	if b <= -5.2e+33:
		tmp = t_2
	elif b <= -3.3e-43:
		tmp = x + z
	elif b <= -4.5e-167:
		tmp = t_1
	elif b <= -6.6e-239:
		tmp = x + z
	elif b <= 7.4e-132:
		tmp = t_1
	elif b <= 2.4e+100:
		tmp = x + z
	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(y - 2.0))
	tmp = 0.0
	if (b <= -5.2e+33)
		tmp = t_2;
	elseif (b <= -3.3e-43)
		tmp = Float64(x + z);
	elseif (b <= -4.5e-167)
		tmp = t_1;
	elseif (b <= -6.6e-239)
		tmp = Float64(x + z);
	elseif (b <= 7.4e-132)
		tmp = t_1;
	elseif (b <= 2.4e+100)
		tmp = Float64(x + z);
	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 * (y - 2.0);
	tmp = 0.0;
	if (b <= -5.2e+33)
		tmp = t_2;
	elseif (b <= -3.3e-43)
		tmp = x + z;
	elseif (b <= -4.5e-167)
		tmp = t_1;
	elseif (b <= -6.6e-239)
		tmp = x + z;
	elseif (b <= 7.4e-132)
		tmp = t_1;
	elseif (b <= 2.4e+100)
		tmp = x + z;
	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[(y - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.2e+33], t$95$2, If[LessEqual[b, -3.3e-43], N[(x + z), $MachinePrecision], If[LessEqual[b, -4.5e-167], t$95$1, If[LessEqual[b, -6.6e-239], N[(x + z), $MachinePrecision], If[LessEqual[b, 7.4e-132], t$95$1, If[LessEqual[b, 2.4e+100], N[(x + z), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;b \leq -4.5 \cdot 10^{-167}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 7.4 \cdot 10^{-132}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 2.4 \cdot 10^{+100}:\\
\;\;\;\;x + z\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.1999999999999995e33 or 2.40000000000000012e100 < b

    1. Initial program 93.3%

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

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

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

    if -5.1999999999999995e33 < b < -3.30000000000000016e-43 or -4.5000000000000001e-167 < b < -6.5999999999999999e-239 or 7.4000000000000004e-132 < b < 2.40000000000000012e100

    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 81.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 62.7%

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. sub-neg47.9%

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

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

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

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

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

    if -3.30000000000000016e-43 < b < -4.5000000000000001e-167 or -6.5999999999999999e-239 < b < 7.4000000000000004e-132

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+33}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;b \leq -3.3 \cdot 10^{-43}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{-167}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq -6.6 \cdot 10^{-239}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;b \leq 7.4 \cdot 10^{-132}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+100}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 70.3% accurate, 1.2× speedup?

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.04999999999999995e28 or 9.8e19 < b

    1. Initial program 94.0%

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

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

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

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

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

        \[\leadsto x + \left(b \cdot y + b \cdot \left(t + \color{blue}{-2}\right)\right) \]
      3. distribute-lft-out80.4%

        \[\leadsto x + \color{blue}{b \cdot \left(y + \left(t + -2\right)\right)} \]
      4. cancel-sign-sub80.4%

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

        \[\leadsto x - \color{blue}{\left(-1 \cdot b\right)} \cdot \left(y + \left(t + -2\right)\right) \]
      6. *-commutative80.4%

        \[\leadsto x - \color{blue}{\left(b \cdot -1\right)} \cdot \left(y + \left(t + -2\right)\right) \]
      7. associate-*r*80.4%

        \[\leadsto x - \color{blue}{b \cdot \left(-1 \cdot \left(y + \left(t + -2\right)\right)\right)} \]
      8. distribute-lft-out80.4%

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

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

        \[\leadsto x - b \cdot \left(-1 \cdot y + -1 \cdot \color{blue}{\left(t - 2\right)}\right) \]
      11. unsub-neg80.4%

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

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

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

        \[\leadsto x + b \cdot \left(-\left(-1 \cdot y + -1 \cdot \left(t + \color{blue}{-2}\right)\right)\right) \]
      15. distribute-lft-out80.4%

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

        \[\leadsto x + b \cdot \left(-\color{blue}{\left(-\left(y + \left(t + -2\right)\right)\right)}\right) \]
      17. remove-double-neg80.4%

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

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

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

    if -1.04999999999999995e28 < b < -1e-59

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

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

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

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

    if -1e-59 < b < -9.4999999999999997e-68

    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 \color{blue}{y \cdot \left(b - z\right)} \]

    if -9.4999999999999997e-68 < b < 9.8e19

    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.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 0 77.1%

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

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

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

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

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

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

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

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

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

Alternative 12: 83.8% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.19999999999999989e27 or 6.79999999999999969e51 < b

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

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

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

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

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

        \[\leadsto x + \left(b \cdot y + b \cdot \left(t + \color{blue}{-2}\right)\right) \]
      3. distribute-lft-out82.9%

        \[\leadsto x + \color{blue}{b \cdot \left(y + \left(t + -2\right)\right)} \]
      4. cancel-sign-sub82.9%

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

        \[\leadsto x - \color{blue}{\left(-1 \cdot b\right)} \cdot \left(y + \left(t + -2\right)\right) \]
      6. *-commutative82.9%

        \[\leadsto x - \color{blue}{\left(b \cdot -1\right)} \cdot \left(y + \left(t + -2\right)\right) \]
      7. associate-*r*82.9%

        \[\leadsto x - \color{blue}{b \cdot \left(-1 \cdot \left(y + \left(t + -2\right)\right)\right)} \]
      8. distribute-lft-out82.9%

        \[\leadsto x - b \cdot \color{blue}{\left(-1 \cdot y + -1 \cdot \left(t + -2\right)\right)} \]
      9. metadata-eval82.9%

        \[\leadsto x - b \cdot \left(-1 \cdot y + -1 \cdot \left(t + \color{blue}{\left(-2\right)}\right)\right) \]
      10. sub-neg82.9%

        \[\leadsto x - b \cdot \left(-1 \cdot y + -1 \cdot \color{blue}{\left(t - 2\right)}\right) \]
      11. unsub-neg82.9%

        \[\leadsto \color{blue}{x + \left(-b \cdot \left(-1 \cdot y + -1 \cdot \left(t - 2\right)\right)\right)} \]
      12. distribute-rgt-neg-in82.9%

        \[\leadsto x + \color{blue}{b \cdot \left(-\left(-1 \cdot y + -1 \cdot \left(t - 2\right)\right)\right)} \]
      13. sub-neg82.9%

        \[\leadsto x + b \cdot \left(-\left(-1 \cdot y + -1 \cdot \color{blue}{\left(t + \left(-2\right)\right)}\right)\right) \]
      14. metadata-eval82.9%

        \[\leadsto x + b \cdot \left(-\left(-1 \cdot y + -1 \cdot \left(t + \color{blue}{-2}\right)\right)\right) \]
      15. distribute-lft-out82.9%

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

        \[\leadsto x + b \cdot \left(-\color{blue}{\left(-\left(y + \left(t + -2\right)\right)\right)}\right) \]
      17. remove-double-neg82.9%

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

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

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

    if -4.19999999999999989e27 < b < 6.79999999999999969e51

    1. Initial program 98.6%

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

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

Alternative 13: 48.5% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;t \leq 9.5 \cdot 10^{-257}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-13}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{+38}:\\
\;\;\;\;x + z\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.2000000000000003e29 or 2.40000000000000017e38 < t

    1. Initial program 93.3%

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

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

    if -4.2000000000000003e29 < t < 9.49999999999999941e-257 or 3.90000000000000007e-151 < t < 4.5e-13

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

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

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

    if 9.49999999999999941e-257 < t < 3.90000000000000007e-151 or 4.5e-13 < t < 2.40000000000000017e38

    1. Initial program 96.6%

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. sub-neg61.5%

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

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

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative61.5%

        \[\leadsto \color{blue}{z + x} \]
    7. Simplified61.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{+29}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-257}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-151}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-13}:\\ \;\;\;\;b \cdot \left(y - 2\right)\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+38}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 50.2% accurate, 1.4× speedup?

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.9000000000000002e32 or 2.39999999999999998e27 < t

    1. Initial program 93.4%

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

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

    if -1.9000000000000002e32 < t < 9.99999999999999977e-257

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

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

    if 9.99999999999999977e-257 < t < 5.20000000000000026e-152

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. sub-neg63.8%

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

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

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative63.8%

        \[\leadsto \color{blue}{z + x} \]
    7. Simplified63.8%

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

    if 5.20000000000000026e-152 < t < 2.39999999999999998e27

    1. Initial program 97.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+32}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 10^{-256}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-152}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+27}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 34.3% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(-a\right)\\ \mathbf{if}\;y \leq -6 \cdot 10^{+125}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{+67}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{+40}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-20}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+216}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* t (- a))))
   (if (<= y -6e+125)
     (* y b)
     (if (<= y -1.55e+67)
       t_1
       (if (<= y -1.85e+40)
         (* y b)
         (if (<= y 1.15e-20) (+ x z) (if (<= y 4.8e+216) t_1 (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = t * -a;
	double tmp;
	if (y <= -6e+125) {
		tmp = y * b;
	} else if (y <= -1.55e+67) {
		tmp = t_1;
	} else if (y <= -1.85e+40) {
		tmp = y * b;
	} else if (y <= 1.15e-20) {
		tmp = x + z;
	} else if (y <= 4.8e+216) {
		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 = t * -a
    if (y <= (-6d+125)) then
        tmp = y * b
    else if (y <= (-1.55d+67)) then
        tmp = t_1
    else if (y <= (-1.85d+40)) then
        tmp = y * b
    else if (y <= 1.15d-20) then
        tmp = x + z
    else if (y <= 4.8d+216) 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 = t * -a;
	double tmp;
	if (y <= -6e+125) {
		tmp = y * b;
	} else if (y <= -1.55e+67) {
		tmp = t_1;
	} else if (y <= -1.85e+40) {
		tmp = y * b;
	} else if (y <= 1.15e-20) {
		tmp = x + z;
	} else if (y <= 4.8e+216) {
		tmp = t_1;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = t * -a
	tmp = 0
	if y <= -6e+125:
		tmp = y * b
	elif y <= -1.55e+67:
		tmp = t_1
	elif y <= -1.85e+40:
		tmp = y * b
	elif y <= 1.15e-20:
		tmp = x + z
	elif y <= 4.8e+216:
		tmp = t_1
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(t * Float64(-a))
	tmp = 0.0
	if (y <= -6e+125)
		tmp = Float64(y * b);
	elseif (y <= -1.55e+67)
		tmp = t_1;
	elseif (y <= -1.85e+40)
		tmp = Float64(y * b);
	elseif (y <= 1.15e-20)
		tmp = Float64(x + z);
	elseif (y <= 4.8e+216)
		tmp = t_1;
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = t * -a;
	tmp = 0.0;
	if (y <= -6e+125)
		tmp = y * b;
	elseif (y <= -1.55e+67)
		tmp = t_1;
	elseif (y <= -1.85e+40)
		tmp = y * b;
	elseif (y <= 1.15e-20)
		tmp = x + z;
	elseif (y <= 4.8e+216)
		tmp = t_1;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * (-a)), $MachinePrecision]}, If[LessEqual[y, -6e+125], N[(y * b), $MachinePrecision], If[LessEqual[y, -1.55e+67], t$95$1, If[LessEqual[y, -1.85e+40], N[(y * b), $MachinePrecision], If[LessEqual[y, 1.15e-20], N[(x + z), $MachinePrecision], If[LessEqual[y, 4.8e+216], t$95$1, N[(y * b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -1.55 \cdot 10^{+67}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -1.85 \cdot 10^{+40}:\\
\;\;\;\;y \cdot b\\

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

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+216}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.0000000000000003e125 or -1.54999999999999998e67 < y < -1.85e40 or 4.7999999999999999e216 < y

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    6. Simplified56.4%

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

    if -6.0000000000000003e125 < y < -1.54999999999999998e67 or 1.15e-20 < y < 4.7999999999999999e216

    1. Initial program 93.3%

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

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

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

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

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

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

    if -1.85e40 < y < 1.15e-20

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. sub-neg46.5%

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

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

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative46.5%

        \[\leadsto \color{blue}{z + x} \]
    7. Simplified46.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+125}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{+67}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;y \leq -1.85 \cdot 10^{+40}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-20}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+216}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 35.9% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+117}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{+66}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{+40}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+25}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{+223}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -8.5e+117)
   (* y b)
   (if (<= y -4.1e+66)
     (* t (- a))
     (if (<= y -1.35e+40)
       (* y b)
       (if (<= y 3e+25) (+ x z) (if (<= y 3.4e+223) (* y (- z)) (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -8.5e+117) {
		tmp = y * b;
	} else if (y <= -4.1e+66) {
		tmp = t * -a;
	} else if (y <= -1.35e+40) {
		tmp = y * b;
	} else if (y <= 3e+25) {
		tmp = x + z;
	} else if (y <= 3.4e+223) {
		tmp = y * -z;
	} 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 <= (-8.5d+117)) then
        tmp = y * b
    else if (y <= (-4.1d+66)) then
        tmp = t * -a
    else if (y <= (-1.35d+40)) then
        tmp = y * b
    else if (y <= 3d+25) then
        tmp = x + z
    else if (y <= 3.4d+223) then
        tmp = y * -z
    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 <= -8.5e+117) {
		tmp = y * b;
	} else if (y <= -4.1e+66) {
		tmp = t * -a;
	} else if (y <= -1.35e+40) {
		tmp = y * b;
	} else if (y <= 3e+25) {
		tmp = x + z;
	} else if (y <= 3.4e+223) {
		tmp = y * -z;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -8.5e+117:
		tmp = y * b
	elif y <= -4.1e+66:
		tmp = t * -a
	elif y <= -1.35e+40:
		tmp = y * b
	elif y <= 3e+25:
		tmp = x + z
	elif y <= 3.4e+223:
		tmp = y * -z
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -8.5e+117)
		tmp = Float64(y * b);
	elseif (y <= -4.1e+66)
		tmp = Float64(t * Float64(-a));
	elseif (y <= -1.35e+40)
		tmp = Float64(y * b);
	elseif (y <= 3e+25)
		tmp = Float64(x + z);
	elseif (y <= 3.4e+223)
		tmp = Float64(y * Float64(-z));
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -8.5e+117)
		tmp = y * b;
	elseif (y <= -4.1e+66)
		tmp = t * -a;
	elseif (y <= -1.35e+40)
		tmp = y * b;
	elseif (y <= 3e+25)
		tmp = x + z;
	elseif (y <= 3.4e+223)
		tmp = y * -z;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8.5e+117], N[(y * b), $MachinePrecision], If[LessEqual[y, -4.1e+66], N[(t * (-a)), $MachinePrecision], If[LessEqual[y, -1.35e+40], N[(y * b), $MachinePrecision], If[LessEqual[y, 3e+25], N[(x + z), $MachinePrecision], If[LessEqual[y, 3.4e+223], N[(y * (-z)), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -1.35 \cdot 10^{+40}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq 3 \cdot 10^{+25}:\\
\;\;\;\;x + z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.49999999999999966e117 or -4.09999999999999994e66 < y < -1.35000000000000005e40 or 3.3999999999999998e223 < y

    1. Initial program 91.5%

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    6. Simplified58.3%

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

    if -8.49999999999999966e117 < y < -4.09999999999999994e66

    1. Initial program 100.0%

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

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

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

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

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

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

    if -1.35000000000000005e40 < y < 3.00000000000000006e25

    1. Initial program 99.3%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. sub-neg43.9%

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

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

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

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

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

    if 3.00000000000000006e25 < y < 3.3999999999999998e223

    1. Initial program 92.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+117}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{+66}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{+40}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 3 \cdot 10^{+25}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{+223}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 50.7% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;t \leq 1.4 \cdot 10^{-256}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 7 \cdot 10^{+27}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.31999999999999997e32 or 7.0000000000000004e27 < t

    1. Initial program 93.4%

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

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

    if -1.31999999999999997e32 < t < 1.40000000000000012e-256 or 8.39999999999999962e-151 < t < 7.0000000000000004e27

    1. Initial program 99.1%

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

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

    if 1.40000000000000012e-256 < t < 8.39999999999999962e-151

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. sub-neg61.3%

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

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

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative61.3%

        \[\leadsto \color{blue}{z + x} \]
    7. Simplified61.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.32 \cdot 10^{+32}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-256}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;t \leq 8.4 \cdot 10^{-151}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+27}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 72.1% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7.60000000000000043e27 or 9e19 < b

    1. Initial program 94.0%

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

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

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

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

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

        \[\leadsto x + \left(b \cdot y + b \cdot \left(t + \color{blue}{-2}\right)\right) \]
      3. distribute-lft-out80.5%

        \[\leadsto x + \color{blue}{b \cdot \left(y + \left(t + -2\right)\right)} \]
      4. cancel-sign-sub80.5%

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

        \[\leadsto x - \color{blue}{\left(-1 \cdot b\right)} \cdot \left(y + \left(t + -2\right)\right) \]
      6. *-commutative80.5%

        \[\leadsto x - \color{blue}{\left(b \cdot -1\right)} \cdot \left(y + \left(t + -2\right)\right) \]
      7. associate-*r*80.5%

        \[\leadsto x - \color{blue}{b \cdot \left(-1 \cdot \left(y + \left(t + -2\right)\right)\right)} \]
      8. distribute-lft-out80.5%

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

        \[\leadsto x - b \cdot \left(-1 \cdot y + -1 \cdot \left(t + \color{blue}{\left(-2\right)}\right)\right) \]
      10. sub-neg80.5%

        \[\leadsto x - b \cdot \left(-1 \cdot y + -1 \cdot \color{blue}{\left(t - 2\right)}\right) \]
      11. unsub-neg80.5%

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

        \[\leadsto x + \color{blue}{b \cdot \left(-\left(-1 \cdot y + -1 \cdot \left(t - 2\right)\right)\right)} \]
      13. sub-neg80.5%

        \[\leadsto x + b \cdot \left(-\left(-1 \cdot y + -1 \cdot \color{blue}{\left(t + \left(-2\right)\right)}\right)\right) \]
      14. metadata-eval80.5%

        \[\leadsto x + b \cdot \left(-\left(-1 \cdot y + -1 \cdot \left(t + \color{blue}{-2}\right)\right)\right) \]
      15. distribute-lft-out80.5%

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

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

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

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

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

    if -7.60000000000000043e27 < b < 9e19

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 27.3% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+40} \lor \neg \left(y \leq 1.3 \cdot 10^{+17}\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.00000000000000003e40 or 1.3e17 < y

    1. Initial program 91.9%

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    6. Simplified41.0%

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

    if -1.00000000000000003e40 < y < 1.3e17

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

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

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

Alternative 20: 35.7% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+39} \lor \neg \left(y \leq 1.9 \cdot 10^{+17}\right):\\
\;\;\;\;y \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.2000000000000005e39 or 1.9e17 < y

    1. Initial program 91.9%

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

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

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

        \[\leadsto \color{blue}{y \cdot b} \]
    6. Simplified41.0%

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

    if -6.2000000000000005e39 < y < 1.9e17

    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 68.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 45.4%

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

      \[\leadsto \color{blue}{x - -1 \cdot z} \]
    6. Step-by-step derivation
      1. sub-neg44.4%

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

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

        \[\leadsto x + \color{blue}{z} \]
      4. +-commutative44.4%

        \[\leadsto \color{blue}{z + x} \]
    7. Simplified44.4%

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

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

Alternative 21: 21.2% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 5.6 \cdot 10^{+18}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.4499999999999999e24 or 5.6e18 < x

    1. Initial program 96.6%

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

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

    if -1.4499999999999999e24 < x < 5.6e18

    1. Initial program 96.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.45 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+18}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 17.3% accurate, 4.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.75 \cdot 10^{+59}:\\
\;\;\;\;-2 \cdot b\\

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


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

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

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

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

      \[\leadsto \color{blue}{-2 \cdot b} \]
    6. Step-by-step derivation
      1. *-commutative17.7%

        \[\leadsto \color{blue}{b \cdot -2} \]
    7. Simplified17.7%

      \[\leadsto \color{blue}{b \cdot -2} \]

    if -1.75e59 < b

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.75 \cdot 10^{+59}:\\ \;\;\;\;-2 \cdot b\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 11.3% 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 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 a around inf 26.5%

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

    \[\leadsto \color{blue}{a} \]
  5. Final simplification8.2%

    \[\leadsto a \]
  6. Add Preprocessing

Reproduce

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