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

Percentage Accurate: 95.5% → 98.1%
Time: 27.0s
Alternatives: 25
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 25 alternatives:

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

Initial Program: 95.5% 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.1% accurate, 0.5× speedup?

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

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

\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 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. Taylor expanded in t around 0 99.9%

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

    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. Taylor expanded in y around inf 72.0%

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

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

Alternative 2: 98.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot \left(1 - t\right) + \left(x - \left(y + -1\right) \cdot z\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
         (+ (+ (* a (- 1.0 t)) (- x (* (+ y -1.0) z))) (* (- (+ 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 = ((a * (1.0 - t)) + (x - ((y + -1.0) * z))) + (((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 = ((a * (1.0 - t)) + (x - ((y + -1.0) * z))) + (((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 = ((a * (1.0 - t)) + (x - ((y + -1.0) * z))) + (((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(a * Float64(1.0 - t)) + Float64(x - Float64(Float64(y + -1.0) * z))) + 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 = ((a * (1.0 - t)) + (x - ((y + -1.0) * z))) + (((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[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(x - N[(N[(y + -1.0), $MachinePrecision] * z), $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(a \cdot \left(1 - t\right) + \left(x - \left(y + -1\right) \cdot z\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 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 \]

    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. Taylor expanded in y around inf 72.0%

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

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

Alternative 3: 53.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \left(1 - y\right)\\ t_2 := \left(\left(y + t\right) - 2\right) \cdot b\\ t_3 := x - t \cdot a\\ \mathbf{if}\;b \leq -1.22 \cdot 10^{+54}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -1.95 \cdot 10^{-125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-190}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -1.6 \cdot 10^{-262}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{-189}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-152}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{-94}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+19}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* z (- 1.0 y))) (t_2 (* (- (+ y t) 2.0) b)) (t_3 (- x (* t a))))
   (if (<= b -1.22e+54)
     t_2
     (if (<= b -1.95e-125)
       t_1
       (if (<= b -2e-190)
         t_3
         (if (<= b -1.6e-262)
           t_1
           (if (<= b 1.6e-189)
             t_3
             (if (<= b 3e-152)
               t_1
               (if (<= b 7.2e-94)
                 (- x (* y z))
                 (if (<= b 2.8e+19) t_3 t_2))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = z * (1.0 - y);
	double t_2 = ((y + t) - 2.0) * b;
	double t_3 = x - (t * a);
	double tmp;
	if (b <= -1.22e+54) {
		tmp = t_2;
	} else if (b <= -1.95e-125) {
		tmp = t_1;
	} else if (b <= -2e-190) {
		tmp = t_3;
	} else if (b <= -1.6e-262) {
		tmp = t_1;
	} else if (b <= 1.6e-189) {
		tmp = t_3;
	} else if (b <= 3e-152) {
		tmp = t_1;
	} else if (b <= 7.2e-94) {
		tmp = x - (y * z);
	} else if (b <= 2.8e+19) {
		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 = z * (1.0d0 - y)
    t_2 = ((y + t) - 2.0d0) * b
    t_3 = x - (t * a)
    if (b <= (-1.22d+54)) then
        tmp = t_2
    else if (b <= (-1.95d-125)) then
        tmp = t_1
    else if (b <= (-2d-190)) then
        tmp = t_3
    else if (b <= (-1.6d-262)) then
        tmp = t_1
    else if (b <= 1.6d-189) then
        tmp = t_3
    else if (b <= 3d-152) then
        tmp = t_1
    else if (b <= 7.2d-94) then
        tmp = x - (y * z)
    else if (b <= 2.8d+19) 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 = z * (1.0 - y);
	double t_2 = ((y + t) - 2.0) * b;
	double t_3 = x - (t * a);
	double tmp;
	if (b <= -1.22e+54) {
		tmp = t_2;
	} else if (b <= -1.95e-125) {
		tmp = t_1;
	} else if (b <= -2e-190) {
		tmp = t_3;
	} else if (b <= -1.6e-262) {
		tmp = t_1;
	} else if (b <= 1.6e-189) {
		tmp = t_3;
	} else if (b <= 3e-152) {
		tmp = t_1;
	} else if (b <= 7.2e-94) {
		tmp = x - (y * z);
	} else if (b <= 2.8e+19) {
		tmp = t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = z * (1.0 - y)
	t_2 = ((y + t) - 2.0) * b
	t_3 = x - (t * a)
	tmp = 0
	if b <= -1.22e+54:
		tmp = t_2
	elif b <= -1.95e-125:
		tmp = t_1
	elif b <= -2e-190:
		tmp = t_3
	elif b <= -1.6e-262:
		tmp = t_1
	elif b <= 1.6e-189:
		tmp = t_3
	elif b <= 3e-152:
		tmp = t_1
	elif b <= 7.2e-94:
		tmp = x - (y * z)
	elif b <= 2.8e+19:
		tmp = t_3
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(z * Float64(1.0 - y))
	t_2 = Float64(Float64(Float64(y + t) - 2.0) * b)
	t_3 = Float64(x - Float64(t * a))
	tmp = 0.0
	if (b <= -1.22e+54)
		tmp = t_2;
	elseif (b <= -1.95e-125)
		tmp = t_1;
	elseif (b <= -2e-190)
		tmp = t_3;
	elseif (b <= -1.6e-262)
		tmp = t_1;
	elseif (b <= 1.6e-189)
		tmp = t_3;
	elseif (b <= 3e-152)
		tmp = t_1;
	elseif (b <= 7.2e-94)
		tmp = Float64(x - Float64(y * z));
	elseif (b <= 2.8e+19)
		tmp = t_3;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = z * (1.0 - y);
	t_2 = ((y + t) - 2.0) * b;
	t_3 = x - (t * a);
	tmp = 0.0;
	if (b <= -1.22e+54)
		tmp = t_2;
	elseif (b <= -1.95e-125)
		tmp = t_1;
	elseif (b <= -2e-190)
		tmp = t_3;
	elseif (b <= -1.6e-262)
		tmp = t_1;
	elseif (b <= 1.6e-189)
		tmp = t_3;
	elseif (b <= 3e-152)
		tmp = t_1;
	elseif (b <= 7.2e-94)
		tmp = x - (y * z);
	elseif (b <= 2.8e+19)
		tmp = t_3;
	else
		tmp = t_2;
	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[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.22e+54], t$95$2, If[LessEqual[b, -1.95e-125], t$95$1, If[LessEqual[b, -2e-190], t$95$3, If[LessEqual[b, -1.6e-262], t$95$1, If[LessEqual[b, 1.6e-189], t$95$3, If[LessEqual[b, 3e-152], t$95$1, If[LessEqual[b, 7.2e-94], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.8e+19], t$95$3, t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -1.95 \cdot 10^{-125}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -2 \cdot 10^{-190}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;b \leq 1.6 \cdot 10^{-189}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 3 \cdot 10^{-152}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 2.8 \cdot 10^{+19}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.22e54 or 2.8e19 < b

    1. Initial program 91.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. Taylor expanded in b around inf 76.4%

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

    if -1.22e54 < b < -1.94999999999999991e-125 or -2e-190 < b < -1.6e-262 or 1.6e-189 < b < 3e-152

    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. Taylor expanded in z around inf 55.0%

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

    if -1.94999999999999991e-125 < b < -2e-190 or -1.6e-262 < b < 1.6e-189 or 7.2e-94 < b < 2.8e19

    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. Taylor expanded in z around 0 78.9%

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

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

      \[\leadsto x - \color{blue}{a \cdot t} \]
    5. Step-by-step derivation
      1. *-commutative59.2%

        \[\leadsto x - \color{blue}{t \cdot a} \]
    6. Simplified59.2%

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

    if 3e-152 < b < 7.2e-94

    1. Initial program 93.6%

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

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

      \[\leadsto x - \color{blue}{y \cdot z} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification66.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.22 \cdot 10^{+54}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -1.95 \cdot 10^{-125}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq -2 \cdot 10^{-190}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq -1.6 \cdot 10^{-262}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{-189}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 3 \cdot 10^{-152}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 7.2 \cdot 10^{-94}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+19}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 4: 57.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \left(y + -1\right) \cdot z\\ t_2 := z \cdot \left(1 - y\right)\\ t_3 := \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -1.4 \cdot 10^{+54}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;b \leq -5.2 \cdot 10^{-17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq -9.5 \cdot 10^{-74}:\\ \;\;\;\;a + \left(x + b \cdot -2\right)\\ \mathbf{elif}\;b \leq -6.2 \cdot 10^{-126}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq -2.9 \cdot 10^{-181}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 1.88 \cdot 10^{-93}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 6.3 \cdot 10^{-15}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 5.4 \cdot 10^{+16}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- x (* (+ y -1.0) z)))
        (t_2 (* z (- 1.0 y)))
        (t_3 (* (- (+ y t) 2.0) b)))
   (if (<= b -1.4e+54)
     t_3
     (if (<= b -5.2e-17)
       t_1
       (if (<= b -9.5e-74)
         (+ a (+ x (* b -2.0)))
         (if (<= b -6.2e-126)
           t_2
           (if (<= b -2.9e-181)
             (* t (- b a))
             (if (<= b 1.88e-93)
               t_1
               (if (<= b 6.3e-15)
                 (- x (* t a))
                 (if (<= b 5.4e+16) t_2 t_3))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x - ((y + -1.0) * z);
	double t_2 = z * (1.0 - y);
	double t_3 = ((y + t) - 2.0) * b;
	double tmp;
	if (b <= -1.4e+54) {
		tmp = t_3;
	} else if (b <= -5.2e-17) {
		tmp = t_1;
	} else if (b <= -9.5e-74) {
		tmp = a + (x + (b * -2.0));
	} else if (b <= -6.2e-126) {
		tmp = t_2;
	} else if (b <= -2.9e-181) {
		tmp = t * (b - a);
	} else if (b <= 1.88e-93) {
		tmp = t_1;
	} else if (b <= 6.3e-15) {
		tmp = x - (t * a);
	} else if (b <= 5.4e+16) {
		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 = x - ((y + (-1.0d0)) * z)
    t_2 = z * (1.0d0 - y)
    t_3 = ((y + t) - 2.0d0) * b
    if (b <= (-1.4d+54)) then
        tmp = t_3
    else if (b <= (-5.2d-17)) then
        tmp = t_1
    else if (b <= (-9.5d-74)) then
        tmp = a + (x + (b * (-2.0d0)))
    else if (b <= (-6.2d-126)) then
        tmp = t_2
    else if (b <= (-2.9d-181)) then
        tmp = t * (b - a)
    else if (b <= 1.88d-93) then
        tmp = t_1
    else if (b <= 6.3d-15) then
        tmp = x - (t * a)
    else if (b <= 5.4d+16) 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 = x - ((y + -1.0) * z);
	double t_2 = z * (1.0 - y);
	double t_3 = ((y + t) - 2.0) * b;
	double tmp;
	if (b <= -1.4e+54) {
		tmp = t_3;
	} else if (b <= -5.2e-17) {
		tmp = t_1;
	} else if (b <= -9.5e-74) {
		tmp = a + (x + (b * -2.0));
	} else if (b <= -6.2e-126) {
		tmp = t_2;
	} else if (b <= -2.9e-181) {
		tmp = t * (b - a);
	} else if (b <= 1.88e-93) {
		tmp = t_1;
	} else if (b <= 6.3e-15) {
		tmp = x - (t * a);
	} else if (b <= 5.4e+16) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x - ((y + -1.0) * z)
	t_2 = z * (1.0 - y)
	t_3 = ((y + t) - 2.0) * b
	tmp = 0
	if b <= -1.4e+54:
		tmp = t_3
	elif b <= -5.2e-17:
		tmp = t_1
	elif b <= -9.5e-74:
		tmp = a + (x + (b * -2.0))
	elif b <= -6.2e-126:
		tmp = t_2
	elif b <= -2.9e-181:
		tmp = t * (b - a)
	elif b <= 1.88e-93:
		tmp = t_1
	elif b <= 6.3e-15:
		tmp = x - (t * a)
	elif b <= 5.4e+16:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x - Float64(Float64(y + -1.0) * z))
	t_2 = Float64(z * Float64(1.0 - y))
	t_3 = Float64(Float64(Float64(y + t) - 2.0) * b)
	tmp = 0.0
	if (b <= -1.4e+54)
		tmp = t_3;
	elseif (b <= -5.2e-17)
		tmp = t_1;
	elseif (b <= -9.5e-74)
		tmp = Float64(a + Float64(x + Float64(b * -2.0)));
	elseif (b <= -6.2e-126)
		tmp = t_2;
	elseif (b <= -2.9e-181)
		tmp = Float64(t * Float64(b - a));
	elseif (b <= 1.88e-93)
		tmp = t_1;
	elseif (b <= 6.3e-15)
		tmp = Float64(x - Float64(t * a));
	elseif (b <= 5.4e+16)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x - ((y + -1.0) * z);
	t_2 = z * (1.0 - y);
	t_3 = ((y + t) - 2.0) * b;
	tmp = 0.0;
	if (b <= -1.4e+54)
		tmp = t_3;
	elseif (b <= -5.2e-17)
		tmp = t_1;
	elseif (b <= -9.5e-74)
		tmp = a + (x + (b * -2.0));
	elseif (b <= -6.2e-126)
		tmp = t_2;
	elseif (b <= -2.9e-181)
		tmp = t * (b - a);
	elseif (b <= 1.88e-93)
		tmp = t_1;
	elseif (b <= 6.3e-15)
		tmp = x - (t * a);
	elseif (b <= 5.4e+16)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(N[(y + -1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.4e+54], t$95$3, If[LessEqual[b, -5.2e-17], t$95$1, If[LessEqual[b, -9.5e-74], N[(a + N[(x + N[(b * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -6.2e-126], t$95$2, If[LessEqual[b, -2.9e-181], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.88e-93], t$95$1, If[LessEqual[b, 6.3e-15], N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.4e+16], t$95$2, t$95$3]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -5.2 \cdot 10^{-17}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq -6.2 \cdot 10^{-126}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq -2.9 \cdot 10^{-181}:\\
\;\;\;\;t \cdot \left(b - a\right)\\

\mathbf{elif}\;b \leq 1.88 \cdot 10^{-93}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 5.4 \cdot 10^{+16}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if b < -1.40000000000000008e54 or 5.4e16 < b

    1. Initial program 91.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. Taylor expanded in b around inf 76.4%

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

    if -1.40000000000000008e54 < b < -5.20000000000000006e-17 or -2.8999999999999998e-181 < b < 1.88000000000000001e-93

    1. Initial program 95.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. Taylor expanded in a around 0 77.5%

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

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

    if -5.20000000000000006e-17 < b < -9.5000000000000007e-74

    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. Taylor expanded in z around 0 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{b \cdot -2} \]
    8. Simplified61.1%

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

    if -9.5000000000000007e-74 < b < -6.2000000000000003e-126 or 6.29999999999999982e-15 < b < 5.4e16

    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. Taylor expanded in z around inf 65.9%

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

    if -6.2000000000000003e-126 < b < -2.8999999999999998e-181

    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. Taylor expanded in t around inf 59.5%

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

    if 1.88000000000000001e-93 < b < 6.29999999999999982e-15

    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. Taylor expanded in z around 0 93.3%

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

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

      \[\leadsto x - \color{blue}{a \cdot t} \]
    5. Step-by-step derivation
      1. *-commutative67.7%

        \[\leadsto x - \color{blue}{t \cdot a} \]
    6. Simplified67.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.4 \cdot 10^{+54}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -5.2 \cdot 10^{-17}:\\ \;\;\;\;x - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;b \leq -9.5 \cdot 10^{-74}:\\ \;\;\;\;a + \left(x + b \cdot -2\right)\\ \mathbf{elif}\;b \leq -6.2 \cdot 10^{-126}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq -2.9 \cdot 10^{-181}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;b \leq 1.88 \cdot 10^{-93}:\\ \;\;\;\;x - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;b \leq 6.3 \cdot 10^{-15}:\\ \;\;\;\;x - t \cdot a\\ \mathbf{elif}\;b \leq 5.4 \cdot 10^{+16}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 5: 68.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(z + \left(a - t \cdot a\right)\right)\\ t_2 := \left(x + y \cdot b\right) - \left(y + -1\right) \cdot z\\ \mathbf{if}\;y \leq -8 \cdot 10^{+117}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -4 \cdot 10^{+65}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -680:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-191}:\\ \;\;\;\;z + \left(x + b \cdot \left(t - 2\right)\right)\\ \mathbf{elif}\;y \leq 14000000000:\\ \;\;\;\;t \cdot b + \left(z - \left(t + -1\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (+ z (- a (* t a)))))
        (t_2 (- (+ x (* y b)) (* (+ y -1.0) z))))
   (if (<= y -8e+117)
     (* y (- b z))
     (if (<= y -4e+65)
       t_1
       (if (<= y -680.0)
         t_2
         (if (<= y -3.8e-68)
           t_1
           (if (<= y 3.5e-191)
             (+ z (+ x (* b (- t 2.0))))
             (if (<= y 14000000000.0)
               (+ (* t b) (- z (* (+ t -1.0) a)))
               t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (z + (a - (t * a)));
	double t_2 = (x + (y * b)) - ((y + -1.0) * z);
	double tmp;
	if (y <= -8e+117) {
		tmp = y * (b - z);
	} else if (y <= -4e+65) {
		tmp = t_1;
	} else if (y <= -680.0) {
		tmp = t_2;
	} else if (y <= -3.8e-68) {
		tmp = t_1;
	} else if (y <= 3.5e-191) {
		tmp = z + (x + (b * (t - 2.0)));
	} else if (y <= 14000000000.0) {
		tmp = (t * b) + (z - ((t + -1.0) * a));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x + (z + (a - (t * a)))
    t_2 = (x + (y * b)) - ((y + (-1.0d0)) * z)
    if (y <= (-8d+117)) then
        tmp = y * (b - z)
    else if (y <= (-4d+65)) then
        tmp = t_1
    else if (y <= (-680.0d0)) then
        tmp = t_2
    else if (y <= (-3.8d-68)) then
        tmp = t_1
    else if (y <= 3.5d-191) then
        tmp = z + (x + (b * (t - 2.0d0)))
    else if (y <= 14000000000.0d0) then
        tmp = (t * b) + (z - ((t + (-1.0d0)) * a))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + (z + (a - (t * a)));
	double t_2 = (x + (y * b)) - ((y + -1.0) * z);
	double tmp;
	if (y <= -8e+117) {
		tmp = y * (b - z);
	} else if (y <= -4e+65) {
		tmp = t_1;
	} else if (y <= -680.0) {
		tmp = t_2;
	} else if (y <= -3.8e-68) {
		tmp = t_1;
	} else if (y <= 3.5e-191) {
		tmp = z + (x + (b * (t - 2.0)));
	} else if (y <= 14000000000.0) {
		tmp = (t * b) + (z - ((t + -1.0) * a));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + (z + (a - (t * a)))
	t_2 = (x + (y * b)) - ((y + -1.0) * z)
	tmp = 0
	if y <= -8e+117:
		tmp = y * (b - z)
	elif y <= -4e+65:
		tmp = t_1
	elif y <= -680.0:
		tmp = t_2
	elif y <= -3.8e-68:
		tmp = t_1
	elif y <= 3.5e-191:
		tmp = z + (x + (b * (t - 2.0)))
	elif y <= 14000000000.0:
		tmp = (t * b) + (z - ((t + -1.0) * a))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(z + Float64(a - Float64(t * a))))
	t_2 = Float64(Float64(x + Float64(y * b)) - Float64(Float64(y + -1.0) * z))
	tmp = 0.0
	if (y <= -8e+117)
		tmp = Float64(y * Float64(b - z));
	elseif (y <= -4e+65)
		tmp = t_1;
	elseif (y <= -680.0)
		tmp = t_2;
	elseif (y <= -3.8e-68)
		tmp = t_1;
	elseif (y <= 3.5e-191)
		tmp = Float64(z + Float64(x + Float64(b * Float64(t - 2.0))));
	elseif (y <= 14000000000.0)
		tmp = Float64(Float64(t * b) + Float64(z - Float64(Float64(t + -1.0) * a)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + (z + (a - (t * a)));
	t_2 = (x + (y * b)) - ((y + -1.0) * z);
	tmp = 0.0;
	if (y <= -8e+117)
		tmp = y * (b - z);
	elseif (y <= -4e+65)
		tmp = t_1;
	elseif (y <= -680.0)
		tmp = t_2;
	elseif (y <= -3.8e-68)
		tmp = t_1;
	elseif (y <= 3.5e-191)
		tmp = z + (x + (b * (t - 2.0)));
	elseif (y <= 14000000000.0)
		tmp = (t * b) + (z - ((t + -1.0) * a));
	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[(a - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(y * b), $MachinePrecision]), $MachinePrecision] - N[(N[(y + -1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8e+117], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4e+65], t$95$1, If[LessEqual[y, -680.0], t$95$2, If[LessEqual[y, -3.8e-68], t$95$1, If[LessEqual[y, 3.5e-191], N[(z + N[(x + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 14000000000.0], N[(N[(t * b), $MachinePrecision] + N[(z - N[(N[(t + -1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -4 \cdot 10^{+65}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -680:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -3.8 \cdot 10^{-68}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 14000000000:\\
\;\;\;\;t \cdot b + \left(z - \left(t + -1\right) \cdot a\right)\\

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


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

    1. Initial program 87.4%

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

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

    if -8.0000000000000004e117 < y < -4e65 or -680 < y < -3.80000000000000038e-68

    1. Initial program 91.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. Taylor expanded in b around 0 84.6%

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(a \cdot \left(t + -1\right) - z\right)} \]
      7. distribute-lft-in83.0%

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

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

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

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

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

    if -4e65 < y < -680 or 1.4e10 < y

    1. Initial program 93.4%

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

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

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

    if -3.80000000000000038e-68 < y < 3.50000000000000007e-191

    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. Taylor expanded in a around 0 85.0%

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

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

    if 3.50000000000000007e-191 < y < 1.4e10

    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. Taylor expanded in y around 0 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+117}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -4 \cdot 10^{+65}:\\ \;\;\;\;x + \left(z + \left(a - t \cdot a\right)\right)\\ \mathbf{elif}\;y \leq -680:\\ \;\;\;\;\left(x + y \cdot b\right) - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{-68}:\\ \;\;\;\;x + \left(z + \left(a - t \cdot a\right)\right)\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-191}:\\ \;\;\;\;z + \left(x + b \cdot \left(t - 2\right)\right)\\ \mathbf{elif}\;y \leq 14000000000:\\ \;\;\;\;t \cdot b + \left(z - \left(t + -1\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + y \cdot b\right) - \left(y + -1\right) \cdot z\\ \end{array} \]

Alternative 6: 48.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(1 - t\right)\\ t_2 := y \cdot \left(b - z\right)\\ t_3 := b \cdot \left(t - 2\right)\\ \mathbf{if}\;y \leq -2.5 \cdot 10^{+104}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{+59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -50000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-68}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{-278}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-234}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-168}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+31}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \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 (- b z))) (t_3 (* b (- t 2.0))))
   (if (<= y -2.5e+104)
     t_2
     (if (<= y -7.4e+59)
       t_1
       (if (<= y -50000.0)
         t_2
         (if (<= y -2e-68)
           t_1
           (if (<= y 2.05e-278)
             t_3
             (if (<= y 4.5e-234)
               (* z (- 1.0 y))
               (if (<= y 5.6e-168)
                 t_3
                 (if (<= y 2.2e+31) (* t (- b a)) 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 * (b - z);
	double t_3 = b * (t - 2.0);
	double tmp;
	if (y <= -2.5e+104) {
		tmp = t_2;
	} else if (y <= -7.4e+59) {
		tmp = t_1;
	} else if (y <= -50000.0) {
		tmp = t_2;
	} else if (y <= -2e-68) {
		tmp = t_1;
	} else if (y <= 2.05e-278) {
		tmp = t_3;
	} else if (y <= 4.5e-234) {
		tmp = z * (1.0 - y);
	} else if (y <= 5.6e-168) {
		tmp = t_3;
	} else if (y <= 2.2e+31) {
		tmp = t * (b - a);
	} 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 = a * (1.0d0 - t)
    t_2 = y * (b - z)
    t_3 = b * (t - 2.0d0)
    if (y <= (-2.5d+104)) then
        tmp = t_2
    else if (y <= (-7.4d+59)) then
        tmp = t_1
    else if (y <= (-50000.0d0)) then
        tmp = t_2
    else if (y <= (-2d-68)) then
        tmp = t_1
    else if (y <= 2.05d-278) then
        tmp = t_3
    else if (y <= 4.5d-234) then
        tmp = z * (1.0d0 - y)
    else if (y <= 5.6d-168) then
        tmp = t_3
    else if (y <= 2.2d+31) then
        tmp = t * (b - a)
    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 * (b - z);
	double t_3 = b * (t - 2.0);
	double tmp;
	if (y <= -2.5e+104) {
		tmp = t_2;
	} else if (y <= -7.4e+59) {
		tmp = t_1;
	} else if (y <= -50000.0) {
		tmp = t_2;
	} else if (y <= -2e-68) {
		tmp = t_1;
	} else if (y <= 2.05e-278) {
		tmp = t_3;
	} else if (y <= 4.5e-234) {
		tmp = z * (1.0 - y);
	} else if (y <= 5.6e-168) {
		tmp = t_3;
	} else if (y <= 2.2e+31) {
		tmp = t * (b - a);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = a * (1.0 - t)
	t_2 = y * (b - z)
	t_3 = b * (t - 2.0)
	tmp = 0
	if y <= -2.5e+104:
		tmp = t_2
	elif y <= -7.4e+59:
		tmp = t_1
	elif y <= -50000.0:
		tmp = t_2
	elif y <= -2e-68:
		tmp = t_1
	elif y <= 2.05e-278:
		tmp = t_3
	elif y <= 4.5e-234:
		tmp = z * (1.0 - y)
	elif y <= 5.6e-168:
		tmp = t_3
	elif y <= 2.2e+31:
		tmp = t * (b - a)
	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(b - z))
	t_3 = Float64(b * Float64(t - 2.0))
	tmp = 0.0
	if (y <= -2.5e+104)
		tmp = t_2;
	elseif (y <= -7.4e+59)
		tmp = t_1;
	elseif (y <= -50000.0)
		tmp = t_2;
	elseif (y <= -2e-68)
		tmp = t_1;
	elseif (y <= 2.05e-278)
		tmp = t_3;
	elseif (y <= 4.5e-234)
		tmp = Float64(z * Float64(1.0 - y));
	elseif (y <= 5.6e-168)
		tmp = t_3;
	elseif (y <= 2.2e+31)
		tmp = Float64(t * Float64(b - a));
	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 * (b - z);
	t_3 = b * (t - 2.0);
	tmp = 0.0;
	if (y <= -2.5e+104)
		tmp = t_2;
	elseif (y <= -7.4e+59)
		tmp = t_1;
	elseif (y <= -50000.0)
		tmp = t_2;
	elseif (y <= -2e-68)
		tmp = t_1;
	elseif (y <= 2.05e-278)
		tmp = t_3;
	elseif (y <= 4.5e-234)
		tmp = z * (1.0 - y);
	elseif (y <= 5.6e-168)
		tmp = t_3;
	elseif (y <= 2.2e+31)
		tmp = t * (b - a);
	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 * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e+104], t$95$2, If[LessEqual[y, -7.4e+59], t$95$1, If[LessEqual[y, -50000.0], t$95$2, If[LessEqual[y, -2e-68], t$95$1, If[LessEqual[y, 2.05e-278], t$95$3, If[LessEqual[y, 4.5e-234], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.6e-168], t$95$3, If[LessEqual[y, 2.2e+31], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -7.4 \cdot 10^{+59}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -50000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -2 \cdot 10^{-68}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.05 \cdot 10^{-278}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{-234}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;y \leq 5.6 \cdot 10^{-168}:\\
\;\;\;\;t_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.4999999999999998e104 or -7.39999999999999995e59 < y < -5e4 or 2.2000000000000001e31 < y

    1. Initial program 90.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. Taylor expanded in y around inf 77.2%

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

    if -2.4999999999999998e104 < y < -7.39999999999999995e59 or -5e4 < y < -2.00000000000000013e-68

    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. Taylor expanded in a around inf 55.3%

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

    if -2.00000000000000013e-68 < y < 2.05000000000000001e-278 or 4.50000000000000009e-234 < y < 5.6000000000000005e-168

    1. Initial program 97.2%

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

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

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

    if 2.05000000000000001e-278 < y < 4.50000000000000009e-234

    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. Taylor expanded in z around inf 49.8%

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

    if 5.6000000000000005e-168 < y < 2.2000000000000001e31

    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. Taylor expanded in t around inf 43.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+104}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{+59}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -50000:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-68}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{-278}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-234}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{-168}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+31}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 7: 48.7% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;y \leq -35000000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -1.5 \cdot 10^{-68}:\\
\;\;\;\;a - t \cdot a\\

\mathbf{elif}\;y \leq 2.4 \cdot 10^{-287}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 9.6 \cdot 10^{-235}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;y \leq 1.9 \cdot 10^{-169}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -2.4999999999999998e104 or -7.39999999999999995e59 < y < -3.5e10 or 1.7999999999999998e32 < y

    1. Initial program 90.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. Taylor expanded in y around inf 77.2%

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

    if -2.4999999999999998e104 < y < -7.39999999999999995e59

    1. Initial program 85.7%

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

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

    if -3.5e10 < y < -1.5e-68

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a} + \left(-t\right) \cdot a \]
      4. distribute-lft-neg-in47.5%

        \[\leadsto a + \color{blue}{\left(-t \cdot a\right)} \]
      5. *-commutative47.5%

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

        \[\leadsto \color{blue}{a - a \cdot t} \]
    7. Simplified47.5%

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

    if -1.5e-68 < y < 2.39999999999999999e-287 or 9.60000000000000043e-235 < y < 1.9e-169

    1. Initial program 97.2%

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

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

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

    if 2.39999999999999999e-287 < y < 9.60000000000000043e-235

    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. Taylor expanded in z around inf 49.8%

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

    if 1.9e-169 < y < 1.7999999999999998e32

    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. Taylor expanded in t around inf 43.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+104}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -7.4 \cdot 10^{+59}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -35000000000:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{-68}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-287}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 9.6 \cdot 10^{-235}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{-169}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{+32}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 8: 48.8% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;y \leq -21000:\\
\;\;\;\;x - y \cdot z\\

\mathbf{elif}\;y \leq -4.6 \cdot 10^{-69}:\\
\;\;\;\;a - t \cdot a\\

\mathbf{elif}\;y \leq 1.08 \cdot 10^{-280}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.05 \cdot 10^{-234}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\

\mathbf{elif}\;y \leq 8 \cdot 10^{-171}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if y < -2.4999999999999998e104 or 7.19999999999999952e29 < y

    1. Initial program 90.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. Taylor expanded in y around inf 78.0%

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

    if -2.4999999999999998e104 < y < -3.20000000000000019e64

    1. Initial program 80.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. Taylor expanded in a around inf 100.0%

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

    if -3.20000000000000019e64 < y < -21000

    1. Initial program 92.1%

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

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

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

    if -21000 < y < -4.6000000000000001e-69

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a} + \left(-t\right) \cdot a \]
      4. distribute-lft-neg-in47.5%

        \[\leadsto a + \color{blue}{\left(-t \cdot a\right)} \]
      5. *-commutative47.5%

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

        \[\leadsto \color{blue}{a - a \cdot t} \]
    7. Simplified47.5%

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

    if -4.6000000000000001e-69 < y < 1.07999999999999996e-280 or 2.05000000000000005e-234 < y < 7.9999999999999999e-171

    1. Initial program 97.2%

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

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

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

    if 1.07999999999999996e-280 < y < 2.05000000000000005e-234

    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. Taylor expanded in z around inf 49.8%

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

    if 7.9999999999999999e-171 < y < 7.19999999999999952e29

    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. Taylor expanded in t around inf 43.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+104}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{+64}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -21000:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;y \leq -4.6 \cdot 10^{-69}:\\ \;\;\;\;a - t \cdot a\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{-280}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 2.05 \cdot 10^{-234}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;y \leq 8 \cdot 10^{-171}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 7.2 \cdot 10^{+29}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 9: 35.1% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq -1.5 \cdot 10^{+64}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -8 \cdot 10^{+29}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;y \leq -0.065:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq -2.6 \cdot 10^{-68}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 1.3 \cdot 10^{+31}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -3.0000000000000003e129 or -7.99999999999999931e29 < y < -0.065000000000000002

    1. Initial program 88.8%

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

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

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

    if -3.0000000000000003e129 < y < -1.5000000000000001e64 or -0.065000000000000002 < y < -2.5999999999999998e-68 or 2.45000000000000014e-88 < y < 1.3e31

    1. Initial program 95.1%

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

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

    if -1.5000000000000001e64 < y < -7.99999999999999931e29

    1. Initial program 87.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. Taylor expanded in z around 0 64.0%

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

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

      \[\leadsto \color{blue}{x - -1 \cdot a} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv52.5%

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

        \[\leadsto x + \color{blue}{1} \cdot a \]
      3. *-lft-identity52.5%

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative52.5%

        \[\leadsto \color{blue}{a + x} \]
    6. Simplified52.5%

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

    if -2.5999999999999998e-68 < y < 2.45000000000000014e-88

    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. Taylor expanded in b around inf 43.2%

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

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

    if 1.3e31 < y

    1. Initial program 93.3%

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

      \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
    3. Taylor expanded in b around 0 47.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+129}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{+64}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -8 \cdot 10^{+29}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq -0.065:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -2.6 \cdot 10^{-68}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{-88}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+31}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \end{array} \]

Alternative 10: 35.8% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;y \leq -1.2 \cdot 10^{+30}:\\
\;\;\;\;x + a\\

\mathbf{elif}\;y \leq -0.065:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;y \leq -3.5 \cdot 10^{-68}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -1.0000000000000001e130 or -1.2e30 < y < -0.065000000000000002

    1. Initial program 88.8%

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

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

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

    if -1.0000000000000001e130 < y < -2.24999999999999987e64 or -0.065000000000000002 < y < -3.50000000000000013e-68

    1. Initial program 91.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. Taylor expanded in a around inf 55.3%

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

    if -2.24999999999999987e64 < y < -1.2e30

    1. Initial program 87.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. Taylor expanded in z around 0 64.0%

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

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

      \[\leadsto \color{blue}{x - -1 \cdot a} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv52.5%

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

        \[\leadsto x + \color{blue}{1} \cdot a \]
      3. *-lft-identity52.5%

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative52.5%

        \[\leadsto \color{blue}{a + x} \]
    6. Simplified52.5%

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

    if -3.50000000000000013e-68 < y < 1.4500000000000001e-169

    1. Initial program 97.6%

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

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

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

    if 1.4500000000000001e-169 < y < 1.02000000000000008e144

    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. Taylor expanded in t around inf 41.3%

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

    if 1.02000000000000008e144 < y

    1. Initial program 91.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. Taylor expanded in y around inf 77.8%

      \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
    3. Taylor expanded in b around 0 55.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1 \cdot 10^{+130}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -2.25 \cdot 10^{+64}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{+30}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;y \leq -0.065:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -3.5 \cdot 10^{-68}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{-169}:\\ \;\;\;\;b \cdot \left(t - 2\right)\\ \mathbf{elif}\;y \leq 1.02 \cdot 10^{+144}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \end{array} \]

Alternative 11: 85.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+33} \lor \neg \left(z \leq 2.1 \cdot 10^{+125}\right):\\
\;\;\;\;x - \left(\left(t + -1\right) \cdot a + \left(y + -1\right) \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.1999999999999995e33 or 2.1000000000000001e125 < z

    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. Taylor expanded in b around 0 83.0%

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

    if -5.1999999999999995e33 < z < 2.1000000000000001e125

    1. Initial program 95.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. Step-by-step derivation
      1. +-commutative95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b + \left(x - \left(\left(y - 1\right) \cdot z + \color{blue}{\left(t - 1\right)} \cdot a\right)\right) \]
      10. associate--l-95.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(x - \color{blue}{\left(a \cdot t - a\right)}\right) + b \cdot \left(y + \left(t + -2\right)\right) \]
      10. *-commutative87.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+33} \lor \neg \left(z \leq 2.1 \cdot 10^{+125}\right):\\ \;\;\;\;x - \left(\left(t + -1\right) \cdot a + \left(y + -1\right) \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + \left(a - t \cdot a\right)\right) + b \cdot \left(y + \left(t + -2\right)\right)\\ \end{array} \]

Alternative 12: 85.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+59} \lor \neg \left(z \leq 9.6 \cdot 10^{+42}\right):\\
\;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) - \left(y + -1\right) \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.15000000000000004e59 or 9.5999999999999994e42 < z

    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. Taylor expanded in a around 0 84.8%

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

    if -1.15000000000000004e59 < z < 9.5999999999999994e42

    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(y + t\right) - 2\right) \cdot b + \left(x - \left(\left(y - 1\right) \cdot z + \color{blue}{\left(t - 1\right)} \cdot a\right)\right) \]
      10. associate--l-97.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+59} \lor \neg \left(z \leq 9.6 \cdot 10^{+42}\right):\\ \;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) - \left(y + -1\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(x + \left(a - t \cdot a\right)\right) + b \cdot \left(y + \left(t + -2\right)\right)\\ \end{array} \]

Alternative 13: 33.4% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.2 \cdot 10^{+161}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -8.2 \cdot 10^{+70}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq -1.2 \cdot 10^{+54}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 1.75 \cdot 10^{-130}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-97}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+77}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -3.2e+161)
   (* y b)
   (if (<= b -8.2e+70)
     (* t b)
     (if (<= b -1.2e+54)
       (* y b)
       (if (<= b 1.75e-130)
         (+ x a)
         (if (<= b 1.7e-97)
           (* z (- y))
           (if (<= b 2.4e+77) (* a (- 1.0 t)) (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -3.2e+161) {
		tmp = y * b;
	} else if (b <= -8.2e+70) {
		tmp = t * b;
	} else if (b <= -1.2e+54) {
		tmp = y * b;
	} else if (b <= 1.75e-130) {
		tmp = x + a;
	} else if (b <= 1.7e-97) {
		tmp = z * -y;
	} else if (b <= 2.4e+77) {
		tmp = a * (1.0 - t);
	} else {
		tmp = y * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (b <= (-3.2d+161)) then
        tmp = y * b
    else if (b <= (-8.2d+70)) then
        tmp = t * b
    else if (b <= (-1.2d+54)) then
        tmp = y * b
    else if (b <= 1.75d-130) then
        tmp = x + a
    else if (b <= 1.7d-97) then
        tmp = z * -y
    else if (b <= 2.4d+77) then
        tmp = a * (1.0d0 - t)
    else
        tmp = y * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -3.2e+161) {
		tmp = y * b;
	} else if (b <= -8.2e+70) {
		tmp = t * b;
	} else if (b <= -1.2e+54) {
		tmp = y * b;
	} else if (b <= 1.75e-130) {
		tmp = x + a;
	} else if (b <= 1.7e-97) {
		tmp = z * -y;
	} else if (b <= 2.4e+77) {
		tmp = a * (1.0 - t);
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -3.2e+161:
		tmp = y * b
	elif b <= -8.2e+70:
		tmp = t * b
	elif b <= -1.2e+54:
		tmp = y * b
	elif b <= 1.75e-130:
		tmp = x + a
	elif b <= 1.7e-97:
		tmp = z * -y
	elif b <= 2.4e+77:
		tmp = a * (1.0 - t)
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -3.2e+161)
		tmp = Float64(y * b);
	elseif (b <= -8.2e+70)
		tmp = Float64(t * b);
	elseif (b <= -1.2e+54)
		tmp = Float64(y * b);
	elseif (b <= 1.75e-130)
		tmp = Float64(x + a);
	elseif (b <= 1.7e-97)
		tmp = Float64(z * Float64(-y));
	elseif (b <= 2.4e+77)
		tmp = Float64(a * Float64(1.0 - t));
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (b <= -3.2e+161)
		tmp = y * b;
	elseif (b <= -8.2e+70)
		tmp = t * b;
	elseif (b <= -1.2e+54)
		tmp = y * b;
	elseif (b <= 1.75e-130)
		tmp = x + a;
	elseif (b <= 1.7e-97)
		tmp = z * -y;
	elseif (b <= 2.4e+77)
		tmp = a * (1.0 - t);
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.2e+161], N[(y * b), $MachinePrecision], If[LessEqual[b, -8.2e+70], N[(t * b), $MachinePrecision], If[LessEqual[b, -1.2e+54], N[(y * b), $MachinePrecision], If[LessEqual[b, 1.75e-130], N[(x + a), $MachinePrecision], If[LessEqual[b, 1.7e-97], N[(z * (-y)), $MachinePrecision], If[LessEqual[b, 2.4e+77], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq -8.2 \cdot 10^{+70}:\\
\;\;\;\;t \cdot b\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -3.20000000000000002e161 or -8.2000000000000004e70 < b < -1.19999999999999999e54 or 2.3999999999999999e77 < b

    1. Initial program 90.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. Taylor expanded in z around 0 84.6%

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

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

    if -3.20000000000000002e161 < b < -8.2000000000000004e70

    1. Initial program 94.0%

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

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

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

    if -1.19999999999999999e54 < b < 1.75e-130

    1. Initial program 97.3%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot a} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv35.9%

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

        \[\leadsto x + \color{blue}{1} \cdot a \]
      3. *-lft-identity35.9%

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative35.9%

        \[\leadsto \color{blue}{a + x} \]
    6. Simplified35.9%

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

    if 1.75e-130 < b < 1.6999999999999999e-97

    1. Initial program 90.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. Taylor expanded in y around inf 61.6%

      \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
    3. Taylor expanded in b around 0 61.6%

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

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

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

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

    if 1.6999999999999999e-97 < b < 2.3999999999999999e77

    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. Taylor expanded in a around inf 47.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.2 \cdot 10^{+161}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -8.2 \cdot 10^{+70}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq -1.2 \cdot 10^{+54}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 1.75 \cdot 10^{-130}:\\ \;\;\;\;x + a\\ \mathbf{elif}\;b \leq 1.7 \cdot 10^{-97}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{elif}\;b \leq 2.4 \cdot 10^{+77}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 14: 61.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq -1.2 \cdot 10^{-262}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 2.2 \cdot 10^{-283}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 1.88 \cdot 10^{-93}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 8.6 \cdot 10^{+23}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.40000000000000008e54 or 8.5999999999999997e23 < b

    1. Initial program 91.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. Taylor expanded in b around inf 76.4%

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

    if -1.40000000000000008e54 < b < -1.2e-262 or 2.1999999999999998e-283 < b < 1.88000000000000001e-93

    1. Initial program 96.3%

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

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

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

    if -1.2e-262 < b < 2.1999999999999998e-283 or 1.88000000000000001e-93 < b < 8.5999999999999997e23

    1. Initial program 99.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.4 \cdot 10^{+54}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -1.2 \cdot 10^{-262}:\\ \;\;\;\;x - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{-283}:\\ \;\;\;\;x - \left(t + -1\right) \cdot a\\ \mathbf{elif}\;b \leq 1.88 \cdot 10^{-93}:\\ \;\;\;\;x - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;b \leq 8.6 \cdot 10^{+23}:\\ \;\;\;\;x - \left(t + -1\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 15: 67.2% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;b \leq 1.05 \cdot 10^{-185}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 1.6 \cdot 10^{+23}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -9.5000000000000006e53 or 1.6e23 < b

    1. Initial program 91.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. Taylor expanded in b around inf 76.4%

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

    if -9.5000000000000006e53 < b < 1.05e-185 or 5.20000000000000027e-98 < b < 1.6e23

    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. Taylor expanded in b around 0 88.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05e-185 < b < 5.20000000000000027e-98

    1. Initial program 95.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.5 \cdot 10^{+53}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq 1.05 \cdot 10^{-185}:\\ \;\;\;\;x + \left(z + \left(a - t \cdot a\right)\right)\\ \mathbf{elif}\;b \leq 5.2 \cdot 10^{-98}:\\ \;\;\;\;x - \left(y + -1\right) \cdot z\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{+23}:\\ \;\;\;\;x + \left(z + \left(a - t \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 16: 72.4% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.35000000000000005e54 or 3.9e26 < b

    1. Initial program 91.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. Taylor expanded in b around inf 76.4%

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

    if -1.35000000000000005e54 < b < -9.4999999999999994e-71

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.4999999999999994e-71 < b < 3.9e26

    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. Taylor expanded in b around 0 89.3%

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

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

        \[\leadsto x - \color{blue}{t \cdot a} \]
    5. Simplified80.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.35 \cdot 10^{+54}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{elif}\;b \leq -9.5 \cdot 10^{-71}:\\ \;\;\;\;x + \left(z + \left(a - t \cdot a\right)\right)\\ \mathbf{elif}\;b \leq 3.9 \cdot 10^{+26}:\\ \;\;\;\;x - \left(t \cdot a + \left(y + -1\right) \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b\\ \end{array} \]

Alternative 17: 81.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.4 \cdot 10^{+54} \lor \neg \left(b \leq 2.1 \cdot 10^{+97}\right):\\
\;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b - t \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.40000000000000008e54 or 2.10000000000000012e97 < b

    1. Initial program 90.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. Taylor expanded in t around inf 80.1%

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

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

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

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

    if -1.40000000000000008e54 < b < 2.10000000000000012e97

    1. Initial program 97.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.4 \cdot 10^{+54} \lor \neg \left(b \leq 2.1 \cdot 10^{+97}\right):\\ \;\;\;\;\left(\left(y + t\right) - 2\right) \cdot b - t \cdot a\\ \mathbf{else}:\\ \;\;\;\;x - \left(\left(t + -1\right) \cdot a + \left(y + -1\right) \cdot z\right)\\ \end{array} \]

Alternative 18: 45.3% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;t \leq -1.35 \cdot 10^{-143}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq -9 \cdot 10^{-275}:\\
\;\;\;\;b \cdot -2\\

\mathbf{elif}\;t \leq 2.35 \cdot 10^{+32}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.19999999999999998e90 or 2.35000000000000012e32 < t

    1. Initial program 91.3%

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

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

    if -3.19999999999999998e90 < t < -1.35000000000000005e-143 or -8.99999999999999957e-275 < t < 2.35000000000000012e32

    1. Initial program 95.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. Taylor expanded in z around inf 47.2%

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

    if -1.35000000000000005e-143 < t < -8.99999999999999957e-275

    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. Taylor expanded in b around inf 49.2%

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

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

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

        \[\leadsto \color{blue}{b \cdot -2} \]
    6. Simplified43.0%

      \[\leadsto \color{blue}{b \cdot -2} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification52.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{+90}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-143}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-275}:\\ \;\;\;\;b \cdot -2\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{+32}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 19: 33.6% accurate, 1.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.3999999999999999e161 or -1.00000000000000007e70 < b < -1.30000000000000003e54 or 2.04999999999999989e64 < b

    1. Initial program 90.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. Taylor expanded in z around 0 83.9%

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

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

    if -2.3999999999999999e161 < b < -1.00000000000000007e70

    1. Initial program 94.0%

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

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

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

    if -1.30000000000000003e54 < b < 2.04999999999999989e64

    1. Initial program 97.2%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot a} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv32.3%

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

        \[\leadsto x + \color{blue}{1} \cdot a \]
      3. *-lft-identity32.3%

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative32.3%

        \[\leadsto \color{blue}{a + x} \]
    6. Simplified32.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.4 \cdot 10^{+161}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq -1 \cdot 10^{+70}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq -1.3 \cdot 10^{+54}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{+64}:\\ \;\;\;\;x + a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 20: 16.9% accurate, 2.3× speedup?

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

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

\mathbf{elif}\;b \leq -2.8 \cdot 10^{-101}:\\
\;\;\;\;a\\

\mathbf{elif}\;b \leq 4.8 \cdot 10^{-20}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;b \cdot -2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.19999999999999999e54 or 4.79999999999999986e-20 < b

    1. Initial program 91.6%

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

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

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

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

        \[\leadsto \color{blue}{b \cdot -2} \]
    6. Simplified23.0%

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

    if -1.19999999999999999e54 < b < -2.79999999999999989e-101

    1. Initial program 95.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. Taylor expanded in a around inf 37.8%

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

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

    if -2.79999999999999989e-101 < b < 4.79999999999999986e-20

    1. Initial program 97.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.2 \cdot 10^{+54}:\\ \;\;\;\;b \cdot -2\\ \mathbf{elif}\;b \leq -2.8 \cdot 10^{-101}:\\ \;\;\;\;a\\ \mathbf{elif}\;b \leq 4.8 \cdot 10^{-20}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;b \cdot -2\\ \end{array} \]

Alternative 21: 23.3% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1660000:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;t \leq 1.42 \cdot 10^{-106}:\\
\;\;\;\;b \cdot -2\\

\mathbf{elif}\;t \leq 5.8 \cdot 10^{+67}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.66e6 or 5.80000000000000047e67 < t

    1. Initial program 90.8%

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

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

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

    if -1.66e6 < t < 1.4199999999999999e-106

    1. Initial program 97.3%

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

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

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

      \[\leadsto \color{blue}{-2 \cdot b} \]
    5. Step-by-step derivation
      1. *-commutative21.9%

        \[\leadsto \color{blue}{b \cdot -2} \]
    6. Simplified21.9%

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

    if 1.4199999999999999e-106 < t < 5.80000000000000047e67

    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. Taylor expanded in x around inf 22.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1660000:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;t \leq 1.42 \cdot 10^{-106}:\\ \;\;\;\;b \cdot -2\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+67}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t \cdot b\\ \end{array} \]

Alternative 22: 25.6% accurate, 2.3× speedup?

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

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

\mathbf{elif}\;y \leq 5.2 \cdot 10^{-303}:\\
\;\;\;\;b \cdot -2\\

\mathbf{elif}\;y \leq 2 \cdot 10^{+51}:\\
\;\;\;\;t \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.4500000000000001e-20 or 2e51 < y

    1. Initial program 89.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. Taylor expanded in z around 0 64.1%

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

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

    if -2.4500000000000001e-20 < y < 5.20000000000000009e-303

    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. Taylor expanded in b around inf 43.0%

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

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

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

        \[\leadsto \color{blue}{b \cdot -2} \]
    6. Simplified29.1%

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

    if 5.20000000000000009e-303 < y < 2e51

    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. Taylor expanded in b around inf 35.6%

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

      \[\leadsto \color{blue}{t \cdot b} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification31.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.45 \cdot 10^{-20}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{-303}:\\ \;\;\;\;b \cdot -2\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+51}:\\ \;\;\;\;t \cdot b\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 23: 34.6% accurate, 2.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+75} \lor \neg \left(z \leq 1.4 \cdot 10^{+50}\right):\\
\;\;\;\;z \cdot \left(-y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.99999999999999971e75 or 1.3999999999999999e50 < z

    1. Initial program 91.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. Taylor expanded in y around inf 44.0%

      \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
    3. Taylor expanded in b around 0 39.2%

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

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

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

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

    if -3.99999999999999971e75 < z < 1.3999999999999999e50

    1. Initial program 97.6%

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

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

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

      \[\leadsto \color{blue}{x - -1 \cdot a} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv32.8%

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

        \[\leadsto x + \color{blue}{1} \cdot a \]
      3. *-lft-identity32.8%

        \[\leadsto x + \color{blue}{a} \]
      4. +-commutative32.8%

        \[\leadsto \color{blue}{a + x} \]
    6. Simplified32.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \cdot 10^{+75} \lor \neg \left(z \leq 1.4 \cdot 10^{+50}\right):\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;x + a\\ \end{array} \]

Alternative 24: 21.4% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 1.35 \cdot 10^{+80}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.49999999999999986e122 or 1.34999999999999991e80 < x

    1. Initial program 95.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. Taylor expanded in x around inf 35.9%

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

    if -9.49999999999999986e122 < x < 1.34999999999999991e80

    1. Initial program 93.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+122}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+80}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 25: 11.3% accurate, 21.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 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. Taylor expanded in a around inf 22.9%

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

    \[\leadsto \color{blue}{a} \]
  4. Final simplification9.4%

    \[\leadsto a \]

Reproduce

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