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

Percentage Accurate: 94.9% → 97.9%
Time: 21.1s
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: 94.9% 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: 97.9% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 100.0%

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

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

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

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

Alternative 2: 97.4% accurate, 0.1× speedup?

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

\\
\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Derivation
  1. Initial program 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. Step-by-step derivation
    1. +-commutative97.2%

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

      \[\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+98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 58.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;a \leq -3.2 \cdot 10^{-78}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 2.3 \cdot 10^{-248}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.32 \cdot 10^{+150}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.0000000000000001e54 or 1.32e150 < a

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{a \cdot \left(t + -1\right)} \]
      4. distribute-rgt-in75.7%

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

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

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

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

    if -1.0000000000000001e54 < a < -3.2e-78 or -3.0999999999999999e-161 < a < 2.3e-248 or 4.0000000000000002e-184 < a < 1.32e150

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

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

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

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

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

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

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

    if -3.2e-78 < a < -3.0999999999999999e-161

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

      \[\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 z around 0 80.7%

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

    if 2.3e-248 < a < 4.0000000000000002e-184

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \cdot 10^{+54}:\\ \;\;\;\;x + \left(a - t \cdot a\right)\\ \mathbf{elif}\;a \leq -3.2 \cdot 10^{-78}:\\ \;\;\;\;\left(x + z\right) - b \cdot \left(2 - t\right)\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-161}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-248}:\\ \;\;\;\;\left(x + z\right) - b \cdot \left(2 - t\right)\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-184}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{+150}:\\ \;\;\;\;\left(x + z\right) - b \cdot \left(2 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(a - t \cdot a\right)\\ \end{array} \]

Alternative 4: 82.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq 2.7 \cdot 10^{+31}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 1.1 \cdot 10^{+149}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.09999999999999994e132 or 1.1e149 < b

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

      \[\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 z around 0 89.3%

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

    if -1.09999999999999994e132 < b < 2.69999999999999986e31 or 2.09999999999999985e131 < b < 1.1e149

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

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

    if 2.69999999999999986e31 < b < 2.09999999999999985e131

    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. Step-by-step derivation
      1. +-commutative100.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-def100.0%

        \[\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+100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.1 \cdot 10^{+132}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq 2.7 \cdot 10^{+31}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{+131}:\\ \;\;\;\;a + \left(z + \left(x + b \cdot \left(y - 2\right)\right)\right)\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{+149}:\\ \;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 5: 85.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq -1600000:\\
\;\;\;\;t_1 + t_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.0999999999999999e175

    1. Initial program 81.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 97.2%

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

    if -2.0999999999999999e175 < y < -1.6e6

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

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

    if -1.6e6 < y < 2.90000000000000017e72

    1. Initial program 99.2%

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

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

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

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

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

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

    if 2.90000000000000017e72 < y

    1. Initial program 96.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+175}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -1600000:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+72}:\\ \;\;\;\;\left(z + \left(x + b \cdot \left(t - 2\right)\right)\right) + a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + z \cdot \left(1 - y\right)\\ \end{array} \]

