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

Percentage Accurate: 95.3% → 98.0%
Time: 19.5s
Alternatives: 24
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 24 alternatives:

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 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 y around inf 88.9%

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

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

Alternative 2: 69.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(a + z \cdot \left(1 - y\right)\right)\\ t_2 := x + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -5 \cdot 10^{+72}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-194}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{-41}:\\ \;\;\;\;x - \left(\left(t + -1\right) \cdot a - z\right)\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+14}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 7 \cdot 10^{+60}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{+94}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 7 \cdot 10^{+127}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{+159}:\\ \;\;\;\;z + \left(x + b \cdot \left(t + -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (+ a (* z (- 1.0 y))))) (t_2 (+ x (* (- (+ y t) 2.0) b))))
   (if (<= b -5e+72)
     t_2
     (if (<= b 7.8e-194)
       t_1
       (if (<= b 5.6e-41)
         (- x (- (* (+ t -1.0) a) z))
         (if (<= b 2.4e+14)
           t_1
           (if (<= b 7e+60)
             (+ x (* a (- 1.0 t)))
             (if (<= b 3.6e+94)
               t_2
               (if (<= b 7e+127)
                 t_1
                 (if (<= b 2.05e+159)
                   (+ z (+ x (* b (+ t -2.0))))
                   t_2))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (a + (z * (1.0 - y)));
	double t_2 = x + (((y + t) - 2.0) * b);
	double tmp;
	if (b <= -5e+72) {
		tmp = t_2;
	} else if (b <= 7.8e-194) {
		tmp = t_1;
	} else if (b <= 5.6e-41) {
		tmp = x - (((t + -1.0) * a) - z);
	} else if (b <= 2.4e+14) {
		tmp = t_1;
	} else if (b <= 7e+60) {
		tmp = x + (a * (1.0 - t));
	} else if (b <= 3.6e+94) {
		tmp = t_2;
	} else if (b <= 7e+127) {
		tmp = t_1;
	} else if (b <= 2.05e+159) {
		tmp = z + (x + (b * (t + -2.0)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (a + (z * (1.0d0 - y)))
    t_2 = x + (((y + t) - 2.0d0) * b)
    if (b <= (-5d+72)) then
        tmp = t_2
    else if (b <= 7.8d-194) then
        tmp = t_1
    else if (b <= 5.6d-41) then
        tmp = x - (((t + (-1.0d0)) * a) - z)
    else if (b <= 2.4d+14) then
        tmp = t_1
    else if (b <= 7d+60) then
        tmp = x + (a * (1.0d0 - t))
    else if (b <= 3.6d+94) then
        tmp = t_2
    else if (b <= 7d+127) then
        tmp = t_1
    else if (b <= 2.05d+159) then
        tmp = z + (x + (b * (t + (-2.0d0))))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (a + (z * (1.0 - y)));
	double t_2 = x + (((y + t) - 2.0) * b);
	double tmp;
	if (b <= -5e+72) {
		tmp = t_2;
	} else if (b <= 7.8e-194) {
		tmp = t_1;
	} else if (b <= 5.6e-41) {
		tmp = x - (((t + -1.0) * a) - z);
	} else if (b <= 2.4e+14) {
		tmp = t_1;
	} else if (b <= 7e+60) {
		tmp = x + (a * (1.0 - t));
	} else if (b <= 3.6e+94) {
		tmp = t_2;
	} else if (b <= 7e+127) {
		tmp = t_1;
	} else if (b <= 2.05e+159) {
		tmp = z + (x + (b * (t + -2.0)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (a + (z * (1.0 - y)))
	t_2 = x + (((y + t) - 2.0) * b)
	tmp = 0
	if b <= -5e+72:
		tmp = t_2
	elif b <= 7.8e-194:
		tmp = t_1
	elif b <= 5.6e-41:
		tmp = x - (((t + -1.0) * a) - z)
	elif b <= 2.4e+14:
		tmp = t_1
	elif b <= 7e+60:
		tmp = x + (a * (1.0 - t))
	elif b <= 3.6e+94:
		tmp = t_2
	elif b <= 7e+127:
		tmp = t_1
	elif b <= 2.05e+159:
		tmp = z + (x + (b * (t + -2.0)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(a + Float64(z * Float64(1.0 - y))))
	t_2 = Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b))
	tmp = 0.0
	if (b <= -5e+72)
		tmp = t_2;
	elseif (b <= 7.8e-194)
		tmp = t_1;
	elseif (b <= 5.6e-41)
		tmp = Float64(x - Float64(Float64(Float64(t + -1.0) * a) - z));
	elseif (b <= 2.4e+14)
		tmp = t_1;
	elseif (b <= 7e+60)
		tmp = Float64(x + Float64(a * Float64(1.0 - t)));
	elseif (b <= 3.6e+94)
		tmp = t_2;
	elseif (b <= 7e+127)
		tmp = t_1;
	elseif (b <= 2.05e+159)
		tmp = Float64(z + Float64(x + Float64(b * Float64(t + -2.0))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (a + (z * (1.0 - y)));
	t_2 = x + (((y + t) - 2.0) * b);
	tmp = 0.0;
	if (b <= -5e+72)
		tmp = t_2;
	elseif (b <= 7.8e-194)
		tmp = t_1;
	elseif (b <= 5.6e-41)
		tmp = x - (((t + -1.0) * a) - z);
	elseif (b <= 2.4e+14)
		tmp = t_1;
	elseif (b <= 7e+60)
		tmp = x + (a * (1.0 - t));
	elseif (b <= 3.6e+94)
		tmp = t_2;
	elseif (b <= 7e+127)
		tmp = t_1;
	elseif (b <= 2.05e+159)
		tmp = z + (x + (b * (t + -2.0)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5e+72], t$95$2, If[LessEqual[b, 7.8e-194], t$95$1, If[LessEqual[b, 5.6e-41], N[(x - N[(N[(N[(t + -1.0), $MachinePrecision] * a), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.4e+14], t$95$1, If[LessEqual[b, 7e+60], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.6e+94], t$95$2, If[LessEqual[b, 7e+127], t$95$1, If[LessEqual[b, 2.05e+159], N[(z + N[(x + N[(b * N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq 7.8 \cdot 10^{-194}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 2.4 \cdot 10^{+14}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 3.6 \cdot 10^{+94}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 7 \cdot 10^{+127}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -4.99999999999999992e72 or 7.0000000000000004e60 < b < 3.59999999999999992e94 or 2.05000000000000007e159 < b

    1. Initial program 93.2%

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

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

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

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

    if -4.99999999999999992e72 < b < 7.7999999999999997e-194 or 5.6000000000000003e-41 < b < 2.4e14 or 3.59999999999999992e94 < b < 6.99999999999999956e127

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

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

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

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

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

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

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

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

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

    if 7.7999999999999997e-194 < b < 5.6000000000000003e-41

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4e14 < b < 7.0000000000000004e60

    1. Initial program 88.9%

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

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

    if 6.99999999999999956e127 < b < 2.05000000000000007e159

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+72}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-194}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 5.6 \cdot 10^{-41}:\\ \;\;\;\;x - \left(\left(t + -1\right) \cdot a - z\right)\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+14}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 7 \cdot 10^{+60}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{+94}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 7 \cdot 10^{+127}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{+159}:\\ \;\;\;\;z + \left(x + b \cdot \left(t + -2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 56.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(1 - y\right)\\ t_2 := x + a \cdot \left(1 - t\right)\\ t_3 := \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -5.2 \cdot 10^{-66}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -1.6 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -3.2 \cdot 10^{-114}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -6.2 \cdot 10^{-187}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{-280}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-52}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 10500000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{+61}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- 1.0 y)))
        (t_2 (+ x (* a (- 1.0 t))))
        (t_3 (* (- (+ y t) 2.0) b)))
   (if (<= b -5.2e-66)
     t_3
     (if (<= b -1.6e-107)
       t_1
       (if (<= b -3.2e-114)
         t_3
         (if (<= b -6.2e-187)
           (- x (* y z))
           (if (<= b 1.2e-280)
             (+ x (+ z a))
             (if (<= b 8e-52)
               t_2
               (if (<= b 10500000000.0)
                 t_1
                 (if (<= b 1.15e+61) t_2 t_3))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (1.0 - y);
	double t_2 = x + (a * (1.0 - t));
	double t_3 = ((y + t) - 2.0) * b;
	double tmp;
	if (b <= -5.2e-66) {
		tmp = t_3;
	} else if (b <= -1.6e-107) {
		tmp = t_1;
	} else if (b <= -3.2e-114) {
		tmp = t_3;
	} else if (b <= -6.2e-187) {
		tmp = x - (y * z);
	} else if (b <= 1.2e-280) {
		tmp = x + (z + a);
	} else if (b <= 8e-52) {
		tmp = t_2;
	} else if (b <= 10500000000.0) {
		tmp = t_1;
	} else if (b <= 1.15e+61) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = z * (1.0d0 - y)
    t_2 = x + (a * (1.0d0 - t))
    t_3 = ((y + t) - 2.0d0) * b
    if (b <= (-5.2d-66)) then
        tmp = t_3
    else if (b <= (-1.6d-107)) then
        tmp = t_1
    else if (b <= (-3.2d-114)) then
        tmp = t_3
    else if (b <= (-6.2d-187)) then
        tmp = x - (y * z)
    else if (b <= 1.2d-280) then
        tmp = x + (z + a)
    else if (b <= 8d-52) then
        tmp = t_2
    else if (b <= 10500000000.0d0) then
        tmp = t_1
    else if (b <= 1.15d+61) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (1.0 - y);
	double t_2 = x + (a * (1.0 - t));
	double t_3 = ((y + t) - 2.0) * b;
	double tmp;
	if (b <= -5.2e-66) {
		tmp = t_3;
	} else if (b <= -1.6e-107) {
		tmp = t_1;
	} else if (b <= -3.2e-114) {
		tmp = t_3;
	} else if (b <= -6.2e-187) {
		tmp = x - (y * z);
	} else if (b <= 1.2e-280) {
		tmp = x + (z + a);
	} else if (b <= 8e-52) {
		tmp = t_2;
	} else if (b <= 10500000000.0) {
		tmp = t_1;
	} else if (b <= 1.15e+61) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (1.0 - y)
	t_2 = x + (a * (1.0 - t))
	t_3 = ((y + t) - 2.0) * b
	tmp = 0
	if b <= -5.2e-66:
		tmp = t_3
	elif b <= -1.6e-107:
		tmp = t_1
	elif b <= -3.2e-114:
		tmp = t_3
	elif b <= -6.2e-187:
		tmp = x - (y * z)
	elif b <= 1.2e-280:
		tmp = x + (z + a)
	elif b <= 8e-52:
		tmp = t_2
	elif b <= 10500000000.0:
		tmp = t_1
	elif b <= 1.15e+61:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(1.0 - y))
	t_2 = Float64(x + Float64(a * Float64(1.0 - t)))
	t_3 = Float64(Float64(Float64(y + t) - 2.0) * b)
	tmp = 0.0
	if (b <= -5.2e-66)
		tmp = t_3;
	elseif (b <= -1.6e-107)
		tmp = t_1;
	elseif (b <= -3.2e-114)
		tmp = t_3;
	elseif (b <= -6.2e-187)
		tmp = Float64(x - Float64(y * z));
	elseif (b <= 1.2e-280)
		tmp = Float64(x + Float64(z + a));
	elseif (b <= 8e-52)
		tmp = t_2;
	elseif (b <= 10500000000.0)
		tmp = t_1;
	elseif (b <= 1.15e+61)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (1.0 - y);
	t_2 = x + (a * (1.0 - t));
	t_3 = ((y + t) - 2.0) * b;
	tmp = 0.0;
	if (b <= -5.2e-66)
		tmp = t_3;
	elseif (b <= -1.6e-107)
		tmp = t_1;
	elseif (b <= -3.2e-114)
		tmp = t_3;
	elseif (b <= -6.2e-187)
		tmp = x - (y * z);
	elseif (b <= 1.2e-280)
		tmp = x + (z + a);
	elseif (b <= 8e-52)
		tmp = t_2;
	elseif (b <= 10500000000.0)
		tmp = t_1;
	elseif (b <= 1.15e+61)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -5.2e-66], t$95$3, If[LessEqual[b, -1.6e-107], t$95$1, If[LessEqual[b, -3.2e-114], t$95$3, If[LessEqual[b, -6.2e-187], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.2e-280], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8e-52], t$95$2, If[LessEqual[b, 10500000000.0], t$95$1, If[LessEqual[b, 1.15e+61], t$95$2, t$95$3]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -1.6 \cdot 10^{-107}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -3.2 \cdot 10^{-114}:\\
\;\;\;\;t_3\\

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

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

\mathbf{elif}\;b \leq 8 \cdot 10^{-52}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 10500000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 1.15 \cdot 10^{+61}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -5.1999999999999998e-66 or -1.60000000000000006e-107 < b < -3.2000000000000002e-114 or 1.15e61 < b

    1. Initial program 94.6%

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

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

    if -5.1999999999999998e-66 < b < -1.60000000000000006e-107 or 8.0000000000000001e-52 < b < 1.05e10

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

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

    if -3.2000000000000002e-114 < b < -6.20000000000000039e-187

    1. Initial program 100.0%

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

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

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

    if -6.20000000000000039e-187 < b < 1.1999999999999999e-280

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1999999999999999e-280 < b < 8.0000000000000001e-52 or 1.05e10 < b < 1.15e61

    1. Initial program 96.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{-66}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -1.6 \cdot 10^{-107}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq -3.2 \cdot 10^{-114}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -6.2 \cdot 10^{-187}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{-280}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-52}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 10500000000:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{+61}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 64.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;b \leq 1.8 \cdot 10^{-302}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;b \leq 5.7 \cdot 10^{-86}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 45000000000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 1.3 \cdot 10^{+60}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.30000000000000005e-65 or 1.30000000000000004e60 < b

    1. Initial program 94.5%

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

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

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

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

    if -1.30000000000000005e-65 < b < 1.8e-302 or 5.7000000000000004e-86 < b < 4.5e13

    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 90.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 69.5%

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

    if 1.8e-302 < b < 6.89999999999999958e-196

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

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

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

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

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

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

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

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

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

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

    if 6.89999999999999958e-196 < b < 5.7000000000000004e-86 or 4.5e13 < b < 1.30000000000000004e60

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.3 \cdot 10^{-65}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 1.8 \cdot 10^{-302}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 6.9 \cdot 10^{-196}:\\ \;\;\;\;x + \left(a - y \cdot z\right)\\ \mathbf{elif}\;b \leq 5.7 \cdot 10^{-86}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 45000000000000:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{+60}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 72.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;b \leq 2.05 \cdot 10^{-195}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 2.5 \cdot 10^{+14}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -2.5000000000000002e68 or 1.2e60 < b

    1. Initial program 94.2%

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

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

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

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

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

    if -2.5000000000000002e68 < b < 2.05000000000000006e-195 or 6.8999999999999996e-40 < b < 2.5e14

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

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

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

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

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

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

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

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

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

    if 2.05000000000000006e-195 < b < 6.8999999999999996e-40

    1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5e14 < b < 1.2e60

    1. Initial program 88.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.5 \cdot 10^{+68}:\\ \;\;\;\;z + \left(x + \left(\left(y + t\right) - 2\right) \cdot b\right)\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{-195}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 6.9 \cdot 10^{-40}:\\ \;\;\;\;x - \left(\left(t + -1\right) \cdot a - z\right)\\ \mathbf{elif}\;b \leq 2.5 \cdot 10^{+14}:\\ \;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+60}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;z + \left(x + \left(\left(y + t\right) - 2\right) \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 60.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;b \leq 9 \cdot 10^{-300}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 5.5 \cdot 10^{-67}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 4500000000:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 1.3 \cdot 10^{+61}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.30000000000000005e-65 or 1.29999999999999986e61 < b

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

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

    if -1.30000000000000005e-65 < b < 9.0000000000000001e-300 or 5.5000000000000003e-67 < b < 4.5e9

    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 90.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 69.5%

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

    if 9.0000000000000001e-300 < b < 5.5000000000000003e-67 or 4.5e9 < b < 1.29999999999999986e61

    1. Initial program 96.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.3 \cdot 10^{-65}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 9 \cdot 10^{-300}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 5.5 \cdot 10^{-67}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 4500000000:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.3 \cdot 10^{+61}:\\ \;\;\;\;x + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 55.2% accurate, 0.7× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 2.3 \cdot 10^{-87}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 130000000:\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -5e20 or 1.3e8 < y

    1. Initial program 92.9%

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

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

    if -5e20 < y < 1.65000000000000014e-154

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.65000000000000014e-154 < y < 6.80000000000000053e-91

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

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

    if 6.80000000000000053e-91 < y < 2.3000000000000001e-87

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

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

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

    if 2.3000000000000001e-87 < y < 1.3e8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-154}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{-91}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{-87}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 130000000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 57.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -2.4 \cdot 10^{-130}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 140000000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.59999999999999989e49 or 1.4e11 < t

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

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

    if -2.59999999999999989e49 < t < -2.39999999999999997e-130 or -1.19999999999999996e-239 < t < 1.4e11

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

    if -2.39999999999999997e-130 < t < -1.19999999999999996e-239

    1. Initial program 95.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+49}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-130}:\\ \;\;\;\;x + \left(a - y \cdot z\right)\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-239}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;t \leq 140000000000:\\ \;\;\;\;x + \left(a - y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 64.3% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 140000000000:\\
\;\;\;\;x + \left(a - y \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.09999999999999984e59 or 1.4e11 < t

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

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

    if -2.09999999999999984e59 < t < -2.89999999999999977e-82

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

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

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

    if -2.89999999999999977e-82 < t < 6.40000000000000011e-86

    1. Initial program 98.9%

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

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

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

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

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

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

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

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

    if 6.40000000000000011e-86 < t < 1.4e11

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 36.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq -2.25 \cdot 10^{-185}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 10500000000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.1599999999999999e104 or 1.05e13 < y

    1. Initial program 91.6%

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

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

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

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

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

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

    if -1.1599999999999999e104 < y < -2.2500000000000001e-185 or 2.1000000000000002e-155 < y < 1.05e13

    1. Initial program 99.9%

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

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

    if -2.2500000000000001e-185 < y < 2.1000000000000002e-155

    1. Initial program 99.9%

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

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

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

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

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

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

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

        \[\leadsto x - \mathsf{fma}\left(a, t + -1, \color{blue}{-z}\right) \]
    6. Simplified76.2%

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

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

        \[\leadsto x - \color{blue}{\left(-z\right)} \]
    9. Simplified45.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.16 \cdot 10^{+104}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;y \leq -2.25 \cdot 10^{-185}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-155}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 10500000000000:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 49.5% accurate, 0.8× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 190000000:\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.29999999999999969e103 or 1.9e8 < y

    1. Initial program 91.7%

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

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

    if -4.29999999999999969e103 < y < -2.2e-185

    1. Initial program 99.9%

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

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

    if -2.2e-185 < y < 1.5000000000000001e-154

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\mathsf{fma}\left(a, t + -1, -1 \cdot z\right)} \]
      5. mul-1-neg76.7%

        \[\leadsto x - \mathsf{fma}\left(a, t + -1, \color{blue}{-z}\right) \]
    6. Simplified76.7%

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

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

        \[\leadsto x - \color{blue}{\left(-z\right)} \]
    9. Simplified44.2%

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

    if 1.5000000000000001e-154 < y < 1.9e8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.3 \cdot 10^{+103}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -2.2 \cdot 10^{-185}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 1.5 \cdot 10^{-154}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 190000000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 86.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;b \leq 4.5 \cdot 10^{+62}:\\
\;\;\;\;x + \left(t_3 + t_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.65000000000000024e-32

    1. Initial program 92.4%

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

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

    if -3.65000000000000024e-32 < b < 4.49999999999999999e62

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

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

    if 4.49999999999999999e62 < b

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

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

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

Alternative 13: 34.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq -9 \cdot 10^{-83}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 170000000000:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.5000000000000002e58 or 1.7e11 < t

    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 a around 0 66.2%

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

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

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

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

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

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

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

    if -9.5000000000000002e58 < t < -8.99999999999999995e-83 or 3.1e-24 < t < 1.7e11

    1. Initial program 97.1%

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

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

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

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

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

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

    if -8.99999999999999995e-83 < t < 3.1e-24

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.5 \cdot 10^{+58}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-83}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-24}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;t \leq 170000000000:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 66.4% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.9e110 or 3.85e9 < 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 76.2%

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

    if -2.9e110 < y < -4.4999999999999997e-24

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

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

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

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

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

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

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

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

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

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

    if -4.4999999999999997e-24 < y < 3.85e9

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 67.9% accurate, 0.9× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.30000000000000005e-65 or 3e61 < b

    1. Initial program 94.5%

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

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

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

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

    if -1.30000000000000005e-65 < b < -5.10000000000000011e-278

    1. Initial program 100.0%

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

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

    if -5.10000000000000011e-278 < b < 3e61

    1. Initial program 97.4%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\mathsf{fma}\left(a, t + -1, -1 \cdot z\right)} \]
      5. mul-1-neg70.6%

        \[\leadsto x - \mathsf{fma}\left(a, t + -1, \color{blue}{-z}\right) \]
    6. Simplified70.6%

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

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

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

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

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

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

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

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

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

Alternative 16: 85.6% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.29999999999999991e72 or 6.49999999999999992e63 < b

    1. Initial program 94.2%

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

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

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

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

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

    if -1.29999999999999991e72 < b < 6.49999999999999992e63

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

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

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

Alternative 17: 86.1% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.32000000000000002e-32

    1. Initial program 92.4%

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

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

    if -2.32000000000000002e-32 < b < 1.25000000000000007e62

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

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

    if 1.25000000000000007e62 < b

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

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

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

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

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

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

Alternative 18: 48.7% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;t \leq 690:\\
\;\;\;\;x + a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.3e48 or 690 < t

    1. Initial program 93.8%

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

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

    if -2.3e48 < t < -6.00000000000000021e-83

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

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

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

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

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

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

    if -6.00000000000000021e-83 < t < 690

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

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

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

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

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

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

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

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

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

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

Alternative 19: 55.6% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;y \leq 44000000:\\
\;\;\;\;t \cdot \left(b - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.2e20 or 4.4e7 < y

    1. Initial program 92.9%

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

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

    if -3.2e20 < y < 1.15e-154

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e-154 < y < 4.4e7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-154}:\\ \;\;\;\;x + \left(z + a\right)\\ \mathbf{elif}\;y \leq 44000000:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 18.6% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;a \leq 5.2 \cdot 10^{-271}:\\
\;\;\;\;z\\

\mathbf{elif}\;a \leq 4.8 \cdot 10^{+62}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.6e146 or 4.8e62 < a

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

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

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

    if -1.6e146 < a < 5.2e-271

    1. Initial program 98.1%

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

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

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

    if 5.2e-271 < a < 4.8e62

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.6 \cdot 10^{+146}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-271}:\\ \;\;\;\;z\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{+62}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 25.9% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{-43} \lor \neg \left(t \leq 0.00135\right):\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.6e-43 or 0.0013500000000000001 < t

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

    if -2.6e-43 < t < 0.0013500000000000001

    1. Initial program 98.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{-43} \lor \neg \left(t \leq 0.00135\right):\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 35.3% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5200000000000 \lor \neg \left(t \leq 3950000\right):\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.2e12 or 3.95e6 < t

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

    if -5.2e12 < t < 3.95e6

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

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

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

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

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

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

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

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

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

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

Alternative 23: 20.7% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.6000000000000002e103 or 5.60000000000000047e64 < a

    1. Initial program 93.2%

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

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

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

    if -2.6000000000000002e103 < a < 5.60000000000000047e64

    1. Initial program 98.7%

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

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

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

Alternative 24: 10.8% 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.4%

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

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

    \[\leadsto \color{blue}{a} \]
  5. Final simplification13.3%

    \[\leadsto a \]
  6. Add Preprocessing

Reproduce

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