Alternative 6: 59.5% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;b \leq -1.65 \cdot 10^{-79}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq -9.8 \cdot 10^{-138}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 1.42 \cdot 10^{-213}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 4 \cdot 10^{-184}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;b \leq 8 \cdot 10^{+86}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.4000000000000001e117 or 8.0000000000000001e86 < b

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

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

    if -3.4000000000000001e117 < b < -1.6499999999999999e-79 or -9.80000000000000033e-138 < b < 1.42000000000000002e-213 or 4.0000000000000002e-184 < b < 8.0000000000000001e86

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

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

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

    if -1.6499999999999999e-79 < b < -9.80000000000000033e-138 or 1.42000000000000002e-213 < b < 4.0000000000000002e-184

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.4 \cdot 10^{+117}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -1.65 \cdot 10^{-79}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq -9.8 \cdot 10^{-138}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 1.42 \cdot 10^{-213}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-184}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;b \leq 8 \cdot 10^{+86}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 7: 61.2% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;b \leq -2.15 \cdot 10^{-138}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;b \leq 1.22 \cdot 10^{-144}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 2.05 \cdot 10^{-76}:\\
\;\;\;\;t_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.80000000000000008e56 or 4.20000000000000037e84 < b

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

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

    if -2.80000000000000008e56 < b < -2.15e-138 or -1.04999999999999991e-223 < b < 1.22e-144 or 2.0499999999999999e-76 < b < 4.20000000000000037e84

    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 \left(\left(x - \color{blue}{\left(y \cdot z + -1 \cdot z\right)}\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. mul-1-neg100.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.15e-138 < b < -1.04999999999999991e-223 or 1.22e-144 < b < 2.0499999999999999e-76

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.8 \cdot 10^{+56}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -2.15 \cdot 10^{-138}:\\ \;\;\;\;x + \left(a - t \cdot a\right)\\ \mathbf{elif}\;b \leq -1.05 \cdot 10^{-223}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 1.22 \cdot 10^{-144}:\\ \;\;\;\;x + \left(a - t \cdot a\right)\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{-76}:\\ \;\;\;\;x + z \cdot \left(1 - y\right)\\ \mathbf{elif}\;b \leq 4.2 \cdot 10^{+84}:\\ \;\;\;\;x + \left(a - t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\ \end{array} \]

Alternative 8: 72.6% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq 2.3 \cdot 10^{-301}:\\
\;\;\;\;t_1\\

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

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

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


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

    1. Initial program 94.9%

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

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

    if -4.6000000000000004e106 < t < 2.3000000000000002e-301 or 5.49999999999999951e-231 < t < 6.9999999999999995e48

    1. Initial program 98.5%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative98.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.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.3000000000000002e-301 < t < 5.49999999999999951e-231

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{+106}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-301}:\\ \;\;\;\;a + \left(z + \left(x + b \cdot \left(y - 2\right)\right)\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-231}:\\ \;\;\;\;\left(x + z\right) - \left(y \cdot z - a\right)\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+48}:\\ \;\;\;\;a + \left(z + \left(x + b \cdot \left(y - 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 9: 73.4% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;t \leq 1.15 \cdot 10^{-303}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 2.6 \cdot 10^{+45}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.12e17 or 2.60000000000000007e45 < t

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

    if -1.12e17 < t < 1.14999999999999998e-303 or 2.0599999999999999e-224 < t < 2.60000000000000007e45

    1. Initial program 99.1%

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

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

        \[\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+100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.14999999999999998e-303 < t < 2.0599999999999999e-224

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.12 \cdot 10^{+17}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - t \cdot a\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-303}:\\ \;\;\;\;a + \left(z + \left(x + b \cdot \left(y - 2\right)\right)\right)\\ \mathbf{elif}\;t \leq 2.06 \cdot 10^{-224}:\\ \;\;\;\;\left(x + z\right) - \left(y \cdot z - a\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+45}:\\ \;\;\;\;a + \left(z + \left(x + b \cdot \left(y - 2\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - t \cdot a\\ \end{array} \]

Alternative 10: 83.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{+87} \lor \neg \left(y \leq 6.2 \cdot 10^{+84}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.3500000000000002e87 or 6.20000000000000006e84 < y

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

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

    if -2.3500000000000002e87 < y < 6.20000000000000006e84

    1. Initial program 98.8%

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

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

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

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

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

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

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

Alternative 11: 85.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{+88} \lor \neg \left(y \leq 6.8 \cdot 10^{+69}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + z \cdot \left(1 - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.06000000000000001e88 or 6.79999999999999973e69 < y

    1. Initial program 94.6%

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

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

    if -1.06000000000000001e88 < y < 6.79999999999999973e69

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

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

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

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

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

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

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

Alternative 12: 38.5% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;a \leq 6 \cdot 10^{-184}:\\
\;\;\;\;y \cdot b\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{+24}:\\
\;\;\;\;x + z\\

\mathbf{elif}\;a \leq 3.4 \cdot 10^{+146}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;a \leq 4.6 \cdot 10^{+146}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -9.0000000000000002e-35 or 4.60000000000000001e146 < a

    1. Initial program 97.1%

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

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

    if -9.0000000000000002e-35 < a < 1.4999999999999999e-239 or 5.99999999999999982e-184 < a < 4.50000000000000019e24

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{z} \]
    6. Simplified38.5%

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

    if 1.4999999999999999e-239 < a < 5.99999999999999982e-184

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

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

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

    if 4.50000000000000019e24 < a < 3.39999999999999991e146

    1. Initial program 95.2%

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

      \[\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 t around inf 44.0%

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

    if 3.39999999999999991e146 < a < 4.60000000000000001e146

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9 \cdot 10^{-35}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-239}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 6 \cdot 10^{-184}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+24}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+146}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;a \leq 4.6 \cdot 10^{+146}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \end{array} \]

Alternative 13: 46.5% accurate, 1.2× speedup?

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

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

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

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

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

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

\mathbf{elif}\;t \leq 9200000000000:\\
\;\;\;\;x + z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.6e16 or 9.2e12 < t

    1. Initial program 95.2%

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

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

    if -6.6e16 < t < -1.5999999999999999e-95 or -9.50000000000000063e-188 < t < 1.49999999999999995e-50 or 1.7e5 < t < 9.2e12

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

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

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

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

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

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

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

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

    if -1.5999999999999999e-95 < t < -9.50000000000000063e-188 or 1.49999999999999995e-50 < t < 1.7e5

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{+16}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-95}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{-188}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-50}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t \leq 170000:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 9200000000000:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 14: 49.1% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq -4.1 \cdot 10^{+14}:\\
\;\;\;\;t_1\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.19999999999999991e87 or 2.3499999999999999e70 < y

    1. Initial program 94.6%

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

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

    if -1.19999999999999991e87 < y < -4.1e14 or -1.02000000000000001e-20 < y < -1.8999999999999999e-70

    1. Initial program 97.1%

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

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

    if -4.1e14 < y < -1.02000000000000001e-20 or -1.8999999999999999e-70 < y < 8.19999999999999972e-224

    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 a around 0 74.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 b around 0 52.9%

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

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

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

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

        \[\leadsto x + \color{blue}{z} \]
    6. Simplified51.3%

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

    if 8.19999999999999972e-224 < y < 2.3499999999999999e70

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+87}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;y \leq -4.1 \cdot 10^{+14}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-20}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq -1.9 \cdot 10^{-70}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-224}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.35 \cdot 10^{+70}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \end{array} \]

Alternative 15: 71.4% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;b \leq -2.55 \cdot 10^{+38} \lor \neg \left(b \leq 9.5 \cdot 10^{+45}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -8.4999999999999998e56 or -3.5000000000000001e43 < b < -2.5500000000000001e38 or 9.4999999999999998e45 < b

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

      \[\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 z around 0 75.8%

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

    if -8.4999999999999998e56 < b < -3.5000000000000001e43

    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 \left(\left(x - \color{blue}{\left(y \cdot z + -1 \cdot z\right)}\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    3. Step-by-step derivation
      1. mul-1-neg100.0%

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

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

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

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

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

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

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

    if -2.5500000000000001e38 < b < 9.4999999999999998e45

    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. Step-by-step derivation
      1. +-commutative100.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-def100.0%

        \[\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+100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8.5 \cdot 10^{+56}:\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{elif}\;b \leq -3.5 \cdot 10^{+43}:\\ \;\;\;\;\left(x + z\right) - \left(y \cdot z - a\right)\\ \mathbf{elif}\;b \leq -2.55 \cdot 10^{+38} \lor \neg \left(b \leq 9.5 \cdot 10^{+45}\right):\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + \left(z + a\right)\right) - t \cdot a\\ \end{array} \]

Alternative 16: 57.9% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a \leq 1.7 \cdot 10^{-247}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 8.2 \cdot 10^{+152}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.1799999999999999e54 or 8.1999999999999996e152 < a

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{a \cdot \left(t + -1\right)} \]
      4. distribute-rgt-in75.7%

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

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

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

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

    if -1.1799999999999999e54 < a < 1.7000000000000001e-247 or 4.0000000000000002e-184 < a < 8.1999999999999996e152

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

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

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

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

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

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

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

    if 1.7000000000000001e-247 < a < 4.0000000000000002e-184

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.18 \cdot 10^{+54}:\\ \;\;\;\;x + \left(a - t \cdot a\right)\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-247}:\\ \;\;\;\;\left(x + z\right) - b \cdot \left(2 - t\right)\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-184}:\\ \;\;\;\;y \cdot \left(b - z\right)\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{+152}:\\ \;\;\;\;\left(x + z\right) - b \cdot \left(2 - t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(a - t \cdot a\right)\\ \end{array} \]

Alternative 17: 33.2% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;y \leq -3.2 \cdot 10^{+19}:\\
\;\;\;\;t_1\\

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

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

\mathbf{elif}\;y \leq 1.7 \cdot 10^{+84}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.19999999999999991e87 or 1.6999999999999999e84 < y

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

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

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

    if -1.19999999999999991e87 < y < -3.2e19 or 3.50000000000000024e-222 < y < 1.6999999999999999e84

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

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

    if -3.2e19 < y < -4e12

    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 a around 0 100.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 t around inf 66.7%

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

    if -4e12 < y < 3.50000000000000024e-222

    1. Initial program 98.8%

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

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

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

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

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

        \[\leadsto x + \color{blue}{z} \]
    6. Simplified47.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+87}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -3.2 \cdot 10^{+19}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{elif}\;y \leq -4000000000000:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-222}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 1.7 \cdot 10^{+84}:\\ \;\;\;\;t \cdot \left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 18: 47.2% 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 -7.2 \cdot 10^{+15}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-66}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+31}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+42}:\\ \;\;\;\;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 -7.2e+15)
     t_2
     (if (<= t 9.5e-66)
       t_1
       (if (<= t 3.6e+31) (* a (- 1.0 t)) (if (<= t 4.2e+42) 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 <= -7.2e+15) {
		tmp = t_2;
	} else if (t <= 9.5e-66) {
		tmp = t_1;
	} else if (t <= 3.6e+31) {
		tmp = a * (1.0 - t);
	} else if (t <= 4.2e+42) {
		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 <= (-7.2d+15)) then
        tmp = t_2
    else if (t <= 9.5d-66) then
        tmp = t_1
    else if (t <= 3.6d+31) then
        tmp = a * (1.0d0 - t)
    else if (t <= 4.2d+42) 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 <= -7.2e+15) {
		tmp = t_2;
	} else if (t <= 9.5e-66) {
		tmp = t_1;
	} else if (t <= 3.6e+31) {
		tmp = a * (1.0 - t);
	} else if (t <= 4.2e+42) {
		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 <= -7.2e+15:
		tmp = t_2
	elif t <= 9.5e-66:
		tmp = t_1
	elif t <= 3.6e+31:
		tmp = a * (1.0 - t)
	elif t <= 4.2e+42:
		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 <= -7.2e+15)
		tmp = t_2;
	elseif (t <= 9.5e-66)
		tmp = t_1;
	elseif (t <= 3.6e+31)
		tmp = Float64(a * Float64(1.0 - t));
	elseif (t <= 4.2e+42)
		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 <= -7.2e+15)
		tmp = t_2;
	elseif (t <= 9.5e-66)
		tmp = t_1;
	elseif (t <= 3.6e+31)
		tmp = a * (1.0 - t);
	elseif (t <= 4.2e+42)
		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, -7.2e+15], t$95$2, If[LessEqual[t, 9.5e-66], t$95$1, If[LessEqual[t, 3.6e+31], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e+42], 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 -7.2 \cdot 10^{+15}:\\
\;\;\;\;t_2\\

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

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{+42}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.2e15 or 4.19999999999999991e42 < t

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

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

    if -7.2e15 < t < 9.5000000000000004e-66 or 3.59999999999999996e31 < t < 4.19999999999999991e42

    1. Initial program 99.1%

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

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

    if 9.5000000000000004e-66 < t < 3.59999999999999996e31

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+15}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{-66}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+31}:\\ \;\;\;\;a \cdot \left(1 - t\right)\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+42}:\\ \;\;\;\;z \cdot \left(1 - y\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(b - a\right)\\ \end{array} \]

Alternative 19: 71.5% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.8999999999999999e38 or 4e46 < b

    1. Initial program 94.0%

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

      \[\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 z around 0 72.7%

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

    if -1.8999999999999999e38 < b < 4e46

    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. Step-by-step derivation
      1. +-commutative100.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-def100.0%

        \[\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+100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.9 \cdot 10^{+38} \lor \neg \left(b \leq 4 \cdot 10^{+46}\right):\\ \;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + \left(z + a\right)\right) - t \cdot a\\ \end{array} \]

Alternative 20: 21.0% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{+198}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -3.8 \cdot 10^{+24}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;x \leq -3.85 \cdot 10^{-236}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 4.7 \cdot 10^{-230}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 10^{+35}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= x -4e+198)
   x
   (if (<= x -3.8e+24)
     (* t b)
     (if (<= x -3.85e-236) z (if (<= x 4.7e-230) a (if (<= x 1e+35) z x))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (x <= -4e+198) {
		tmp = x;
	} else if (x <= -3.8e+24) {
		tmp = t * b;
	} else if (x <= -3.85e-236) {
		tmp = z;
	} else if (x <= 4.7e-230) {
		tmp = a;
	} else if (x <= 1e+35) {
		tmp = z;
	} 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 <= (-4d+198)) then
        tmp = x
    else if (x <= (-3.8d+24)) then
        tmp = t * b
    else if (x <= (-3.85d-236)) then
        tmp = z
    else if (x <= 4.7d-230) then
        tmp = a
    else if (x <= 1d+35) then
        tmp = z
    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 <= -4e+198) {
		tmp = x;
	} else if (x <= -3.8e+24) {
		tmp = t * b;
	} else if (x <= -3.85e-236) {
		tmp = z;
	} else if (x <= 4.7e-230) {
		tmp = a;
	} else if (x <= 1e+35) {
		tmp = z;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if x <= -4e+198:
		tmp = x
	elif x <= -3.8e+24:
		tmp = t * b
	elif x <= -3.85e-236:
		tmp = z
	elif x <= 4.7e-230:
		tmp = a
	elif x <= 1e+35:
		tmp = z
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (x <= -4e+198)
		tmp = x;
	elseif (x <= -3.8e+24)
		tmp = Float64(t * b);
	elseif (x <= -3.85e-236)
		tmp = z;
	elseif (x <= 4.7e-230)
		tmp = a;
	elseif (x <= 1e+35)
		tmp = z;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (x <= -4e+198)
		tmp = x;
	elseif (x <= -3.8e+24)
		tmp = t * b;
	elseif (x <= -3.85e-236)
		tmp = z;
	elseif (x <= 4.7e-230)
		tmp = a;
	elseif (x <= 1e+35)
		tmp = z;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4e+198], x, If[LessEqual[x, -3.8e+24], N[(t * b), $MachinePrecision], If[LessEqual[x, -3.85e-236], z, If[LessEqual[x, 4.7e-230], a, If[LessEqual[x, 1e+35], z, x]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x \leq -3.85 \cdot 10^{-236}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 4.7 \cdot 10^{-230}:\\
\;\;\;\;a\\

\mathbf{elif}\;x \leq 10^{+35}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -4.00000000000000007e198 or 9.9999999999999997e34 < x

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

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

    if -4.00000000000000007e198 < x < -3.80000000000000015e24

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

      \[\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 t around inf 33.3%

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

    if -3.80000000000000015e24 < x < -3.85e-236 or 4.7e-230 < x < 9.9999999999999997e34

    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. Step-by-step derivation
      1. +-commutative96.3%

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

        \[\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+98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.85e-236 < x < 4.7e-230

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4 \cdot 10^{+198}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -3.8 \cdot 10^{+24}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;x \leq -3.85 \cdot 10^{-236}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 4.7 \cdot 10^{-230}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 10^{+35}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 21: 25.5% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.32 \cdot 10^{+51}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -9.6 \cdot 10^{-95}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{-207}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+25}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -1.32e+51)
   (* y b)
   (if (<= y -9.6e-95)
     (* t b)
     (if (<= y 1.22e-207) z (if (<= y 2.5e+25) a (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.32e+51) {
		tmp = y * b;
	} else if (y <= -9.6e-95) {
		tmp = t * b;
	} else if (y <= 1.22e-207) {
		tmp = z;
	} else if (y <= 2.5e+25) {
		tmp = 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 (y <= (-1.32d+51)) then
        tmp = y * b
    else if (y <= (-9.6d-95)) then
        tmp = t * b
    else if (y <= 1.22d-207) then
        tmp = z
    else if (y <= 2.5d+25) then
        tmp = 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 (y <= -1.32e+51) {
		tmp = y * b;
	} else if (y <= -9.6e-95) {
		tmp = t * b;
	} else if (y <= 1.22e-207) {
		tmp = z;
	} else if (y <= 2.5e+25) {
		tmp = a;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -1.32e+51:
		tmp = y * b
	elif y <= -9.6e-95:
		tmp = t * b
	elif y <= 1.22e-207:
		tmp = z
	elif y <= 2.5e+25:
		tmp = a
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -1.32e+51)
		tmp = Float64(y * b);
	elseif (y <= -9.6e-95)
		tmp = Float64(t * b);
	elseif (y <= 1.22e-207)
		tmp = z;
	elseif (y <= 2.5e+25)
		tmp = a;
	else
		tmp = Float64(y * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -1.32e+51)
		tmp = y * b;
	elseif (y <= -9.6e-95)
		tmp = t * b;
	elseif (y <= 1.22e-207)
		tmp = z;
	elseif (y <= 2.5e+25)
		tmp = a;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.32e+51], N[(y * b), $MachinePrecision], If[LessEqual[y, -9.6e-95], N[(t * b), $MachinePrecision], If[LessEqual[y, 1.22e-207], z, If[LessEqual[y, 2.5e+25], a, N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -9.6 \cdot 10^{-95}:\\
\;\;\;\;t \cdot b\\

\mathbf{elif}\;y \leq 1.22 \cdot 10^{-207}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{+25}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.32e51 or 2.50000000000000012e25 < y

    1. Initial program 95.3%

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

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

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

    if -1.32e51 < y < -9.6e-95

    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. Taylor expanded in a around 0 69.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 t around inf 29.2%

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

    if -9.6e-95 < y < 1.22e-207

    1. Initial program 98.5%

      \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b \]
    2. Step-by-step derivation
      1. +-commutative98.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-def100.0%

        \[\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+100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.22e-207 < y < 2.50000000000000012e25

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.32 \cdot 10^{+51}:\\ \;\;\;\;y \cdot b\\ \mathbf{elif}\;y \leq -9.6 \cdot 10^{-95}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{-207}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+25}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 22: 20.8% accurate, 2.3× speedup?

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

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

\mathbf{elif}\;x \leq -1.1 \cdot 10^{-239}:\\
\;\;\;\;z\\

\mathbf{elif}\;x \leq 2.5 \cdot 10^{-229}:\\
\;\;\;\;a\\

\mathbf{elif}\;x \leq 1.12 \cdot 10^{+35}:\\
\;\;\;\;z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.55e129 or 1.12000000000000003e35 < x

    1. Initial program 96.8%

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

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

    if -1.55e129 < x < -1.09999999999999991e-239 or 2.50000000000000008e-229 < x < 1.12000000000000003e35

    1. Initial program 96.9%

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

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

        \[\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+98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.09999999999999991e-239 < x < 2.50000000000000008e-229

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.55 \cdot 10^{+129}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -1.1 \cdot 10^{-239}:\\ \;\;\;\;z\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{-229}:\\ \;\;\;\;a\\ \mathbf{elif}\;x \leq 1.12 \cdot 10^{+35}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 23: 33.0% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+87}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{+108}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -3.5e+87) (* t b) (if (<= b 2.05e+108) (+ x z) (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -3.5e+87) {
		tmp = t * b;
	} else if (b <= 2.05e+108) {
		tmp = x + z;
	} else {
		tmp = y * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (b <= (-3.5d+87)) then
        tmp = t * b
    else if (b <= 2.05d+108) then
        tmp = x + z
    else
        tmp = y * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -3.5e+87) {
		tmp = t * b;
	} else if (b <= 2.05e+108) {
		tmp = x + z;
	} else {
		tmp = y * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -3.5e+87:
		tmp = t * b
	elif b <= 2.05e+108:
		tmp = x + z
	else:
		tmp = y * b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -3.5e+87)
		tmp = Float64(t * b);
	elseif (b <= 2.05e+108)
		tmp = Float64(x + z);
	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.5e+87)
		tmp = t * b;
	elseif (b <= 2.05e+108)
		tmp = x + z;
	else
		tmp = y * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.5e+87], N[(t * b), $MachinePrecision], If[LessEqual[b, 2.05e+108], N[(x + z), $MachinePrecision], N[(y * b), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;b \leq 2.05 \cdot 10^{+108}:\\
\;\;\;\;x + z\\

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


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

    1. Initial program 92.6%

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

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

    if -3.49999999999999986e87 < b < 2.05e108

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{z} \]
    6. Simplified33.8%

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

    if 2.05e108 < b

    1. Initial program 92.5%

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

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

      \[\leadsto \color{blue}{y \cdot b} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification36.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+87}:\\ \;\;\;\;t \cdot b\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{+108}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;y \cdot b\\ \end{array} \]

Alternative 24: 20.8% accurate, 4.1× speedup?

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

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

\mathbf{elif}\;x \leq 1.45 \cdot 10^{+34}:\\
\;\;\;\;a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.79999999999999972e66 or 1.4500000000000001e34 < x

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

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

    if -5.79999999999999972e66 < x < 1.4500000000000001e34

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.8 \cdot 10^{+66}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{+34}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 25: 10.8% accurate, 21.0× speedup?

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

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

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

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

    \[\leadsto a \]

Reproduce

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